1

Note: I am using a trial instance of Sitecore 9.0.2.

I create an item:

curl -X POST \
 https://mysitecoreurl/sitecore/api/ssc/item/%2Fsitecore%2Fcontent%2FHome%2Ffolder1 \
  -H 'Content-Type: application/json' \
  -d '{ 
    "ItemName": "Home4", 
    "TemplateID": "76036f5e-cbce-46d1-af0a-4143f9b557aa", 
    "Title": "Sitecore2", 
    "Text": "\r\n\t\t<p>Welcome to Sitecore 4</p>\r\n" 
}'

It returns seems ok?

Status: 201 Created
Location: Location →https://mysitecoreurl/sitecore/api/ssc/item/b8527e6a-f731-4cb2-a8a0-1f3cd8d7bd4f?Database=master

So I get the GUID of the folder:

curl -X GET \
  'https://mysitecoreurl/sitecore/api/ssc/item/?path=/sitecore/content/Home/folder1'

Which returns:

{
    "ItemID": "fe2e79b2-2b0c-4866-a6b4-70eab694e58b",
    "ItemName": "folder1",
    "ItemPath": "/sitecore/content/Home/folder1",
    "ParentID": "110d559f-dea5-42ea-9c1c-8a5df7e70ef9",
    "TemplateID": "a87a00b1-e6db-45ab-8b54-636fec3b5523",
    "TemplateName": "Folder",
    "CloneSource": null,
    "ItemLanguage": "en",
    "ItemVersion": "1",
    "DisplayName": "folder1",
    "HasChildren": "True",
    "ItemIcon": "/temp/iconcache/applications/16x16/folder.png",
    "ItemMedialUrl": "/temp/iconcache/applications/48x48/folder.png",
    "ItemUrl": "~/link.aspx?_id=FE2E79B22B0C4866A6B470EAB694E58B&amp;_z=z"
}

Now when I try to get the children of the folder:

curl -X GET \
  https://mysitecoreurl/sitecore/api/ssc/item/fe2e79b2-2b0c-4866-a6b4-70eab694e58b/children

I do not see my new item.

curl -X GET \
  https://mysitecoreurl/sitecore/api/ssc/item/b8527e6a-f731-4cb2-a8a0-1f3cd8d7bd4f

Returns:

The item "b8527e6a-f731-4cb2-a8a0-1f3cd8d7bd4f" was not found.

It may have been deleted by another user.

Am I missing something?

But here it is in the UI: yet here it is

and the guid of that item matches: enter image description here

What am I missing here?

I have a feeling I'm missing some sort of "Publish" step.

2

Is it because you are missing the database param in your request for your item?

The default is the context database for the logged in user so perhaps you are logged into Core or Web?:

curl -X GET \
  https://mysitecoreurl/sitecore/api/ssc/item/b8527e6a-f731-4cb2-a8a0-1f3cd8d7bd4f?Database=master
  • I just ran {{sitecoreURL}}/sitecore/api/ssc/item/fe2e79b2-2b0c-4866-a6b4-70eab694e58b/children?Database=master that just times out. never returns anything – Nicholas DiPiazza Oct 2 '18 at 18:23
  • yep that's because now it's so big, there's no way it can return that number of results in one query. – Nicholas DiPiazza Oct 2 '18 at 18:25
  • What is so big? I single item can’t be that big surely? Or are you returning the child items for that item also? – Adam Seabridge Oct 2 '18 at 18:26
  • yeah it was the "children" call which was lots of possibly large items – Nicholas DiPiazza Oct 2 '18 at 18:43
  • Ok well I’d delete your children in the UI and then test the call above – Adam Seabridge Oct 2 '18 at 18:44

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.