Method: projects.locations.repositories.files.patch

Updates a file.

HTTP request


The URLs use gRPC Transcoding syntax.

Path parameters

Parameters
file.name

string

The name of the file, for example: projects/p1/locations/us-central1/repositories/repo1/files/a%2Fb%2Fc.txt. If the file ID part contains slashes, they are escaped.

Query parameters

Parameters
updateMask

string (FieldMask format)

Required. The update mask applies to the resource. For the FieldMask definition, see https://developers.google.com/protocol-buffers/docs/reference/google.protobuf#fieldmask

This is a comma-separated list of fully qualified names of fields. Example: "user.displayName,photo".

Request body

The request body contains an instance of File.

Response body

If successful, the response body contains an instance of File.

Authorization scopes

Requires the following OAuth scope:

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

For more information, see the Authentication Overview.