12min

Bulk Documents

POST /{appname}/data/{servicename}/_bulk

Allows the client to submit an array of JSON documents to hyper for batch loading into the data service. A bulk update can handle inserting, updating, and deleting documents. Use _deleted: true flag to delete a record. It is also important to note that you need to supply an _id for each document.

Parameters

Path

  • appname - string - path parameters
  • servicename - value requirements
    • See parametersο»Ώ

Request Body

The request body takes an array of objects in JSON.

Bulk Request Payload Limit

When submitting bulk documents, the request payload size limit isΒ 10MB.

JSON
|

Examples (Bulk Insert/Update)

Don't forget!

Be sure to set your HYPER environment variable with the value of your hyper app's connection string.

Node.js
Curl
|

Example (Bulk Delete)

Node.js
Curl
|

Responses

Status Code

Description

Example Response

200

Successfully returned results for your query

{"ok": true, "results": [{"id": '1', "ok": true}, ....]}

500

Error occurred trying to run your query

{"ok": false, "msg": ""}

Need Help?Need Help?

You can always reach out to our support team for any additional assistance on slack.

ο»Ώ

Updated 24 Mar 2022
Did this page help?
Yes
No