I am trying to execute a very simple query on a standard Case object via the REST API but am receiving an INVALID_QUERY_LOCATOR error.

My query is:

SELECT Status FROM Case WHERE CaseNumber='00001039' LIMIT 1

which works in the developer console, but not via the REST API:


Error response: 400 - BadRequest

[{"message":"invalid query locator","errorCode":"INVALID_QUERY_LOCATOR"}]

I've also tried escaping the quote char in the URL with %27, without any luck:


Any ideas?

1 Answer 1


400 means your request is not correct. Check that you are missing ? mark in your REST query. Try below


Note that Workbench is a good tool to test your request

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .