An organization defines access and spending boundaries for a team. Its membership and roles control who can work with its functions. Its API keys let applications act on the team’s behalf, and usage and spending are attributed to that organization.
Registration creates a personal organization for you. Use separate organizations when teams need independent permissions, API keys, and spending controls.
Members and permissions
Section titled “Members and permissions”Each membership assigns a role in that organization. Members with write access can create functions; viewers can read the function list. A role in one organization does not grant access to another.
Switch to an organization to work with the resources your role can access. To invite people, change roles, or remove members, select curl above.
List the organization’s members with a signed-in session token:
curl https://api.str.ing/acme/members \ -H "Authorization: Bearer $STRING_TOKEN"The API specification describes invitation, role-change,
and member-removal requests under /{org_slug}/members and
/{org_slug}/invitations.
Membership management requires a signed-in session. Select curl above to manage members and invitations with a session token.
API keys and spending
Section titled “API keys and spending”An API key grants access to one organization. Use keys for the organization whose resources and spending the application should use. See automation credentials for instructions in your chosen interface.
Switch organizations
Section titled “Switch organizations”Open the organization picker in the sidebar, search for an organization, and select it. On a phone, the picker is inside the navigation menu. Switching opens that organization’s function list.
The breadcrumb at the top of the page shows your current organization. If an organization does not appear, check that you signed in with the account that belongs to it.
Read your memberships, then choose the organization’s slug in each request path:
curl https://api.str.ing/auth/verify \ -H "Authorization: Bearer $STRING_TOKEN"
curl https://api.str.ing/acme/functions \ -H "Authorization: Bearer $STRING_TOKEN"Replace acme with a slug from the response’s organizations array. An
organization-scoped API key or personal access token applies only to its own
organization.
Run str login again and choose the organization during authorization.
Check the resulting credential’s organization:
str api /auth/whoami{org} in a request path expands to that organization’s slug:
str api '/{org}/functions'Organization slugs
Section titled “Organization slugs”An organization’s slug is its handle in URLs. For example, /acme/functions
identifies the organization acme. Use the same slug in application API paths
such as https://api.str.ing/acme/functions, and gateway paths such as
https://gateway.str.ing/acme/chat/completions.