function readOnly(count){ }
Starting November 20, the site will be set to read-only. On December 4, 2023,
forum discussions will move to the Trailblazer Community.
+ Start a Discussion
Amit Jain 109Amit Jain 109 

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

I have created a REST Webservice
@RestResource(urlMapping='/Account/*')
global with sharing class MyRestResource {
@HttpDelete
global static void doDelete() {
RestRequest req = RestContext.request;
RestResponse res = RestContext.response;
String accountId = req.requestURI.substring(req.requestURI.lastIndexOf('/')+1);
Account account = [SELECT Id FROM Account WHERE Id = :accountId];
delete account;
}
@HttpGet
global static Account doGet() {
RestRequest req = RestContext.request;
RestResponse res = RestContext.response;
String accountId = req.requestURI.substring(req.requestURI.lastIndexOf('/')+1);
Account result = [SELECT Id, Name, Phone, Website FROM Account WHERE Id = :accountId];
return result;
    }
@HttpPost
global static String doPost(String name,
String phone, String website) {
Account account = new Account();
account.Name = name;
account.phone = phone;
account.website = website;
insert account;
return account.Id;
}
}

Now from Postman when I try to invoke the same using the below
https://na30.salesforce.com/services/data/v31.0/query/Account/0013600000OrUqm
I get the below error 
[{"errorCode":"NOT_FOUND","message":"The requested resource does not exist"}]

Can someone please help me to understand if there is any issue with the URL
Best Answer chosen by Amit Jain 109
Amit Jain 109Amit Jain 109
The URL was supposed to be 

https://na30.salesforce.com/services/apexrest/Account/0013600000OrUqm

It worked for me....

Amit Jain