Batch-mode response example: as you can see, value of inserted.id
contain comma-separated IDs of created attributes instead of just single integer value. Also please note that if some attribute should be unique at it's level but it already exists, the response will contain existing
-prop, having newly-created attrs IDs as keys and existing attrs IDs as values. In the below example response we created two Comment-attributes on termEntry-level, for different termEntries, but one of affected termEntries does already have Comment-attribute with ID=2020358. All attributes created in batch-mode are set up with isDraft=1
flag in the database, so they are drafts, and they need to be confirmed futher, otherwise they will be deleted by daily cron job.
Response in case of non-batch-mode would be the same as below, except that inserted.id
would contain single value instead of comma-separated values, and except that there would be no existing
-property in response json
Code Block |
---|
title | Response |
---|
collapse | true |
---|
|
{
"inserted": {
"id": "2020477,2020478",
"target": "",
"value": null,
"type": null,
"language": null,
"deletable": true,
"dataTypeId": "20",
"created": "Pavel Perminov, 09.05.2022 08:37:44",
"updated": "Pavel Perminov, 09.05.2022 08:37:44"
},
"updated": "Pavel Perminov, 09.05.2022 08:37:44",
"existing": {
"2020478": 2020358
}
} |