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.
Get quota for a project.
GET /projects/customerX%2Fcalculator/@PLUGIN@~quota/ HTTP/1.0
As response a QuotaInfo entity is returned that describes the projects quota.
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 } }
Get quota for the projects accessible by the caller.
GET /config/server/@PLUGIN@~quota/ HTTP/1.0
As result a map is returned that maps the project names to QuotaInfo entries. The entries in the map are sorted by project name.
HTTP/1.1 200 OK Content-Disposition: attachment Content-Type: application/json;charset=UTF-8 )]}' { "external/bison": { "repo_size": 386, "max_repo_size": 1048576, "namespace": { "name": "external/*", "total_size": 1874, "max_total_size": 10485760 } }, "internal/gcc": { "repo_size": 386 } }
Limit the results to those projects that start with the specified prefix.
GET /config/server/@PLUGIN@~quota/?p=external%2F HTTP/1.0
As result a map is returned that maps the project names to QuotaInfo entries. The entries in the map are sorted by project name.
HTTP/1.1 200 OK Content-Disposition: attachment Content-Type: application/json;charset=UTF-8 )]}' { "external/bison": { "repo_size": 386, "max_repo_size": 1048576, "namespace": { "name": "external/*", "total_size": 1874, "max_total_size": 10485760 } } }
The QuotaInfo
entity contains information about a project's quota. It has the following fields:
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: