---
title: "POST /v1/projects/{projectsId}/instances/{instancesId}/databases/{databasesId}/sessions:adapter"
method: POST
path: "/v1/projects/{projectsId}/instances/{instancesId}/databases/{databasesId}/sessions:adapter"
tags: ["projects"]
---

# POST /v1/projects/{projectsId}/instances/{instancesId}/databases/{databasesId}/sessions:adapter

`POST /v1/projects/{projectsId}/instances/{instancesId}/databases/{databasesId}/sessions:adapter`

## Request

- Base URL: `https://spanner.googleapis.com`
- URL: `https://spanner.googleapis.com/v1/projects/{projectsId}/instances/{instancesId}/databases/{databasesId}/sessions:adapter`
- Auth: one of:
  - OAuth 2 and OAuth 2
    - Implicit: `https://accounts.google.com/o/oauth2/auth`
    - Scopes: `https://www.googleapis.com/auth/cloud-platform`
    - Authorization code: `https://accounts.google.com/o/oauth2/auth`
    - Token URL: `https://accounts.google.com/o/oauth2/token` scopes: `https://www.googleapis.com/auth/cloud-platform`
  - OAuth 2 and OAuth 2
    - Implicit: `https://accounts.google.com/o/oauth2/auth`
    - Scopes: `https://www.googleapis.com/auth/spanner.data`
    - Authorization code: `https://accounts.google.com/o/oauth2/auth`
    - Token URL: `https://accounts.google.com/o/oauth2/token` scopes: `https://www.googleapis.com/auth/spanner.data`

Creates a new session to be used for requests made by the adapter. A session identifies a specific incarnation of a database resource and is meant to be reused across many `AdaptMessage` calls.

## Path parameters

- `projectsId` string, required
- `instancesId` string, required
- `databasesId` string, required

## Query parameters

- `$.xgafv` '1' | '2'
- `access_token` string
- `alt` 'json' | 'media' | 'proto'
- `callback` string
- `fields` string
- `key` string
- `oauth_token` string
- `prettyPrint` boolean
- `quotaUser` string
- `uploadType` string
- `upload_protocol` string

## Request body

- AdapterSession: A session in the Cloud Spanner Adapter API.
  - `name` string: Identifier. The name of the session. This is always system-assigned.

## Response `200`

Successful response

- AdapterSession: A session in the Cloud Spanner Adapter API.
  - `name` string: Identifier. The name of the session. This is always system-assigned.

## Changes

- **2026-12-05** `a7213b86b5d7`: 4 info
  - the security scope `https://www.googleapis.com/auth/cloud-platform` was added to the endpoint's security scheme `Oauth2`
  - the security scope `https://www.googleapis.com/auth/cloud-platform` was added to the endpoint's security scheme `Oauth2c`
  - the security scope `https://www.googleapis.com/auth/spanner.data` was removed from the endpoint's security scheme `Oauth2`
  - the security scope `https://www.googleapis.com/auth/spanner.data` was removed from the endpoint's security scheme `Oauth2c`
- **2026-11-20** `54a0040f5251`: 4 info
  - the security scope `https://www.googleapis.com/auth/cloud-platform` was added to the endpoint's security scheme `Oauth2`
  - the security scope `https://www.googleapis.com/auth/cloud-platform` was added to the endpoint's security scheme `Oauth2c`
  - the security scope `https://www.googleapis.com/auth/spanner.data` was removed from the endpoint's security scheme `Oauth2`
  - the security scope `https://www.googleapis.com/auth/spanner.data` was removed from the endpoint's security scheme `Oauth2c`

[Operation history](https://skmtc.dev/google/apis/spanner/changes/v1/projects/:projectsId/instances/:instancesId/databases/:databasesId/sessions:adapter/post.md)

---

[API](https://skmtc.dev/google/apis/spanner.md) - [All operations](https://skmtc.dev/google/apis/spanner/llms.txt) - [OpenAPI document](https://skmtc.dev/google/apis/spanner/revisions/a7213b86b5d7?raw)
