This section details the endpoints used to write, modify, or delete metric data.
Write data
Description
This request allows you to write data points for one or more metrics. If a specified metric does not exist, it will be automatically created in the repository.
POST /v2/data/values
Scope
To execute this request, you must have the following scope: metrics:write.
Parameters
metricName (string, required): Name of the metric.
datasource (string, optional): Datasource.
values (array of objects, required): A list of the data points to insert.
timestamp (date-time, required): Timestamp of the data point in ISO 8601 format.
value (number, required): The numerical value of the point.
The following parameters must be provided in the request body, in JSON format.
[
{
"metricName": "string",
"datasource": "string",
"values": [
{
"timestamp": "date_et_heure_iso",
"value": "valeur_numerique"
}
]
}
]
Request example
# Command to write values for multiple metrics
curl -X POST \
--url 'https://xxx.indaba.api.indasuite.io-base.com/v2/data/values' \
# ----- Headers -----
-H 'Authorization: Bearer VOTRE_JETON_JWT' \
-H 'Content-Type: application/json' \
# ----- Request body with two metrics -----
-d '[
{
"metricName": "metric4test_ok",
"datasource": "main",
"values": [
{ "timestamp": "2025-06-26T08:04:05Z", "value": 10.5 },
{ "timestamp": "2025-06-26T08:05:05Z", "value": 11.2 }
]
},
{
"metricName": "pressure_sensor_1",
"datasource": "main",
"values": [
{ "timestamp": "2025-07-01T10:00:00Z", "value": 1013.2 }
]
}
]'
Responses
Example of a valid response (200 OK) :
{
"statusCode": 1010,
"message": "2 metrics written/0 metrics filtered/3 values written"
}
Common Errors
Please refer to the list of common errors.
Update a data point
Description
This request modifies the value of an existing data point at a specific timestamp. An annotation is automatically generated to track this change.
PUT /v2/data/values
Scope
To execute this request, you must have the following scope: metrics:write.
Parameters
metricName (string, required): Name of the metric.
datasource (string, optional): Datasource.
timestamp (date-time, required): The exact timestamp of the point to modify.
value (number, required): The new value of the point.
message (string, optional): A custom message for the modification annotation.
The following parameters must be provided in the request body, in JSON format.
General syntax of the request body :
{
"metricName": "nom_de_la_metrique",
"datasource": "source_de_donnees",
"timestamp": "date_et_heure_iso",
"value": "nouvelle_valeur_numerique",
"message": "message_pour_l_annotation"
}
Request example
# Command to update a data point
curl -X PUT \
--url 'https://xxx.indaba.api.indasuite.io-base.com/v2/data/values' \
# ----- Headers -----
-H 'Authorization: Bearer VOTRE_JETON_JWT' \
-H 'Content-Type: application/json' \
# ----- Request body -----
-d '
{
"metricName": "metric4test_ok",
"datasource": "main",
"timestamp": "2025-06-26T08:04:05Z",
"value": 10.6,
"message": "Valeur mise à jour."
}
'
Responses
Example of a valid response (200 OK) :
{ "statusCode": 1010, "message": "OK" }
Common Errors
Please refer to the list of common errors.
Delete data over a period
Description
This request deletes all data points for a metric within a specified time range.
Warning: this action is irreversible.
DELETE /v2/data/values
Scope
To execute this request, you must have the following scope: metrics:write.
Parameters
MetricName (string, required): Name of the concerned metric.
Datasource (string, optional): Datasource.
Start (date-time, required): Start date for the deletion (ISO 8601 format).
End (date-time, required): End date for the deletion (ISO 8601 format).
These parameters must be added to the end of the URL to build the query string. The first is preceded by a "?" and the following ones are separated by an "&":
General syntax of the GET request:
.../values?MetricName=[metric_name]&Start=[start_date]&End=[end_date]
Note: Data deletion is only allowed for the last 3 months.
Example request
# Command to delete data for a metric over a period
curl -X DELETE \
'https://xxx.indaba.api.indasuite.io-base.com/v2/data/values?MetricName=metric4test_ok&Datasource=main&Start=2025-06-26T07:06:00Z&End=2025-06-26T08:06:00Z' \
-H 'Authorization: Bearer VOTRE_JETON_JWT'
Responses
Example of a valid response (200 OK) :
{ "statusCode": 1010, "message": "OK" }
Common Errors
Please refer to the list of common errors.
Endpoint to list databases (datasources)
Description
This request returns the list of all available databases (Datasources) in the system.
GET /v2/database
Scope
This request does not require any specific scope.
Parameters
This request does not take any parameters.
Example request
# Command to list all available datasources
curl -X GET \
'https://xxx.indaba.api.indasuite.io-base.com/v2/database' \
-H 'Authorization: Bearer VOTRE_JETON_JWT'
Responses
Example of a valid response (200 OK) :
{
"data": [
"prod",
"test"
],
"statusCode": 1010,
"message": "OK"
}
Common Errors
Please refer to the list of common errors.
Common errors
You will primarily encounter the following HTTP error codes:
400 Bad Request: Your request is malformed. This may be due to a missing parameter, an incorrect data type, or invalid JSON. The response body will contain an
errors
array detailing the problem.{
"errors": [
{
"error": "Field Required",
"message": "The xxx field is required."
}
],
"statusCode": 1050,
"message": "Invalid request"
}
403 Forbidden: Your authentication token is valid, but you do not have the necessary rights for this action. This can happen for two reasons:
Your token does not have the required scope (e.g., you are trying to write data without the metrics:write scope).
Your token has the correct scope, but your user (or service account) is not linked to an authorization that grants access to the requested metric.
404 Not Found: The resource you are trying to reach does not exist. This typically occurs if you are using an incorrect ID or requesting a metric that does not exist.