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
IanDoneganIanDonegan 

Is it possible to access an org's instance name through the rest API?

I would like to keep track of the instance names of orgs I am the administrator for without having to manually handle instance refreshes. Periodically querying those orgs would allow me to access a reletively up-to-date list of clients that are affected by issues listed on trust.salesforce.com.

Is this possible?
Best Answer chosen by IanDonegan
GauravendraGauravendra
Hey Ian,

You can use query like:
/services/data/v45.0/query/?q=SELECT+Id,InstanceName,IsSandbox,Name,OrganizationType+FROM+Organization

User-added image

Hope this helps!

All Answers

GauravendraGauravendra
Hey Ian,

You can use query like:
/services/data/v45.0/query/?q=SELECT+Id,InstanceName,IsSandbox,Name,OrganizationType+FROM+Organization

User-added image

Hope this helps!
This was selected as the best answer
IanDoneganIanDonegan
Excelent. Thank you, Gauravenda.