Docs
parent
964886ae8f
commit
7477d98ccb
29
README.md
29
README.md
|
@ -19,22 +19,43 @@ Content-Type:application/x-www-form-urlencoded
|
||||||
Accept:application/json
|
Accept:application/json
|
||||||
```
|
```
|
||||||
|
|
||||||
|
When signed in, you must provide the access token:
|
||||||
|
|
||||||
|
```
|
||||||
|
Authorization: Bearer <Access_token>
|
||||||
|
```
|
||||||
|
|
||||||
## API response
|
## API response
|
||||||
|
|
||||||
The response code will never be in the response.
|
The response code will never be in the response.
|
||||||
|
|
||||||
**Make operations** (create, update, delete ...)
|
**Make operations** (create, update, delete ...)
|
||||||
|
|
||||||
```js
|
Validation error example:
|
||||||
|
|
||||||
|
```json
|
||||||
{
|
{
|
||||||
success: false,
|
"success": false,
|
||||||
message: 'Oups!'
|
"message": "Form is invalid.",
|
||||||
|
"errors": [
|
||||||
|
{
|
||||||
|
"message": "\"password\" is required",
|
||||||
|
"path": [
|
||||||
|
"password"
|
||||||
|
],
|
||||||
|
"type": "any.required",
|
||||||
|
"context": {
|
||||||
|
"key": "password",
|
||||||
|
"label": "password"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
]
|
||||||
}
|
}
|
||||||
```
|
```
|
||||||
|
|
||||||
**Getting objects** (read)
|
**Getting objects** (read)
|
||||||
|
|
||||||
```js
|
```json
|
||||||
{
|
{
|
||||||
"_id": "5bec2fed257ab94172cd3874",
|
"_id": "5bec2fed257ab94172cd3874",
|
||||||
"firstname": "Raphael",
|
"firstname": "Raphael",
|
||||||
|
|
Loading…
Reference in New Issue