0

How can I get Children item using the Item service API?

I retrieved parent item and fields using Item service API

I got the result like below Json

{
  "ItemID": "25a40733-babf-4f16-a025-a3ffb0c84c05",
  "ItemName": "itemName",
  "ItemPath": "/sitecore/content/Home",
  "ParentID": "59b7047e-1063-4f2e-a452-4ca466ecb621",
  "TemplateID": "3191fecf-905e-4ca1-a007-05ba9f5b7455",
  "TemplateName": "templatename",
  "CloneSource": null,
  "ItemLanguage": "en",
  "ItemVersion": "1",
  "DisplayName": "testuser",
  "HasChildren": "True",
}

in the above result have "HasChildren": "True", but I cannot able to get the whole children value.

Thanks in advance

2

According to the documentation

https://doc.sitecore.com/developers/90/sitecore-experience-manager/en/the-restful-api-for-the-itemservice.html

you can use url like

/item/{id}/children?database&language&version&includeStandardTemplateFields&includeMetadata&fields

to retrieve children of the item with id specified in {id} parameter

3
  • Thanks Marek. Working fine. Feb 26 '20 at 14:38
  • one more question can you help me. Feb 26 '20 at 14:39
  • 1
    I'm sure he can as soon as you open a new question. Feb 26 '20 at 23:18

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.