When you can target a different teamspace
TheDatagrid-Teamspace header only takes effect for API keys created with scopeLevel: "account". For these account-scoped keys, the header may select any teamspace under the same account as the key’s home teamspace.
For the default scopeLevel: "org" keys, the header is ignored — the request always runs against the home teamspace. To target a different teamspace with an org-scoped key, mint a new key inside the target teamspace.
Key scopeLevel | Datagrid-Teamspace behavior |
|---|---|
"org" (default) | Header is ignored. Request runs against the key’s home teamspace. |
"account" | Header selects the target teamspace. Must be under the same account as the home teamspace; otherwise the request returns 404. |
Option 1: Initialize the client with a teamspace
Initialize the Datagrid client with a teamspace ID — all subsequent requests will use it automatically (account-scoped keys only).Option 2: Scope individual requests
Pass theDatagrid-Teamspace header per request — useful when one client addresses multiple teamspaces in the same account.