HTTP Status Codes and Error Handling
The platform APIs use HTTP status codes to convey the results of a client request. There are the following standard status code categories, though not all are currently in use on the platform:
1xx: Informational
—Communicates transfer protocol-level information.2xx: Success
—The client’s request was accepted successfully. For example:a successful
PUT
(update) request for a data class on the platform will return a 200 code, and the response will show the contents of the updated object.a successful
POST
(create) will return a 201 code, and the response will show the contents of the created object.
3xx: Redirection
—The client must take additional action in order to complete the request.4xx: Client Error
—This type of error status code indicates a client error. For example, an unsuccessful request on the platform may return a 400 status code:"Bad Request due to an invalid format or because the requested name is already in use"
.5xx: Server Error
—This type of error status code indicates a server error.
If an API call is not successful, for example if the server is unable to generate a 200 OK
or 201 CREATED
response, then the server will return the appropriate standard error code in a set format.
In Swagger, click the arrow symbol on any endpoint to see example status codes in the Responses section.
You can also view every status code in use in the schema. To open the schema, click /api/v1/api-docs
just below the title on the Swagger page.