ethereum-optimism / ethereum-optimism/specs
Make altda server api more RESTful
- Dominant language
- Python
- Stars
- 178
- Forks
- 206
- Avg merge
- 5d 2h
- Merged PRs (30d)
- 6
Description
**Is your feature request related to a problem? Please describe.**
The altda [server spec](https://specs.optimism.io/experimental/alt-da.html#da-server)

has redundant (and confusing) path prefixes. Specifically, the /put/ and /get/ prefixes are redundant with the HTTP method, and in the case of /put/ is actually confusing because the POST method is used instead of PUT.
The Richardson Maturity Model https://martinfowler.com/articles/richardsonMaturityModel.html gives a theoretical framework for why having verbs in the route is bad practice (http verbs are for verbs, paths are supposed to be nouns). In practice, when implementing the routing for the da server, it means I need duplicate routes for /put/commitments and /get/commitment, whereas this should have the same route (just commitment) and router will allow both GET and POST methods against it.
**Describe the solution you'd like**
Would like to clean up the routes to look like
```
POST /
POST /
GET /
```
or perhaps to be more clear and self-documenting
```
POST /keccak/
POST /generic
GET /
```
Can make this change and keep the old routes if we want to maintain backward compatibility.
**Describe alternatives you've considered**
**Additional context**
Contributor guide
Research direction
Start with the altda server spec's DA server section and compare the current /put/ and /get/ routes with the proposed route shapes in the issue. Determine the intended compatibility policy, then update the specification consistently so the route methods, paths, and commitment formats are unambiguous.
Written by the indexing model from the issue text.
Assessment
- Domain
- api, backend-api-design, documentation
- Issue type
- Feature
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100