AdminAPI could be more RESTFUL #378
Labels
No Label
AdminAPI
Bug
Check AWS
CI
Correctness
Critical
Documentation
Ideas
Improvement
Low priority
Newcomer
Performance
S3 Compatibility
Testing
Usability
No Milestone
No Assignees
1 Participants
Notifications
Due Date
No due date set.
Dependencies
No dependencies set.
Reference: Deuxfleurs/garage#378
Loading…
Reference in New Issue
No description provided.
Delete Branch "%!s(<nil>)"
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: