Update API Session
API Session Workspace
You can use this endpoint to change the active workspace for the current API session.
Only one workspace can be active in a session. The active workspace can be changed any number of times in a session.
The default workspace for API sessions is the "production" workspace.
All Looker APIs that use projects or lookml models (such as running queries) will use the version of project and model files defined by this workspace for the lifetime of the current API session or until the session workspace is changed again.
An API session has the same lifetime as the access_token used to authenticate API requests. Each successful API login generates a new access_token and a new API session.
If your Looker API client application needs to work in a dev workspace across multiple API sessions, be sure to select the dev workspace after each login.
Request
Response
200: Auth
400: Bad Request
404: Not Found
422: Validation Error
429: Too Many Requests
Examples
Python
Ruby
https://github.com/looker-open-source/sdk-codegen/blob/main/examples/ruby/dev_vs_prod.rb |
TypeScript
https://github.com/looker-open-source/sdk-codegen/blob/main/examples/typescript/validateBranch.ts |