Repository navigation
Closed
Labels
priority: highHigh prioritytype: featureNew feature or requestworkload: daysLikely takes days to resolve
Description
Why?
GET /services/types lists the distinct types of the registered services. Types aren't stored, so:
- a type can't be registered before a service uses it;
- any user who registers a service with a new type adds that type;
- registries can't offer a curated list of types (e.g.,
org.ga4gh · tes · 1.1.0) for clients to pick from.
What?
- Store service types (
{group, artifact, version}) in their own collection.POST /services/typesregisters one.DELETE /services/typeswith the type in the body, or an equivalent path design consistent with the API, removes one. Only admins may remove types, in every mode; users who add types don't own them and can never remove them, since that could invalidate other people's services. Removing a type that registered services still use is refused (409, detail: "Service type is in use. If you really want to revoke it, edit or delete all services that depend on it.").- Both are extensions of the GA4GH API, in
additions.openapi.yaml.
GET /services/typeslists the stored types.- A one-off, idempotent migration seeds them from the types of existing services, so nothing disappears on upgrade.
- A configuration option for who may add types (both are generic, for any deployment):
open(the current behaviour): any logged-in user may add types, explicitly viaPOST /services/typesor implicitly by registering or updating a service with a new type, which is then stored.controlled: only admins may add types. Services from non-admins must use a stored type (400with a cleardetailotherwise). Admins are exempt, and their new types are stored.- Choose the default that keeps the current behaviour; document both.
GET /metells clients whether the caller may add types (e.g.,may_add_service_types), so UIs can offer "Add new service type" only when it works.
Out of scope: a "pending" mode where users request new types and admins approve them in-app.
Acceptance criteria
- Admins can register and remove service types before any service uses them.
- In
controlledmode, non-admins can only register services with stored types, and they can't add types. - Clients can tell from
GET /mewhether the caller may add types.
Requested by the maintainer for the Cloud Registry UI (elixir-cloud-aai/cloud-registry-ui#19).
Metadata
Metadata
Assignees
Labels
priority: highHigh prioritytype: featureNew feature or requestworkload: daysLikely takes days to resolve
Activity