Response Codes
Netilion API will return the following HTTP codes:
| Code | Name | Response Body Content Type | Description |
|---|---|---|---|
| 200 | ok | application/json | Success response with a response body. |
| 201 | created | application/json | Successfully created a new resource. The response body contains the new resource and associated object IDs. |
| 204 | no content | — | Success response without a response body on update or delete |
| 400 | bad request | application/json | The server did not process the request due to a client error such as a malformed request syntax, too large size, invalid request message framing or deceptive request routing. See a list of bad request error codes below. |
| 401 | unauthorized | application/json | Missing or wrong API key, username or password. Error codes: invalid_api_key, invalid_auth_type, unauthorized |
| 402 | quota_exceeded | application/json | API Subscription quota is used up or expired. Error codes: quota_exceeded, expired_api_key |
| 403 | forbidden | application/json | The request is valid, but the user is not authorized to access the resource. Error codes: access_denied, read_only, immutable, attachments_limit_exceeded |
| 404 | not found | application/json | The requested resource could not be found, or is not visible to the requesting user. Error codes: not_found_no_permission |
| 409 | conflict | application/json | A conflict would arrise by allowing the request. It is denied to maintain data consistency. Error codes: assigned_restriction, api_lockout, parent, no_owner, write_protected_attribute, association_conflict including the conflicting resource. |
| 415 | unsupported media type | application/json | The request contains a media type that is not whitelisted as attachment MIME type. |
| 429 | too many requests | application/json | Throttling of requests when there are too many requests per minute from one API key. Error codes: too_many_requests |
| 500 | internal server error | application/json | A problem has occurred on the server’s side. Error codes: internal_server_error, service_unavailable |
API errors
The response bodys of the API errors are structured as follows:
{ "errors": [ { "type": "string", "message": "string", "attribute": "string" } ] }The attribute defines the resource that is causing the error such as asset, node etc.
Error codes are stable within the API version.
Implemented error types are:
access_denied- access to the required resource deniedapi_lockout- action would lead to an API lockoutassigned- target object has resource assignedassigned_restriction- target object can’t be deleted because of dependent resourcesassociation_blank- mandatory association was blankassociation_not_found- invalid reference used for object dependencyassociations_not_found- invalid references used for object dependencyassociations_already_added- duplicate association (m:n)association_tenant_conflict- tenant association mismatchassociation_conflict- association mismatchblank- mandatory field was not setboolean_format- value is not a booleandate_format- invalid date format for fielddate_range- invalid date rangedate_time_format- invalid date time format for fielddate_year_month_format- invalid date/year month/year formatgreater_than- value to high for numeric fieldid_format- invalid format of an ID fieldinternal_server_error- unexpected error on serverinvalid- format not allowedinvalid_input- invalid input data caused an errorinvalid_enum_value- the given value is not a valid enum valuekey_format- invalid key formatlockout- action would lead to a resource lockoutless_than- value to low for numeric fieldmissing_header- a mandatory request header is missingmissing_parameter- a mandatory request parameter is missingnot_a_number- for numerical fieldsnot_unique_in_scope- resource not unique in corresponding scopenumber_format- wrong input for numberparameter_missing- required parameter for resource is missingparent- resource can not be deleted cause its a parent to other resourcespresent- field that should not be setquota_exceeded- file, image or asset could not be created because the subscription quota has exceededspecification_not_found- specification for given key not foundspecifications_not_found- specifications for given keys not foundtaken- unique field is already takentenant_on_child- tenant parent/child conflicttoo_long- length not in valid rangetoo_short- length not in valid rangeunconfirmed- user is unconfirmedwrong_format- invalid date format for fieldwrong_length- does not match exact length