API Endpoint Definition API Debugging

This section provides details on the data object that reflects the API’s common response to error cases, and lists the API’s range of response status codes for both error and success cases.

Error Responses

When the API encounters a problem, it responds with an object that adheres to the HTTP Problem Details standard. This sample shows an authorization error, where the type value is a non-navigable URI, and the instance may be useful if you need to communicate about the problem with your Akamai support representative:

{
    "type": "https://problems.luna.akamaiapis.net/api-definitions/error-types/UNAUTHORIZED",
    "title": "Unauthorized Access/Action",
    "status": 403,
    "detail": "You don't have access to the end point.",
    "instance": "https://problems.luna.akamaiapis.net/api-definitions/error-instances/d54686b5-21cb-4ab7-a8d6-a92282cf1749"
}

HTTP Status Codes

The following lists the full range of response codes the API may generate:

Code Description
200 The operation was successful.
201 Resource successfully created.
204 Successfully processed request.
400 Bad Request.
401 Authentication failure.
403 Access is forbidden.
404 Resource not found.
405 Method not supported.
409 Conflict with current state of resource.
412 An Etag or If-Match header does not match, indicating the content has been modified. See Concurrency Control for more information.
500 Internal server error.

Error Types

The table below lists the common error types that you can encounter and their corresponding descriptions. Each name in the column on the left represents a string that appears after the following URL prefix in the type member: https://problems.luna.akamaiapis.net/api-definitions/error-types/.

Error Type Description
activation-for-other-version-already-pending You cannot activate the endpoint version because another version’s activation is pending on the Akamai network.
activation-for-path-already-pending At least one base path and hostname combination that you specified for an endpoint is currently being activated on the Akamai network.
allow-any-domain-is-not-allowed For the CORS configuration, you cannot use a wildcard (*) in the allowedOrigins field when the allowCredentials field is set to true.
api-privacy-key-location-not-set For the API privacy configuration, to define an endpoint version as private, you must first specify the apiKeyLocation value for the endpoint version.
empty-contract You must specify a contract ID when creating or cloning an endpoint.
empty-group You must specify a Luna group ID when creating or cloning an endpoint.
empty-hosts You must include at least one hostname in the apiEndPointHosts array when creating or cloning an endpoint.
endpoint-name-not-unique An endpoint with the name that you specified already exists.
endpoint-invalid-basepath The basePath that you specified does not meet the syntactic requirements for a base path. Ensure that the base path starts with a forward slash (/) and does not end with one.
endpoint-invalid-host At least one element that you included in the apiEndPointHosts array does not meet the syntactic requirements outlined in RFC–952 and RFC–1123.
endpoint-path-already-active At least one base path and hostname combination that you specified is already active on the Akamai network.
endpoint-path-already-used At least one base path and hostname combination that you specified already exists in another endpoint configuration.
endpoint-version-already-active You cannot activate the endpoint version because it’s already active on the Akamai network.
endpoint-version-is-pending You cannot modify the endpoint version because it has pending changes that are being propagated to the Akamai network.
endpoint-version-locked You cannot modify the endpoint version because it has already been activated on the Akamai network.
endpoint-version-not-active You cannot deactivate the endpoint version because it is not currently active on the Akamai network.
endpoint-version-not-found You cannot modify the endpoint version because it does not exist.
greater-than-max The numerical JSON value is too large.
import-invalid-syntax The import file that you provided contains syntactic errors. For details on forming an API definition file, see either the Swagger specification or the RAML specification.
import-invalid-schema The import file that you provided is not a valid Swagger 2.0 or RAML 0.8 file. For details on forming an API definition file, see either the Swagger specification or the RAML specification.
import-hostnames-mismatch The hostnames in your imported API definition file do not match the hostnames configured for the endpoint. This is just to inform you that the system did not replace the original hostnames.
import-ref-not-found The importUrl that you specified for the import operation does not point to an API definition file.
invalid-category The apiCategoryId that you specified is not associated with any endpoints in the system.
invalid-contract The contract ID that you specified when creating or cloning an endpoint does not exist.
invalid-header The HTTP header value provided for the CORS configuration contains invalid characters.
invalid-http-method The JSON value is not an HTTP method name string. This is for JSON fields that expect HTTP methods for values.
invalid-json-value The JSON value does not meet the validation criteria for the corresponding JSON field.
invalid-origin The origin hostname does not meet the syntactic requirements outlined in RFC–952 and RFC–1123.
jwt-public-key-duplicated The primary and backup RSA keys uploaded for JWT validation purposes are identical.
less-than-min The numerical JSON value is too small.
multiple-type-parameters-not-supported The system only supports single-type parameters in imported API definitions files.
not-null The JSON value is null, and the corresponding JSON field does not accept null values.
raml-version-not-supported The system does not support the RAML version of your imported API definition file. The currently supported version is RAML 0.8.
required-param-missing The JSON value specified as required in the schema is missing from the request body.
resource-invalid-path The resourcePath that you specified does not meet the syntactic requirements for a path. Ensure that the resource path starts with a forward slash (/) and does not end with one.
resource-name-not-unique A resource with the name that you specified already exists.
resource-not-found The endpoint, version, or resource with the ID that you specified does not exist.
swagger-version-not-supported The system does not support the Swagger version of your imported API definition file. The currently supported version is Swagger 2.0.
type-mismatch The JSON value is of a different data type than expected in the corresponding JSON field.
unrecognized-json-field The JSON field is not present in the corresponding JSON schema.

Last modified: 5/10/2018