Repositories

Repositories are the basic unit of information organization. We will see how to obtain the list of repositories and their properties.

The repositories model

The repository model contains the essential information on data organization and activity of a project, team and developer.

Properties

  • Name
    id
    Type
    string
    Description

    Unique identifier for the repository.

  • Name
    name
    Type
    string
    Description

    The name for the repository.

  • Name
    url
    Type
    string
    Description

    The url for the repository.

  • Name
    userName
    Type
    string
    Description

    The author username of the repository.

  • Name
    createdAt
    Type
    timestamp
    Description

    Timestamp of when the repository was created.

  • Name
    pushedAt
    Type
    timestamp
    Description

    Timestamp of when the repository was updated.

  • Name
    provider
    Type
    string
    Description

    The name of the provider.

  • Name
    branchesTotal
    Type
    integer
    Description

    Number of active branches in the repository


GET/api/dashboard/repositories

List all repositories

Request

GET
/api/dashboard/repositories
curl -G https://api.pulzen-gateway/api/dashboard/repositories \
  -H "Authorization: Basic {token}"

Response

{
    "id": "R_kgDOH2Ucfw",
    "name": "QA_testing",
    "fullName": null,
    "url": "https://github.com/CleveritDemo/QA_testing",
    "userId": "MDEyOk9yZ2FuaXphdGlvbjkxMjg5MjAx",
    "userName": "CleveritDemo",
    "userLogin": "CleveritDemo",
    "email": null,
    "language": null,
    "size": 0,
    "defaultBranch": "REF_kwDOH2Ucf69yZWZzL2hlYWRzL21haW4",
    "createdAt": "2022-08-19T18:54:06Z",
    "updatedAt": "2022-08-19T18:54:06Z",
    "pushedAt": "2022-08-19T18:54:07Z",
    "provider": "GITHUB",
    "branchesTotal": 1
}

Query Parameters:

  • provider: Can be one of the following: GITHUB, GITLAB, BITBUCKET, AZUREDEVOPS.

Metrics

From Git Repositories: API Endpoint

Branches Total

Definition: Number of active branches in a repository.

Summary:

  • The total branches are calculated in-line; the values are not stored in the database.