- HTTP request
- Path parameters
- Query parameters
- Request body
- Response body
- Authorization scopes
- IAM Permissions
- Try it!
Returns the contents of a file (inside a Repository). The Repository must not have a value for gitRemoteSettings.url 
.
HTTP request
 GET https://dataform.googleapis.com/v1beta1/{name=projects/*/locations/*/repositories/*}:readFile 
The URL uses gRPC Transcoding syntax.
Path parameters
name 
 string 
Required. The repository's name.
Authorization requires the following IAM 
permission on the specified resource name 
:
-  dataform.repositories.readFile
Query parameters
| Parameters | |
|---|---|
| commitSha |   Optional. The commit SHA for the commit to read from. If unset, the file will be read from HEAD. | 
| path |   Required. Full file path to read including filename, from repository root. | 
Request body
The request body must be empty.
Response body
 repositories.readFile 
response message.
If successful, the response body contains data with the following structure:
| JSON representation | 
|---|
| { "contents" : string } | 
| Fields | |
|---|---|
| contents |   The file's contents. A base64-encoded string. | 
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.readFile
For more information, see the IAM documentation .

