- HTTP request
- Path parameters
- Query parameters
- Request body
- Response body
- Authorization scopes
- IAM Permissions
- BlameRange
- Try it!
Fetches blame information for a file or line range in a file.
HTTP request
GET https://developerconnect.googleapis.com/v1/{name=projects/*/locations/*/connections/*/gitRepositoryLinks/*}:fetchFileBlame
The URL uses gRPC Transcoding syntax.
Path parameters
| Parameters | |
|---|---|
name |
Required. The resource name of the GitRepositoryLink in the format |
Query parameters
| Parameters | |
|---|---|
ref |
Required. The SCM commit SHA, or symbolic revision (for example, branch name, tag) from which to fetch the blame. |
path |
Required. The file path within the repository. |
firstLine |
Optional. The 1-indexed starting line number of the range to blame (inclusive). If not specified, blame begins at line 1. |
lastLine |
Optional. The 1-indexed ending line number of the range to blame (inclusive). If not specified, blame extends to the end of the file. |
Request body
The request body must be empty.
Response body
Response message for gitRepositoryLinks.fetchFileBlame.
If successful, the response body contains data with the following structure:
| JSON representation |
|---|
{
"ranges": [
{
object ( |
| Fields | |
|---|---|
ranges[] |
The list of blame ranges for the file. |
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 name resource:
developerconnect.gitRepositoryLinks.fetchFileBlame
For more information, see the IAM documentation.
BlameRange
BlameRange represents blame information for a range of lines.
| JSON representation |
|---|
{
"firstLine": integer,
"lastLine": integer,
"commit": {
object ( |
| Fields | |
|---|---|
firstLine |
The 1-indexed starting line number of the range (inclusive). |
lastLine |
The 1-indexed ending line number of the range (inclusive). |
commit |
The commit metadata for this line range. |