Access and update your content remotely with the VISUALPLANT Web Services API.
To create titles with the VP API you need an understanding of the
W3C SOAP protocol
and an environment capable of processing SOAP requests. You will also need a VP account. During
set-up our team prepares a transcoding profile with recipes (output formats) according to your needs.
Root VP SOAP URL:
http://webservices.visualplant.net/soap/EncodingServer.php
WSDL:
http://webservicesstaging.visualplant.net/soap/EncodingServer.php?wsdl
Overview and process:
1. To create a new title, begin by calling CreateTitleID(). Declare your publisher name
(Publisher) and Passkey (Passkey) and do so on all subsequent API calls.
The response will populate TitleID from VPSoapMetaData.
2. Next, you can call AssociateMetaData() with the TitleID from step 1 to populate the title with
the optional metadata: Title , Description , Tags , ReleaseDate and UserID.
3. Then, call GetUploadLocation(). The response will populate UploadServer ,
UploadType , UploadUsername and UploadPassword from VPSoapUpload. Declare a
NotificationURL only if you need to override the one established during set-up.
4. Now, use SubmitRequest() to add the title to the transcoding queue.
Upload your source file (video, audio or image file) according to UploadServer and UploadType (S3 or FTP).
5. For each format processed, the VP API will send notifications to your notification URL (NotificationURL),
in order of priority. The most important formats will be encoded and notified first—which is useful
to allow your users to share uploads quickly while less-used formats finish encoding in the background.
List structure:
| Function |
Description |
Parameter |
Elements |
Response |
| CreateTitleID() |
Returns the Title ID for the title to be created. |
VPSoapEncodingServer |
Required:
Publisher
Passkey
|
VPSoapMetaData |
| AssociateMetaData() |
Adds optional metadata for the title. |
VPSoapMetaData |
Required:
Publisher
Passkey
TitleID
Optional:
Title
Description
Tags
ReleaseDate
UserID
|
VPSoapServerObj |
| GetUploadLocation() |
Returns the type, location and credentials to upload the source file. |
VPSoapServerObj |
Required:
Publisher
Passkey
Optional or automatic:
PassThrough
NotificationURL
Message
|
VPSoapServerResponse |
| SubmitRequest() |
Returns Job IDs and starts the encoding process. |
VPSoapServerObj |
Required:
Publisher
Passkey
Optional or automatic:
InputUser
InputPass
OutputFileURL
OutputUser
OutputPass
OutputThumbPrefix
OutputThumbSuffix
PassThrough
NotificationURL
JobID
Message
UploadMethod |
VPSoapServerObj |
| GetJobStatus() |
Returns the status of a transcoding job. |
VPSoapMetaDeta |
Required:
Publisher
Passkey
JobID
|
VPSoapServerObj |
Element descriptions:
Publisher
The name of the publisher, e.g., your company or product name. Required in each API request.
Passkey
Your passkey for access to the API. Required in each API request.
InputFileURL
Where to upload the file (e.g. s3://bucketname/path.). Assigned by the API.
NotificationURL
The URL to your script to receive responses/notifications from the API. Populated by the API with option to overwrite.
JobID
The unique id to identify the transcoding job. Assigned by the API.
TitleID
The unique id to identify the title. Assigned by the API.
UserID
The unique id to identify the user who uploaded the title. Assigned by the API when using VISUALPLANT's user system.
Optionally, you may use the field to assign a UserID from your own user system.
Title
A name or headline to describe the title.
Description
A complete description for the title.
OutputFileURL
The destination for encoded files after processing. Populated by the API.
OutputUser
The username to access the destination for encoded files after processing. Populated by the API.
OutputPass
The password to access the destination for encoded files after processing. Populated by the API.
OutputThumbPrefix
Optional prefix for thumbnail image files. Populated by the API.
OutputThumbSuffix
Optional suffix for thumbnail image files. Populated by the API.
PassThrough
Optional passthrough string for client use.
Message
Communicates messages from the API, such as errors. Populated by the API.
To view and manage titles with the VP API you need an understanding of
RESTful Web Services.
"GET" requests return a maximum of 10 titles per page,
unless you specify a different value for
max-results in your query.
For pagination, specify
start-index in your query (default start value is "0").
See an
example query with results and pagination.
Replace italicized variables in each request below with your info.
XML output contains complete metadata and is typically used to populate pages with lists, thumbnails and to
show credits, comments, ratings, tags, etc for a title. XSPF output is suited for playback of playlists
in the Web player. You may change "XML" to "XSPF" on services below marked with "(XSPF available)".
Show Latest titles: (XSPF available)
http://webservices.visualplant.net/Core/Search/XML/passkey/Category/Latest
Show titles in a category: (XSPF available)
http://webservices.visualplant.net/Core/Search/XML/passkey/Category/category name
Search titles: (XSPF available)
http://webservices.visualplant.net/Core/Search/XML/passkey/All/search term
Search titles in a category: (XSPF available)
http://webservices.visualplant.net/Core/Search/XML/passkey/Category/category name/search term
Search titles matching all credits: (XSPF available)
http://webservices.visualplant.net/Core/Search/XML/passkey/Credit/All/credit value
Search titles matching a single credit: (XSPF available)
http://webservices.visualplant.net/Core/Search/XML/passkey/Credit/credit title/credit value
Show top 100 most viewed titles: (XSPF available)
http://webservices.visualplant.net/Core/TopWork/XML/passkey/Top100/yyyy-mm-dd
Show top 20 most e-mailed titles: (XSPF available)
http://webservices.visualplant.net/Core/TopWork/XML/passkey/MostEmailed/yyyy-mm-dd
Search titles owned by a user:
http://webservices.visualplant.net/Core/Search/XML/passkey/User/username/search term
Show user titles:
http://webservices.visualplant.net/Core/UserTitles/XML/passkey/username
Show user favorites:
http://webservices.visualplant.net/Core/UserFavorites/XML/passkey/username
Show if title/playlist is a user favorite: (is_favorite = 1 means title id is a favorite)
http://webservices.visualplant.net/Core/UserFavorites/XML/passkey/unique user id/isFav/unique title id
Show user friends:
http://webservices.visualplant.net/Core/UserFriends/XML/passkey/username
Show a title: (XSPF available)
http://webservices.visualplant.net/Core/Title/XML/passkey/unique title id
Show credits for a title:
http://webservices.visualplant.net/Core/Credits/XML/passkey/unique title id
Show comments for a title:
http://webservices.visualplant.net/Core/Comments/XML/passkey/unique title id
Show titles in a playlist: (XSPF available)
http://webservices.visualplant.net/Core/Search/XML/passkey/Playlist/playlist name
Generate Google Sitemap of your media library: (up to 50,000 returned in this request)
http://webservices.visualplant.net/Core/Search/XML/passkey/Sitemap?max-results=50000&start-index=0
Use this PHP file to request the sitemap webservice and generate a gzipped file on your web server:
sitemap.zip
Results and Pagination (max-results and start-index)
http://webservices.visualplant.net/Core/Search/XML/passkey/Category/category name?max-results=10&start-index=0
Example PUT requests, including inserts, updates and deletes. (Note: These services are case-sensitive. It needs to be "Insert" with a capital "I" and "Delete" with a capital "D" if written, or the cache will not overwrite with new data.)
Insert e-mail-a-friend (for e-mail-a-friend stats):
http://webservices.visualplant.net/Core/Insert/XML/passkey/Top_Work/unique title id
Insert user favorites (for titles and playlists):
http://webservices.visualplant.net/Core/Insert/XML/passkey/User_Favs/unique user id/unique title id
Delete user favorites (for titles and playlists):
http://webservices.visualplant.net/Core/Delete/XML/passkey/User_Favs/unique user id/unique title id
Insert a title impression (for viewership stats):
http://webservices.visualplant.net/Core/PUT/XML/passkey/impression/insert/unique title id/session variable/track number
Additional PUT requests (e.g., edit title, description, delete, etc., will be provided with documentation to all clients.)
As with any Web site that displays dynamic content, we strongly urge the use of page-caching on your site to
ensure good performance and reliability for your users. Although the VISUALPLANT API is built to accomodate
many thousands of requests per second, we cannot control network-related issues. Page-caching will reduce the
chances of a failed connection between your application and VISUALPLANT and improve load times. If you would
like to use the
VISUALPLANT Venue™ micro-site builder templates for PHP or .NET which incorporate page-caching out-of-the-box,
read here.