parent
e7c2c6fd03
commit
e4e02aba84
46
REST-API.md
46
REST-API.md
@ -114,12 +114,6 @@ Endpoint using to retrieve logged user profile
|
||||
* **uri**:
|
||||
|
||||
`/api/profile`
|
||||
|
||||
* **request body**:
|
||||
|
||||
{
|
||||
"name": "project_1"
|
||||
}
|
||||
|
||||
* **success response example**:
|
||||
|
||||
@ -173,10 +167,10 @@ Endpoint using to create new user's project
|
||||
|
||||
* **success response example**:
|
||||
|
||||
`status_code: 200`
|
||||
`status_code: 201`
|
||||
|
||||
{
|
||||
"id": "82325af3-86d2-4b1c-852d-98d6e276e450",
|
||||
"id": "some_id",
|
||||
"name": "project_1",
|
||||
"created_at": "2020-12-17T16:07:42.050666Z",
|
||||
"updated_at": "2020-12-17T16:07:42.050707Z"
|
||||
@ -188,3 +182,39 @@ Endpoint using to create new user's project
|
||||
{
|
||||
"detail": "Authentication credentials were not provided."
|
||||
}
|
||||
|
||||
## GET /api/projects
|
||||
Endpoint using to retrieve all user's projects
|
||||
|
||||
* **requires authentication**:
|
||||
|
||||
`True`
|
||||
* **uri**:
|
||||
|
||||
`/api/projects`
|
||||
|
||||
* **success response example**:
|
||||
|
||||
`status_code: 200`
|
||||
|
||||
[
|
||||
{
|
||||
"id": "id_1",
|
||||
"name": "project_1",
|
||||
"created_at": "2020-12-15T15:32:33.901299Z",
|
||||
"updated_at": "2020-12-15T15:32:33.901370Z"
|
||||
},
|
||||
{
|
||||
"id": "id_2",
|
||||
"name": "project_2",
|
||||
"created_at": "2020-12-17T16:07:42.050666Z",
|
||||
"updated_at": "2020-12-17T16:07:42.050707Z"
|
||||
}
|
||||
]
|
||||
* **error response examples**:
|
||||
|
||||
`status_code: 401`
|
||||
|
||||
{
|
||||
"detail": "Authentication credentials were not provided."
|
||||
}
|
Loading…
Reference in New Issue
Block a user