parent
a7be2df569
commit
e7c2c6fd03
40
REST-API.md
40
REST-API.md
@ -114,6 +114,12 @@ Endpoint using to retrieve logged user profile
|
||||
* **uri**:
|
||||
|
||||
`/api/profile`
|
||||
|
||||
* **request body**:
|
||||
|
||||
{
|
||||
"name": "project_1"
|
||||
}
|
||||
|
||||
* **success response example**:
|
||||
|
||||
@ -148,3 +154,37 @@ Endpoint using to retrieve logged user profile
|
||||
"message": "User profile does not exist",
|
||||
"error": "UserProfile matching query does not exist."
|
||||
}
|
||||
|
||||
## POST /api/projects
|
||||
Endpoint using to create new user's project
|
||||
|
||||
* **requires authentication**:
|
||||
|
||||
`True`
|
||||
* **uri**:
|
||||
|
||||
`/api/projects`
|
||||
|
||||
* **request body**:
|
||||
|
||||
{
|
||||
"name": "project_1"
|
||||
}
|
||||
|
||||
* **success response example**:
|
||||
|
||||
`status_code: 200`
|
||||
|
||||
{
|
||||
"id": "82325af3-86d2-4b1c-852d-98d6e276e450",
|
||||
"name": "project_1",
|
||||
"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