curl --request POST \
--url https://apiweb.mile.app/api/v3/data/bulk/upsert \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"data": [
{
"dataId": "N001",
"dataTypeId": "64e5d8a107e9e4337a5ba3d2",
"hubId": "65322ff9cc356d4bd67fcc22",
"field1": "Jack Ward",
"field2": "Gambir Jakarta",
"field3": "-6.230815251,106.75684387",
"limitUser": null
},
{
"dataId": "N002",
"dataTypeId": "64e5d8a107e9e4337a5ba3d2",
"hubId": "65322ff9cc356d4bd67fcc22",
"field1": "Jack Ward",
"field2": "Menteng Jakarta",
"field3": "-6.1951689,106.8278573",
"limitUser": null
}
]
}
'{
"success": 2,
"failed": 0,
"data": [
{
"status": true,
"message": "Data has been created successfully.",
"event": "create",
"_id": "646db91d0d73b6392543fb82"
},
{
"status": true,
"message": "Data has been updated successfully.",
"event": "update",
"_id": "646db91d0d73b6392543fb83"
}
]
}curl --request POST \
--url https://apiweb.mile.app/api/v3/data/bulk/upsert \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"data": [
{
"dataId": "N001",
"dataTypeId": "64e5d8a107e9e4337a5ba3d2",
"hubId": "65322ff9cc356d4bd67fcc22",
"field1": "Jack Ward",
"field2": "Gambir Jakarta",
"field3": "-6.230815251,106.75684387",
"limitUser": null
},
{
"dataId": "N002",
"dataTypeId": "64e5d8a107e9e4337a5ba3d2",
"hubId": "65322ff9cc356d4bd67fcc22",
"field1": "Jack Ward",
"field2": "Menteng Jakarta",
"field3": "-6.1951689,106.8278573",
"limitUser": null
}
]
}
'{
"success": 2,
"failed": 0,
"data": [
{
"status": true,
"message": "Data has been created successfully.",
"event": "create",
"_id": "646db91d0d73b6392543fb82"
},
{
"status": true,
"message": "Data has been updated successfully.",
"event": "update",
"_id": "646db91d0d73b6392543fb83"
}
]
}Use a valid Bearer token to authenticate.
The maximum data for creating or update multiple data source is 2000 data.
Show child attributes
The identifier of fields from data type. The upsert endpoint combines the functionalities of both POST and PUT operations. Depending on the presence of a specified identifier (dataId), the endpoint will either create a new record or update an existing one.
Example: N001
The identifier of data type. Use GET /data-types API to get the list of Data Type IDs.
Example: 63db2fb476bc679c540369c4
The identifier for the hub that generated by system. hubId is not required if the commonData configuration for the data type is true.
Use GET /hubs API to get the list of Hub IDs.
Example: 63c63ffbdef63e6f641aac72
This field's type & value is according to dataType. Use GET /data-types API to get fields of dataType.
Example: Jack Ward
This field's type & value is according to dataType. Use GET /data-types API to get fields of dataType.
Example: Gambir Jakarta
This field's type & value is according to dataType. Use GET /data-types API to get fields of dataType.
Example: -6.230815251,106.75684387
List of email that can see the data source.
Success
Total success created or update data source.
Total failed created or update data source.