Content Segment

What is a Content Segment?

A Content Segment supports the provision of content items that can be rendered by a display. This includes aspects such as content creation; content hosting; and logic for complex, perhaps interactive, display applications.

Overview

The Content Segment API provides 1 resource with 1 method:

Application Scheduling
POST /schedule Request that an application attempts to schedule itself onto the specified display.

Each endpoint supports JSON as both the request and response format. XML formatted requests and responses are not supported.

Application Scheduling

This resource provides one method:

Request application scheduling

POST /schedule Request that an application attempts to schedule itself onto the specified display.

POST parameters

application-params required A JSON object containing zero or more “parameter name” : “parameter value” pairs to be read by the application.
display-uri required A string containing a URI that uniquely identifies a display.
preferred-duration optional An string value describing the amount of time that the caller considers the optimum duration for the content.
requestor required A JSON object providing information about the caller.

Request Headers

None specified.

Response

Possible response status codes:

  • 400 – Bad request. The application could not understand the request.
  • 202 – Accepted. The application has accepted the request and will make a scheduling request to the specified display.
  • 504 – Gateway timeout. The application could not contact the specified display.
Response fields:
request-status string A string message that describes the state of the request. Possible values:

  • “rejected” — the request was not accepted
  • “failed” — the request could not be forwarded
  • “forwarded” — the request has been forwarded to the specified display

 

Examples

request

User-Agent: Tacita/1.0
Date: Tue, 15 Jun 2013 08:12:31 GMT
Content-Type: application/json
Accept: application/json
{
    "application-params" : {
        "vm-uri": "ubuntu1004_desktop_kvm"
    },
    "display-uri" : "demo.cmu.display.1",
    "preferred-duration" : "10 seconds",
    "requestor" : {
        "device-id" : "laptop",
        "user-id" : "isrserver"
    }
}

response

202 (Accepted)
    Content-Type: application/json
{
    "request-status": "forwarded",
}