Neowit developer docs
API referenceSupportKnowledge baseStatusApp
  • Overview
  • REST API
    • Introduction
    • Authentication
      • OAuth2
      • Basic Auth
    • Error codes
    • API reference
    • Coordinate systems
    • Query Language
      • Query Language Reference
  • Service Accounts
    • Introduction
    • Creating service accounts
  • Integrations
    • Introduction
    • MQTT
      • Native Sparkplug
      • Custom Starlark
  • Starlark
    • Introduction
    • Modules
      • time module
      • json module
      • math module
      • devices module
      • series module
      • sensors module
  • Tutorials
    • Introduction
    • Create users using API
Powered by GitBook
On this page
  • Common response body
  • 400 - Bad Request
  • 401 - Unauthorized
  • Access Tokens
  • 403 - Forbidden
  • 404 - Not found
  • 409 - Conflict
  • 500 - Internal server error
  • 503 - Service Unavailable
  • 504 - Gateway timeout
  1. REST API

Error codes

Summary of common error codes returned by our REST API.

Common response body

Most API endpoints return a common response body when an errors occurs. These responses can contain useful hints while developing or debugging, but is not designed to be directly shown to the user.

{
  "reason": "invalid space",
  "status": "bad request",
  "traceID": "123wedt",
  "validations": {
    "user.email": "required"
  }
}
Field
Type
Description

reason

string

A summary of what when wrong.

status

string

Text version of the response code.

traceID

string

An id that may be supplied to support for internal debugging.

validations

object

Hints of fields that failed validating.

400 - Bad Request

This is most likely due to an invalid argument as a part of a path, query parameter, or request body. Please see the error message for more information.

401 - Unauthorized

The user or the Service Account can not be authenticated towards our API.

Access Tokens

If you are using an Access Token received from our OAuth2 endpoint, please note that these are only valid for one hour. For uninterrupted operations using Access Tokens, make sure to get a new one before the previous one expires.

403 - Forbidden

The user or service account does not have access to this resource.

404 - Not found

The requested resource could not be found. Make sure the URL is correct. Note that the resource may have been removed after it was discovered.

409 - Conflict

The resource you're trying to create already exists. This can happen for certain resources which have unique constraints (for example named tags).

500 - Internal server error

An internal error occurred in our services.

These may be intermittent, and in general we recommend re-trying with an exponential backoff with a minimum of 1-second delay. If your integration sends many requests our way, we also recommend adding jitter to this retry mechanism to stop thundering herds.

503 - Service Unavailable

504 - Gateway timeout

PreviousBasic AuthNextAPI reference

Last updated 11 months ago

See our for more details.

If these errors persist over a longer period, check our . If nothing is showing up there, get in touch with . Please include the traceID from the response body if this is present, as it can help support and our engineering team figure out what when wrong quicker.

See

See

Authentication guide
Status page
Support
500 - Internal server error
500 - Internal server error