0

Using Sitecore 9.2 and SXA 1.9, Im trying to call a saved item query by using the guid of the query item in the url

/sitecore/api/ssc/item/{guid_of_query)/query

This gives a 400 error. What's wrong with that?

From what I've ready here, this should be correct: https://doc.sitecore.com/developers/91/sitecore-experience-management/en/the-restful-api-for-the-itemservice.html enter image description here

1
  • Does the {guid_of_query} item from the request inherit Query Definition template? Commented Sep 12, 2019 at 7:35

1 Answer 1

1

400 Error code usually means "Bad Request" which means that something has been forgotten that is expected in URL or there is a typo somewhere.

Based on Documentation page you have linked it means:

Bad Request. This indicates that the request is not accepted by the server, perhaps because a parameter is invalid. It also indicates that you should not repeat the request. You get this response when the query definition item does not exist.

This error may indicate that:

  1. Stored query is not based on template /System/Services/Item Service/Query/Query Definition
  2. You are missing parameters in your request ?pageSize&page&database&includeStandardTemplateFields&fields

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

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