Method: projects.locations.connections.repositories.accessReadToken

Fetches read token of a given repository.

HTTP request

POST https://cloudbuild.googleapis.com/v2/{repository=projects/*/locations/*/connections/*/repositories/*}:accessReadToken

The URL uses gRPC Transcoding syntax.

Path parameters

Parameters
repository

string

Required. The resource name of the repository in the format projects/*/locations/*/connections/*/repositories/*.

Request body

The request body must be empty.

Response body

Message for responding to get read token.

If successful, the response body contains data with the following structure:

JSON representation
{
  "token": string,
  "expirationTime": string
}
Fields
token

string

The token content.

expirationTime

string (Timestamp format)

Expiration timestamp. Can be empty if unknown or non-expiring.

A timestamp in RFC3339 UTC "Zulu" format, with nanosecond resolution and up to nine fractional digits. Examples: "2014-10-02T15:01:23Z" and "2014-10-02T15:01:23.045123456Z".

Authorization scopes

Requires the following OAuth scope:

  • https://www.googleapis.com/auth/cloud-platform

For more information, see the Authentication Overview.

IAM Permissions

Requires the following IAM permission on the repository resource:

  • cloudbuild.repositories.accessReadToken

For more information, see the IAM documentation.