8

I am using the Sitecore Item Rest API and all the existing fields (both standard and custom) I need to use from the template come back fine (e.g: Start Date below). However I've added a new one (a droplist field) and it is not returned by the API. E.g this is the request: /sitecore/api/ssc/item/%7bA3FE61CA-82F1-43EE-BA6A-5C923FD81639%7d/children?includeStandardTemplateFields=true

{
    "ItemID": "2cdd1808-31c2-4c88-8b11-39bb8526a033",
    "ItemName": "Adams Test",
    "TemplateName": "Template 1 Test",
    "__Updated": "20170713T100944Z",
    "Start Date": "20170302T104743Z"
},

It's very strage as other custom fields are returned. Is there some config I'm missing somewhere to register my new custom field? Is the Item API Powered by Solr in the back ground and I need to update the search config or indexing?

  • did you try prefixing database name and field-name in the query? – Tech master Jul 13 '17 at 19:13
  • Have tried specifying payload=full in the query string? – grg Jul 13 '17 at 20:28
  • 2
    I've tested your request and it does return all my custom fields. Have you checked if user has access rights to the field, if the value is set in the context language, if all the necessary things are published? – Marek Musielak Jul 13 '17 at 20:29
  • 1
    Thanks for all the ideas. In the end this looks to have been a publishing issue with the template used. It's now resolved though. – Adam Seabridge Jul 18 '17 at 12:50
  • @AdamSeabridge you should add and accept that as an answer :) I had the same issue after thinking I had definitely published everything. I switched to web database and found my field wasn't there - so had to delete and then republish. – Jen May 20 at 0:09
1

The issue in my case was a publishing issue. Make sure you double-check that the template(s) your item(s) uses has made it to the Web database. If it isn't there then try re-publishing and check again. The Item Rest API uses the context database for the logged in user so if the content user is using the web database it won't return the item(s).

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.