Method: projects.repos.list

Returns all repos belonging to a project. The sizes of the repos are not set by repos.list. To get the size of a repo, use repos.get.

HTTP request

GET https://sourcerepo.googleapis.com/v1/{name=projects/*}/repos

The URL uses Google API HTTP annotation syntax.

Path parameters

Parameters
name

string

The project ID whose repos should be listed. Values are of the form projects/<project>.

Authorization requires the following Google IAM permission on the specified resource name:

  • source.repos.list

Query parameters

Parameters
pageSize

number

Maximum number of repositories to return; between 1 and 500. If not set or zero, defaults to 100 at the server.

pageToken

string

Resume listing repositories where a prior ListReposResponse left off. This is an opaque token that must be obtained from a recent, prior ListReposResponse's nextPageToken field.

Request body

The request body must be empty.

Response body

If successful, the response body contains data with the following structure:

Response for repos.list. The size is not set in the returned repositories.

JSON representation
{
  "repos": [
    {
      object(Repo)
    }
  ],
  "nextPageToken": string,
}
Fields
repos[]

object(Repo)

The listed repos.

nextPageToken

string

If non-empty, additional repositories exist within the project. These can be retrieved by including this value in the next ListReposRequest's pageToken field.

Authorization

Requires one of the following OAuth scopes:

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

For more information, see the Auth Guide.

Monitor your resources on the go

Get the Google Cloud Console app to help you manage your projects.

Send feedback about...

Cloud Source Repositories