Skip to content

Commit

Permalink
info text about org admin pat
Browse files Browse the repository at this point in the history
  • Loading branch information
davidx33 committed Dec 31, 2024
1 parent 561f695 commit 0b8e2aa
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions docs/administration/concepts/index.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -186,7 +186,10 @@ Use [resource tags](#resource-tags) to organize resources by environment using t
permissions when we release attribute based access control (ABAC). ABAC on the resource tag will provide a fine-grained way to restrict access to production tracing projects, for example. We do not recommend that you use Workspaces for environment separation as you cannot share resources
across Workspaces. If you would like to promote a prompt from `staging` to `prod`, we recommend you use prompt tags instead. See [docs](../prompt_engineering/concepts#tags) for more information.

### Cross-workspace access
### Programmatically Managing Workspaces
:::info
A PAT associated with an organization admin has access to all resources within an organization. Ensure this token is only provided to developers who need to manage resources across workspaces.
:::

Use a personal access token (PAT) associated with an organization admin to programmatically create workspaces. This PAT can also be used to manage resources across your organization's workspaces (e.g. creating and deleting tracing projects, datasets, prompts, etc.).
By default, the PAT will target the workspace it was created in. To manage resources in a workspace different from the default, you can specify the desired workspace ID in the client declaration. The sample code
Expand Down Expand Up @@ -245,8 +248,6 @@ url = client.push_prompt("example-joke-prompt", object=prompt)
print("Successfully created prompt and tracing project in default workspace", project.id, url)
session = requests.Session()
# Specify new workspace id
session.headers.update({"X-Tenant-Id": "<YOUR_WORKSPACE_ID>"})
client = ls.Client(session=session)
Expand Down

0 comments on commit 0b8e2aa

Please sign in to comment.