Skip to content

Commit f187ece

Browse files
Update LSD control plane API auth section to specify X-Tenant-Id (#1163)
## Overview Make it super explicit that `X-Tenant-Id` should be specified in the LSD control plane API request. It's needed for org-scoped API keys and it doesn't hurt to specify it for workspace-scoped API keys. Be explicit. Reduce user support questions. ## Type of change **Type:** Update existing documentation ## Related issues/PRs - Slack thread: https://langchain.slack.com/archives/C089RDWTKU4/p1761648613577899 ## Checklist <!-- Put an 'x' in all boxes that apply --> - [x] I have read the [contributing guidelines](README.md) - [x] I have tested my changes locally using `docs dev` - [x] All code examples have been tested and work correctly - [x] I have used **root relative** paths for internal links - [x] I have updated navigation in `src/docs.json` if needed - I have gotten approval from the relevant reviewers - (Internal team members only / optional) I have created a preview deployment using the [Create Preview Branch workflow](https://github.com/langchain-ai/docs/actions/workflows/create-preview-branch.yml) ## Additional notes N/A
1 parent 18a3523 commit f187ece

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

src/langsmith/api-ref-control-plane.mdx

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,14 +21,15 @@ The control plane hosts for Cloud data regions:
2121

2222
## Authentication
2323

24-
To authenticate with the control plane API, set the `X-Api-Key` header to a valid LangSmith API key.
24+
To authenticate with the control plane API, set the `X-Api-Key` header to a valid LangSmith API key and set the `X-Tenant-Id` header to a valid workspace ID to target.
2525

2626
Example `curl` command:
2727

2828
```shell
2929
curl --request GET \
3030
--url http://localhost:8124/v2/deployments \
3131
--header 'X-Api-Key: LANGSMITH_API_KEY'
32+
--header 'X-Tenant-Id': WORKSPACE_ID'
3233
```
3334
3435
## Versioning
@@ -59,6 +60,7 @@ load_dotenv()
5960
# required environment variables
6061
CONTROL_PLANE_HOST = os.getenv("CONTROL_PLANE_HOST")
6162
LANGSMITH_API_KEY = os.getenv("LANGSMITH_API_KEY")
63+
WORKSPACE_ID = os.getenv("WORKSPACE_ID")
6264
INTEGRATION_ID = os.getenv("INTEGRATION_ID")
6365
MAX_WAIT_TIME = 1800 # 30 mins
6466
@@ -67,6 +69,7 @@ def get_headers() -> dict:
6769
"""Return common headers for requests to the control plane API."""
6870
return {
6971
"X-Api-Key": LANGSMITH_API_KEY,
72+
"X-Tenant-Id": WORKSPACE_ID,
7073
}
7174
7275

0 commit comments

Comments
 (0)