I'm trying to use the REST API to get the list of values for a Global Value Set. Since it is not a field on a specific SObject, I don't think you can query for the values. I am successfully authenticated and have a valid REST call, but am getting a 404 response. I think it must have something to do with my endpoint I defined:
req.setEndpoint('https://'+host+'/services/data/v41.0/tooling/sobjects/GlobalValueSet/<myId>');
Is GlobalValueSet in the endpoint correct?
Best Answer
You can query for GlobalValueSet via the Tooling API:
And, if you had the right URL, you'd get a valid response:
Make sure you use the full Id, should start with
0Nt
.Response will be something like: