Some endpoints share responses. These shared responses are documented here and are linked in the documentation of the individual endpoints.
- Responses from endpoints that require an access token
- Responses for requests with JSON bodies
- Responses for requests that try to add already existing objects to the database
- Responses for requests which try to query resources that do not exist in the database
- Responses for requests which delete database objects
- Responses to requests that result in server-side communication with another MQTT server
- Responses for requests that call endpoints that can only be called by users assigned to the queried experiments
Also check out: Obtaining an access token!
{
"errors": [
"Access to this resource requires a valid access-token."
]
}{
"errors": [
"Only administrators are allowed to access this endpoint."
]
}Only for endpoints which can only be accessed by administrators.
{
"errors": [
"The access-token sent is invalid or no longer accepted."
]
}{
"errors": [
"You must provide the data in the body as JSON."
]
}{
"errors": [
"Some or more values in the JSON body were null or do not correspond to the required column type in the database."
]
}{
"errors": [
"A ... (...) is already present in the database."
]
}The object's type (first points) and its identifier (second points) of the object are sent in the response.
{
"errors": [
"The ... (...) is not present in the database."
]
}The object's type (first points) and its identifier (second points) of the object are sent in the response.
{
"messages": [
"The ... (...) was successfully deleted from the database."
]
}The object's type (first points) and its identifier (second points) of the object are sent in the response.
{
"errors": [
"The MQTT server to which this request should be forwarded cannot be reached."
]
}If this response comes back, the MQTT server is either offline or the URI to the MQTT server has been misconfigured in the backend. In both cases, You should notify the administration of the respective server.
Responses for requests that call endpoints that can only be called by users assigned to the queried experiments
{
"errors": [
"Only users that are assigned to the experiment can access it."
]
}If the endpoint can be used without restrictions by administrators, the error message is modified as follows: Only users that are assigned to the experiment and admins can access it.