docs: add rest paths to api design (#9910)

# Which Problems Are Solved

REST paths for new APIs are unclear as they are not defined in the
API_DESIGN.

# How the Problems Are Solved

Add a part to the API_DESIGN, which can be removed at a later date when
migrating to RPC connect.

# Additional Changes

None

# Additional Context

None
This commit is contained in:
Stefan Benz
2025-12-04 07:07:07 +00:00
committed by GitHub
parent a1bfdeb257
commit f9e3871bb3
+24
View File
@@ -270,6 +270,30 @@ Additionally, state changes, specific actions or operations that do not fit into
- `Send` for sending a resource.
- etc.
#### REST Path
Paths of operations MUST be structured as follows:
| Operation | Method | Path |
|---------------|--------|------------------------------------------|
| Create/Add | POST | /\<version\>/\<resource\> |
| Update | POST | /\<version\>/\<resource\>/\<identifier\> |
| Delete/Remove | DELETE | /\<version\>/\<resource\>/\<identifier\> |
| Set | PUT | /\<version\>/\<resource\> |
| Get | GET | /\<version\>/\<resource\>/\<identifier\> |
| List | POST | /\<version\>/\<resource\>/search |
Which results in an example path for operations like `/v2beta/users/search`.
Paths of status changes on resources MUST be structured as follows:
| Operation | Method | Path |
|------------|--------|-----------------------------------------------------|
| Activate | POST | /\<version\>/\<resource\>/\<identifier\>/activate |
| Deactivate | POST | /\<version\>/\<resource\>/\<identifier\>/deactivate |
Which results in an example path for status changes like `/v2beta/users/1234567890/activate`.
## Authentication and Authorization
The API uses OAuth 2 for authorization. There are corresponding middlewares that check the access token for validity and