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:


Is GlobalValueSet in the endpoint correct?

2 Answers 2


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:

  "attributes" : {
    "type" : "GlobalValueSet",
    "url" : "/services/data/v41.0/tooling/sobjects/GlobalValueSet/0Nt....."
  "Metadata" : {
    "customValue" : [ {
      "color" : null,
      "default" : false,
      "description" : null,
      "isActive" : null,
      "label" : "Yes",
      "urls" : null,
      "valueName" : "Yes"
    }, {
      "color" : null,
      "default" : false,
      "description" : null,
      "isActive" : null,
      "label" : "No",
      "urls" : null,
      "valueName" : "No"
    } ],
    "description" : null,
    "masterLabel" : "Value Label",
    "sorted" : false,
    "urls" : null
  "FullName" : "Value_Label",
  "Id" : "0Nt...",
  "DeveloperName" : "Value_Label",
  "MasterLabel" : "Value Label",
  "Description" : null,
  "NamespacePrefix" : null,
  "ManageableState" : "unmanaged",
  "CreatedDate" : "2018-03-13T04:12:06.000+0000",
  "CreatedById" : "005........",
  "LastModifiedDate" : "2018-03-13T04:12:06.000+0000",
  "LastModifiedById" : "005........"
  • If I remove the Id at the end of the endpoint I get 200 and a valid response. But when I add the Id I get 404. I got the Id from the url when looking at the Global Value Set in setup. I tried both with and without the prefix 0Nt, I'm not sure why it's not working
    – tom_12321
    Commented Sep 13, 2018 at 23:26
  • @tom_12321 try running a query for it just to verify it's the right Id.
    – sfdcfox
    Commented Sep 13, 2018 at 23:28
  • GlobalValueSet is not a valid SObject to query when doing an SOQL query. How would I query it?
    – tom_12321
    Commented Sep 13, 2018 at 23:32
  • @tom_12321 It's not a standard SOQL query, it's Tooling API query. Different list of available objects.
    – sfdcfox
    Commented Sep 13, 2018 at 23:34
  • Oh ok, thanks for that link! How would I query for it? Would I do it in an anonymous apex window? Or would i do it in workbench somewhere?
    – tom_12321
    Commented Sep 13, 2018 at 23:39

I just tried the same endpoint on Salesforce Workbench. And I was able to access the global value set from it. Can you see if host is proper?

enter image description here

You must log in to answer this question.

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