Skip to content
Español

Using the API

The figures on this site can also be read from the data API, which answers in JSON and is read-only.

Base address

https://organico-api.bioaudita.cl/api/v1/

Specification

The OpenAPI specification describes every route, its parameters and the shape of each response.

OpenAPI specification (JSON)

Main routes

Main routes
Route What it returns
/api/v1/indicadores The indicators, with their name, unit and current indicator sheet.
/api/v1/indicadores/{slug}/valores The published values of an indicator, each with its indicator sheet, territory, status and capture.
/api/v1/fichas/{uuid} An indicator sheet, with the history of its versions.
/api/v1/linaje/{id} The path of a value, from the agency capture to the published figure.
/api/v1/fuentes The sources, with their agency and licence.
/api/v1/snapshots/{sha256} A capture, with its date, origin and fingerprint.
/api/v1/snapshots/{sha256}/archivo The file of a capture, as it was downloaded from the agency.
/api/v1/publicaciones The published datasets, with their files.
/api/v1/catalogo.jsonld The DCAT catalogue in JSON-LD. The Turtle version is at catalogo.ttl.
/api/v1/indicadores/{slug}/canal.atom The Atom feed of an indicator, with every new or corrected figure.
/api/v1/alertas The alert rules and their notices.
/api/v1/version The site version and when it was published.

Lists come in pages: each response carries its elements in items and the address of the next page in siguiente, which is empty on the last page.

Example

To read the published values of an indicator, for example Organic exports by aggregated product:

curl "https://organico-api.bioaudita.cl/api/v1/indicadores/exportacion-organica-fob-producto/valores"

Linked data

Every indicator, sheet, value and capture has its own IRI, in a namespace separate from this site's domain. The DCAT catalogue publishes them in JSON-LD and Turtle. For example:

https://organico.ago.cl/id/indicador/exportacion-organica-fob-producto

Catalogue in JSON-LD Catalogue in Turtle

Licence

aGo lab is the data controller. Derived figures are published under the licence their sources allow, stated on each indicator sheet.

Arrows choose, Enter opens and Escape closes.