Key highlights
- Change one component in a collection: the API can insert, append or remove a single component in a collection area without sending the whole collection again.
Every Core dna product, release by release, newest first. Each product ships on its own schedule.
Collection Area API and Bug Fixes
The API can remove, insert or append single components in a collection area without resending the whole collection.
A collection area, such as a page's sections, can now be changed one component at a time through the API, instead of resending every component it holds. In the patchRevision of an edit request, four keys name the area and, where needed, a position:
insertAreaCollectionElement(area, n) inserts a new component at position n;appendAreaCollectionElement(area) adds one at the end, and appendAreaCollectionElements(area) adds several;removeAreaCollectionElement(area, n) removes the component at position n.They work on pages, blog posts and the other records with layout areas. Within one request every position refers to the collection as it was before the request, so several changes can be combined. Send originRevision with the live revision's id and activeRevision: true for the change to go live. Every key is described in Collection operations.
PUT /cdna-api/pages/page/42 HTTP/1.1
Host: hub.coredna.com
Authorization: Bearer YOUR_ACCESS_TOKEN
Accept: application/json
Content-Type: application/json
{
"patchRevision": {
"originRevision": 310,
"activeRevision": true,
"removeAreaCollectionElement(pageSections, 3)": true,
"appendAreaCollectionElement(pageSections)": {
"layout": 40,
"name": "Call to action",
"areas": {
"body": "<p>Talk to our team</p>"
}
}
}
}Was this page helpful?
Your answer goes to the docs team.