All requests will respond with, at the least, an Integer value for success. This value is either 1 or 0 to represent if the request was processed correctly or not. All requests will also return a String value for error and warnings. This will most likely be blank if you have a success value of 1. However, it is possible to have warnings if your uploaded data, for example, had to be truncated to the appropriate length.
Many responses will be within an array titled medias. In those cases, if you are expecting only one result, you can simply read the first object from that array. However, you should always check to make sure there is only one result when performing a query that could have multiple results rather than simply assume a single result. Exceptions to this are update, deactivate and activate, which return a single Media Object called media.
All functions of the API work exclusively with the Media Object. The purpose of the Media Object is to be a placeholder for an original piece of media uploaded to WellcomeMat, and to link to the appropriately encoded images and videos for that file. The encoded images/videos are linked through an attached Image Object and Video Object. When querying for media, you will always be returned a full description of the Media Object, meaning that it will also include all of the details for the Image Object and Video Object that are attached to that Media Object. If they do not exist, you will simply be returned null values for the Image Object and/or Video Object.
Please note that all return objects are, at their root, a success value, error string, warnings string, and an array of medias.
JSON variable name
The unique identifier for this media
The unique identifier for this media in the old WellcomeMat, if it originated there.
How the video was uploaded into the site. You will only need this if you know what it is.
Traffic Generation Override
Traffic override to point all viewers to a webpage where you have embedded your video.
The timestamp that this video was created
The timestamp that this video was last replaced
The timestamp at which any associated data was updated