Stay organized with collections
Save and categorize content based on your preferences.
Lists all sessions in a given database.
For more information about retries and long-running operations, see
Understand connectors.
Arguments
Parameters
database
string
Required. The database in which to list sessions.
filter
string
An expression for filtering the results of the request. Filter rules are case insensitive. The fields eligible for filtering are: * labels.key where key is the name of a label Some examples of using filters are: * labels.env:* --> The session has the label "env". * labels.env:dev --> The session has the label "env" and the value of the label contains the string "dev".
[[["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-28 UTC."],[],[],null,["# Method: googleapis.spanner.v1.projects.instances.databases.sessions.list\n\nLists all sessions in a given database.\n\nFor more information about retries and long-running operations, see\n[Understand connectors]().\n\nArguments\n---------\n\nRaised exceptions\n-----------------\n\nResponse\n--------\n\nIf successful, the response contains an instance of [`ListSessionsResponse`](https://cloud.google.com/workflows/docs/reference/googleapis/spanner/v1/Overview#ListSessionsResponse).\n\nSubworkflow snippet\n-------------------\n\nSome fields might be optional or required.\nTo identify required fields, refer to the [API documentation](https://cloud.google.com/spanner/docs/reference/rest/v1/projects.instances.databases.sessions/list). \n\n### YAML\n\n```yaml\n- list:\n call: googleapis.spanner.v1.projects.instances.databases.sessions.list\n args:\n database: ...\n filter: ...\n pageSize: ...\n pageToken: ...\n result: listResult\n```\n\n### JSON\n\n```json\n[\n {\n \"list\": {\n \"call\": \"googleapis.spanner.v1.projects.instances.databases.sessions.list\",\n \"args\": {\n \"database\": \"...\",\n \"filter\": \"...\",\n \"pageSize\": \"...\",\n \"pageToken\": \"...\"\n },\n \"result\": \"listResult\"\n }\n }\n]\n```"]]