Ingest Data
POST
/v2/data/in/{dataset_id}
const url = 'http://localhost:3000/v2/data/in/example';const options = { method: 'POST', headers: {'Content-Type': 'application/json'}, body: '{"id":"api.data.in","ver":"v2","ts":"1711966306164","params":{"msgid":"e180ecac-8f41-4f21-9a21-0b3a1a368917"},"data":{"eid":"INTERACT","date":"2022-01-01","ver":"3.0","syncts":1668591949682,"ets":1668591949682}}'};
try { const response = await fetch(url, options); const data = await response.json(); console.log(data);} catch (error) { console.error(error);}curl --request POST \ --url http://localhost:3000/v2/data/in/example \ --header 'Content-Type: application/json' \ --data '{ "id": "api.data.in", "ver": "v2", "ts": "1711966306164", "params": { "msgid": "e180ecac-8f41-4f21-9a21-0b3a1a368917" }, "data": { "eid": "INTERACT", "date": "2022-01-01", "ver": "3.0", "syncts": 1668591949682, "ets": 1668591949682 } }'Parameters
Section titled “ Parameters ”Path Parameters
Section titled “Path Parameters ” dataset_id
required
string
Unique identifier for the dataset
Request Body
Section titled “Request Body ” Media type application/json
object
Example
{ "id": "api.data.in", "ver": "v2", "ts": "1711966306164", "params": { "msgid": "e180ecac-8f41-4f21-9a21-0b3a1a368917" }, "data": { "eid": "INTERACT", "date": "2022-01-01", "ver": "3.0", "syncts": 1668591949682, "ets": 1668591949682 }}Responses
Section titled “ Responses ”OK
Media type application/json
object
Examples
Success: Data ingested successfully
{ "id": "api.data.in", "ver": "v2", "ts": "2024-05-30T23:35:48+05:30", "params": { "status": "SUCCESS", "msgid": "e180ecac-8f41-4f21-9a21-0b3a1a368917", "resmsgid": "9a44ac5b-ef82-46f7-92c5-c5b39ef88764" }, "responseCode": "OK", "result": { "message": "Data ingested successfully" }}Success: Data ingested successfully (batch)
{ "id": "api.data.in", "ver": "v2", "ts": "2024-05-30T23:36:49+05:30", "params": { "status": "SUCCESS", "msgid": "e180ecac-8f41-4f21-9a21-0b3a1a368917", "resmsgid": "a220041c-0c28-415a-9687-9fb2e211f8c4" }, "responseCode": "OK", "result": { "message": "Data ingested successfully" }}Headers
Section titled “Headers ” X-Powered-By
string
Example
Express Content-Length
integer
Example
261 ETag
string
Example
W/"105-UtaCmh0qZMBRBdniNq74Gr+4YAo" Date
string
Example
Thu, 30 May 2024 18:05:48 GMT Connection
string
Example
keep-alive Keep-Alive
string
Example
timeout=5Bad Request
Media type application/json
object
Example
{ "id": "api.data.in", "ver": "v2", "ts": "2024-05-30T23:33:32+05:30", "params": { "status": "FAILED", "resmsgid": "acf07609-77de-4ab5-81ea-42e41b8b95ff" }, "responseCode": "BAD_REQUEST", "result": {}, "error": { "code": "DATA_INGESTION_INVALID_INPUT", "message": "#required should have required property 'id'", "trace": "" }}Headers
Section titled “Headers ” X-Powered-By
string
Example
Express Content-Length
integer
Example
300 ETag
string
Example
W/"12c-GNCIUUDxOZD3UfM311sjnmFIgPc" Date
string
Example
Thu, 30 May 2024 18:03:32 GMT Connection
string
Example
keep-alive Keep-Alive
string
Example
timeout=5Not Found
Media type application/json
object
Examples
Entry topic not found
{ "id": "api.data.in", "ver": "v2", "ts": "2024-04-18T15:47:00+05:30", "params": { "status": "FAILED", "msgid": "e180ecac-8f41-4f21-9a21-0b3a1a368917", "resmsgid": "11c32a3a-fdeb-4e00-a9cf-f6433ade5608" }, "responseCode": "BAD_REQUEST", "result": {}, "error": { "code": "TOPIC_NOT_FOUND", "message": "Entry topic is not defined", "trace": "" }}Failure: Dataset not found
{ "id": "api.data.in", "ver": "v2", "ts": "2024-05-30T23:37:29+05:30", "params": { "status": "FAILED", "msgid": "e180ecac-8f41-4f21-9a21-0b3a1a368917", "resmsgid": "d4db36b4-37b0-4170-a4cf-9d2ae8fa0416" }, "responseCode": "BAD_REQUEST", "result": {}, "error": { "code": "DATASET_NOT_FOUND", "message": "Dataset with id not found", "trace": "" }}Failure: Entry topic not found
{ "id": "api.data.in", "ver": "v2", "ts": "2024-05-30T23:39:26+05:30", "params": { "status": "FAILED", "msgid": "e180ecac-8f41-4f21-9a21-0b3a1a368917", "resmsgid": "62309380-3e83-442f-877e-359ed2774bbf" }, "responseCode": "BAD_REQUEST", "result": {}, "error": { "code": "TOPIC_NOT_FOUND", "message": "Entry topic is not defined", "trace": "" }}Headers
Section titled “Headers ” X-Powered-By
string
Example
Express Content-Length
integer
Example
316 ETag
string
Example
W/"13c-O9iirC/EyneYXQzth7iwEEy1UV4" Date
string
Example
Thu, 18 Apr 2024 10:17:00 GMT Connection
string
Example
keep-alive Keep-Alive
string
Example
timeout=5