POST

Insert Data Item References


Developer Preview

This API is subject to change. Bug fixes and new features will be released based on developer feedback throughout the preview period.

Inserts one or more item references into a referring field of the specified item.

Endpoint
POST
{DEPLOYMENT-URI}/v3/items/insert-references
Body Params
collectionIdstringRequired

ID of the referring collection.


referringFieldKeystringRequired

Field ID of the field in the referring collection to insert references into.


referencesArray <ReferenceId>RequiredminItems 1

References to insert.

Response Object
resultsArray <ReferenceModificationResult>

Response must include either the inserted reference or an error.

Creates a reference from one item to another.

Request
cURL
curl POST https://external-db.example.com/v3/items/insert-references \ -H 'Content-Type: application/json;charset=UTF-8' \ -H 'Authorization: <AUTH>' \ --d '{ "collectionId": "cities", "referringFieldKey": "pointsOfInterest", "references": [{ "referringItemId": "c285e77c-a86b-4361-a55f-c6b934d70187", "referencedItemId": "faa17edb-2d88-488d-8e95-24b9364c3284" }] }'
Response
JSON
{ "results": [ { "reference": { "referringItemId": "c285e77c-a86b-4361-a55f-c6b934d70187", "referencedItemId": "faa17edb-2d88-488d-8e95-24b9364c3284" } } ] }
Did this help?