Download OpenAPI specification:Download
This extension add 3 new parameters as documented. The page and per_page parameters add pagination to your API response data, allowing a client to specify limits to the amount of data they receive. You will need to make use of LIMIT and OFFSET in your SQL to accomplish these.
| author | string Only get books by a specific author. Default to all books if not provided |
| page | integer The page number to return. Must default to 1 if not provided. |
| per_page | integer The number of records to return per page. Maximum should be 50, minimum is 10. Must default to 20 if not provided. |
{- "books": [
- {
- "id": 0,
- "title": "string",
- "type": "string",
- "author": "string",
- "topic": "string",
- "publication_date": "string",
- "pages": 0
}
], - "perPage": 0,
- "page": 0
}Add some error responses!
| title | string |
| type | string |
| author | string |
| topic | string |
| publication_date | string |
| pages | integer |
{- "title": "string",
- "type": "string",
- "author": "string",
- "topic": "string",
- "publication_date": "string",
- "pages": 0
}Add some error responses!
| title | string |
| type | string |
| author | string |
| topic | string |
| publication_date | string |
| pages | integer |
{- "title": "string",
- "type": "string",
- "author": "string",
- "topic": "string",
- "publication_date": "string",
- "pages": 0
}{- "error": "string"
}The page and per_page parameters add pagination to your API response data, allowing a client to specify limits to the amount of data they receive. You will need to make use of LIMIT and OFFSET in your SQL to accomplish these.
| page | integer The page number to return. Must default to 1 if not provided. |
| per_page | integer The number of records to return per page. Maximum should be 50, minimum is 10. Must default to 20 if not provided. |
{- "pets": [
- {
- "id": 0,
- "name": "string",
- "age": 0,
- "type": "string",
- "breed": "string",
- "has_microchip": true
}
], - "perPage": 0,
- "page": 0
}| name | string |
| age | integer |
| type | string |
| breed | string |
| has_microchip | boolean |
{- "name": "string",
- "age": 0,
- "type": "string",
- "breed": "string",
- "has_microchip": true
}{- "error": "string"
}| name | string |
| age | integer |
| type | string |
| breed | string |
| has_microchip | boolean |
{- "name": "string",
- "age": 0,
- "type": "string",
- "breed": "string",
- "has_microchip": true
}{- "error": "string"
}This should use the existing data in the pets table. You will need to use DISTINCT in your SQL.
| type required | string Filter breeds to only animals of the specified type (e.g. "dog") |
{- "breeds": [
- {
- "breed": "string"
}
]
}