Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Refactor Backend APIs to follow REST standard #1034

Open
mesudip opened this issue May 16, 2024 · 0 comments
Open

Refactor Backend APIs to follow REST standard #1034

mesudip opened this issue May 16, 2024 · 0 comments

Comments

@mesudip
Copy link
Contributor

mesudip commented May 16, 2024

Why

The Swagger interface for API is available here:
https://govtool.cardanoapi.io/swagger-ui/

The api follow non-standard naming and the paths contain redundant words like 'list' 'get' etc.

E.g. This is how current DRep APIs look like

GET /drep/list                      -> List all DReps in the network
GET /drep/info/{drepId}             -> Get detail about particular DRep
GET /drep/get-voting-power/{drepId} -> Get voting power of a DRep
GET /drep/getVotes/{drepId}         -> Get votes casted by a DRep

What

Refactor the api to follow proper naming conventions.
Guideline : https://restfulapi.net/resource-naming/

How

More standard and consistent way to represent those resource should be used.

Example for DRep resources.

GET /dreps                       -> List all DReps in the network
GET /dreps/{drepId}              -> Get detail about particular DRep
GET /dreps/{drepId}/voting-power -> Get voting power of a DRep
GET /dreps/{drepId}/votes        -> Get votes casted by a DRep
@mesudip mesudip moved this to Backlog in Govtool all May 16, 2024
@mesudip mesudip changed the title Refactor Backend APIs paths to follow REST standard Refactor Backend APIs to follow REST standard May 16, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
Status: Backlog
Development

No branches or pull requests

3 participants