Page tree
Skip to end of metadata
Go to start of metadata

The Frequency API set gives access to the Frequency video services that provide current short form video content similar to a television channel watching experience. The APIs includes a set of Frequency services defined by REST Frequency API endpoints. 

The access convention for the Frequency API is the standard REST operations mapping. The mapping is as follows:

  • HTTP POST to create.
  • HTTP GET to read.
  • HTTP PUT to update.
  • HTTP DELETE to delete.

The URI and Versioning

The Frequency SDK uses a URI with an embedded version number. This insures that the clients using the URI API do not break with future non-compatible upgrades and allows for smooth deprecations. The URI format is as follows:

api/[version]/[API service name]

 

There is no other service version mapping that is resolved within the services. It is a 
hard mapping of the URI version number that determines the version of the service that 
is accessed by the client.

HTTP Response Codes

Frequency uses the standard HTTP response codes to report error conditions. Frequency uses the following error response code to communicate error conditions back to the caller:

Response CodeDescription
400 Bad RequestThe error condition where URI parameters or the request body elements are invalid. 
401 UnauthorizedReturned when the X-Frequency-Auth token or X-Frequency_DeviceId is invalid. If this error response is seen, the next step is to do an auth refresh. If an auth refresh returns a 401 then a user login is required.
403 ForbiddenA 403 response code is only returned if a user is blocked from the Frequency services.
404 Not FoundThe service URI was malformed and could not be routed to a Frequency service. 

Headers

The header attributes used to support the Frequency SDK are as follows:

Header Attribute
Contents
Content-Type'application/json; charset=UTF-8'
X-Frequency-AuthThe access token
X-Frequency-DeviceIdThe device id

The header attributes are expected to be set and used for every API. The HTTP error code 401 is returned if the header X-Frequency-Auth and either X-Frequency-Sdk-Key or X-Frequency-DeviceId are not set.

The authentication APIs that are used to get these attributes are the only exceptions and they are noted in the endpoint documentation.

  • No labels