Get Categories

Overview

You can use this call to get books categories in the database.

URI

https://|api_url|/api/fab/v3/category/?format=json

Parameters

You can use these parameters in your request . The examples sections shows how you can combine different parameters to refine your search.

Parameter Type Description
id Integer Identifier
name String Category name
resource_uri String The resource url for accessing this resource directly

Response

The response can return any of the book parameters defined in Get Books and in the parameters table above. It will also return the following metadata.
{"meta":{"limit": 20, "next": null, "offset": 0, "previous": null, "total_count": 1}
Parameter Description
limit By default only 20 objects are sent back in each response. You can increase or decrease this limit by supplying a limit filter on your query.
next The url for you to fetch the next set of results in your query. This url will not be a fully qualified url but instead relative to the base url we discussed earlier. If the value is none there is not another set of results and you have reached the last "page".
offset The number of records you are offsetting this result by. For example if you had a limit of 20 and there were 100 total records. If you had an offset of 60 that would mean you are looking at records 61-80.
previous Same as next but refers to the previous set of results. If this is null there are no previous sets available.
total_count The total number of results in the query. For example if you had a query that generated 100 results this number would be 100.

Examples

The following are some example queries to get you started.

Get all categories:

https://|api_url|/api/fab/v3/category/?format=json

Filter category to what you want by name:

https://|api_url|/api/fab/v3/category/?format=json&name__contains=Lifestyles