Find Your Instance With A Custom Domain

Find Your Salesforce Instance With A Custom Domain

If you have already created a custom domain for the lightning modules, and now you are working on the Apex Web Services module in Apex Integration Services on trailhead, you might wonder how you are supposed to find your instance. 

So the in module walk through in this module, has you create a case with workbench, then you grab you session ID, and then “cURL” your REST endpoint.  Your cURL command is made up of the following text: 
curl https://instance.salesforce.com/services/apexrest/Cases/<Record_ID> -H 'Authorization: Bearer<your_session_id>' -H 'X-PrettyPrint:1'
You insert the ID of the Case you created where it says “<Record_Id>”, and your session id where it says “<your_session_id>”, and you might over look it at first, but you need to replace “instance” with your Salesforce instance.
If you have already done the Lightning Modules, you probably have a Custom Domain setup, so when you look at your Salesforce URL it says something like: https://meighantrailhead-dev-ed.my.salesforce.com/ so how do you find your instance?  
You can go to  https://status.salesforce.com/status, where Salesforce has setup a lovely lookup for your domain.

 

Trust_Status

Click My Domain in the Upper Right

Trust_Status

Then just enter your custom domain & click search

 
So take your salesforce URL:
 
https://meighantrailhead-dev-ed.my.salesforce.com/
 
and remove all the stuff from .my.salesforce on and remove it:
https://meighantrailhead-dev-ed
 
then remove the “https://&#8221;:
 
meighantrailhead-dev-ed

and enter what you have left into the lookup box, and click find.  Viola! You have your instance.  Now finish updating your cURL text and continue on your trail.

Advertisements

What are your thoughts? Seriously, comment.

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s