How to use the APIs as provided by Director?

<< Back to Knowledge Search



I am Using the Director Application Programming Interface ( API) reference PDF guide, but I still can't get my XML file to work.

Can you give me an example of how to populate streaming video content, using this set of A.P.I.s?


The Director APIs enable you to execute jobs using properly structured Extensible Markup Language (XML) files securely posted to a Director servlet. The parameter values you supply in the XML files follow the same rules and conventions as command line interface commands (sometimes referred to as CLI).

The following rules should be followed when using the Direcor API.

  • The XML file that executes the API must be structured as discussed in this document- More instructions can be found in the API CMG GUIDE.  
  • Blue Coat highly recommends you implement a parser—such as Simple APIfor XML (SAX) or Document Object Model ( DOM) . However, Blue Coat does not recommend a particular parser.
  • Do not use special characters in job IDs.
  • The following characters are not allowed and will result in errors if you attempt to execute jobs: +, _, ., -, $, %, &,#, and so o
  • You can name this XML file anything you want.
  • The XML must be posted to one of the following URLs:
SG CLIhttps://director_host-or-ip:8082/servlet/SGCommandServlet
Content Filiteringhttps://director_host-or-ip:8082/servlet/PushPloicyServlet
Content Queryhttps://director_host-or-ip:8082/servlet/ContentQueryServlet



1: How use the the API set to populate streaming video.

In this example, we are going to use the “Poster” Firefox plug-in with Firefox 5.0. It can create HTTP Post request and post it to the specified URL, The same thing can be done programmatically in different languages. Firefox “Poster” plug-in is available at FF POSTER:

In the below XML file, we are logging in with the mentioned credentials to the Director and sending two manifest URLs of the smooth streaming videos, called BigBuckBunny and ElephantsDream that want cached by the SGs. The Target is a group of SG appliances is  called “SGVAs”.  This is a custom group that was created using the Director Management Console ( DMC)  in advance.

<?xml version="1.0" encoding="UTF-8"?>
 <configurationlock force="true"></configurationlock>
 <smoothstreamingcontent name="sscnt1">
 <target type="group">

Follow these steps to post this to the DIrector appliance, for Distribution:

  • Launch Firefox, and ensure that 'Poster' is installed.  If you have not yet installed this plugin, please follow the above link, and do so now.
  • Select the “Tools” menu and Click on the “Poster” menu item.
  • You should see a screen such as this one below.


  • Copy and paste the above XML ( or the one you are using)  to the text area presented in the “Content to Send” tab
  • Enter your own API URL in the “URL” text box of the Request panel as shown in above image.
  • Click on the post button.

Result: This will send the XML to the API,and  the manifest files will be parsed and a bunch of URLs are produced. This URL list is then pushed to the targeted SGs.

Response from Director:

  • If the XML file is acepted by Director, you should see this response from Director.

  • This response contains the Command ID, as highlighted above, and the generated URLs count each manifest URL and the status of the URL List creation. Using the command id we can query the status of pushing URL List execution (means status of pushing URLs to SGs). This is discussed later in this document.
  • If the response declares the status a failure, you will see a screenshot such as this one:



How to query for the status of a URL list execution:

To check on how many SGS now contain this content, follow these steps:

  • Launch Firefox, and ensure that 'Poster' is installed.  If you have not yet installed this plugin, please follow the above link, and do so now.
  • Select the “Tools” menu and Click on the “Poster” menu item.
  • As you did above, cut and paste the below XML file into the "Content to send" window.

<?xml version="1.0" encoding="UTF-8"?>
 <Content_Query type="summary">

  • Note we have used the comand id of 1312278187977077, but yours will be different, as will the username and password.
  • Enter your own API URL in the “URL” text box of the Request panel.
  • Your screen should look something like the one below, now.


  • Click on the post button, and you will see a response like the one below.

  • The above output shows you how many commands were issued for device number 36-69 - 2361- and how many were succesfull- 2304- with none failing.  We have a total of 57 pending requests.

Links to other relevant articles:

More instructions for Director the director API can be found in the API CMG GUIDE

For a detailied list of CLI commands avaialble to the Director appliance, see 000014637

For a detailed explanation of how to take a backup, and send a profile, or overlay file to your SG, see 000010276

Additional Information
Bug Number
InQuira Doc IdKB4772

Article Feedback

Hide Properties
First Published      10/01/2014
Last Modified      10/01/2014
Last Published      10/01/2014
Article Audience
Product      Director-510
Software      Director 5.5
Article Number      000011527
Was this helpful?
Previous MonthNext Month