User Guide Getting Started Help Center Documentation Community Training
Looker
  
English
Français
Deutsch
日本語
Session : Session Information

Get Session beta

GET/api/3.0/session
session()

Implementation Notes

Get API Session.

Returns information about the current API session, such as which workspace is selected for the session.

Response Class

ApiSession {
workspace_id (string): The id of active workspace for this session,
can (object, read-only): Operations the current user is able to perform on this object
}

Parameters

  None

Response Messages

HTTP Status Code Reason Response Model
400 Bad Request
Error {
message (string, read-only, required): Error details,
documentation_url (string, read-only, required): Documentation link
}
404 Not Found
Error {
message (string, read-only, required): Error details,
documentation_url (string, read-only, required): Documentation link
}

Update Session beta

PATCH/api/3.0/session
update_session(body)

Implementation Notes

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.

Response Class

ApiSession {
workspace_id (string): The id of active workspace for this session,
can (object, read-only): Operations the current user is able to perform on this object
}

Parameters

Parameter Required? Description Parameter Type Data Type
body true Session body
ApiSession {
workspace_id (string): The id of active workspace for this session,
can (object, read-only): Operations the current user is able to perform on this object
}

Response Messages

HTTP Status Code Reason Response Model
400 Bad Request
Error {
message (string, read-only, required): Error details,
documentation_url (string, read-only, required): Documentation link
}
404 Not Found
Error {
message (string, read-only, required): Error details,
documentation_url (string, read-only, required): Documentation link
}
422 Validation Error
ValidationError {
message (string, read-only, required): Error details,
errors (Array[ValidationErrorDetail], read-only): Error detail array,
documentation_url (string, read-only, required): Documentation link
}
ValidationErrorDetail {
field (string, read-only): Field with error,
code (string, read-only): Error code,
message (string, read-only): Error info message,
documentation_url (string, read-only, required): Documentation link
}
Top