This article details the available endpoints dedicated to bulk data import from files (Excel, CSV).
List files pending import
Description
This request allows you to list the files that have been uploaded and are in a specific status (e.g., pending, error, processed).
GET /v2/import-data
Scope
To execute this request, you must have the following scope: metrics:write.
Parameters
datasource (string, optional): Filters files by datasource.
fileStatus (string, optional): Filters files by status. Possible values:
Waiting
,Error
,Processed
.
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:
.../import-data?datasource=[datasource]&fileStatus=[status]
Example request
# Command to list files pending import for the "main" datasource
curl -X GET \
'https://xxx.indaba.api.indasuite.io-base.com/v2/import-data?datasource=main&fileStatus=Waiting' \
-H 'Authorization: Bearer VOTRE_JETON_JWT'
Responses
Example of a valid response (200 OK):
{
"data": [
{
"filename": "import_donnees_janvier.xlsx",
"fileKey": "import_donnees_janvier.xlsx",
"datasource": "main",
"filenameError": null,
"author": "j.doe@example.com",
"dateImport": "2025-06-27T10:15:30Z"
},
{
"filename": "rapport_compresseur_01.csv",
"fileKey": "rapport_compresseur_01.csv",
"datasource": "main",
"filenameError": null,
"author": "j.doe@example.com",
"dateImport": "2025-06-27T10:20:00Z"
}
]
}
Note: If no files match, an empty list is returned.
Common errors
Please refer to the list of common errors.
Import data from a file
Description
This request allows you to upload a file (Excel, CSV) to import its data. The processing is asynchronous.
POST /v2/import-data/{datasource}
Scope
To execute this request, you must have the following scope: metrics:write.
Parameters
datasource (string, required): The datasource where the metrics from the file will be written.
Request Body :
This request must be in multipart/form-data
format and contain a single part:
file (file, required): The Excel or CSV file to import.
Example request
# Command to upload a data file to the datasource "main"
curl -X POST \
--url 'https://xxx.indaba.api.indasuite.io-base.com/v2/import-data/main' \
# ----- Headers -----
-H 'Authorization: Bearer VOTRE_JETON_JWT' \
-H 'Content-Type: multipart/form-data' \
# ----- File to send -----
-F 'file=@/chemin/vers/mon_fichier_a_importer.xlsx'
Responses
Example of a valid response (200 OK):
{ "statusCode": 1010, "message": "OK" }
Common errors
Please refer to the list of common errors.
Delete files by status
Description
This request deletes all files that are in a given status (for example, deleting all files in error).
DELETE /v2/import-data
Scope
To execute this request, you must have the following scope: metrics:write.
Parameters
datasource (string, optional): Limits the deletion to a specific datasource.
fileStatus (string, required): The status of the files to delete (
Waiting
,Error
,Processed
).
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: .../import-data?datasource=[datasource]&fileStatus=[status]
Example request
# Command to delete all files in error from the "main" datasource
curl -X DELETE \
'https://xxx.indaba.api.indasuite.io-base.com/v2/import-data?datasource=main&fileStatus=Error' \
-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.
Delete a specific import file
Description
This request deletes a specific import file, identified by its "fileKey".
DELETE /v2/import-data/{datasource}/{fileKey}
Scope
To execute this request, you must have the following scope: metrics:write.
Parameters
datasource (string, required): Datasource of the file.
fileKey (string, required): Unique identifier of the file.
fileStatus (string, required): Status of the file to delete (Waiting, Error...).
This request uses path parameters (integrated into the URL) and query parameters (after the "?").
General syntax of the DELETE request: .../import-data/[datasource_value]/[fileKey_value]?fileStatus=[status]
Example request
# Command to delete a specific file in error
curl -X DELETE \
'https://xxx.indaba.api.indasuite.io-base.com/v2/import-data/main/mon_fichier.csv?fileStatus=Error' \
-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.
Download an import file
Description
This request allows you to download the source file that was imported.
GET /v2/import-data/download/{datasource}/{fileKey}
Scope
To execute this request, you must have the following scope: metrics:write.
Parameters
datasource (string, required): Datasource of the file.
fileKey (string, required): Unique identifier of the file.
fileStatus (string, required): Status of the file to download.
This request uses path parameters (integrated into the URL) and query parameters (after the "?").
General syntax of the GET request: ../import-data/download/[datasource_value]/[fileKey_value]?fileStatus=[status]
Example request
# Command to download a file and save it locally
curl -X GET \
'https://xxx.indaba.api.indasuite.io-base.com/v2/import-data/download/main/mon_fichier.csv?fileStatus=Processed' \
-H 'Authorization: Bearer VOTRE_JETON_JWT' \
-o 'fichier_telecharge.csv'
Responses
Example of a valid response (200 OK):
{ "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.