diff --git a/src/langsmith/api-ref-control-plane.mdx b/src/langsmith/api-ref-control-plane.mdx index 829c6a40a8..1b753bc048 100644 --- a/src/langsmith/api-ref-control-plane.mdx +++ b/src/langsmith/api-ref-control-plane.mdx @@ -21,7 +21,7 @@ The control plane hosts for Cloud data regions: ## Authentication -To authenticate with the control plane API, set the `X-Api-Key` header to a valid LangSmith API key. +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. Example `curl` command: @@ -29,6 +29,7 @@ Example `curl` command: curl --request GET \ --url http://localhost:8124/v2/deployments \ --header 'X-Api-Key: LANGSMITH_API_KEY' + --header 'X-Tenant-Id': WORKSPACE_ID' ``` ## Versioning @@ -59,6 +60,7 @@ load_dotenv() # required environment variables CONTROL_PLANE_HOST = os.getenv("CONTROL_PLANE_HOST") LANGSMITH_API_KEY = os.getenv("LANGSMITH_API_KEY") +WORKSPACE_ID = os.getenv("WORKSPACE_ID") INTEGRATION_ID = os.getenv("INTEGRATION_ID") MAX_WAIT_TIME = 1800 # 30 mins @@ -67,6 +69,7 @@ def get_headers() -> dict: """Return common headers for requests to the control plane API.""" return { "X-Api-Key": LANGSMITH_API_KEY, + "X-Tenant-Id": WORKSPACE_ID, }