Skip to content

Data import

Data Import allows you to ingest external data into DatAscend by uploading files (Excel/CSV) through a REST API. This is useful for bulk data loading, migrating from other systems, or integrating with external data sources. The API provides endpoints to start import jobs, track their progress, and handle validation errors.

FieldTypeDescriptionRequired
AuthorizationstringBearer token for authentication.Yes
Content-TypestringMust be multipart/form-data.Yes
domainstringTarget domain for imported records.Yes
FieldTypeDescriptionRequired
versionstringCurrent application version.Yes
entitystringName or ID of the entity to import.Yes

Follows the multipart/form-data format with the following fields:

FieldTypeRequiredDescription
typestringYesThe type of the file, either csv or xlsx
filestring($binary)YesThe file to upload, sent as binary data
mappingobjectYesMap of file column indexes (starting from 1) to entity property names
localestringNoUser locale used to parse dates
timezoneOffsetnumberNoTimezone offset in minutes from UTC
POST /api/v1/entities/:entity/import

Response example:

{
"status": 200,
"error": false,
"message": "string",
"errors": [
{}
],
"data": {
// Unique identifiers for the import job
"id": "A0123456-7890-ABCD-EF00-00000000000",
"entity": "E0123456-7890-ABCD-EF00-00000000000",
// Status of the import job.
"duration": "10 seconds",
"status": "QUEUED",
"type": "IMPORT",
"progress": 100,
"payload": {},
"output": {},
// Timestamps for job lifecycle events.
"jobEnd": "2020-01-01T00:00:10.000Z",
"jobStart": "2020-01-01T00:00:00.000Z",
"createdAt": "2022-01-01T00:00:00.000Z",
"updatedAt": "2022-01-01T00:00:00.000Z",
"lastHeartbeat": "2022-01-01T00:00:05.000Z",
},
"pagination": { <Pagination> }
}
  • The import is processed asynchronously; use the background job status endpoint /api/v1/job/:id to check progress.
  • On successful completion, jobStatus may become completed, with importedCount and failedCount values.
  • Validation errors and failed rows are reported in job details.

This endpoint allows you to retrieve the status and details of a specific import job.

GET /api/v1/job/{id}
NameTypeDescriptionRequired
idstringThe Job ID value (e.g., 24a55348-e5c9-48b7-b377-07db2f1df368)Yes

Returns a Job object with details about the import process.

Response example:

{
"errors": [],
"status": 200,
"error": false,
"message": "string",
"data": {
"id": "132e4567-e89b-12d3-a456-426614174000",
"entity": "132e4567-e89b-12d3-a456-426614174000",
"duration": "10 seconds",
"status": "QUEUED",
"type": "IMPORT",
"progress": 100,
"payload": {},
"output": {},
"jobEnd": "2022-01-05T16:27:16.560Z",
"jobStart": "2022-01-05T16:27:16.560Z",
"createdAt": "2022-01-05T16:27:16.560Z",
"updatedAt": "2022-01-05T16:27:16.560Z",
"lastHeartbeat": "2022-01-05T16:27:16.560Z"
}
}