Endpoint
Document rest api endpoints
Document REST API endpoints with method badges and parameters.
Usage
/api/users/:idget a user by id
idstringrequiredthe user id
Methods
All HTTP methods are supported with color coding:
/api/resource/api/resource/api/resource/:id/api/resource/:id/api/resource/:idParameters
/api/userscreate a new user
namestringrequireduser's full name
emailstringrequireduser's email address
rolestringuser role (admin, user)
Responses
Document response codes:
200Success
Returns the user object
404Not found
User does not exist
Props
Endpoint
| prop | type | default | description |
|---|---|---|---|
| method | string | required | HTTP method (GET, POST, PUT, PATCH, DELETE, HEAD, OPTIONS, TRACE) |
| path | string | required | API path |
| description | string | - | Endpoint description |
| children | ReactNode | - | Parameter list |
Param
| prop | type | default | description |
|---|---|---|---|
| name | string | required | Parameter name |
| type | string | required | Parameter type |
| required | boolean | false | Marks as required |
| description | string | - | Parameter description |
Response
| prop | type | default | description |
|---|---|---|---|
| status | number | required | HTTP status code |
| description | string | - | Status description |
| children | ReactNode | - | Response details |