Maven Virtual Registry: Registry models API
🔭 Issues plan
- Maven Virtual Registry: Database models (#467972 - closed).
- Maven Virtual Registry: Permissions policy (#467977 - closed).
-
Maven Virtual Registry: Registry models API (#467979 - closed).
👈 You're here. - Maven Virtual Registry: Maven API endpoint (#467982 - closed).
- Maven Virtual Registry: Cache logic (#467983 - closed).
- Maven Registry: Cached responses destruction (#468113 - closed).
- Improve workhorse dependencyproxy logic (#461561 - closed).
- Maven Virtual Registry: Documentation (#468115).
- Maven Virtual Registry: Performance review (#468116).
- Maven Virtual Registry: feature flag cleanup (#468117).
🗒 Description
The API endpoints should be located in the standalone resources.
1️⃣ Registries
Route | Notes |
---|---|
GET /api/v4/virtual_registries/packages/maven/registries | Get the list of all maven registries (only 1 in this scope). |
GET /api/v4/virtual_registries/packages/maven/registries/:registry_id | Get a specific maven registry |
POST /api/v4/virtual_registries/packages/maven/registries | Create a specific maven registry. Attributes will be mainly the cache settings. |
PUT /api/v4/virtual_registries/packages/maven/registries/:registry_id | Updating a specific maven registry. |
DELETE /api/v4/virtual_registries/packages/maven/registries/:registry_id | Delete a specific maven registry. |
The attributes that can be passed for the POST
and PUT
requests:
- (
POST
only)group_id
. The rootGroup
id. -
cache_validity_period_hours
.0
or positive integer.
2️⃣ Upstreams
Route | Notes |
---|---|
GET /api/v4/virtual_registries/packages/maven/registries/:registry_id/upstreams | Get the list of all upstreams. (only 1 in this scope). |
GET /api/v4/virtual_registries/packages/maven/registries/:registry_id/upstreams/:upstream_id | Get a specific upstream. |
POST /api/v4/virtual_registries/packages/maven/registries/:registry_id/upstreams | Create an upstream. Attributes will be essentially the url and the optional credentials. |
PUT /api/v4/virtual_registries/packages/maven/registries/:registry_id/upstreams/:upstream_id | Update an upstream. |
DELETE /api/v4/virtual_registries/packages/maven/registries/:registry_id/upstreams/:upstream_id | Delete an upstream. |
The attributes that can be passed for the POST
and PUT
requests:
- (
POST
only)registry_id
. TheVirtualRegistries::Maven::Registry
id. -
url
. The upstream url. -
username
. The username to use against the upstream. -
password
. The password to use against the upstream.
The password
should be a write once, read non attribute. In other words, it should not be possible to read the password
back.
3️⃣ Cached responses
Route | Notes |
---|---|
GET /api/v4/virtual_registries/packages/maven/registries/:registry_id/upstreams/:upstream_id/cached_responses | We should support a fuzzy search on the relative path attribute. |
DELETE /api/v4/virtual_registries/packages/maven/registries/:registry_id/upstreams/:upstream_id/cached_responses/:cached_response_id | cached_response_id can be the encoded relative_path as it is unique within upstream id and we don't really need a primary key on cached responses. |
The GET
request has the following attributes:
-
search
. Search term to match therelative_path
field of cached responses. Simple fuzzy search supported such as*foo*bar
.
🔮 Additional considerations
- Split this work in multiple MRs.
- Authentication: Usual public rest API means.
- Authorization: See Maven Virtual Registry: Permissions policy (#467977 - closed).
- Use a feature flag .
Edited by David Fernandez