Skip to content

Commit 8c152c9

Browse files
committed
doc
1 parent 2112eb4 commit 8c152c9

File tree

1 file changed

+15
-3
lines changed

1 file changed

+15
-3
lines changed

docs/API.md

Lines changed: 15 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,16 @@ Example of correct request:
1212
}
1313
```
1414

15+
Response is also HTTP with JSON and status code depending on whether
16+
error happened or not.
17+
18+
* 200 if there wasn't error
19+
* 400 if you sent bad request
20+
* 500 if there was error during execution your request or in some
21+
other cases
22+
23+
status_code is also duplicated in JSON body.
24+
1525
## Possible keys
1626

1727
* `model` - specifies what you will work with.
@@ -85,7 +95,8 @@ Response
8595

8696
],
8797
"has_more": true,
88-
"status": "ok"
98+
"status": "ok",
99+
"status_code": 200
89100
}
90101
```
91102

@@ -113,8 +124,9 @@ Response:
113124

114125
```json
115126
{
116-
"error_message": ""Model \"user\" doesn't exist or isn't allowed",
117-
"status": "error"
127+
"error_message": "Model \"user\" doesn't exist or isn't allowed",
128+
"status": "error",
129+
"status_code": 400
118130
}
119131
```
120132

0 commit comments

Comments
 (0)