Fetches the tree structure of a content item, its parents, or its children. Use this endpoint when you know the identifier of the root item, for example, if you want to fetch the structure of a treelist field with a defined content item source.
Identifiers of the child content types (base templates). Only child content items of the content types specified by these ids will be returned.
- Production serverhttps://edge-platform.sitecorecloud.io/authoring/api/v1/content-items/{contentItemId}/hierarchy
- curl
- JavaScript
- Node.js
- Python
- Java
- C#
- PHP
- Go
- Ruby
- R
curl -i -X GET \
'https://edge-platform.sitecorecloud.io/authoring/api/v1/content-items/3875AC96-8ECF-44AE-8E25-851068B373CE/hierarchy?ChildrenModelIds=4cf51e95-ee7e-4ad6-a69f-e4d740b03616%2Cd9584f11-07d3-4cda-8373-7f97ceedbc09&Language=en&environmentId=main' \
-H 'Authorization: Bearer <YOUR_TOKEN_HERE>'Successful operation
Whether the content item has presentation. An item with presentation is an item with a layout assigned.
Child content items, represented as "HierarchyItem" objects. Each object has the same structure as the root content item in the response.
[ { "hasChildren": false, "hasPresentation": false, "children": null, "ancestors": null, "insertOptions": null, "baseContentModels": null, "id": "059a5e63-6fca-44ea-be8b-e0b7919895f6", "name": "My item", "displayName": "Home", "language": "en", "version": 0, "templateId": "76036f5e-cbce-46d1-af0a-4143f9b557aa", "path": "/sitecore/content/Home/item", "permissions": {}, "system": {} } ]
Ancestor content items, represented as "HierarchyItem" objects. Each object has the same structure as the root content item in the response.
[ { "hasChildren": true, "hasPresentation": false, "children": null, "ancestors": null, "baseContentModels": [ … ], "id": "3875AC96-8ECF-44AE-8E25-851068B373CE", "insertOptions": null, "name": "sitecore", "displayName": "sitecore", "language": "en", "version": 1, "templateId": "c6576836-910c-4a3d-ba03-c277dbd3b827", "path": "/sitecore", "permissions": {}, "system": {} } ]
Insert options of the content item. Insert options control which types of new items can be created beneath a specific item in the content tree.
{ "hasChildren": true, "hasPresentation": true, "children": [ { … } ], "ancestors": [ { … } ], "insertOptions": [ { … } ], "baseContentModels": [ "string" ], "id": "37265ed7-85cf-4876-9c09-b6590fc6cf3a", "name": "My content item", "displayName": "My content item display name", "language": "en", "version": 1, "templateId": "97265ed7-85cf-4876-9c09-b6590fc6cf3a", "path": "/sitecore/content/Home", "permissions": { "canAdmin": true, "canWrite": true, "canCreate": true, "canDelete": true, "canRename": true, "canRead": true, "canPublish": true, "canDuplicate": true, "canWriteLanguage": true }, "system": { "created": "2024-01-15T10:30:00Z", "createdBy": "sitecore admin", "updated": "2024-01-15T10:30:00Z", "updatedBy": "sitecore admin" } }