Test against a sandbox¶
Your software has a dev copy, a staging copy and the real thing. Each needs its own results webhook and its own job space, or a test run would post results into production's receiver and list its jobs beside real ones.
A sandbox is a test copy of your company in Sight, one per environment. It uses your company's models, so you test with the model you will ship with, and everything else about it is its own:
| In a sandbox | Belongs to |
|---|---|
| Models | your company (and any company it sells to) |
| API keys | the sandbox |
| Jobs, photos and results | the sandbox |
| Templates (rule sets) | the sandbox: start from copies of your live ones |
| Results webhook and its secret | the sandbox |
| Usage | the sandbox, counted against the same plan as the model's project |
Nothing a sandbox does reaches your company's jobs or receiver, and a sandbox's key cannot act for your company or for anybody else.
Make one¶
In the console, open your company and choose Sandboxes, then New
sandbox. Name it after the environment it serves: Acme staging. Owners and
admins of the company can do this; a sandbox has no members of its own, and
your company's people reach it as they reach any company beneath yours.
Then, inside the sandbox:
- API keys → New key. Choose the model, the permissions your staging software needs (Photo checks, Results webhook, and Check templates if it writes rules), and how long the key lasts. The key is shown once.
- Copy rule sets (back on the company's Sandboxes tab). Every live template of your company is copied into the sandbox and made live there, so staging checks photos by the same rules. Copy again whenever your live rules change. You can also write the sandbox's own templates through the API with its key; nothing you save there touches production.
- Set the webhook from your staging software with the sandbox's key, exactly as in production:
That is all. Your staging configuration holds the sandbox's key and that secret; your production configuration holds your company's key and its secret. The code is the same in both.
What a sandbox cannot do¶
- Hold projects or models. Its models are its company's. Train and promote in the company; the sandbox follows the live version like any key does.
- Act for the company. A request from a sandbox key that names your company
(
account) gets 404, as any account you cannot act for does. - Be a way to more photos. A sandbox's photos count against the plan of the project whose model it uses, like a reseller's key acting for a client.
- Have a sandbox of its own, or anything beneath it.
Rename or delete¶
Rename it any time from the Sandboxes tab. Delete it there when the environment goes: its keys stop working at once and its templates and webhook go with it. A sandbox that has checked photos is kept, because Sight keeps every photo it checked and what it decided; rename it instead, or make a new one.
Every change to a sandbox is recorded in the company's Activity.