Database Management
Add an Element to an Array in a Document
Add an Element to an Array in a Document. You can pass in the Document ID and the Field/Key that you want to add an element to and we will add the element to the Array for you. If the Array does not exist, we will create a new Array and add the element to it.
post/api/collections/data/array/update/add
Request body
Example request
{
"collection": "Users",
"docId": "1234567890",
"field": "identities",
"arrayUnion": "sfdcsfc"
}Response
Output from the Database Collection Edits Process
Example response
{
"status": "success",
"processing_time": 888,
"processing_id": "4b139bfe-1f71-4345-b539-fa6c1700f166",
"processing_count": 6554,
"data": {
"databaseId": "1234567890",
"collection": "Users",
"elapsed_time": 800,
"documentId": "1234567890"
}
}