Method: projects.locations.connections.gitRepositoryLinks.fetchReadWriteToken

Fetches read/write token of a given gitRepositoryLink.

HTTP request

POST https://developerconnect.googleapis.com/v1/{gitRepositoryLink=projects/*/locations/*/connections/*/gitRepositoryLinks/*}:fetchReadWriteToken

The URL uses gRPC Transcoding syntax.

Path parameters

Parameters

Request body

The request body must be empty.

Response body

Message for responding to get read/write token.

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

JSON representation
{
  "token": string,
  "expirationTime": string,
  "gitUsername": 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".

gitUsername

string

The gitUsername to specify when making a git clone with the token. For example, for GitHub GitRepositoryLinks, this would be "x-access-token"

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 gitRepositoryLink resource:

  • developerconnect.gitRepositoryLinks.fetchReadWriteToken

For more information, see the IAM documentation.