Cloud Build API

Creates and manages builds on Google Cloud Platform.

Service: cloudbuild.googleapis.com

To call this service, we recommend that you use the Google-provided client libraries. If your application needs to use your own libraries to call this service, use the following information when you make the API requests.

Discovery document

A Discovery Document is a machine-readable specification for describing and consuming REST APIs. It is used to build client libraries, IDE plugins, and other tools that interact with Google APIs. One service may provide multiple discovery documents. This service provides the following discovery documents:

Service endpoint

A service endpoint is a base URL that specifies the network address of an API service. One service might have multiple service endpoints. This service has the following service endpoint and all URIs below are relative to this service endpoint:

  • https://cloudbuild.googleapis.com

REST Resource: v2.projects.locations

Methods
getGET /v2/{name=projects/*/locations/*}
Gets information about a location.
listGET /v2/{name=projects/*}/locations
Lists information about the supported locations for this service.

REST Resource: v2.projects.locations.connections

Methods
createPOST /v2/{parent=projects/*/locations/*}/connections
Creates a Connection.
deleteDELETE /v2/{name=projects/*/locations/*/connections/*}
Deletes a single connection.
fetchLinkableRepositoriesGET /v2/{connection=projects/*/locations/*/connections/*}:fetchLinkableRepositories
FetchLinkableRepositories get repositories from SCM that are accessible and could be added to the connection.
getGET /v2/{name=projects/*/locations/*/connections/*}
Gets details of a single connection.
getIamPolicyGET /v2/{resource=projects/*/locations/*/connections/*}:getIamPolicy
Gets the access control policy for a resource.
listGET /v2/{parent=projects/*/locations/*}/connections
Lists Connections in a given project and location.
/v2/{connection.name=projects/*/locations/*/connections/*}
Updates a single connection.
processWebhookPOST /v2/{parent=projects/*/locations/*}/connections:processWebhook
ProcessWebhook is called by the external SCM for notifying of events.
setIamPolicyPOST /v2/{resource=projects/*/locations/*/connections/*}:setIamPolicy
Sets the access control policy on the specified resource.
testIamPermissionsPOST /v2/{resource=projects/*/locations/*/connections/*}:testIamPermissions
Returns permissions that a caller has on the specified resource.

REST Resource: v2.projects.locations.connections.repositories

Methods
accessReadTokenPOST /v2/{repository=projects/*/locations/*/connections/*/repositories/*}:accessReadToken
Fetches read token of a given repository.
accessReadWriteTokenPOST /v2/{repository=projects/*/locations/*/connections/*/repositories/*}:accessReadWriteToken
Fetches read/write token of a given repository.
batchCreatePOST /v2/{parent=projects/*/locations/*/connections/*}/repositories:batchCreate
Creates multiple repositories inside a connection.
createPOST /v2/{parent=projects/*/locations/*/connections/*}/repositories
Creates a Repository.
deleteDELETE /v2/{name=projects/*/locations/*/connections/*/repositories/*}
Deletes a single repository.
fetchGitRefsGET /v2/{repository=projects/*/locations/*/connections/*/repositories/*}:fetchGitRefs
Fetch the list of branches or tags for a given repository.
getGET /v2/{name=projects/*/locations/*/connections/*/repositories/*}
Gets details of a single repository.
listGET /v2/{parent=projects/*/locations/*/connections/*}/repositories
Lists Repositories in a given connection.

REST Resource: v2.projects.locations.operations

Methods
cancelPOST /v2/{name=projects/*/locations/*/operations/*}:cancel
Starts asynchronous cancellation on a long-running operation.
getGET /v2/{name=projects/*/locations/*/operations/*}
Gets the latest state of a long-running operation.

REST Resource: v1

Methods
webhookPOST /v1/webhook
ReceiveWebhook is called when the API receives a webhook.

REST Resource: v1.DotComWebhook

Methods
receivePOST /v1/DotComWebhook:receive
ReceiveDotComWebhook is called when the API receives a .com webhook.

REST Resource: v1.locations

Methods
regionalWebhookPOST /v1/{location=locations/*}/regionalWebhook
ReceiveRegionalWebhook is called when the API receives a regional webhook.

REST Resource: v1.operations

Methods
cancelPOST /v1/{name=operations/**}:cancel
Starts asynchronous cancellation on a long-running operation.
getGET /v1/{name=operations/**}
Gets the latest state of a long-running operation.

REST Resource: v1.projects.builds

Methods
approvePOST /v1/{name=projects/*/builds/*}:approve
Approves or rejects a pending build.
cancelPOST /v1/projects/{projectId}/builds/{id}:cancel
Cancels a build in progress.
createPOST /v1/projects/{projectId}/builds
Starts a build with the specified configuration.
getGET /v1/projects/{projectId}/builds/{id}
Returns information about a previously requested build.
listGET /v1/projects/{projectId}/builds
Lists previously requested builds.
retryPOST /v1/projects/{projectId}/builds/{id}:retry
Creates a new build based on the specified build.

REST Resource: v1.projects.EnterpriseConfigs

Methods
createPOST /v1/{parent=projects/*}/EnterpriseConfigs
Create an association between a GCP project and a Enterprise server.
deleteDELETE /v1/{name=projects/*/EnterpriseConfigs/*}
Delete an association between a GCP project and a Enterprise server.
getGET /v1/{name=projects/*/EnterpriseConfigs/*}
Retrieve a EnterpriseConfig.
listGET /v1/{parent=projects/*}/EnterpriseConfigs
List all EnterpriseConfigs for a given project.
/v1/{EnterpriseConfig.name=projects/*/EnterpriseConfigs/*}
Update an association between a GCP project and a Enterprise server.

REST Resource: v1.projects.locations

Methods
getDefaultServiceAccountGET /v1/{name=projects/*/locations/*/defaultServiceAccount}
Returns the DefaultServiceAccount used by the project.

REST Resource: v1.projects.locations.bitbucketServerConfigs

Methods
createPOST /v1/{parent=projects/*/locations/*}/bitbucketServerConfigs
Creates a new BitbucketServerConfig.
deleteDELETE /v1/{name=projects/*/locations/*/bitbucketServerConfigs/*}
Delete a BitbucketServerConfig.
getGET /v1/{name=projects/*/locations/*/bitbucketServerConfigs/*}
Retrieve a BitbucketServerConfig.
listGET /v1/{parent=projects/*/locations/*}/bitbucketServerConfigs
List all BitbucketServerConfigs for a given project.
/v1/{bitbucketServerConfig.name=projects/*/locations/*/bitbucketServerConfigs/*}
Updates an existing BitbucketServerConfig.
removeBitbucketServerConnectedRepositoryPOST /v1/{config=projects/*/locations/*/bitbucketServerConfigs/*}:removeBitbucketServerConnectedRepository
Remove a Bitbucket Server repository from a given BitbucketServerConfig's connected repositories.

REST Resource: v1.projects.locations.bitbucketServerConfigs.connectedRepositories

Methods
batchCreatePOST /v1/{parent=projects/*/locations/*/bitbucketServerConfigs/*}/connectedRepositories:batchCreate
Batch connecting Bitbucket Server repositories to Cloud Build.

REST Resource: v1.projects.locations.bitbucketServerConfigs.repos

Methods
listGET /v1/{parent=projects/*/locations/*/bitbucketServerConfigs/*}/repos
List all repositories for a given BitbucketServerConfig.

REST Resource: v1.projects.locations.builds

Methods
approvePOST /v1/{name=projects/*/locations/*/builds/*}:approve
Approves or rejects a pending build.
cancelPOST /v1/{name=projects/*/locations/*/builds/*}:cancel
Cancels a build in progress.
createPOST /v1/{parent=projects/*/locations/*}/builds
Starts a build with the specified configuration.
getGET /v1/{name=projects/*/locations/*/builds/*}
Returns information about a previously requested build.
listGET /v1/{parent=projects/*/locations/*}/builds
Lists previously requested builds.
retryPOST /v1/{name=projects/*/locations/*/builds/*}:retry
Creates a new build based on the specified build.

REST Resource: v1.projects.locations.gitLabConfigs

Methods
createPOST /v1/{parent=projects/*/locations/*}/gitLabConfigs
Creates a new GitLabConfig.
deleteDELETE /v1/{name=projects/*/locations/*/gitLabConfigs/*}
Delete a GitLabConfig.
getGET /v1/{name=projects/*/locations/*/gitLabConfigs/*}
Retrieves a GitLabConfig.
listGET /v1/{parent=projects/*/locations/*}/gitLabConfigs
List all GitLabConfigs for a given project.
/v1/{gitlabConfig.name=projects/*/locations/*/gitLabConfigs/*}
Updates an existing GitLabConfig.
removeGitLabConnectedRepositoryPOST /v1/{config=projects/*/locations/*/gitLabConfigs/*}:removeGitLabConnectedRepository
Remove a GitLab repository from a given GitLabConfig's connected repositories.

REST Resource: v1.projects.locations.gitLabConfigs.connectedRepositories

Methods
batchCreatePOST /v1/{parent=projects/*/locations/*/gitLabConfigs/*}/connectedRepositories:batchCreate
Batch connecting GitLab repositories to Cloud Build.

REST Resource: v1.projects.locations.gitLabConfigs.repos

Methods
listGET /v1/{parent=projects/*/locations/*/gitLabConfigs/*}/repos
List all repositories for a given GitLabConfig.

REST Resource: v1.projects.locations.EnterpriseConfigs

Methods
createPOST /v1/{parent=projects/*/locations/*}/EnterpriseConfigs
Create an association between a GCP project and a Enterprise server.
deleteDELETE /v1/{name=projects/*/locations/*/EnterpriseConfigs/*}
Delete an association between a GCP project and a Enterprise server.
getGET /v1/{name=projects/*/locations/*/EnterpriseConfigs/*}
Retrieve a EnterpriseConfig.
listGET /v1/{parent=projects/*/locations/*}/EnterpriseConfigs
List all EnterpriseConfigs for a given project.
/v1/{EnterpriseConfig.name=projects/*/locations/*/EnterpriseConfigs/*}
Update an association between a GCP project and a Enterprise server.

REST Resource: v1.projects.locations.operations

Methods
cancelPOST /v1/{name=projects/*/locations/*/operations/*}:cancel
Starts asynchronous cancellation on a long-running operation.
getGET /v1/{name=projects/*/locations/*/operations/*}
Gets the latest state of a long-running operation.

REST Resource: v1.projects.locations.triggers

Methods
createPOST /v1/{parent=projects/*/locations/*}/triggers
Creates a new BuildTrigger.
deleteDELETE /v1/{name=projects/*/locations/*/triggers/*}
Deletes a BuildTrigger by its project ID and trigger ID.
getGET /v1/{name=projects/*/locations/*/triggers/*}
Returns information about a BuildTrigger.
listGET /v1/{parent=projects/*/locations/*}/triggers
Lists existing BuildTriggers.
/v1/{trigger.resourceName=projects/*/locations/*/triggers/*}
Updates a BuildTrigger by its project ID and trigger ID.
runPOST /v1/{name=projects/*/locations/*/triggers/*}:run
Runs a BuildTrigger at a particular source revision.
webhookPOST /v1/{name=projects/*/locations/*/triggers/*}:webhook
ReceiveTriggerWebhook [Experimental] is called when the API receives a webhook request targeted at a specific trigger.

REST Resource: v1.projects.locations.workerPools

Methods
createPOST /v1/{parent=projects/*/locations/*}/workerPools
Creates a WorkerPool.
deleteDELETE /v1/{name=projects/*/locations/*/workerPools/*}
Deletes a WorkerPool.
getGET /v1/{name=projects/*/locations/*/workerPools/*}
Returns details of a WorkerPool.
listGET /v1/{parent=projects/*/locations/*}/workerPools
Lists WorkerPools.
/v1/{workerPool.name=projects/*/locations/*/workerPools/*}
Updates a WorkerPool.

REST Resource: v1.projects.triggers

Methods
createPOST /v1/projects/{projectId}/triggers
Creates a new BuildTrigger.
deleteDELETE /v1/projects/{projectId}/triggers/{triggerId}
Deletes a BuildTrigger by its project ID and trigger ID.
getGET /v1/projects/{projectId}/triggers/{triggerId}
Returns information about a BuildTrigger.
listGET /v1/projects/{projectId}/triggers
Lists existing BuildTriggers.
/v1/projects/{projectId}/triggers/{triggerId}
Updates a BuildTrigger by its project ID and trigger ID.
runPOST /v1/projects/{projectId}/triggers/{triggerId}:run
Runs a BuildTrigger at a particular source revision.
webhookPOST /v1/projects/{projectId}/triggers/{trigger}:webhook
ReceiveTriggerWebhook [Experimental] is called when the API receives a webhook request targeted at a specific trigger.