v1
Double column
API
CLI
JS Client

Integrations /

List repositories

Gets a list of repositories accessible to this account

Required permission

Account > Git > General > Read

Query parameters

    • per_page

      integer

      The number of results to display per request. Maximum of 100 results per page.

    • page

      integer

      The page number to access.

    • cursor

      string

      The cursor returned from the previous page of results, used to request the next page.

    • vcs_service

      string

      If provided, only returns repositories belonging to this version control provider.

      one of
      bitbucket, gitlab, github, self-hosted
    • self_hosted_vcs_id

      string

      If provided, only returns repositories belonging to this self-hosted version control provider.

    • account_login

      string

      If provided, only returns repositories that can be accessed by the linked version control account with this name.

Response body

  • {object}

    Response object.

    • data

      {object} required

      Result data.

      • repos

        [array]

        A list of accessible repositories.

        • {object}

          Details about an accessible repository.

          • vcsService

            string required

            Version control provider of the repository.

            one of
            bitbucket, gitlab, github, self-hosted
          • selfHostedVcsId

            string

            If vcsService is self-hosted, the ID of the self-hosted provider.

          • id

            required

            The ID of the repository, according to the version control provider.

          • name

            string required

            The name of the repository.

          • full_name

            string required

            The full name of the repository.

          • url

            string required

            The url of the repository.

          • owner

            {object} required

            Details about the repository owner.

            • login

              string required

              The login of the repository owner.

          • accountLogin

            string required

            The login of the linked version control account that can access this repository.

    • pagination

      {object} required

      Data about the endpoint pagination.

      • hasNextPage

        boolean required

        Is there another page of results available?

      • cursor

        string

        The cursor to access the next page of results.

      • count

        number required

        The number of results returned by this request.

API
CLI
JS Client

GET /v1/vcs/repos

Example response

200 OK

The list of repos.

JSON

{
  "data": {
    "repos": [
      {
        "vcsService": "github",
        "id": 123456789,
        "name": "gatsby-with-northflank",
        "full_name": "northflank/gatsby-with-northflank",
        "url": "https://github.com/northflank/gatsby-with-northflank",
        "owner": {
          "login": "northflank"
        },
        "accountLogin": "example-user"
      }
    ]
  },
  "pagination": {
    "hasNextPage": false,
    "count": 1
  }
}

© 2022 Northflank Ltd. All rights reserved.