This api is implemented according to the JSON API spec.
If you want to filter your query, you can do so by setting the supported filter parameters in the following way:
?author_id=24
Authors group
GET /api/v1/authors
Headers | |
---|---|
Accept | application/vnd.api+json |
Content-Type | application/vnd.api+json |
Headers | |
---|---|
Content-Type | application/vnd.api+json; charset=utf-8 |
application/vnd.api+json; charset=utf-8
{
"data": [
{
"id": "1",
"type": "authors",
"attributes": {
"name": "Author_1"
},
"relationships": {
"books": {
"meta": {
"included": false
}
}
}
}
]
}
GET /api/v1/authors/1
Parameters | |||
---|---|---|---|
id |
string
1
|
- |
Headers | |
---|---|
Accept | application/vnd.api+json |
Content-Type | application/vnd.api+json |
Headers | |
---|---|
Content-Type | application/vnd.api+json; charset=utf-8 |
application/vnd.api+json; charset=utf-8
{
"data": {
"id": "1",
"type": "authors",
"attributes": {
"name": "Author_2"
},
"relationships": {
"books": {
"data": [
]
}
}
}
}
GET /api/v1/authors/invalid_id
Parameters | |||
---|---|---|---|
id |
string
1
|
- |
Headers | |
---|---|
Accept | application/vnd.api+json |
Content-Type | application/vnd.api+json |
Headers | |
---|---|
Content-Type | application/vnd.api+json; charset=utf-8 |
application/vnd.api+json; charset=utf-8
{
"errors": [
]
}
POST /api/v1/authors
Headers | |
---|---|
Accept | application/vnd.api+json |
Content-Type | application/vnd.api+json |
application/vnd.api+json
{
"data": {
"type": "author",
"attributes": {
"name": "Author_5"
}
}
}
Headers | |
---|---|
Content-Type | application/vnd.api+json; charset=utf-8 |
application/vnd.api+json; charset=utf-8
{
"data": {
"id": "2",
"type": "authors",
"attributes": {
"name": "Author_5"
},
"relationships": {
"books": {
"meta": {
"included": false
}
}
}
}
}
POST /api/v1/authors
Headers | |
---|---|
Accept | application/vnd.api+json |
Content-Type | application/vnd.api+json |
application/vnd.api+json
{
"data": {
"type": "author",
"attributes": {
"name": ""
}
}
}
Headers | |
---|---|
Content-Type | application/vnd.api+json; charset=utf-8 |
application/vnd.api+json; charset=utf-8
{
"errors": [
{
"title": "Unprocessable Entity",
"detail": "Name can't be blank",
"source": {
"parameter": "name",
"pointer": "data/attributes/name"
}
}
]
}
PUT /api/v1/authors/1
Parameters | |||
---|---|---|---|
id |
string
1
|
- |
Headers | |
---|---|
Accept | application/vnd.api+json |
Content-Type | application/vnd.api+json |
application/vnd.api+json
{
"data": {
"type": "author",
"id": 1,
"attributes": {
"name": "New Author"
}
}
}
Headers | |
---|---|
Content-Type | application/vnd.api+json; charset=utf-8 |
application/vnd.api+json; charset=utf-8
{
"data": {
"id": "1",
"type": "authors",
"attributes": {
"name": "New Author"
},
"relationships": {
"books": {
"meta": {
"included": false
}
}
}
}
}
PUT /api/v1/authors/1
Parameters | |||
---|---|---|---|
id |
string
1
|
- |
Headers | |
---|---|
Accept | application/vnd.api+json |
Content-Type | application/vnd.api+json |
application/vnd.api+json
{
"data": {
"type": "author",
"id": 1,
"attributes": {
"name": ""
}
}
}
Headers | |
---|---|
Content-Type | application/vnd.api+json; charset=utf-8 |
application/vnd.api+json; charset=utf-8
{
"errors": [
{
"title": "Unprocessable Entity",
"detail": "Name can't be blank",
"source": {
"parameter": "name",
"pointer": "data/attributes/name"
}
}
]
}
DELETE /api/v1/authors/1
Parameters | |||
---|---|---|---|
id |
string
1
|
- |
Headers | |
---|---|
Accept | application/vnd.api+json |
Content-Type | application/vnd.api+json |
Headers |
---|
GET /api/v1/book_collections
Headers | |
---|---|
Accept | application/vnd.api+json |
Content-Type | application/vnd.api+json |
Headers | |
---|---|
Content-Type | application/vnd.api+json; charset=utf-8 |
application/vnd.api+json; charset=utf-8
{
"data": [
{
"id": "1",
"type": "book_collections",
"attributes": {
"name": "Book_collection_1"
},
"relationships": {
"books": {
"meta": {
"included": false
}
}
}
}
]
}
GET /api/v1/book_collections/1
Parameters | |||
---|---|---|---|
id |
string
1
|
- |
Headers | |
---|---|
Accept | application/vnd.api+json |
Content-Type | application/vnd.api+json |
Headers | |
---|---|
Content-Type | application/vnd.api+json; charset=utf-8 |
application/vnd.api+json; charset=utf-8
{
"data": {
"id": "1",
"type": "book_collections",
"attributes": {
"name": "Book_collection_2"
},
"relationships": {
"books": {
"data": [
]
}
}
}
}
GET /api/v1/book_collections/invalid_id
Parameters | |||
---|---|---|---|
id |
string
1
|
- |
Headers | |
---|---|
Accept | application/vnd.api+json |
Content-Type | application/vnd.api+json |
Headers | |
---|---|
Content-Type | application/vnd.api+json; charset=utf-8 |
application/vnd.api+json; charset=utf-8
{
"errors": [
]
}
POST /api/v1/book_collections
Headers | |
---|---|
Accept | application/vnd.api+json |
Content-Type | application/vnd.api+json |
application/vnd.api+json
{
"data": {
"type": "book_collection",
"attributes": {
"name": "Book_collection_5"
}
}
}
Headers | |
---|---|
Content-Type | application/vnd.api+json; charset=utf-8 |
application/vnd.api+json; charset=utf-8
{
"data": {
"id": "2",
"type": "book_collections",
"attributes": {
"name": "Book_collection_5"
},
"relationships": {
"books": {
"meta": {
"included": false
}
}
}
}
}
POST /api/v1/book_collections
Headers | |
---|---|
Accept | application/vnd.api+json |
Content-Type | application/vnd.api+json |
application/vnd.api+json
{
"data": {
"type": "book_collection",
"attributes": {
"name": ""
}
}
}
Headers | |
---|---|
Content-Type | application/vnd.api+json; charset=utf-8 |
application/vnd.api+json; charset=utf-8
{
"errors": [
{
"title": "Unprocessable Entity",
"detail": "Name can't be blank",
"source": {
"parameter": "name",
"pointer": "data/attributes/name"
}
}
]
}
PUT /api/v1/book_collections/1
Parameters | |||
---|---|---|---|
id |
string
1
|
- |
Headers | |
---|---|
Accept | application/vnd.api+json |
Content-Type | application/vnd.api+json |
application/vnd.api+json
{
"data": {
"type": "book_collection",
"id": 1,
"attributes": {
"name": "New Book Collection"
}
}
}
Headers | |
---|---|
Content-Type | application/vnd.api+json; charset=utf-8 |
application/vnd.api+json; charset=utf-8
{
"data": {
"id": "1",
"type": "book_collections",
"attributes": {
"name": "New Book Collection"
},
"relationships": {
"books": {
"meta": {
"included": false
}
}
}
}
}
PUT /api/v1/book_collections/1
Parameters | |||
---|---|---|---|
id |
string
1
|
- |
Headers | |
---|---|
Accept | application/vnd.api+json |
Content-Type | application/vnd.api+json |
application/vnd.api+json
{
"data": {
"type": "book_collection",
"id": 1,
"attributes": {
"name": ""
}
}
}
Headers | |
---|---|
Content-Type | application/vnd.api+json; charset=utf-8 |
application/vnd.api+json; charset=utf-8
{
"errors": [
{
"title": "Unprocessable Entity",
"detail": "Name can't be blank",
"source": {
"parameter": "name",
"pointer": "data/attributes/name"
}
}
]
}
DELETE /api/v1/book_collections/1
Parameters | |||
---|---|---|---|
id |
string
1
|
- |
Headers | |
---|---|
Accept | application/vnd.api+json |
Content-Type | application/vnd.api+json |
Headers |
---|
GET /api/v1/books
Headers | |
---|---|
Accept | application/vnd.api+json |
Content-Type | application/vnd.api+json |
Headers | |
---|---|
Content-Type | application/vnd.api+json; charset=utf-8 |
application/vnd.api+json; charset=utf-8
{
"data": [
{
"id": "1",
"type": "books",
"attributes": {
"name": "Book_1"
},
"relationships": {
"author": {
"meta": {
"included": false
}
},
"book_collection": {
"meta": {
"included": false
}
}
}
}
]
}
GET /api/v1/books/1
Parameters | |||
---|---|---|---|
id |
string
1
|
- |
Headers | |
---|---|
Accept | application/vnd.api+json |
Content-Type | application/vnd.api+json |
Headers | |
---|---|
Content-Type | application/vnd.api+json; charset=utf-8 |
application/vnd.api+json; charset=utf-8
{
"data": {
"id": "1",
"type": "books",
"attributes": {
"name": "Book_2"
},
"relationships": {
"author": {
"data": {
"type": "authors",
"id": "1"
}
},
"book_collection": {
"data": {
"type": "book_collections",
"id": "1"
}
}
}
},
"included": [
{
"id": "1",
"type": "authors",
"attributes": {
"name": "Author_11"
},
"relationships": {
"books": {
"meta": {
"included": false
}
}
}
},
{
"id": "1",
"type": "book_collections",
"attributes": {
"name": "Book_collection_11"
},
"relationships": {
"books": {
"meta": {
"included": false
}
}
}
}
]
}
GET /api/v1/books/invalid_id
Parameters | |||
---|---|---|---|
id |
string
1
|
- |
Headers | |
---|---|
Accept | application/vnd.api+json |
Content-Type | application/vnd.api+json |
Headers | |
---|---|
Content-Type | application/vnd.api+json; charset=utf-8 |
application/vnd.api+json; charset=utf-8
{
"errors": [
]
}
POST /api/v1/books
Headers | |
---|---|
Accept | application/vnd.api+json |
Content-Type | application/vnd.api+json |
application/vnd.api+json
{
"data": {
"type": "book",
"attributes": {
"name": "New Book",
"author_id": 1
}
}
}
Headers | |
---|---|
Content-Type | application/vnd.api+json; charset=utf-8 |
application/vnd.api+json; charset=utf-8
{
"data": {
"id": "2",
"type": "books",
"attributes": {
"name": "New Book"
},
"relationships": {
"author": {
"meta": {
"included": false
}
},
"book_collection": {
"meta": {
"included": false
}
}
}
}
}
POST /api/v1/books
Headers | |
---|---|
Accept | application/vnd.api+json |
Content-Type | application/vnd.api+json |
application/vnd.api+json
{
"data": {
"type": "book",
"attributes": {
"name": ""
}
}
}
Headers | |
---|---|
Content-Type | application/vnd.api+json; charset=utf-8 |
application/vnd.api+json; charset=utf-8
{
"errors": [
{
"title": "Unprocessable Entity",
"detail": "Author must exist",
"source": {
"parameter": "author",
"pointer": "data/attributes/author"
}
},
{
"title": "Unprocessable Entity",
"detail": "Name can't be blank",
"source": {
"parameter": "name",
"pointer": "data/attributes/name"
}
}
]
}
POST /api/v1/books
Headers | |
---|---|
Accept | application/vnd.api+json |
Content-Type | application/vnd.api+json |
application/vnd.api+json
{
"data": {
"type": "book",
"attributes": {
"name": ""
}
}
}
Headers | |
---|---|
Content-Type | application/vnd.api+json; charset=utf-8 |
application/vnd.api+json; charset=utf-8
{
"errors": [
{
"title": "Unprocessable Entity",
"detail": "Author must exist",
"source": {
"parameter": "author",
"pointer": "data/attributes/author"
}
},
{
"title": "Unprocessable Entity",
"detail": "Name can't be blank",
"source": {
"parameter": "name",
"pointer": "data/attributes/name"
}
}
]
}
PUT /api/v1/books/1
Parameters | |||
---|---|---|---|
id |
string
1
|
- |
Headers | |
---|---|
Accept | application/vnd.api+json |
Content-Type | application/vnd.api+json |
application/vnd.api+json
{
"data": {
"type": "book",
"id": 1,
"attributes": {
"name": "New Book"
}
}
}
Headers | |
---|---|
Content-Type | application/vnd.api+json; charset=utf-8 |
application/vnd.api+json; charset=utf-8
{
"data": {
"id": "1",
"type": "books",
"attributes": {
"name": "New Book"
},
"relationships": {
"author": {
"meta": {
"included": false
}
},
"book_collection": {
"meta": {
"included": false
}
}
}
}
}
PUT /api/v1/books/1
Parameters | |||
---|---|---|---|
id |
string
1
|
- |
Headers | |
---|---|
Accept | application/vnd.api+json |
Content-Type | application/vnd.api+json |
application/vnd.api+json
{
"data": {
"type": "book",
"id": 1,
"attributes": {
"name": ""
}
}
}
Headers | |
---|---|
Content-Type | application/vnd.api+json; charset=utf-8 |
application/vnd.api+json; charset=utf-8
{
"errors": [
{
"title": "Unprocessable Entity",
"detail": "Name can't be blank",
"source": {
"parameter": "name",
"pointer": "data/attributes/name"
}
}
]
}
DELETE /api/v1/books/1
Parameters | |||
---|---|---|---|
id |
string
1
|
- |
Headers | |
---|---|
Accept | application/vnd.api+json |
Content-Type | application/vnd.api+json |
Headers |
---|