Function list

Here you can find the available functions within the RPC, which make it possible to execute API requests. More information concerning API requests can be found here: https://support.bluebillywig.com/vms-api-guide

3.1 doAction

Execute API request/action and return the result as an array.

Array doAction(String entity, String action, Map properties)

entity: The relevant api entity that you want to query to obtain the desired result. For example mediaclip, mediacliplist, publication or playout.

action: The action you want to execute. The actions differ per entity, see the API documentation for details. For example for the mediaclip entity possible actions are get, put or getUsageStats.

properties: This array will contain required or optional properties needed for the specific request. For example for the action put of the entity mediaclip you'll need to provide at least the property xml, see the example below.

Here an example to update a mediaclip:

VmsRpc vmsRpc = new VmsRpc("http://<publication>.bbvms.com","<username>","<password>");

String xml = "<media-clip id=\"1234567\" status=\"draft\"></media-clip>";

Map<String,String> properties = new HashMap<String,String>();
//Set the status to draft
properties.put("xml",xml);

vmsRpc.doAction("mediaclip","put",properties);

And an example to add a new mediaclip including a video-file:

VmsRpc vmsRpc = new VmsRpc("http://<publication>.bbvms.com","<username>","<password>");

String xml = "<media-clip title=\"Some title\" usetype=\"editorial\" status=\"published\">";
Map<String,String> properties = new HashMap<String,String>();
properties.put("xml",xml);
properties.put("Filedata","@/tmp/a_video_file.mp4");

vmsRpc.doAction("mediaclip","put",properties);

3.2 JSON

Execute API request/action and return the result in JSON format. At this moment it's only possible to get results in JSON format for get and search actions on mediaclips, timelines, widgets and zones.

String json(String entity)

String json(String entity, int objectId, Map properties)

entity: The relevant api entity that you want to query to obtain the desired result. For example mediaclip, mediacliplist, publication or playout.

objectId: (optional) The id of a certain entity, for example the mediaclipid. If objectId is set the action will become get.

properties: (optional) This array contains required or optional properties needed for the specific request.

Below an example to search for a couple of mediaclips.

VmsRpc vmsRpc = new VmsRpc("http://<publication>.bbvms.com","<username>","<password>");

Map<String,String> properties = new HashMap<String,String>();
properties.put("query","type:mediaclip AND status:published");
properties.put("limit","10");
properties.put("sort","createddate desc");

String json = vmsRpc.json( "search", null, properties );

3.3 XML

Execute API request/action and return the result in XML format.

String xml(String entity)

String xml(String entity, int objectId, Map properties)

entity: The relevant api entity that you want to query to obtain the desired result. For example mediaclip, mediacliplist, publication or playout.

objectId: (optional) The id of a certain entity, for example the mediaclipid. If objectId is set the action will become get.

properties: (optional) This array contains required or optional properties needed for the specific request. If not set the default action will become get.

Below an example to get global configurations of a publication.

VmsRpc vmsRpc = new VmsRpc("http://<publication>.bbvms.com","<username>","<password>");

String xml = vmsRpc.xml( "publication" );

3.4 URI

Execute an API request/action and send all properties for the specific request on the query string. This may be useful whether multiple properties with the same key need to be provided, which could be the case for Solr requests.

String uri(String apiEntityUrl)

String uri(String apiEntityUrl, String qs)

apiEntityUrl: The relevant api entity that you want to query to obtain the desired result. For example json/mediaclip or json/qstats.

qs: (optional) The Query String to be send with the request.

Below an example to get the mainconfig.xml, which contains configuration of your publication such as asset-paths.

VmsRpc vmsRpc = new VmsRpc("http://<publication>.bbvms.com","<username>","<password>");

String mainconfigXml = vmsRpc.uri("","mainconfig.xml");