AdminAPI could be more RESTFUL #378
Labels
No labels
action
check-aws
action
discussion-needed
action
for-external-contributors
action
for-newcomers
action
more-info-needed
action
need-funding
action
triage-required
kind
correctness
kind
ideas
kind
improvement
kind
performance
kind
testing
kind
usability
kind
wrong-behavior
prio
critical
prio
low
scope
admin-api
scope
background-healing
scope
build
scope
documentation
scope
k8s
scope
layout
scope
metadata
scope
ops
scope
rpc
scope
s3-api
scope
security
scope
telemetry
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference: Deuxfleurs/garage#378
Loading…
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Instead of mapping directly to the CLI commands and to a RPC model, we could have a more restful approach.
We could replace
/status
and/connect
with a/member
,/membership
,/fleet
or something similar.POST
would be used to add membersGET
would be used to get members status (without the layout)For the layout part, we could also have a single
/layout
endpoint:GET
would return the current and staged layout, as currentlyPATCH
orPUT
could be used to change the staged layout (UpdateClusterLayout
)DELETE
could be used to revert change on the staged layout (RevertClusterLayout
)POST
could be used to apply the staged layout (ApplyClusterLayout
)For the key part, we could have a
/key/{pattern}
approach:GET /key
would return the list of all keysGET /key/{pattern}
would fetch the first key matching the pattern.?exact
or something similar could be appended to find the exact identifier and thus benefit from the optimizationPOST /key
would be used to add a new key. Adding?import
could be used to import the key instead of generating a new one.PATCH /key/{identifier}
(orPUT
) could be used to update a keyDELETE /key/{identifier}
would be used to delete the keyThe same logic could be used for the bucket endpoints but I have not reviewed them yet...
Also, sometimes we pass small parameters in the body:
But sometimes not: