Datasembly
Datasembly API specification.
Legacy Auth ¶
Datasembly is currently migrating to a new authentication approach using Auth0, this section describes the legacy authentication method still in use by some customers. If you are a new Datasembly customer you have been set up to use Auth0 and should get your token from there.
Resource ¶
POST/v2/user/login
Example URI
Headers
Content-Type: multipart/form-data; boundary=----------apiformboundary13ul5lXBody
----------apiformboundary13ul5lX
Content-Disposition: form-data; name="email"
user@organization.com
----------apiformboundary13ul5lX
Content-Disposition: form-data; name="password"
P@ssw0rd123
----------apiformboundary13ul5lX200Headers
set-authorization: AUTH_TOKENExports ¶
View new exports, export files, and export history. Manage exports by marking
exports that have been ingested as received. Each export is made up of a group
of files, and each file has a url property that can be used to download the
file.
Note that downloading export files requires an auth token in the authorization
header. There are two formats for the authorization header depending on whether
you are using legacy authentication. Each endpoint below defines a request using
the current header format first followed by a request with the legacy format.
List all exports ¶
List all exportsGET/v2/exports{?new}
Example URI
- new
boolean(optional)If
true, only exports that have not been received are included in the response. Iffalseor missing, all exports are included in the response.
Headers
authorization: Bearer AUTH_TOKENLegacy AuthHeaders
authorization: AUTH_TOKEN200Headers
Content-Type: application/jsonBody
{
"exports": [
{
"id": 4,
"settingsId": 4,
"revision": 0,
"exported": "2019-01-22T01:44:35Z",
"start": "2019-01-13T04:00:00Z",
"end": "2019-01-20T04:00:00Z",
"entities": [
{
"entity": "store",
"files": [
{
"id": 13,
"name": "20190113_stores_v0_000000000000.csv.gz",
"recordCount": 25657,
"url": "https://api.datasembly.com/v2/exports/4/20190113_stores_v0_000000000000.csv.gz"
}
]
}
],
"received": true,
"isReport": false
}
]
}Download export file ¶
Download export fileGET/v2/exports/{export_id}/{file_name}
The body is the content of the export
Example URI
- export_id
number | string(required)idof the export- file_name
string(required)The file
name
Headers
authorization: Bearer AUTH_TOKENLegacy AuthHeaders
authorization: AUTH_TOKEN200Headers
Content-Type: text/csv
transfer-encoding: chunkedMark the export as received ¶
Mark the export as receivedPOST/v2/exports/{export_id}
The request body can be left empty
Example URI
- export_id
number | string(required)idof the export
Headers
authorization: Bearer AUTH_TOKENLegacy AuthHeaders
authorization: AUTH_TOKEN200