CSVUploads

Retreive all

get
Query parameters
projectIdstringOptional

Optional. If not given, then default project is used

Responses
200

List of CSV Uploads

application/json
get
GET /api/v2/csvuploads HTTP/1.1
Host: api_host
Accept: */*
200

List of CSV Uploads

[
  {
    "destinationTable": "orders_raw",
    "destinationSchema": "oms",
    "fileSet": "orders_data",
    "createTime": 1660439099000,
    "updateTime": 1660445539000
  }
]

Retreive

get
Path parameters
destinationTablestringRequired

name of the destinationTable

Query parameters
projectIdstringOptional

Optional. If not given, then default project is used

Responses
200

Details about the CSV Upload

application/json
get
GET /api/v2/csvuploads/{destinationTable} HTTP/1.1
Host: api_host
Accept: */*
200

Details about the CSV Upload

{
  "destinationTable": "orders_raw",
  "destinationSchema": "oms",
  "fileSet": "orders_data",
  "createTime": 1660439099000,
  "updateTime": 1660445539000
}

Delete

delete
Path parameters
destinationTablestringRequired

name of the destinationTable

Query parameters
projectIdstringOptional

Optional. If not given, then default project is used

Responses
200

csv upload is deleted

No content

delete
DELETE /api/v2/csvuploads/{destinationTable} HTTP/1.1
Host: api_host
Accept: */*
200

csv upload is deleted

No content

Create

post
Path parameters
dataImportNamestringRequired

name of the dataImport

destinationTablestringRequired

name of the destinationTable

Query parameters
projectIdstringOptional

Optional. If not given, then default project is used

Body
filestringOptional
Responses
200

Details about the created csv upload

application/json
post
POST /api/v2/csvuploads/{dataImportName}/{destinationTable} HTTP/1.1
Host: api_host
Content-Type: multipart/form-data
Accept: */*
Content-Length: 15

{
  "file": "text"
}
200

Details about the created csv upload

{
  "destinationTable": "orders_raw",
  "destinationSchema": "oms",
  "fileSet": "orders_data",
  "createTime": 1660439099000,
  "updateTime": 1660445539000
}

Update

put
Path parameters
dataImportNamestringRequired

name of the dataImport

destinationTablestringRequired

name of the destinationTable

Query parameters
projectIdstringOptional

Optional. If not given, then default project is used

Body
filestringOptional
Responses
200

Details about the updated csv upload

application/json
put
PUT /api/v2/csvuploads/{dataImportName}/{destinationTable} HTTP/1.1
Host: api_host
Content-Type: multipart/form-data
Accept: */*
Content-Length: 15

{
  "file": "text"
}
200

Details about the updated csv upload

{
  "destinationTable": "orders_raw",
  "destinationSchema": "oms",
  "fileSet": "orders_data",
  "createTime": 1660439099000,
  "updateTime": 1660445539000
}

Sample Create Request

import requests

import json

url='https://API_HOST/api/v2/csvuploads/dataImportName/destinationTable'

data={'file':open('path/file.csv')}

authheaders = {'sprinkle-org-id':'OrgId', 'sprinkle-api-key':'key', 'sprinkle-api-secret':'secret'}

r=requests.post(url, files=data, headers=authheaders)

res_json=json.loads(r.text)

Last updated