All Collections
APIs
API Responses
API Responses
A description of Semantik Public API responses
D
Written by Dave Almond
Updated over a week ago

The Semantik Public API uses standard HTTP response codes as defined in RFC7231 Section 6. These status codes are used to provide context for an API request's response and indicate success or failure.

Successful Requests

For successful requests, the Semantik Public API returns HTTP 2xx status codes. See RFC7231 Section 6 for a list of the standard 2xx response codes.

The Semantik Public API page lists all available endpoints and an example successful result for each.

Failed Requests

The Semantik Public API will always return a standard error response which includes a status and message on a failed request. In most cases, additional information is provided to aid in troubleshooting.

There are two main types of failures:

  • 4xx status codes - Indicate that the Semantik API found a problem with the data being sent into the API. In this case the request can be corrected and resent.

  • 5xx status codes - Indicate something went wrong within the Semantik API service. Please retry the request, check our status page, or contact us for support.

Error Response Format

{
"error": {
"status": "<number>",
"message": "<string>",
"logId": "<string>",
"requestId": "<string>",
"traceId": "<string>",
"contextType": "<string>",
}
}

Error Response Example

{
"error": {
"status": 401,
"message": "An Authorization header must be included with the request",
"logId": "3de89085-1f90-420d-8943-b4868bc28132",
"requestId": "e377fb8b-a689-46ee-9296-20db52c808d2",
"traceId": "Root=1-5f4689b6-372c3670acfecccc3a93df9c",
"contextType": "none"
}
}

Error Response Property Definitions

  • status - The HTTP status code returned with the response.

  • message - A brief human-readable description of the error.

  • logId - An ID that may be used to locate the log message for the error. Log ID will be null if the error was not not logged.

  • requestId - An ID that may be used to find all log messages associated with the request within the service. Request ID will be null if not available.

  • traceId - The trace ID for the request. Trace ID will be null if not available.

  • contextType - Indicates the structure of the context property or is 'none' if no context property was included.

  • context - A container for additional data that is relevant to the error.

Did this answer your question?