nav-api API

The Store API

A JSON API for accessing data programmatically. Generally the result of a request is a JSON object.

JSONP

All the requests support JSONP: Supply a callback parameter, the JSON data will be wrapped with a function call using the value of the callback parameter as its name. Example (a JSONP version of a Tax Share example, below):

${c.jsonp_url}

Requests

The store responds to the following requests:

Search

Search the spending data in the store. Modulo some checks and minor modifications (e.g. to ensure json is returned), search parameters are passed directly through to solr so you can use any parameters supported by Solr. Key basic paramemters:

Returns data in JSON and JSONP is supported. Examples:

${url(controller='api', action='search')}

${url(controller='api', action='search', q='children')}

REST

A family of calls for navigating the store's data. For details, see:

${c.rest_url}

JSONP also works with the REST API.

Aggregate

Retrieves a dataset, specifying axes of interest. The data will be aggregated over all other axes.

Example:

${c.aggregate_url}

Parameters:

Tax share

Estimates a household's tax contribution based on simple proxy data. The estimate allows for both direct tax (including income tax, national insurance and council tax) and indirect tax (including VAT, alcohol and tobacco duty, and fuel duty).

Example:

${c.mytax_url}

Parameters: