Response codesΒΆ

Success or failure of an API call is communicated using HTTP response codes.

Status code Description
2xx Success
4xx Bad request sent to server
5xx Server side error

In case of failure, the response body will contain a JSON payload with error code and message.

Example.

curl -XPOST -G \
    -H "Authorization: Bearer 4d055ad820051448" \
    -d "scriptPath=/user/examples/noSuchScript.sx" \
    http://localhost:8388/API/v1.0/

HTTP Response:

HTTP/1.1 400 Bad Request
Content-Type: application/json
Content-Length: 115

{
    "code":"ClientException",
    "message":"script does not exist: /user/examples/noSuchScript.sx"
}