Authorization requires the followingIAMpermission on the specified resourcename:
dataform.repositories.fetchHistory
Query parameters
Parameters
pageSize
integer
Optional. Maximum number of commits to return. The server may return fewer items than requested. If unspecified, the server will pick an appropriate default.
pageToken
string
Optional. Page token received from a previousrepositories.fetchHistorycall. Provide this to retrieve the subsequent page.
When paginating, all other parameters provided torepositories.fetchHistory, with the exception ofpageSize, must match the call that provided the page token.
Request body
The request body must be empty.
Response body
repositories.fetchHistoryresponse message.
If successful, the response body contains data with the following structure:
Uses RFC 3339, where generated output will always be Z-normalized and uses 0, 3, 6 or 9 fractional digits. Offsets other than "Z" are also accepted. Examples:"2014-10-02T15:01:23Z","2014-10-02T15:01:23.045123456Z"or"2014-10-02T15:01:23+05:30".
[[["Easy to understand","easyToUnderstand","thumb-up"],["Solved my problem","solvedMyProblem","thumb-up"],["Other","otherUp","thumb-up"]],[["Hard to understand","hardToUnderstand","thumb-down"],["Incorrect information or sample code","incorrectInformationOrSampleCode","thumb-down"],["Missing the information/samples I need","missingTheInformationSamplesINeed","thumb-down"],["Other","otherDown","thumb-down"]],["Last updated 2025-07-21 UTC."],[[["\u003cp\u003eThis page documents the \u003ccode\u003efetchHistory\u003c/code\u003e method for a Dataform repository, which retrieves a history of commits, provided the repository does not contain a value for \u003ccode\u003egitRemoteSettings.url\u003c/code\u003e.\u003c/p\u003e\n"],["\u003cp\u003eThe HTTP request uses \u003ccode\u003eGET\u003c/code\u003e to fetch the commit history, with the repository's name specified as a path parameter in the URL, and requires the \u003ccode\u003edataform.repositories.fetchHistory\u003c/code\u003e IAM permission.\u003c/p\u003e\n"],["\u003cp\u003eOptional query parameters like \u003ccode\u003epageSize\u003c/code\u003e and \u003ccode\u003epageToken\u003c/code\u003e can be used to manage the number of results returned and navigate through multiple pages of commits, respectively.\u003c/p\u003e\n"],["\u003cp\u003eThe response body returns a list of commit logs (\u003ccode\u003eCommitLogEntry\u003c/code\u003e), each containing details like \u003ccode\u003ecommitTime\u003c/code\u003e, \u003ccode\u003ecommitSha\u003c/code\u003e, \u003ccode\u003eauthor\u003c/code\u003e, and \u003ccode\u003ecommitMessage\u003c/code\u003e, and a \u003ccode\u003enextPageToken\u003c/code\u003e for further pagination.\u003c/p\u003e\n"],["\u003cp\u003eTo use this method, one of the provided OAuth scopes must be used, and the \u003ccode\u003edataform.repositories.fetchHistory\u003c/code\u003e IAM permission on the specified resource \u003ccode\u003ename\u003c/code\u003e is mandatory.\u003c/p\u003e\n"]]],[],null,["# Method: projects.locations.repositories.fetchHistory\n\n- [HTTP request](#body.HTTP_TEMPLATE)\n- [Path parameters](#body.PATH_PARAMETERS)\n- [Query parameters](#body.QUERY_PARAMETERS)\n- [Request body](#body.request_body)\n- [Response body](#body.response_body)\n - [JSON representation](#body.FetchRepositoryHistoryResponse.SCHEMA_REPRESENTATION)\n- [Authorization scopes](#body.aspect)\n- [IAM Permissions](#body.aspect_1)\n- [CommitLogEntry](#CommitLogEntry)\n - [JSON representation](#CommitLogEntry.SCHEMA_REPRESENTATION)\n- [Try it!](#try-it)\n\nFetches a Repository's history of commits. The Repository must not have a value for `gitRemoteSettings.url`.\n\n### HTTP request\n\n`GET https://dataform.googleapis.com/v1/{name=projects/*/locations/*/repositories/*}:fetchHistory`\n\nThe URL uses [gRPC Transcoding](https://google.aip.dev/127) syntax.\n\n### Path parameters\n\n### Query parameters\n\n### Request body\n\nThe request body must be empty.\n\n### Response body\n\n`repositories.fetchHistory` response message.\n\nIf successful, the response body contains data with the following structure:\n\n### Authorization scopes\n\nRequires one of the following OAuth scopes:\n\n- `https://www.googleapis.com/auth/cloud-platform`\n- `\n https://www.googleapis.com/auth/bigquery`\n\nFor more information, see the [Authentication Overview](/docs/authentication#authorization-gcp).\n\n### IAM Permissions\n\nRequires the following [IAM](https://cloud.google.com/iam/docs) permission on the `name` resource:\n\n- `dataform.repositories.fetchHistory`\n\nFor more information, see the [IAM documentation](https://cloud.google.com/iam/docs).\n\nCommitLogEntry\n--------------\n\nRepresents a single commit log."]]