Media Services API Debugging

This section details the Media Services API error response formats, lists specific error messages you might encounter, and the API’s complete range of HTTP response codes.

Error Responses

This API’s error responses conform to the JSON problem specification. The following shows a typical Media Services API error response:

{
    "type": "https://problems.luna.akamaiapis.net/-/resource-impl/forward-origin-error",
    "title": "Bad Request",
    "status": 400,
    "instance": "https://akab-we62bufgzvfmaj5f-3rtepafiil5ulp4p.luna.akamaiapis.net/config-media-live/v1/live/abcd-lh.akamaihd.n1et/stream",
    "method": "GET",
    "serverIp": "184.1.2.3",
    "clientIp": "60.2.3.4",
    "requestId": "14d35d3a",
    "requestTime": "2016-04-19T13:04:20Z"
}

Errors When Adding a Domain

The following errors might appear if the API fails while adding a domain:

  • Empty Configuration Name.
  • Maximum Configuration Name: (30)
  • HostName must be specified.
  • Reporting CPCode is required.
  • Version details missing.
  • CPCode not available for creating domain configuration.
  • User does not have edit permission for CPCode.
  • Hostname should not be more than 18 characters.
  • Archive configuration missing.
  • Multiple archive feature currently not supported.
  • Storage Group CPCode missing.
  • No CPCodes available to create a storage group.
  • The archive CPCode is not available.
  • Hostname format is not valid.

Errors When Creating a New Domain Version

The following errors might appear if the API fails while creating a new domain version:

  • Domain cannot be empty.
  • Please specify only a single activate environment either staging or production.
  • Invalid activate environment. Please specify either staging or production.
  • Domain has been converted to ‘advanced configuration’. You cannot add new versions to this domain.

Errors When Activating Domain Versions

The following errors might appear if the API fails while activating a domain version and getting the version status:

  • Invalid version ID
  • Please specify a valid environment.
  • Environment must be either production or staging.

Errors When Deleting Domains

The following errors might appear if the API fails while deleting a domain:

  • Domain cannot be empty.
  • Domain Name must be specified.

Errors When Creating Streams

The following errors might appear if the API fails while creating a stream:

  • Domain Name must be specified.
  • For creating new stream, please do not specify a stream ID.
  • Stream Format does not match with domain supported stream format.
  • No configuration found for specified domain.
  • User does not have permission to create IPhone streams.
  • User does not have permission to create Flash streams.
  • Unable to find Storage group from configuration.
  • The stream end date should be later than today.
  • Please specify stream end date between tomorrow and 5 years from today.
  • Please specify a valid value for DVR window.
  • DVR window should be between 5 and 30 minutes.
  • DVR window should be less than 30 minutes when Netstorage is disabled.
  • Please enter stream name.
  • Please re-enter stream name in the valid format.
  • Please do not specify the username field.
  • For IPhone streams please do not specify the primary or backup encoder IP
  • Please specify a valid value for Segment Interval (Integer no less than 2).
  • Please enter a valid primary encoder IP. This IP is restricted.
  • Please enter a valid secondary encoder IP. This IP is restricted.
  • Please specify a password in encoder settings.
  • Please specify a primary contact.
  • Unable to find Primary Contact. Please check your input.
  • Please specify a secondary contact
  • Unable to find Secondary Contact. Please check your input.
  • Please specify a Notification Email.
  • Invalid Notification email format. Please specify a valid email address.

Errors When Editing or Deleting Streams

The following error might appear if the API fails while editing or deleting a stream:

  • Incorrect Stream ID

HTTP Status Codes

The API produces the following set of HTTP status codes for both success and failure scenarios.

Code Description
200 Request OK
201 Resource Created
400 Bad Request
401 Unauthorized Request
402 Failed Request
403 Forbidden
404 Resource not found
405 Method not allowed
415 Unsupported Media Type
422 Unprocessable entity
429 Too many requests
500 Server Error

Last modified: 12/13/2016