addarrow-downaxebreadcrumb dividercameracc-compulsarychatcontactdata-usersdebugdevelopersdismisserrorglossaryinfolinkpublisherssearchselect-dropdownsuccesswarning

Developers

APIs to manage your site, query data and build new products and services.

  1. Home
  2. Developers
  3. Publisher Admin API
  4. Data Catalog API

Data Catalog API

The Data Catalog API is a read-only API for listing data from the Koordinates catalogue. For write access to the items listed here, refer to the item-specific API endpoints.

Useful Headers

List views provide some useful headers in responses:

  • X-Paginate-By : The number of results (maximum) that will be returned by the request.
  • X-Resource-Range : The range and count for the current request in the format start-end/total. start and end are 0-based indexes, the range has an exclusive upper bound. In other words, the resource range 10-20/112 means records 11 through 20 (inclusive) of 112 total records. For any request, you should recieve end - start records.
  • Link : A list of links (conforming to RFC5988) to related views.

List Catalog Entries

GET /data/
Get Catalog Entries

This view shows the published version of each layer, table, set, document or source. It will not show items that have not been published. Multiple filter parameters of different names will be AND-ed together. Multiple uses of the same filter parameter will be OR-ed.

Parameters

  • kind: string (optional). Data type of the layer or type of source (Only Layers or Sources). Using this filter parameter will implicitly filter by layer or source type. Data types: vector raster grid attribute-grid table. Source types: info arcgis cifs upload postgres wfs
  • public: string (optional). Choices: true false
  • Group: string (optional) A group id or a group api url. Example: 1
  • license: string (optional). A license id, a license api url or either true (has a license) or false (no license specified) license. Example: 1 
  • type:string (optional). Choices: public-domain custom commercial cc(-by|-nc|-nd|-sa)*. Example: cc-by-nc
  • license.jurisdictionstring (optional). Ensure jurisdiction is a valid country code. Example: nz
  • license.versionstring (optional). Can be a single digit or specific with one decimal place. Example: 3.0
  • category: string (optional). Ensure / characters in categories are url-encoded. Example: topographic/elevation
  • geotag: string (optional). Ensure / characters in geotags are url-encoded. Example: global/oceania/new-zealand/auckland
  • tag: string (optional). Search for a single tag. Spaces should be replaced with dashes. Example: new-zealand. 
  • q: string (optional). Search for a specific set of terms, space-separated. Example: road parcels
  • created_at.before: string (optional). Example: 2013-12-03T03:56:55Zcreated_at.
  • after: string (optional)
  • updated_at.before: string (optional)
  • updated_at.after: string (optional). An ISO 8601 formatted data strong. If no timezone is specified, UTC will be assumed. 
  • sort: string (optional). Sort results. If empty or not provided, search relevance ordering as assumed if q is also given (otherwise ordering will be undefined. Example: -name. Choices: name (A→Z) -name (Z→A) created_at (new→old) -created_at (old→new) updated_at -updated_at popularity (most popular→least popular)

Response 200

Headers

Content-Type: application/json
X-Paginate-By: 100
X-Resource_Range: 0-1/1
Link: <https://{domain}/services/api/v1/data/?sort=name>; rel="sort-name", <https://{domain}/services/api/v1/data/?sort=-name>; rel="sort-name-desc", <https://{domain}/services/api/v1/data/?page=2>; rel="page-next", <https://{domain}/services/api/v1/data/?page=45>; rel="page-last"

Body

[{
    "id": 123,
    "url": "https://{domain}/services/api/v1/layers/123/",
    "type": "layer",
    "name": "Fictional Boundary Points",
    "first_published_at": "2013-01-01T00:01:01",
    "published_at": "2013-12-03T03:56:55Z"
}]

Latest Catalog Entries

GET /data/latest
List Catalog Entries' Latest Version

This will provide a filterable list view of layers, tables, sets, documents and sources, similar to /data/. This view shows the latest version of each item. The most recent version of an item will appear here, regardless of whether or not it has been published. All the same filters and ordering from /data/ applies.

Parameters

  • version.status: string (optional). The status of the latest version of the item. Choices: ok error importing cancelled new

Response 200

Headers

Content-Type: application/json

Body

[{
    "id": 123,
    "url": "https://{domain}/services/api/v1/layers/123/",
    "type": "layer",
    "name": "Fictional Boundary Points",
    "first_published_at": "2013-01-01T00:01:01",
    "published_at": "2013-12-03T03:56:55Z"
}]