@PLUGIN@ - /projects/ REST API

This page describes the REST endpoints that are added by the @PLUGIN@ plugin.

Please also take note of the general information on the REST API.

Quota Endpoints

Get Quota

GET /projects/{project}/@PLUGIN@~quota/

Get quota for a project.

Request

  GET /projects/customerX%2Fcalculator/@PLUGIN@~quota/ HTTP/1.0

As response a QuotaInfo entity is returned that describes the projects quota.

Response

  HTTP/1.1 200 OK
  Content-Disposition: attachment
  Content-Type: application/json;charset=UTF-8

  )]}'
  {
    "repo_size": 386,
    "max_repo_size": 1048576,
    "namespace": {
      "name": "customerX/*",
      "total_size": 1874,
      "max_total_size": 10485760
    }
  }

JSON Entities

QuotaInfo

The QuotaInfo entity contains information about a project's quota. It has the following fields:

  • repo_size: The disk space, in bytes, that is used by this project's Git repository
  • max_repo_size: The max allowed size of this project's Git repositoriy on the disk.
  • namespace: NamespaceInfo

NamespaceInfo

The ‘NamespaceInfo’ entity contains the quota information for the whole namespace. This means that the sum of sizes of all repositories under that namespace is not allowed to exceed the namespace quota. It has the following fields:

  • name: the namepspace name
  • total_size: the total size of all repositories under this namespace
  • max_total_size: the maximum allowed total size of all repositories under this namespace