- HTTP request
- Path parameters
- Request body
- Response body
- Authorization scopes
- IAM Permissions
- CommitMetadata
- FileOperation
- WriteFile
- DeleteFile
- Try it!
Applies a Git commit to a Repository. The Repository must not have a value for gitRemoteSettings.url.
HTTP request
POST https://dataform.googleapis.com/v1beta1/{name=projects/*/locations/*/repositories/*}:commit
The URL uses gRPC Transcoding syntax.
Path parameters
| Parameters | |
|---|---|
| name | 
 Required. The repository's name. Authorization requires the following IAM permission on the specified resource  
 | 
Request body
The request body contains data with the following structure:
| JSON representation | 
|---|
| { "commitMetadata": { object ( | 
| Fields | |
|---|---|
| commitMetadata | 
 Required. The changes to commit to the repository. | 
| requiredHeadCommitSha | 
 Optional. The commit SHA which must be the repository's current HEAD before applying this commit; otherwise this request will fail. If unset, no validation on the current HEAD commit SHA is performed. | 
| fileOperations | 
 Optional. A map to the path of the file to the operation. The path is the full file path including filename, from repository root. An object containing a list of  | 
Response body
repositories.commit response message.
If successful, the response body contains data with the following structure:
| JSON representation | 
|---|
| { "commitSha": string } | 
| Fields | |
|---|---|
| commitSha | 
 The commit SHA of the current commit. | 
Authorization scopes
Requires one of the following OAuth scopes:
- https://www.googleapis.com/auth/cloud-platform
- https://www.googleapis.com/auth/bigquery
For more information, see the Authentication Overview.
IAM Permissions
Requires the following IAM permission on the name resource:
- dataform.repositories.commit
For more information, see the IAM documentation.
CommitMetadata
Represents a Dataform Git commit.
| JSON representation | 
|---|
| {
  "author": {
    object ( | 
| Fields | |
|---|---|
| author | 
 Required. The commit's author. | 
| commitMessage | 
 Optional. The commit's message. | 
FileOperation
Represents a single file operation to the repository.
| JSON representation | 
|---|
| { // Union field | 
| Fields | |
|---|---|
| Union field operation. The operation to perform on the file.operationcan be only one of the following: | |
| writeFile | 
 Represents the write operation. | 
| deleteFile | 
 Represents the delete operation. | 
WriteFile
Represents the write file operation (for files added or modified).
| JSON representation | 
|---|
| { "contents": string } | 
| Fields | |
|---|---|
| contents | 
 The file's contents. A base64-encoded string. | 
DeleteFile
This type has no fields.
Represents the delete file operation.