Code | Meaning |
---|---|
200 | All good! |
201 | Resource created |
302 | You were redirected |
400 | The request was unacceptable (you screwed up) |
403 | You are not authorized to access the resource |
401 | You are not authorized |
404 | Requested resource not found |
422 | Validation failed (you screwed up) |
429 | Too many requests hit the API too quickly. |
500, 502, 503, 504 | Server Errors (we screwed up) |
{
"errors": {
"url": [
"The url field is required"
],
"email": [
"The email field is required"
]
}
"message": "The provided data is invalid."
}
example.com/resources/{id}
{
"data": {
"foo": "bar",
"biz": {
"baz": "buz"
}
},
"meta": {}
}
example.com/resources?page=2
{
"data": [
{
"foo": "bar",
"biz": {
"baz": "bar"
}
},
{
"foo": "qux",
"biz": {
"baz": "foo"
}
}
],
"meta": {
"pagination": {
"count": 15,
"current_page": 2,
"links": {
"next": "http://resources.dev/page?page=2"
},
"per_page": 2,
"total": 61,
"total_pages": 5
}
}
}