Every request you send to Sutra acts in a project and carries an API key.
Projects
Sutra has three levels of tenancy: tenant, organization and project. A tenant holds organizations, and an organization holds projects. A project is the parent of every resource you create, such as sandboxes, agents and services.
Each resource has a full name that starts with its project:
tenants/{tenant}/organizations/{organization}/projects/{project}/sandboxes/{sandbox}You do not have to write all of it. Your API key belongs to one organization, so a project in that organization can be written by its id alone:
| Written | Means |
|---|---|
{project} |
The project in your organization. Accepted where a call asks for a project. |
projects/{project} |
The same. |
organizations/{organization}/projects/{project} |
The project in that organization. |
tenants/{tenant}/organizations/{organization}/projects/{project} |
The full name. |
A resource name takes the same prefixes, for example projects/{project}/sandboxes/{sandbox}. Responses always return the full name. See Resource names.
The SDKs and the CLI take a default project, so most calls name no project at all. The samples in these docs read it from SUTRA_PROJECT, for example <project-id>. A call that names no project acts in your organization’s default project.
API keys
Send your API key in the Authorization header:
Authorization: Bearer <key>The samples in these docs read the key from SUTRA_API_KEY. Keep it out of your code and out of any sandbox.
Organization admins create and revoke keys in the admin console Planned. You can see your own keys in the developer console Planned.
Quotas
Each organization has default quotas, such as the number of running sandboxes and their total CPU and memory. An organization admin can raise them.
API endpoint
All requests go to one base URL:
https://anchor.jgcp.mistrivedev.com