Syndai Docs

Import rows into an app from CSV

POST
/api/v1/external/coding/customers/{customer_id}/repositories/{coding_repository_id}/publication/data/{collection}/import

Adds a CSV's lines (header = column names; at most 2 MB and 10,000 lines) through the app's rules, as its owner, in batches. Each line's key is a hash of the file and the line, so importing the same file again never doubles a row. Answers how many were added and each rejected line with the rule's message. Needs coding:apps:publish.

Authorization

CustomerApiKey
headerAuthorizationBearer <API Key>

Customer API key sent as a bearer token

Path Parameters

customer_id*string
Formatuuid
coding_repository_id*string
Formatuuid
collection*string
Match^[A-Za-z0-9_-]{1,64}$

Request Body

application/json
  1. body
csv*string

Response Body

Request fulfilled, document follows

application/json
  1. response
added*integer
rejected*array<>
Example Request
curl -X POST 'https://api.syndai.ai/api/v1/external/coding/customers/497f6eca-6276-4993-bfeb-53cbbbba6f08/repositories/497f6eca-6276-4993-bfeb-53cbbbba6f08/publication/data/string/import' \  -H 'Content-Type: application/json' \  -d '{  "csv": "string"}'
Example Response
{  "added": 0,  "rejected": [    {      "line": 0,      "message": "string"    }  ]}
Was this page helpful?