Stay organized with collections
Save and categorize content based on your preferences.
Version 4.0.25.14 (latest)
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.
[[["Easy to understand","easyToUnderstand","thumb-up"],["Solved my problem","solvedMyProblem","thumb-up"],["Other","otherUp","thumb-up"]],[["Hard to understand","hardToUnderstand","thumb-down"],["Incorrect information or sample code","incorrectInformationOrSampleCode","thumb-down"],["Missing the information/samples I need","missingTheInformationSamplesINeed","thumb-down"],["Other","otherDown","thumb-down"]],["Last updated 2025-08-20 UTC."],[],[],null,["# Update Auth\n\nVersion 4.0.25.14 (latest)\n\n### Update API Session\n\n#### API Session Workspace\n\nYou can use this endpoint to change the active workspace for the current API session.\n\nOnly one workspace can be active in a session. The active workspace can be changed\nany number of times in a session.\n\nThe default workspace for API sessions is the \"production\" workspace.\n\nAll Looker APIs that use projects or lookml models (such as running queries) will\nuse the version of project and model files defined by this workspace for the lifetime of the\ncurrent API session or until the session workspace is changed again.\n\nAn API session has the same lifetime as the access_token used to authenticate API requests. Each successful\nAPI login generates a new access_token and a new API session.\n\nIf your Looker API client application needs to work in a dev workspace across multiple\nAPI sessions, be sure to select the dev workspace after each login.\n\nRequest\n-------\n\nPATCH /session \nDatatype \nDescription \nRequest \nHTTP Request \nbody \nHTTP Body \nExpand HTTP Body definition... \nbody \n[ApiSession](/looker/docs/reference/looker-api/latest/types/ApiSession) \nAuth\nExpand ApiSession definition... \ncan \n*lock* \nobject \nOperations the current user is able to perform on this object \nworkspace_id \nstring \nThe id of active workspace for this session \nsudo_user_id \n*lock* \nstring \nThe id of the actual user in the case when this session represents one user sudo'ing as another\n\nResponse\n--------\n\n### 200: Auth\n\nDatatype \nDescription \n(object) \n[ApiSession](/looker/docs/reference/looker-api/latest/types/ApiSession) \ncan \n*lock* \nobject \nOperations the current user is able to perform on this object \nworkspace_id \nstring \nThe id of active workspace for this session \nsudo_user_id \n*lock* \nstring \nThe id of the actual user in the case when this session represents one user sudo'ing as another\n\n### 400: Bad Request\n\nDatatype \nDescription \n(object) \n[Error](/looker/docs/reference/looker-api/latest/types/Error) \nmessage \n*lock* \nstring \nError details \ndocumentation_url \n*lock* \nstring \nDocumentation link\n\n### 404: Not Found\n\nDatatype \nDescription \n(object) \n[Error](/looker/docs/reference/looker-api/latest/types/Error) \nmessage \n*lock* \nstring \nError details \ndocumentation_url \n*lock* \nstring \nDocumentation link\n\n### 422: Validation Error\n\nDatatype \nDescription \n(object) \n[ValidationError](/looker/docs/reference/looker-api/latest/types/ValidationError) \nmessage \n*lock* \nstring \nError details \nerrors \n[ValidationErrorDetail](/looker/docs/reference/looker-api/latest/types/ValidationErrorDetail)\\[\\] \nExpand ValidationErrorDetail definition... \nfield \n*lock* \nstring \nField with error \ncode \n*lock* \nstring \nError code \nmessage \n*lock* \nstring \nError info message \ndocumentation_url \n*lock* \nstring \nDocumentation link \ndocumentation_url \n*lock* \nstring \nDocumentation link\n\n### 429: Too Many Requests\n\nDatatype \nDescription \n(object) \n[Error](/looker/docs/reference/looker-api/latest/types/Error) \nmessage \n*lock* \nstring \nError details \ndocumentation_url \n*lock* \nstring \nDocumentation link\n\nExamples\n--------\n\n### Python\n\n\n### Ruby\n\n\n### TypeScript"]]