Imports data from a CSV file into a specified internal table in a given project.
This endpoint accepts a multipart/form-data
request with two parts:
CSV file format can be get from /projects/{projectId}/table/{tableName}/sample
.
The request
part must contain:
mappings
: A list of objects, each with:
name
: The name of the target column in the internal table.csvColumnName
or csvColumnIndex
to define the corresponding column in the CSV.containsHeader
: A boolean indicating whether the CSV includes a header row.With column names:
{
"mappings": [
{ "name": "numcol", "csvColumnName": "numcol" },
{ "name": "text", "csvColumnName": "text" },
{ "name": "decimalcol", "csvColumnName": "decimalcol" }
],
"containsHeader": true
}
With column indexes:
{
"mappings": [
{ "name": "numcol", "csvColumnIndex": 0 },
{ "name": "text", "csvColumnIndex": 1 },
{ "name": "decimalcol", "csvColumnIndex": 2 }
],
"containsHeader": false
}
containsHeader: true
), you can use either csvColumnName
or csvColumnIndex
.containsHeader: false
), you must use csvColumnIndex
.The endpoint currently runs synchronously and returns an ImportJob
object with the job status and number of processed rows.
In future versions, this endpoint will return only the jobId
, and the progress/result will be tracked via a separate job status endpoint:
GET /jobs/{id}
Use the Authorization header with the value 'Bearer <apiKey>' to authenticate. Partner API Keys have full access; Project API Keys are limited to their project scope. Learn more: https://docs.peaka.com/api-reference/authentication
Import job created successfully
The response is of type object
.