0

For example after refreshing of Sandbox - I need to know that first version of Sandbox is not longer exists.

In such case any REST request return 401 (like when session id is expired) when any SOAP (I tested only a few) return INSUFFICIENT_ACCESS: Inactive Organization.

Also I know that it is possible to query SandboxInfo and SandboxProcess of Prod instance.

Last way - parse a html for string 'Your organization has been disabled'.

Maybe exists some other way? Is it possible to execute some api-call from Sandbox to get status?

5
  • Through UI you can open Setup and go to Sandboxex. You'll see which sandboxes exist and what the current status is for each one, including the last time it was refreshed for each one in your org.
    – crmprogdev
    Dec 29, 2016 at 17:06
  • @crmprogdev yes, but some api-way and by making call from Sandbox instead of Prod? Jan 10, 2017 at 12:13
  • It is not clear how are you able to access first instance of sandbox. Usually we have the same credentials on both old sandbox instance and new sandbox instead. It sounds impossible to find api way by using the same sandbox credentials
    – Patlatus
    Jan 11, 2017 at 7:15
  • You only have the Sandbox credentials and not the corresponding production credentials, correct? Are you having problems accessing the Sandbox after it is refreshed? Jan 11, 2017 at 21:10
  • @DanielBallinger In general I have credentials to the Prod, but for my script will be more convenient to do this check from Sandbox itself, if it is possible. Jan 12, 2017 at 15:43

2 Answers 2

0
+50

I'm not completely sure what your use case here is, if you have access to only one sandbox, and it is refreshed, since the credentials are coming from production, you would have no access at that point.

If you just want to validate that it was refreshed and you have no access, you could set up a scheduled job to send you an email every day and if you stop getting that email, then the sandbox was probably refreshed.

If you do have some other kind of access, you could try querying for the organization ID, if a sandbox is refreshed, it is assigned a new Org Id, as documented here. If the org ID for a URL changes, you know that the sandbox has been refreshed.

0

When a sandbox is refreshed the old sandbox is deleted. Because of this you cannot login to a org that does not exist you cannot get authenticated. Thus you cannot query anything about the Sandbox.

If you are trying to validate if a sandbox exists only from the Sandbox you would have ot try to login with credentials that you know. If it fails it's gone.

You must log in to answer this question.

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