Return codes

Every BSL call return a HTTP Return Code

Code

Description

200 OK

A GET or function call request returns 200 OK, if the operation is completed successfully. The response body must contain the value of the entity or property specified in the request URL.

201 ok

The request is successfully executed by POST/ PUT /DELETE method



204 No Content

A POST/PUT/DELETE command executed completely and return the "ok" without additional content (body is empty)

3xx

Not supported.

400

Syntax error in URI String

401

Login fail, wrong password (Login fail) or

Authentication is required and has not been provided. (Unauthorized)

404 Not Found

404 Not Found. Can be:

- Entity not found

- Function not found

- Resource (the Data record, defined in bracket) not found

 

Example:

Item("unknownItem")returns 404, if this item does not exist

Item?$filter=ItemCode eq "unknownItem" -> returns 200 and a JSON string with "value":[] 

 

Note:

If the client don't support 404 for requests, you can change this with Property  "notFoundCode"

{"User":"adam","Pwd":"***","notFoundCode":200}

if this property is defined, the system return in 404 case the http status code "200 ok" and the error code 404

notfound

 

405 Method not allowed

a request cannot be used for this record

or login not possible with this request type

500 internal error

Internal error (SQL error, program error)

501 not implemented

Not implemented