REST / JSON Web API

REST/JSON error codes

Success Jump to heading

In case of success, the following HTTP header is returned:

text
Status: 200 OK
text
Status: 200 OK

Errors Jump to heading

On error, the HTTP header Status should be set and the following HTTP header can be sent (optional):

text
X-Alctl-Errno
X-Alctl-Errstr
text
X-Alctl-Errno
X-Alctl-Errstr

Three different types of error can occur:

  • errors returned by the HTTP server, returning Status

  • errors returned by the high-layer API, returning Status and optionally X-Alctl-Errno and X-Alctl-Errstr

  • errors returned by the low-layer API, returning Status, X-Alctl-Errno and X-Alctl-Errstr

HTTP status Jump to heading

These messages can be returned by WAPI service to show statuses and reasons:

Status Reason
1.1 Continue
101 Switching Protocols
200 OK
201 Created
202 Accepted
203 Non-Authoritative Information
204 No Content
205 Reset Content
206 Partial Content
300 Multiple Choices
301 Moved Permanently
302 Found
303 See Other
304 Not Modified
305 Use Proxy
306 (Unused)
307 Temporary Redirect
400 Bad Request
401 Unauthorized
402 Payment Required
403 Forbidden
404 Not Found
405 Method Not Allowed
406 Not Acceptable
407 Proxy Authentication Required
408 Request Timeout
409 Conflict
410 Gone
411 Length Required
412 Precondition Failed
413 Request Entity Too Large
414 Request-URI Too Long
415 Unsupported Media Type
416 Requested Range Not Satisfiable
417 Expectation Failed
500 Internal Server Error
501 Not Implemented
502 Bad Gateway
503 Service Unavailable
504 Gateway Timeout
505 HTTP Version Not Supported

High-layer errors Jump to heading

These errors are returned by the high-layer of the API.

Status Reason Usual cause
400 Bad Request Client error, see below
404 Not Found This object does not exist
405 Method Not Allowed This method does not exist for this object
415 Unsupported Media Type This file type is not supported by this object
500 Internal Server Error Server error, see below

HTTP errors 400 and 500 are completed by the HTTP headers X-Alctl-Errno and X-Alctl-Errstr.

Status Reason X-Alctl-Errno X-Alctl-Errstr
500 Internal Server Error 1001 should not happen
500 Internal Server Error 1011 read error
500 Internal Server Error 1012 write error
500 Internal Server Error 1013 execution error
500 Internal Server Error 1014 child timeout error
500 Internal Server Error 1021 lckpwdf failed
400 Bad Request 1101 missing scope name
400 Bad Request 1102 missing transaction id
400 Bad Request 1103 missing scope name or transaction id
400 Bad Request 1111 bad input format
400 Bad Request 1112 empty input
400 Bad Request 1113 too much input

Info

The X-Alctl-Errstr header field string is only available for information purposes and the results can differ. You should only consider X-Alctl-Errno.

These errors follows a categorization rule:

Type X-Alctl-Errno Category
Server error 10xx
100x General
101x File system
102x Locking
Client error 11x
110x Identification
111x Input format

Low-layer errors Jump to heading

These errors are returned by the low-layer of the API, for example, the alohactl command-line utility.

Status Reason X-Alctl-Errno X-Alctl-Errstr
400 Bad Request 0
400 Bad Request 99
503 Service Unavailable 100 API is locked
500 Internal Server Error 101 Configuration validation failure
500 Internal Server Error 110 Configuration apply failure
500 Internal Server Error 111 Unable to create transaction context
500 Internal Server Error 112 Unable to create transaction context for sub-module
500 Internal Server Error 113 Unable to re-create transaction context
500 Internal Server Error 114 Unable to backup configuration
500 Internal Server Error 115 Unable to install configuration
500 Internal Server Error 120 Unable to restore configuration

Info

The X-Alctl-Errstr header field string is only available for information purposes and the results can differ. You should only consider X-Alctl-Errno.

Do you have any suggestions on how we can improve the content of this page?