Koordinates API Documentation (1.0.1)

Download OpenAPI specification:Download

Documentation for Koordinates REST APIs.

Introduction

Koordinates provides a RESTful API that uses standard HTTP methods and status codes. This documentation provides detailed developer documentation for specific API endpoints, including request and response formats. This should be read in conjunction with the Help documentation available at https://help.koordinates.com/

Authentication

There are a number of ways to authenticate with the Koordinates API depending on your requirements. Note that not every method is available for every endpoint. Supported authentication methods are listed under in endpoint's "Authorization" section. Refer to API Tokens documentation for creating and modifying tokens.

HeaderTokenAuthentication

Simple HTTP header token based authentication. Clients should authenticate by passing the token key in the "Authorization" HTTP header, prepended with the string "key ". For example:

Authorization: key abcdef0123456789abcdef0123456789
Security Scheme Type: API Key
Header parameter name: key

URLTokenAuthentication

Simple url token based authentication. Clients should authenticate by passing the token key in the request url. For example:

GET /services;key=abcdef0123456789abcdef0123456789/wmts/1.0.0/WMTSCapabilities.xml
Security Scheme Type: API Key
URI parameter name: key

SessionAuthentication

Cookie based session authentication as provided by browser-based login flows. Most APIs are available with session authentication. Scopes are not required. APIs intended for use only within the Koordinates.com site or customer portals are only available with session authentication. Not recommended for external usage.

Security Scheme Type: API Key
Cookie parameter name: sessionid

BearerAuthToken

Bearer auth token as supplied by Koordinates ID. This is used by Koordinates for some internal services and in is not available for public use at this time.

Security Scheme Type: API Key
Header parameter name: bearer

API Features

Pagination

List API responses will include pagination headers.

  • X-Paginate-By - the number of items per page
  • X-Resource-Range - the range of items in the current response in the form start-end/total

For example:

X-Paginate-By: 20
X-Resource-Range: 20-40/320

List APIs that can be sorted or paged will usually include Link headers that conform to the RFC 5988 standard. For example:

Link: 
  <https://{domain}/services/api/v1.x/layers/?page=2&page_size=20>; rel="page-next", 
  <https://{domain}/services/api/v1.x/layers/?page=724&page_size=20>; rel="page-last", 
  <https://{domain}/services/api/v1.x/layers/?page_size=20&sort=name>; rel="sort-name", 
  <https://{domain}/services/api/v1.x/layers/?page_size=20&sort=-name>; rel="sort-name-desc", 
  <https://{domain}/services/api/v1.x/layers/?page_size=20&sort=popularity>; rel="sort-most-popular", 
  <https://{domain}/services/api/v1.x/layers/?page_size=20&sort=created_at>; rel="sort-recently-added", 
  <https://{domain}/services/api/v1.x/layers/?page_size=20&sort=updated_at>; rel="sort-recently-updated", 
  <https://{domain}/services/api/v1.x/layers/?page_size=20&sort=featured_at>; rel="sort-recently-featured", 
  <https://{domain}/services/api/v1.x/layers/?page_size=20&sort=-featured_at>; rel="sort-recently-featured-oldest-first"

Expansions

Expansions (sometimes known as “side-loads”) provide a way to include related content into a particular API view. For many property values, we supply a URL to the resource. For example:

{
  "id": 4,
  "url": "https://{domain}/services/api/v1/layers/1/",
  "type": "layer",
  "name": "Road Centerlines",
  "permissions": "https://{domain}/services/api/v1/layers/4/permissions/",
  ...

The permissions property points to a URL where we can see the permissions for this layer. We can include the permissions response directly in this request by including an Expand header with the value permissions.

  Expand: permissions

More than one expansion can be requested by providing property names separated by commas.

A list of available expansions for any particular view is accessible via an OPTIONS request. This will return an object that contains the key expansions and an array of valid expansion options. For example:

  {
      "name": "Layer Detail",
      "expansions": [
          "permissions"
      ]
  }

Some list views can provide more detailed responses via the special list expansion. Note that list expansions cannot be used in conjunction with detailed item expansions.

Exports

The Export API provides methods for extracting data in bulk from the Koordinates platform. Multiple layers can be exported in one download, data can be cropped, reprojected into different coordinate reference systems, and data can be exported in many different formats.

Create a new export

Authorizations:
SessionAuthenticationHeaderTokenAuthentication
Request Body schema: application/json
required
crs
required
string

The coordinate reference system in the form EPSG:XXXX where XXXX is the identifier. For more info on EPSG, refer to http://epsg.io. Please note that KML exports can only be exported in WGS84 / EPSG:4326.

formats
required
object

An object keyed by layer or table "kind" (see Layers & tables API kind property) with the mimetype of the format you want in the download. You must have one entry for each data kind you are exporting.

required
Array of objects (ExportDatasetItemList) >= 0

A list of layer, table or dataset items to export.

name
string

The name for the archive. If not provided this will be generated from the content.

extent
string

A Crop Feature or Geometry extent for cropping to a specific geographic area.

options
object

Additional format options

object

Delivery details (omit this when creating a downloadable export)

Request samples

Content type
application/json
{
  • "crs": "EPSG:26767",
  • "formats": {
    },
  • "items": [
    ],
  • "name": "string",
  • "extent": "string",
  • "options": { },
  • "delivery": {
    }
}

List exports

Authorizations:
SessionAuthenticationHeaderTokenAuthentication

Responses

Response Schema: application/json
Array
id
number
name
string
created_at
string
state
string
Enum: "complete" "processing" "cancelled" "error" "gone"
  • processing: the export is being created and will be available for download soon. If the export is processing, the download_url will be null.
  • cancelled: the export was processing but has been cancelled before it was completed.
  • error: there was an error during the creation of the export.
  • complete: the export has finished processing and is available for download at the location provided in download_url.
  • gone: the export was completed successfully but has since been removed or has expired from the system.
url
string <url>
download_url
string <url>

Response samples

Content type
application/json
[
  • {
    }
]

Get export options

Authorizations:
SessionAuthenticationHeaderTokenAuthentication

Responses

Response Schema: application/json
object

Response samples

Content type
application/json
{
  • "actions": {
    }
}

Validate export

The Export Validation endpoint accepts the same content as the Export Creation API but will not create/start the export and will return additional information.

Error Codes

The following errors are returned as part of a 400 response when the validation request itself fails. The paths below indicate where the error will be found in the nested respone, for example:

  {
    "error_code": 400,
    "errors": {
      "items": [
        `no-items: You must request at least one item`
      ]
    }
  }
  • errors
    • items
      • no-items: You must request at least one item \
      • duplicate-items: Duplicate items were requested
      • [index]
        • item
          • Invalid hyperlink - No URL match.
    • crs
      • Invalid CRS
      • Unknown CRS
  • formats
    • No format was selected for layers of type '{kind}'

The following error codes are returned as part of a 200 response which will include other information about the Export validation.

  • invalid_reasons

    • kml-invalid-crs
    • missing-crs
    • no-layers
    • over-size-limit:max-{overall-size-limit}
    • under-sized-courier-export:min-{overall-size-limit}
    • over-size-limit:{mime-type}:max-{format-size-limit}
    • missing-shipping_address-field:{field_name}
  • items

    • [index]
      • invalid_reasons
        • commercial-data-not-supported
        • outside-extent
        • online-only
        • invalid-for-given-crs
Authorizations:
SessionAuthenticationHeaderTokenAuthentication
Request Body schema: application/json
required
crs
required
string

The coordinate reference system in the form EPSG:XXXX where XXXX is the identifier. For more info on EPSG, refer to http://epsg.io. Please note that KML exports can only be exported in WGS84 / EPSG:4326.

formats
required
object

An object keyed by layer or table "kind" (see Layers & tables API kind property) with the mimetype of the format you want in the download. You must have one entry for each data kind you are exporting.

required
Array of objects (ExportDatasetItemList) >= 0

A list of layer, table or dataset items to export.

name
string

The name for the archive. If not provided this will be generated from the content.

extent
string

A Crop Feature or Geometry extent for cropping to a specific geographic area.

options
object

Additional format options

object

Delivery details (omit this when creating a downloadable export)

Responses

Response Schema: application/json
invalid_reasons
Array of strings
Items Enum: "over-size-limit:max-{overall-size-limit}" "missing-crs" "kml-invalid-crs" "no-layers" "over-size-limit:${mime-type}:max-{format-size-limit}"
is_valid
boolean
Array of objects
name
string
size_estimate_zipped
number

Value in bytes

Array of objects (CoordinateSystemListItem)
Array of objects (CoordinateSystemListItem)

Request samples

Content type
application/json
{
  • "crs": "EPSG:26767",
  • "formats": {
    },
  • "items": [
    ],
  • "name": "string",
  • "extent": "string",
  • "options": { },
  • "delivery": {
    }
}

Response samples

Content type
application/json
{}

Raster Query

The Raster Query API allows users to request information related to a point location from one or more Koordinates grid or raster datasets.

URL

Your URL endpoint is dependent on the particular Koordinates service you wish to access.

The URL for the Koordinates.com will be: https://koordinates.com/services/query/v1/raster

The raster query API returns in JSON:

content-type: application/vnd.koordinates.rasterQuery+json Formats can be specified via URL. For example: https://koordinates.com/services/query/v1/raster.json

They can also be specified using the HTTP Accept header with the appropriate content-type against the base URL. For example: application/vnd.koordinates.rasterQuery.1+json.

By default, all responses use the newest format. While we try very hard to prevent backwards-incompatible breaks, please note that it may happen in future.

If you're using the URL endpoint (for example, rasterQuery.json) you can pass a &v=1 parameter to specify version 1. Note that the current version is 1.

Compression

Add a request header with Accept-Encoding: gzip to get compressed results. This dramatically reduces the size of the response and will speed up your API requests.

Get information from grid or raster datasets

Authorizations:
SessionAuthenticationHeaderTokenAuthentication
Request Body schema: application/json
required
key
required
string

Your Koordinates API key

layer
required
integer

The ID of the raster or grid layer to get results from

x
required
number

Longitude of the point you want to query

y
required
number

Latitude of the point you want to query

callback
boolean

Only available for JSON formats. If supplied, will use the JSONP format with a callback of the given name

Request samples

Content type
application/json
{
  • "key": 1,
  • "layer": 1132,
  • "x": -41.27831,
  • "y": 174.77694,
  • "callback": false
}

Vector Query

The Vector Query API allows users to request information related to a point location from one or more Koordinates vector datasets.

URL

Your URL endpoint is dependent on the particular Koordinates service you wish to access.

The URL for Koordinates.com site will be: https://koordinates.com/services/query/v1/vector

Formats

The vector query API returns in:

  • JSON: content-type: application/vnd.koordinates.setQuery+json. Results are encoded as GeoJSON-compatible Feature objects.
  • Xml: content-type: application/vnd.koordinates.vectorQuery+xml. A schema is available. Geometries are encoded as GML v3 geometry objects.
  • Json-gmaps: content-type: application/vnd.koordinates.vectorQuery-gmaps+json. For use with the Google Maps API, geometries are returned as arrays of geometry objects, with linestrings & polygons encoded for faster display & smaller response-size.

Formats can be specified via URL. For example: https://koordinates.com/services/query/v1/vector.json

They can also be specified using the HTTP Accept header with the appropriate content-type against the base URL. For example: application/vnd.koordinates.vectorQuery.1+json

By default, all responses use the newest format. While we try very hard to prevent backwards-incompatible breaks, please note that it may happen in future

If you're using the URL endpoint (eg. vector.json) you can pass a &v=1 parameter to specify version 1.0. The current version is 1.1.

Compression

Add a request header with Accept-Encoding: gzip to get compressed results. This dramatically reduces the size of the response and will speed up your API requests.

Get information from vector datasets

Authorizations:
SessionAuthenticationHeaderTokenAuthentication
Request Body schema: application/json
required
key
required
string

Your Koordinates API key

layer
required
string

The ID of the vector layer to get results from

x
required
number

Longitude of the point you want to query

y
required
number

Latitude of the point you want to query

max_results
integer [ 1 .. 100 ]
Default: 1

Maximum number of results to return

radius
integer [ 0 .. 100000 ]
Default: 1000

Distance in meters to query around the specified point.

geometry
boolean
Default: false

Whether to include the geometry for each feature result

with_field_names
boolean
Default: false

Whether to include an ordered list of field names. Availability: 1.1

callback
boolean

Only available for JSON formats. If supplied, will use the JSONP format with a callback of the given name

Request samples

Content type
application/json
{
  • "key": 1,
  • "layer": 743,
  • "x": -41.27831,
  • "y": 174.77694,
  • "max_results": 1,
  • "radius": 1000,
  • "geometry": false,
  • "with_field_names": false,
  • "callback": false
}

Overview

The following APIs are used to connect to external services, import and manage publication of data on the Koordinates platform.

Concepts

Sources, Data Sources and Scans

A Source is a container of data that we can potentially process. Examples of Sources include:

  • An uploaded Zip containing many pieces of data
  • An internet-accessible WFS server or Esri AGOL service account
  • A connected S3 bucket

A Data Source is a specific file, service or resource in a Source that could be ingested into the Koordinates platform. Some examples of data sources include:

  • A particular shapefile in an uploaded Zip
  • A specific layer in a WFS (Web Feature Service) or Esri AGOL account
  • A single GeoTIFF in an AWS S3 bucket

Data sources are discovered by Koordinates by running a Scan. This is a process where we inspect the source to find the available data sources, and make them availale for importing. Some sources, like an upload, only need to be scanned once. Other sources, like an S3 bucket, can be regularly scanned to find new, updated or removed data sources.

Importing Data

Data sources are used to create Layers, Tables and Documents. This is typically done by creating a new object and providing refences to the data sources discovereed in a scan.

  • Layers and Tables can be created from one or more data sources. If more than one data source is used they must be of the same data type (e.g. vector polyon, geotiff, etc) and have the same schema (columns, field types, number of bands, etc).

  • Documents can only be created form a single data source and only if its a file-like datasource.

  • Sets are created from other Layers and Tables, rather than from data sources.

Versions and Publishing

Layers, Tables, Documents and Sets are versioned.

  • The published version is the currently visible version to users. Exports of the item will include data from the published version. Published versions cannot be edited. To modify an item, a new draft version is created.
  • The draft version, if it exists, can be modified. New data can also be imported to the draft version. Once edits to the draft are complete the draft can be published.

Data Sources

The Data Sources API provides read and write access to sources, datasources and scans.

Source-specific notes

There are several types of sources. Each exposes the same set of core fields, but some fields are only exposed or accepted for specific types of sources. Everything in options is optional.

CIFS, URL, ArcGIS, and WFS source options

All these source types can accept credentials in an options field:

  • options:
    • username : username to access this server.
    • password : password for this server.
    • ssl_verify : A boolean specifying whether Koordinates should verify the SSL certificate of the host when scanning this source. Defaults to true. Username and password are write-only. They are never returned to clients via the API.

ArcGIS Server

  • url_remote : The URL of your ArcGIS server, usually ending with/rest/api/services/. Must not contain credentials.

  • options : In addition to the options listed above, ArcGIS also accepts:

    • folders : A JSON array of folders to scan. If not given, the whole server will be scanned.

CIFS

  • url_remote : A URL of the form "cifs://host/sharename", optionally with extra path segments. Must not contain credentials.

PostgreSQL

  • url_remote : A URL of the form "postgresql://host:port/database". Must not contain credentials.

  • options :

    • username : username to access the PostgreSQL database.
    • password : postgres database password.
    • schemas : A JSON array containing schema names, e.g.: "schemas": ["public", "other_schema"]

URL

A URL source defines an FTP, HTTP or HTTPS url to an archive Koordinates can scan for data.

Currently accepts these archives:

  • .zip
  • .tar.gz, .tgz
  • .7z

URL sources accept the following extra fields:

  • url_remote : The URL to download the archive. Must not contain credentials.

WFS Server

  • url_remote : The URL to the WFS server endpoint. Must not contain credentials.

List Sources

Returns a list of all the sources available to you.

Authorizations:
SessionAuthenticationHeaderTokenAuthentication

Responses

Response Schema: application/json
id
number
url
string <url>
name
string
type
string
description
string
description_html
string
categories
string
object (DataSourceUser)
last_scanned_at
string or null
scan_schedule
string or null
options
string
metadata
string or null

Response samples

Content type
application/json
{
  • "id": 1,
  • "name": "harbour-images.zip",
  • "type": "upload",
  • "description": "",
  • "description_html": "",
  • "categories": "string",
  • "user": {
    },
  • "last_scanned_at": null,
  • "scan_schedule": null,
  • "options": "{}",
  • "metadata": null
}

Create a Source

To create a source, post to this view.

Parameters

  • type: string (required). The type of source to create. Example: info. Choices: info upload cifs arcgis wfs postgres
  • name: string (required). The name of the new source.
  • group: string|id(optional)
  • user: string|id (optional). The group or user (at least one required) that owns the source, by ID or API URL.
  • url_remote: string (optional). The remote URL to the source, not required for info or uploadsources
  • options: object (optional). Refer to the source specific notes above.
  • scan_schedule: string (optional). A Cron expression specifying how frequently the source should be scanned. All normal cron values are supported but the ‘minutes’ value is currently ignored. Predefined scheduling definitions are supported except for "@reboot".
Authorizations:
SessionAuthenticationHeaderTokenAuthentication
Request Body schema: application/json
optional
name
string
type
string
description
string
categories
string
user
number
object (SourcePostOptions)
url_remote
string <url>
scan_schedule
string

Responses

Response Schema: application/json
id
number
url
string <url>
name
string
type
string
description
string
description_html
string
categories
string
object (SourceUserExample)
last_scanned_at
string or null
scan_schedule
string or null
options
string
metadata
string or null
url_remote
string <url>

Request samples

Content type
application/json
{
  • "name": "Bob's ArcGIS 10 Server",
  • "type": "arcgis",
  • "description": "All of Bob's data",
  • "categories": "string",
  • "user": 3,
  • "options": {
    },
  • "scan_schedule": "@daily"
}

Response samples

Content type
application/json
{}

Get source detail

Returns details of a source.

Authorizations:
SessionAuthenticationHeaderTokenAuthentication

Edit a source

Authorizations:
SessionAuthenticationHeaderTokenAuthentication
Request Body schema: application/json
optional
description
string

Request samples

Content type
application/json
{
  • "description": "Harbour Imagery (4m/px)"
}

Delete a source

Authorizations:
SessionAuthenticationHeaderTokenAuthentication

Responses

List scans

Returns a list of scans for a source.

Notable fields:

status : The current status of this scan. Valid values are:

running completed cancelled error change_counts : counts of datasources deleted, updated and added in this scan. This is only guaranteed to be present in completed scans. For other scans it may be null or the counts may all be 0. tags:

  • Data Sources security:
  • SessionAuthentication: []
  • HeaderTokenAuthentication: [] operationId: getSourceScans responses: '200': description: OK content: application/json: schema: $ref: '#/schemas/SourceScans'

Start scan

Starts a scan for this source. No post data is required.

Authorizations:
SessionAuthenticationHeaderTokenAuthentication

Responses

Response Schema: application/json
id
number
url
string <url>
name
string
type
string
description
string
description_html
string
categories
string
object (SourceUserExample)
last_scanned_at
string or null
scan_schedule
string or null
options
string
metadata
string or null
url_remote
string <url>

Response samples

Content type
application/json
{}

Get scan detail

Information about a particular scan. This is the same as an item in the list view above, except it also includes a progress indicator, which is a float between 0 and 1. Progress is approximate.

Authorizations:
SessionAuthenticationHeaderTokenAuthentication

Responses

Response Schema: application/json
id
number
url
string <url>
status
string
started_at
string
completed_at
string
object
log
string <url>
progress
number <float>

Response samples

Content type
application/json
{}

Cancel or delete scan

Cancels an in-progress scan.

Authorizations:
SessionAuthenticationHeaderTokenAuthentication

Responses

Get scan log

Gets a log for a scan. By default this is returned as text/plain, but you can request JSON via the Accept header.

Authorizations:
SessionAuthenticationHeaderTokenAuthentication

Responses

List datasources

Lists datasources for this source.

The API for datasources is read-only. Datasources are updated by scanning your source. If you don't see what you expect here, check that your source has been scanned recently.

Authorizations:
SessionAuthenticationHeaderTokenAuthentication

Responses

Response Schema: application/json
id
number
url
string <url>
title
string
data_type
string
geometry_type
string
updated_at
string
arcgis_folder_service_path
string
arcgis_geometry_type
string
arcgis_layer_name
string
arcgis_type
string

Response samples

Content type
application/json
{
  • "id": 1,
  • "title": "",
  • "data_type": "vector",
  • "geometry_type": "polygon",
  • "updated_at": "2013-10-13T02:53:46Z",
  • "arcgis_folder_service_path": "Bob/MapServer",
  • "arcgis_geometry_type": "esriGeometryPolygon",
  • "arcgis_layer_name": "Null Island",
  • "arcgis_type": "Feature Layer"
}

Get datasource detail

Detailed information for a given datasource. Includes all the info shown in the list above, as well as much more information describing the datasource.

Field notes

  • type is the source type, not to be confused with data_type, format or geometry_type

  • data_type refers to the broad type of data. Different types of data require significantly different handling. Current data types are:

    • table
    • vector
    • raster
    • grid
    • attribute-grid
  • format is a string describing the media type of this datasource.

  • geometry_type describes the type of geometry in vector datasources. It is null for non-vector datasources. Possible values are:

  • point

  • linestring

  • polygon

  • multipoint

  • multilinestring

  • multipolygon

  • Spatial datasources may or may not have a known Coordinate Reference System (crs).

  • extent is a GeoJSON geometry. It may be null for aspatial datasources. The coordinate system for this geometry is the same as that in the crs field, which may not be known.

  • For vector and table datasources, fields is a list of JSON objects. It will be null for other datasources.

Authorizations:
SessionAuthenticationHeaderTokenAuthentication

Responses

Response Schema: application/json
id
number
url
string <url>
title
string
data_type
string
geometry_type
string
updated_at
string
format
string
crs
string
fields
Array of any
num_dims
number
num_features
number
num_bands
number or null
extent
object
metadata
number or null
arcgis_folder_service_path
string
arcgis_geometry_type
string
arcgis_layer_name
string
arcgis_type
string

Response samples

Content type
application/json
{
  • "id": 1,
  • "title": "Null Island Polygons",
  • "data_type": "vector",
  • "geometry_type": "polygon",
  • "updated_at": "2012-11-14T02:53:46Z",
  • "format": "application/json",
  • "crs": "EPSG:4326",
  • "fields": [
    ],
  • "num_dims": "2,",
  • "num_features": "1500,",
  • "num_bands": "null,",
  • "extent": { },
  • "metadata": "null,",
  • "arcgis_folder_service_path": "Bob/MapServer",
  • "arcgis_geometry_type": "esriGeometryPolygon",
  • "arcgis_layer_name": "Geology",
  • "arcgis_type": "Feature Layer"
}

Get datasource metadata

Some datasources can have attached XML metadata. This is attached by the CIFS and Upload scanners, if a datasource has an .xml file with the same basename. For example:

my-points-with-metadata.geojson my-points-with-metadata.xml As with sources, datasource XML must be in one of these three formats:

  • ISO 19115/19139
  • FGDC CSDGM
  • Dublin Core

Response Body

<dc xmlns:oai_dc="http://www.openarchives.org/OAI/2.0/oai_dc/">
  <title></title>
  <creator>Bob Jones and Associates</creator>
  <subject>hydro</subject>
  <description>Some nice colourful aerial photos of the Auckland Harbour.</description>
  <date>2013-01-01</date>
  <type>raster</type>
  <language>eng</language>
</dc>
Authorizations:
SessionAuthenticationHeaderTokenAuthentication

Responses

Response Schema: application/json
creator
string
subject
string
description
string
date
string
type
string
language
string

Response samples

Content type
application/json
{
  • "creator": "Bob Jones and Associates",
  • "subject": "hydro",
  • "description": "Some nice colourful aerial photos of the Auckland Harbour.",
  • "date": "2013-01-01",
  • "type": "raster",
  • "language": "string"
}

Layers & Tables

Layer APIs

List layers and tables

List layers (at layers/) and tables (at tables/) respectively. List views follow the Catalog API semantics.

Authorizations:
SessionAuthenticationHeaderTokenAuthentication

Responses

Response Schema: application/json
Array
id
integer
url
string <uri>
type
string
title
string
first_published_at
string <date-time>
thumbnail_url
string <uri>
published_at
string <date-time>
featured_at
string <date-time>
services
string <uri>
user_permissions
Array of strings (LayersTablesPostPermissionsSerializer)
public_access
string

Response samples

Content type
application/json
[]

Post layers or tables

All fields except name and data.datasources are optional.

Authorizations:
SessionAuthenticationHeaderTokenAuthentication
Request Body schema: application/json
required
title
required
string
description
string
collected
string <date>
object (LayersLicenseSerializer)
supplier_reference
string
version_reference
string
default_style_id
integer
publish
boolean
mapstream_id
integer
categories
string
tags
Array of arrays
Array of objects (PermissionArray) >= 0
publish_to_catalog_services
boolean
object (LayersAutoupdateSerializer)
required
object (LayersDataSerializer)
tilegrids
Array of arrays

Responses

Response Schema: application/json
title
string
id
integer
url
string <uri>
type
string
collected_at
string <date>
created at
string <date>
first_published_at
string <date>
thumbnail_url
string <uri>
services
string <uri>
user_permissions
Array of strings (LayersTablesPostPermissionsSerializer)
object (LayersTablesPostUserSerializer)
description
string
description_html"
string
object (LayersTablesPostGroupSerializer)
object (LayersTablesPostDataSerializer)
url_html
string <uri>
published_version
string <uri>
latest_version
string <uri>
this_version
string <uri>
kind
string
categories
Array of arrays
tags
Array of arrays
license
string
metadata
string
elevation_field
string
publish_to_catalog_services
boolean
object (LayersAutoupdateSerializer)
supplier_reference
string
styles
string <uri>
attachments
string <uri>
tilegrids
Array of arrays
num_views
number
num_downloads
number
repository
object
geotags
string <uri>
public_access
string
settings
object
default_style
string

Request samples

Content type
application/json
{
  • "title": "Fictional Boundary Points",
  • "description": "These points are totally fictional!",
  • "collected": "2013-01-01",
  • "license": {},
  • "supplier_reference": "TIVPAS",
  • "version_reference": "added more data",
  • "default_style_id": 3,
  • "publish": true,
  • "mapstream_id": 3,
  • "categories": "topographic/nz-topo-offshore-islands-data/terrain",
  • "tags": "tag2, tag2",
  • "permissions": [
    ],
  • "publish_to_catalog_services": true,
  • "autoupdate": {
    },
  • "data": {
    },
  • "tilegrids": "[]"
}

Response samples

Content type
application/json
{}

Get a filterable list view of layers

A filterable list views of layers (layers/drafts/) and and tables (tables/drafts/) respectively, similar to /layers/ and /tables/. This view shows the draft version of each layer or table. If the most recent version of a layer or table has been published already, it will not appear here.

All the same filters and ordering from layers/ and tables/ apply.

Authorizations:
SessionAuthenticationHeaderTokenAuthentication

Responses

Response Schema: application/json
id
integer
url
string <uri>
type
string
first_published_at
string <date-time>
published_at
string <date-time>

Response samples

Content type
application/json
{}

Get details of a layer or a table

Displays details of a layer layers/{id}/ or a table tables/{id}/. This view displays the published version only. To get the latest version, hit /layers/{id}/versions/latest/

Both of these URLs work for either layers or tables. This is because layers can be turned into tables and vice versa. If /tables/123/ is hit for a layer, or /layers/123/ for a table, the behaviour and response will be the same as the “correct” URL, except that the response will contain a Location header specifying the canonical URL. This applies to all sub-urls also (permissions/, metadata/, versions/, etc)

Authorizations:
SessionAuthenticationHeaderTokenAuthentication

Responses

Response Schema: application/json
title
string
id
integer
url
string <uri>
type
string
collected_at
string <date>
created at
string <date>
first_published_at
string <date>
thumbnail_url
string <uri>
services
string <uri>
user_permissions
Array of strings (LayersTablesPostPermissionsSerializer)
object (LayersTablesPostUserSerializer)
description
string
description_html"
string
object (LayersTablesPostGroupSerializer)
object (LayersTablesPostDataSerializer)
url_html
string <uri>
published_version
string <uri>
latest_version
string <uri>
this_version
string <uri>
kind
string
categories
Array of arrays
tags
Array of arrays
license
string
metadata
string
elevation_field
string
publish_to_catalog_services
boolean
object (LayersAutoupdateSerializer)
supplier_reference
string
styles
string <uri>
attachments
string <uri>
tilegrids
Array of arrays
num_views
number
num_downloads
number
repository
object
geotags
string <uri>
public_access
string
settings
object
default_style
string

Response samples

Content type
application/json
{}

Delete a layer

Deletes specified layer.

Authorizations:
SessionAuthenticationHeaderTokenAuthentication

Responses

Filterable view of a specific layer or table versions

Filterable list views of versions of a specific layer or table, always sorted newest to oldest.

Parameters data__source_revision: number (optional). If the version s source supports revisions, find versions using a specific revision. Values depend on the source type. Optionally use data__source_revision__lt ordata__source_revision__gte to filter using < or >= operators respectively.

Authorizations:
SessionAuthenticationHeaderTokenAuthentication

Responses

Response Schema: application/json
id
integer
url
string <uri>
created_at
string <date-time>
reference
string
data_import
boolean
status
string
progress
number

Response samples

Content type
application/json
{}

Create a new draft version

Creates a new draft version, accepting the same content as POST layers/. If anything in the data object has changed then an import will begin immediately. Otherwise to force a re-import from the previous sources call layers/{id}/versions/{version}/import/.

Authorizations:
SessionAuthenticationHeaderTokenAuthentication
Request Body schema: application/json
required
title
string
description
string
collected
string <date>
object
supplier_reference
string
version_reference
string
default_style_id
integer
publish
boolean
object
categoties
string <uri>
tags
Array of strings
permissions
string <uri>
publish_to_catalog_services
boolean
object (LayersAutoupdateSerializer)
object (LayersDataSerializer)
tilegrids
string
default_style
integer

Responses

Response Schema: application/json
object

Request samples

Content type
application/json
{
  • "title": "Fictional Boundary Points",
  • "description": "These points are totally fictional!",
  • "collected": [
    ],
  • "license": {},
  • "supplier_reference": "TIVPAS",
  • "version_reference": "added more data",
  • "default_style_id": 3,
  • "publish": true,
  • "user": {
    },
  • "categoties": [
    ],
  • "tags": [
    ],
  • "publish_to_catalog_services": true,
  • "autoupdate": {
    },
  • "data": {
    },
  • "tilegrids": "EPSG:2193",
  • "default_style": 10
}

Response samples

Content type
application/json
{ }

Get Layer DOI

Authorizations:
SessionAuthenticationHeaderTokenAuthentication

Responses

Response Schema: application/json
url
string <url>
identifier
string

Response samples

Content type
application/json
{}

Auto-Create or Set Layer DOI

Authorizations:
SessionAuthenticationHeaderTokenAuthentication
Request Body schema: application/json
optional
any (CreateDOIRequest)

Responses

Response Schema: application/json
url
string <url>
identifier
string

Request samples

Content type
application/json
null

Response samples

Content type
application/json
{}

Documents

Document API

Returns a list of documents.

Authorizations:
SessionAuthenticationHeaderTokenAuthentication

Responses

Response Schema: application/json
id
number
name
string
object
url
string
url_html
string
url_download
string
first_published_at
string or null
published_at
string or null
extension
string
file_size
number
file_size_formatted
number

Response samples

Content type
application/json
{}

Create document

Note that documents can only be created from sources with the data type document.

Authorizations:
SessionAuthenticationHeaderTokenAuthentication
Request Body schema: application/json
optional
name
string
user
string <url>
data
object

Responses

Response Schema: application/json
id
number
url
string <url>
created_at
string
object

Request samples

Content type
application/json
{}

Response samples

Content type
application/json
{}

Retrieve a document

Authorizations:
SessionAuthenticationHeaderTokenAuthentication

Responses

Response Schema: application/json
id
number
name
string
object
url
string
url_html
string
url_download
string
first_published_at
string or null
published_at
string or null
extension
string
file_size
number
file_size_formatted
number
description
string
description_html
string
published_version
string
latest_version
string
this_version
string
data
object
categories
Array of strings
tags
Array of strings
license
string or null
metadata
string or null
permissions
string <url>
publish_to_catalog_services
boolean

Response samples

Content type
application/json
{}

Delete Documents

Authorizations:
SessionAuthenticationHeaderTokenAuthentication

Responses

List document versions

Authorizations:
SessionAuthenticationHeaderTokenAuthentication

Responses

Response Schema: application/json
id
number
url
string <url>
created_at
string
object

Response samples

Content type
application/json
{}

Create document version

Authorizations:
SessionAuthenticationHeaderTokenAuthentication
Request Body schema: application/json
optional
name
string
user
string <url>
data
object

Request samples

Content type
application/json
{}

Retrieve document version.

Authorizations:
SessionAuthenticationHeaderTokenAuthentication

Update document version

Authorizations:
SessionAuthenticationHeaderTokenAuthentication

Delete Document Version

Authorizations:
SessionAuthenticationHeaderTokenAuthentication
Request Body schema: application/json
optional
error
string

Responses

Request samples

Content type
application/json
{
  • "error": "This version isn't a draft."
}

Get Document DOI

Authorizations:
SessionAuthenticationHeaderTokenAuthentication

Responses

Response Schema: application/json
url
string <url>
identifier
string

Response samples

Content type
application/json
{}

Auto-Create or Set Document DOI

Authorizations:
SessionAuthenticationHeaderTokenAuthentication
Request Body schema: application/json
optional
any (CreateDOIRequest)

Responses

Response Schema: application/json
url
string <url>
identifier
string

Request samples

Content type
application/json
null

Response samples

Content type
application/json
{}

Sets

The Set Query API allows users to look up a point location and get back information from a set.

A set is a collection of data layers and tables that can be viewed downloaded at one time. Publishers use sets to enable users to access datasets that are commonly grouped together.

Differences to vector and raster APIs

The set query API returns similar information to the Vector and Raster API endpoints, with a few notable differences

  • You query a single set, not a number of layers. You don't have to know what layers are in the set before you query it.
  • Layers are returned in the correct order, in a JSON list rather than an object. Both vector and grid layers from the set will be included.
  • Each layer returned contains its ID and title, since you might not already have them.

URL

Your URL endpoint is dependent on the particular Koordinates service you wish to access.

The URL for the Koordinates site will be https://koordinates.com/services/query/v1/set

Formats

The sets API returns in JSON:

content-type: application/vnd.koordinates.setQuery+json

Formats can be specified via URL. For example: http://api.koordinates.com/api/setQuery.json

They can also be specified using the HTTP Accept header with the appropriate content-type against the base URL. For example: application/vnd.koordinates.rasterQuery.1+json

By default, all responses use the newest format. While we try very hard to prevent backwards-incompatible breaks, please note that it may happen in future

If you're using the URL endpoint (for example, rasterQuery.json) you can pass a &v=1 parameter to specify version 1.3. Note that the current version is 1.3

Compression

Add a request header with Accept-Encoding: gzip to get compressed results. This dramatically reduces the size of the response and will speed up your API requests.

Get information from a set

Authorizations:
SessionAuthenticationHeaderTokenAuthentication

Responses

Response Schema: application/json
x
number
y
number
radius
number [ 0 .. 100000 ]
Default: 100
geometry
boolean
Default: false
with_field_names
boolean
Default: false
set required
number
max_result
number [ 1 .. 5 ]
Default: 1

Response samples

Content type
application/json
{
  • "x": 0,
  • "y": 0,
  • "radius": 100,
  • "geometry": false,
  • "with_field_names": false,
  • "set required": 0,
  • "max_result": 1
}

Service Discovery

Services

Authorizations:
SessionAuthenticationHeaderTokenAuthentication

Responses

Response Schema: application/json
Array
key
string
authority
string
short_name
string
label
string
auth_method
Array of arrays
auth_scopes
Array of arrays
domain
string
Array of objects (ServiceTemplateSerializer) >= 0

Response samples

Content type
application/json
[
  • {
    }
]

Data Object Identifiers

DOIs – or Data Object Identifiers – are unique addresses assigned to a piece of digital content. They are intended to provide a persistent link to its location on the internet. Koordinates supports manually assigned DOIs and supports DOI "minting" and integrated management with the DataCite registry service.

For sites that have this feature enabled, the Data Object Identifiers API is an extension to Layer, Table and Document APIs. For more information about enabling Data Object Identifier support to your site, please contact support@koordinates.com.

DOI Representations

DOIs can be defined in the following ways:

  • As a basic prefix/suffix of the form 10.5072/FK2SJ1J03K
  • As a URL https://doi.org/10.5072/FK2SJ1J03K
  • As a name-spaced DOI string doi:10.5072/FK2SJ1J03K

Any of these forms is considered an acceptable way to supply DOI strings to the API. You can also supply one or more of these in an object keyed by url or identifier as long as they are equivalent.

Get Layer DOI

Authorizations:
SessionAuthenticationHeaderTokenAuthentication

Responses

Response Schema: application/json
url
string <url>
identifier
string

Response samples

Content type
application/json
{}

Auto-Create or Set Layer DOI

Authorizations:
SessionAuthenticationHeaderTokenAuthentication
Request Body schema: application/json
optional
any (CreateDOIRequest)

Responses

Response Schema: application/json
url
string <url>
identifier
string

Request samples

Content type
application/json
null

Response samples

Content type
application/json
{}

Get Document DOI

Authorizations:
SessionAuthenticationHeaderTokenAuthentication

Responses

Response Schema: application/json
url
string <url>
identifier
string

Response samples

Content type
application/json
{}

Auto-Create or Set Document DOI

Authorizations:
SessionAuthenticationHeaderTokenAuthentication
Request Body schema: application/json
optional
any (CreateDOIRequest)

Responses

Response Schema: application/json
url
string <url>
identifier
string

Request samples

Content type
application/json
null

Response samples

Content type
application/json
{}

Repositories

The Repositories API allows you to create and interact with hosted Kart repositories. Refer to https://KartProject.org for more information on Kart.

Returns a list of Repos you have access to.

Authorizations:
SessionAuthenticationHeaderTokenAuthentication

Responses

Response Schema: application/json
Array
id
string
full_name
string
url
string <url>
clone_location_ssh
string
clone_location_https
string

Response samples

Content type
application/json
[
  • {
    }
]

Create a new empty hosted Repository

Authorizations:
SessionAuthenticationHeaderTokenAuthentication
Request Body schema: application/json
required
title
required
string

Request samples

Content type
application/json
{
  • "title": "string"
}

Fetch a single Repo

Authorizations:
SessionAuthenticationHeaderTokenAuthentication

Responses

Response Schema: application/json
id
string
full_name
string
url
string <url>
clone_location_ssh
string
clone_location_https
string

Response samples

Content type
application/json
{
  • "id": "string",
  • "full_name": "string",
  • "url": "string",
  • "clone_location_ssh": "string",
  • "clone_location_https": "string"
}

Update a repo

Authorizations:
SessionAuthenticationHeaderTokenAuthentication

Fetch an estimate for the on-disk size of Repo clone.

Authorizations:
SessionAuthenticationHeaderTokenAuthentication
query Parameters
depth
integer
Example: depth=5

The depth, for a shallow clone, of objects to recieve, where the depths is the number of commits of history to include. by default includes all commits.

spatial_filter
string
Example: spatial_filter=POLYGON ((1752700 5921800, 1752700 5927200, 1757100 5927200, 1757100 5921800, 1752700 5921800))

Applies a spatial filter to the clone size estimate. The spatial-filter is a geometry encoded using either WKT or hex-encoded WKB. Kart-style spatial-filter specifications are also supported - where the CRS is prepended to the geometry and separated by a semicolon, eg "EPSG:2193;"

spatial_filter_crs
string
Example: spatial_filter_crs=EPSG:2193

The CRS of the spatial-filter. Defaults to "EPSG:4326" if not specified here or prepended to spatial_filter.

Responses

Response Schema: application/json
pack_size_bytes
number

Estimate of the size (in bytes) of the pack objects to be received. This is usually roughly equivalent to the size of the repository itself, excluding the working copy.

working_copy_size_bytes
number

Estimate of the size (in bytes) of the working copy that would be created by cloning the repository, excluding the size of the repository itself.

spatial_filter_ratio
number

Optional. The approximate overlap of the specified spatial-filter with the extent of the data in the repository, as a fraction (ie 0.25 means 25% of the data's extent is covered by the spatial filter). This estimates the effectiveness of the spatial filter at saving bandwidth - a number near 0 means most data will be filtered out, and a number near 1 means most data will still be sent. This is for added context only - the pack_size_bytes and working_copy_size_bytes have already been adjusted, they do not need to be adjusted further using this number. If this field is not present, no spatial-filter was applied - either no spatial-filter was specified, or, the spatial-filter could not be applied to the estimate in a timely manner.

Response samples

Content type
application/json
{
  • "pack_size_bytes": 1234567890,
  • "working_copy_size_bytes": 1234567890,
  • "spatial_filter_ratio": 0.250071
}

Fetch a list of branches available for this repo.

Authorizations:
SessionAuthenticationHeaderTokenAuthentication

Responses

Response Schema: application/json
Array
name
string
target
string
shorthand
string

Response samples

Content type
application/json
[
  • {
    }
]

Fetch a specific commit

Authorizations:
SessionAuthenticationHeaderTokenAuthentication

Responses

Response Schema: application/json
commit
string
abbrevCommit
string
message
string
authorName
string
authorEmail
string
authorTime
string
authorTimeOffset
string
committerName
string
committerEmail
string
committerTime
string
committerTimeOffset
string
parents
Array of strings
abbrevParents
Array of strings
refs
Array of strings

Response samples

Content type
application/json
{
  • "commit": "e67a159dce20ccfb268e975d92f88a4d64a91d27",
  • "abbrevCommit": "e67a159",
  • "message": "Updated this api documentation",
  • "authorName": "Jane Doe",
  • "authorEmail": "jane.doe@example.com",
  • "authorTime": "2021-07-07T03:50:42Z",
  • "authorTimeOffset": "+01:00",
  • "committerName": "Jane Doe",
  • "committerEmail": "jane.doe@example.com",
  • "committerTime": "2021-07-07T03:50:42Z",
  • "committerTimeOffset": "+01:00",
  • "parents": [
    ],
  • "abbrevParents": [
    ],
  • "refs": [
    ]
}

Fetch a list of imports for this repo.

Authorizations:
SessionAuthenticationHeaderTokenAuthentication
query Parameters
ref
string
Example: ref=main

Branch or tag reference to filter imports by.

Responses

Response Schema: application/json
Array
url
string
message
string
Array of objects (RepoDatasetImportSerializer)
ref
string
state
string
Enum: "WORKING" "COMPLETED" "ERROR" "CANCELLED"
progress
number <float> [ 0 .. 1 ]
created_at
string <date-time>
updated_at
string <date-time>
commit_oid
string (CommitOid)
author_email
string <email>

Response samples

Content type
application/json
[
  • {
    }
]

Create a new import for this repo.

Authorizations:
SessionAuthenticationHeaderTokenAuthentication
Request Body schema: application/json
required
message
string

A commit message to associate with the import

ref
string

The branch or tag to import to

Array of objects (RepoDatasetImportSerializer)

Request samples

Content type
application/json
{
  • "message": "string",
  • "ref": "string",
  • "datasets": [
    ]
}

Fetch a specific import for this repo.

Authorizations:
SessionAuthenticationHeaderTokenAuthentication

Responses

Response Schema: application/json
url
string
message
string
Array of objects (RepoDatasetImportSerializer)
ref
string
state
string
Enum: "WORKING" "COMPLETED" "ERROR" "CANCELLED"
progress
number <float> [ 0 .. 1 ]
created_at
string <date-time>
updated_at
string <date-time>
commit_oid
string (CommitOid)
author_email
string <email>

Response samples

Content type
application/json
{
  • "url": "string",
  • "message": "string",
  • "datasets": [
    ],
  • "ref": "string",
  • "state": "WORKING",
  • "progress": 1,
  • "created_at": "2019-08-24T14:15:22Z",
  • "updated_at": "2019-08-24T14:15:22Z",
  • "commit_oid": "42cd7929aa9aaca1782c6e75f552459ca41a7c66",
  • "author_email": "user@example.com"
}

Diff between two commits

Returns a diff in JSON or JSON-Lines format depending on the supplied Accept header.

Authorizations:
SessionAuthenticationHeaderTokenAuthentication
path Parameters
rev_range
required
string
Example: abcd1234...main

A Kart revision range. This is usually of the form "X..Y" or "X...Y", where X and Y are resolvable to commit IDs.

query Parameters
crs
string^EPSG:\d+$
Example: crs=EPSG:2193

Reproject geometries into the given EPSG CRS.

Return a log for the given commit or revision range

Returns a diff in JSON or JSON-Lines format depending on the supplied Accept header.

Authorizations:
SessionAuthenticationHeaderTokenAuthentication
path Parameters
rev_range
required
string
Example: abcd1234...main^

A Kart revision range. This is either:

  • a single commit or ref
  • "X..Y" or "X...Y", where X and Y are resolvable to commit IDs.

Responses

Response Schema: application/json
Array
commit
string
abbrevCommit
string
message
string
authorName
string
authorEmail
string
authorTime
string
authorTimeOffset
string
committerName
string
committerEmail
string
committerTime
string
committerTimeOffset
string
parents
Array of strings
abbrevParents
Array of strings
refs
Array of strings

Response samples

Content type
application/json
[
  • {
    }
]

List datasets in a repo

Authorizations:
SessionAuthenticationHeaderTokenAuthentication
path Parameters
commitish
required
string
Example: main^

Responses

Response Schema: application/json
Array
id
string
repository
string <url>
path
string

Path of the dataset inside the Kart repo

url
string <url>
title
string
updated_at
string <date-time>

When this dataset was last updated.

updated_at_commit
string

The commit at which this dataset was last updated.

ref
string

The ref or commit hash this dataset was found at

type
string
Value: "layer"
kind
string
Enum: "vector" "pointcloud" "raster"
public_access
string
settings
object
user_permissions
Array of strings
Items Enum: "find" "view" "download" "write" "admin"

Response samples

Content type
application/json
[]

Get a specific dataset

Authorizations:
SessionAuthenticationHeaderTokenAuthentication
path Parameters
commitish
required
string
Example: main^

Responses

Response Schema: application/json
id
string
repository
string <url>
path
string

Path of the dataset inside the Kart repo

url
string <url>
title
string
updated_at
string <date-time>

When this dataset was last updated.

updated_at_commit
string

The commit at which this dataset was last updated.

ref
string

The ref or commit hash this dataset was found at

type
string
Value: "layer"
kind
string
Enum: "vector" "pointcloud" "raster"
public_access
string
settings
object
user_permissions
Array of strings
Items Enum: "find" "view" "download" "write" "admin"
created_at
string <date-time>

When this dataset was first created.

created_at_commit
string

The commit which created this dataset.

description
string <markdown>
description_html
string <html>
object (Group)
object
tags
Array of arrays

Response samples

Content type
application/json
{
  • "id": "dtV9pqYL3RtF9GK",
  • "path": "property/boundaries",
  • "title": "Property Boundaries",
  • "updated_at": "2019-08-24T14:15:22Z",
  • "updated_at_commit": "42cd7929aa9aaca1782c6e75f552459ca41a7c66",
  • "ref": "42cd7929aa9aaca1782c6e75f552459ca41a7c66",
  • "type": "layer",
  • "kind": "vector",
  • "public_access": "download",
  • "settings": { },
  • "user_permissions": [
    ],
  • "created_at": "2019-08-24T14:15:22Z",
  • "created_at_commit": "42cd7929aa9aaca1782c6e75f552459ca41a7c66",
  • "description": "This dataset contains *property boundaries* for privately owned titles.",
  • "description_html": "<p>This dataset contains <strong>property boundaries</strong> for privately owned titles.</p>",
  • "group": {
    },
  • "data": {
    },
  • "tags": [ ]
}

Get metadata about this repo

The response is given as a JSON object whose keys correspond to dataset paths.

Authorizations:
SessionAuthenticationHeaderTokenAuthentication
path Parameters
commitish
required
string
Example: main^

Responses

Response Schema: application/json
additional property
object (RepoDatasetMeta)

Response samples

Content type
application/json
{
  • "property/boundaries": {
    }
}

Returns a list of tiles in a point-cloud dataset

Authorizations:
SessionAuthenticationHeaderTokenAuthentication
query Parameters
sort
string
Default: "name"
Enum: "name" "-name" "date_added" "-date_added" "date_updated" "-date_updated" "point_count" "-point_count" "point_density" "-point_density"

Specifies a different sort order for the returned tiles. (By default they are sorted by name.) Prefixing your sort with - inverts the sort, so -date_added will return the newest tiles first.

search
string
Example: search=*auckland_AB34*

Limits the returned tiles to those whose names match the given search query string. May contain wildcards * (match any number of characters) and ? (match any single character). Must match the entire tile name, including file extension. To match on a substring, put a * at the beginning and end of your query. All searches are case-insensitive.

x
float
Example: x=79.3758

The x value of the point to query for. Must be used in conjunction with y and crs

y
float
Example: y=-35.2354

The y value of the point to query for in the requested CRS. Must be used in conjunction with x and crs

radius
float [ 0 .. 10 ]
Default: 1
Example: radius=5

The radius in meters to search for tiles in.

crs
string
Enum: "global" "native" "EPSG:XXXX"

The CRS to use for the x and y parameters. Must be used in conjunction with x and y. If global is specified, the x and y parameters are assumed to be in EPSG:4326 (WGS84). If native is specified, the x and y parameters are assumed to be in the native CRS of the dataset. If an EPSG code is specified, the x and y parameters are assumed to be in that CRS.

Responses

Response Schema: application/json
Array
name
string
point_count
integer
oid
string
source_oid
string
object (MultiPolygon)

MultiPolygon geometry

gridded_extent
string (GriddedExtent)

A hex-encoded WKB string describing a multipolygon covering a tile or dataset.

object (CommitOidAndAuthorDate)
object (CommitOidAndAuthorDate)
Array of objects (PointCloudClassification)

Counts of the classifications present in this tile's points.

Array of objects (PointCloudClassificationFlag)

Counts of the classification flags present in this tile's points.

point_density_sqm
number

An estimate of the density of this tile (number of points per square metre)

Response samples

Content type
application/json
[
  • {
    }
]

Returns a list of nearby points in a point-cloud dataset.

Returns a list of tiles near the query-point, and returns a list of points (found within those tiles) near the query point. All tiles that are within radius of the query point will be returned, unless further filters are specified, and they will be ordered using the specified sort-order. Only num_points points will be returned, ordered by their distance from the query point. This endpoint be thought of as an extension to the query-tiles endpoint: first the list of tiles is found, using the same logic as query-tiles, then a list of points is found from within those tiles.

Authorizations:
SessionAuthenticationHeaderTokenAuthentication
query Parameters
sort
string
Default: "name"
Enum: "name" "-name" "date_added" "-date_added" "date_updated" "-date_updated" "point_count" "-point_count" "point_density" "-point_density"

Specifies a different sort order for the returned tiles. (By default they are sorted by name.) Prefixing your sort with - inverts the sort, so -date_added will return the newest tiles first.

search
string
Example: search=*auckland_AB34*

Limits the returned tiles to those whose names match the given search query string. May contain wildcards * (match any number of characters) and ? (match any single character). Must match the entire tile name, including file extension. To match on a substring, put a * at the beginning and end of your query. All searches are case-insensitive. Filtering returned tiles indirectly filters returned points, since all returned points will be found somewhere within the returned tiles.

x
float
Example: x=79.3758

The x value of the point to query for. Required.

y
float
Example: y=-35.2354

The y value of the point to query for in the requested CRS. Required.

radius
float [ 0 .. 10 ]
Default: 1
Example: radius=5

The radius in meters to search for tiles in.

crs
string
Enum: "global" "native" "EPSG:XXXX"

The CRS to use for the x and y parameters. Required. If global is specified, the x and y parameters are assumed to be in EPSG:4326 (WGS84). If native is specified, the x and y parameters are assumed to be in the native CRS of the dataset. If an EPSG code is specified, the x and y parameters are assumed to be in that CRS.

num_points
integer [ 1 .. 1000 ]
Default: 10

The number of points to return, starting with the point to the query-point. All returned points will be found within the returned tiles, but it may be that some of the returned tiles don't provide any points which are among the closest num_points points.

Responses

Response Schema: application/json
Array of objects (RepoPointCloudTile) >= 0
Array of objects (RepoPointCloudPoint) >= 0

Response samples

Content type
application/json
{
  • "tiles": [
    ],
  • "points": [
    ]
}

Users

User APIs

Get the currently logged in user's details

Returns detail about the user who is currently authenticated with the API.

Authorizations:
SessionAuthenticationHeaderTokenAuthentication

Responses

Response Schema: application/json
id
integer
url
string <url>
first_name
string
last_name
string
country
string
email
string
is_locked
boolean
is_site_admin
boolean
seat_type
string
date_joined
string
avatar_url
string <url>
object
Array of objects (UserContextList) >= 0
remote_auth
boolean

true if the user's Koordinates ID is linked to a 3rd party authorization service such as GSuite or Azure AD. This user cannot edit their profile information directly from Koordinates.

object (OrgSerializer)
locale
string
object
is_authenticated
boolean
object

Response samples

Content type
application/json
{
  • "id": 482,
  • "first_name": "Jennifer",
  • "last_name": "Exampleton",
  • "country": "US",
  • "email": "jennifer.exampleton@example.com",
  • "is_locked": false,
  • "is_site_admin": false,
  • "seat_type": "none",
  • "date_joined": "2020-05-16T23:37:45.632286Z",
  • "avatar_url": "string",
  • "capabilities": {
    },
  • "contexts": [
    ],
  • "remote_auth": false,
  • "remote_auth_org": {},
  • "locale": "en-US",
  • "geoip": {
    },
  • "is_authenticated": true,
  • "notification_preferences": {
    }
}

Groups

List Groups

Get the groups configured for this site.

Authorizations:
SessionAuthenticationHeaderTokenAuthentication
query Parameters
q
string

Free-text search query

access_requests_enabled
boolean

Filter groups with or without access requests

Responses

Response Schema: application/json
Array
id
number
url
string <url>
name
string
country
string
org
string
access_requests_enabled
boolean

Response samples

Content type
application/json
[
  • {
    }
]

Get a Group.

Authorizations:
SessionAuthenticationHeaderTokenAuthentication

Responses

Response Schema: application/json
id
number
url
string <url>
name
string
country
string
org
string
access_requests_enabled
boolean

Response samples

Content type
application/json
{
  • "id": 0,
  • "url": "string",
  • "name": "string",
  • "country": "string",
  • "org": "string",
  • "access_requests_enabled": true
}

List Group User Permissions

Returns a list of permissions granted to users within this group.

Authorizations:
SessionAuthenticationHeaderTokenAuthentication

Responses

Response Schema: application/json
Array
id
string
object (RelatedUserSerializer)
permission
string
Enum: "view" "manage_data" "admin"

Valid options can be determined via an OPTIONS request. Note that view grants the permission to view and download data from the group.

url
string <url>

Response samples

Content type
application/json
[]

Modify Group User Permissions

Allows the caller to make multiple changes to the group permissions. Each action in the list has one of three action types that can be performed:

  • create - add a new permission for a user to this group
  • update - modify the permissions for an existing permission
  • delete - delete a permission that currently exists

The update and delete operations require the url to the permission as returned in the GET request to this endpoint. The value object specifies the user (by ID) and the permission to grant.

Authorizations:
SessionAuthenticationHeaderTokenAuthentication
Request Body schema: application/json
required
Array
action
string
Enum: "create" "update" "delete"
object
url
string

Required for update and delete actions.

Responses

Request samples

Content type
application/json
[]

Add Group User Permissions

Authorizations:
SessionAuthenticationHeaderTokenAuthentication
Request Body schema: application/json
required
permission
string
Enum: "view" "manage_data" "admin"
user
number

Responses

Request samples

Content type
application/json
{
  • "permission": "view",
  • "user": 99999
}

Get User Group Permission

Authorizations:
SessionAuthenticationHeaderTokenAuthentication

Responses

Response Schema: application/json
id
string
object (RelatedUserSerializer)
permission
string
Enum: "view" "manage_data" "admin"

Valid options can be determined via an OPTIONS request. Note that view grants the permission to view and download data from the group.

url
string <url>

Response samples

Content type
application/json
{}

Update User Group Permission

Authorizations:
SessionAuthenticationHeaderTokenAuthentication
Request Body schema: application/json
required
permission
string
Enum: "view" "manage_data" "admin"
user
number

Responses

Response Schema: application/json
id
string
object (RelatedUserSerializer)
permission
string
Enum: "view" "manage_data" "admin"

Valid options can be determined via an OPTIONS request. Note that view grants the permission to view and download data from the group.

url
string <url>

Request samples

Content type
application/json
{
  • "permission": "view",
  • "user": 99999
}

Response samples

Content type
application/json
{}

Delete User Group Permission

Authorizations:
SessionAuthenticationHeaderTokenAuthentication

Responses

Current User Access Request

Fetches an existing access request to the group for the currently authenticated user.

Authorizations:
SessionAuthenticationHeaderTokenAuthentication

Responses

Response Schema: application/json
id
number
url
string <url>
created_at
string

Response samples

Content type
application/json
{}

Request Access to Group

Submit an access request to the group for the currently authenticated user.

Authorizations:
SessionAuthenticationHeaderTokenAuthentication

Responses

Response samples

Content type
application/json
{}

Revoke Access Request

Revokes the access request for the currently authenticated user.

Authorizations:
SessionAuthenticationHeaderTokenAuthentication

Responses

Get Access Request List

Fetches all outstanding access requests for the group.

Authorizations:
SessionAuthenticationHeaderTokenAuthentication

Responses

Response Schema: application/json
Array
id
number
url
string <url>
created_at
string
object (RelatedUserSerializer)

Response samples

Content type
application/json
[]

Get Access Request

Fetches an access requests for the group.

Authorizations:
SessionAuthenticationHeaderTokenAuthentication

Responses

Decline Access Request

Declines a users request to access the group. This will notify the requesting user that the request has been declined.

Authorizations:
SessionAuthenticationHeaderTokenAuthentication

Responses

Approve Access Request

Approves a request to access the group. The user will be notified that the request has been approved.

Authorizations:
SessionAuthenticationHeaderTokenAuthentication

Responses

Licenses

Get licenses

Authorizations:
SessionAuthenticationHeaderTokenAuthentication

Responses

Response Schema: application/json
Array
id
integer
title
string (License Title)
type
string
jurisdiction
string
version
string
url
string
slug
string
text
string
url_external
string
object

Layers and documents this license belongs to

Response samples

Content type
application/json
[]

Create a new custom license

Note that only custom licenses can be created.

Authorizations:
SessionAuthentication
Request Body schema: application/json
required
title
string
text
string

Body of the license text.

slug
string

URL-friendly name for this license. Will be generated automatically if not provided.

url_external
string

Request samples

Content type
application/json
{
  • "title": "The Unlicense",
  • "text": "string",
  • "slug": "string",
  • "url_external": "string"
}

Fetch a single license

Authorizations:
SessionAuthenticationHeaderTokenAuthentication

Responses

Response Schema: application/json
id
integer
title
string (License Title)
type
string
jurisdiction
string
version
string
url
string
slug
string
text
string
url_external
string
object

Layers and documents this license belongs to

Response samples

Content type
application/json
{}

Update a custom license

Note that only custom licenses can be updated.

Authorizations:
SessionAuthentication
Request Body schema: application/json
required
title
string
text
string
slug
string

URL-friendly name for this license. Will be generated automatically if not provided.

url_external
string
description
string
collected
string <date>
object (LayersLicenseSerializer)
supplier_reference
string
version_reference
string
default_style_id
number
publish
boolean
mapstream_id
number
categories
string
tags
Array of arrays
permissions
string <url>
publish_to_catalog_services
boolean
object (LayersAutoupdateSerializer)
required
object (LayersDataSerializer)
tilegrids
Array of arrays

Responses

Response Schema: application/json
id
integer
title
string (License Title)
type
string
jurisdiction
string
version
string
url
string
slug
string
text
string
url_external
string
object

Layers and documents this license belongs to

Request samples

Content type
application/json
{
  • "title": "The Unlicense",
  • "text": "string",
  • "slug": "string",
  • "url_external": "string",
  • "description": "These points are totally fictional!",
  • "collected": "2013-01-01",
  • "license": {},
  • "supplier_reference": "TIVPAS",
  • "version_reference": "added more data",
  • "default_style_id": 3,
  • "publish": true,
  • "mapstream_id": 3,
  • "categories": "topographic/nz-topo-offshore-islands-data/terrain",
  • "tags": "tag2, tag2",
  • "permissions": "topographic/nz-topo-offshore-islands-data/terrain",
  • "publish_to_catalog_services": true,
  • "autoupdate": {
    },
  • "data": {
    },
  • "tilegrids": "[]"
}

Response samples

Content type
application/json
{}

Delete a custom license

Authorizations:
SessionAuthenticationHeaderTokenAuthentication

Responses

Response Schema: application/json
any

Response samples

Content type
application/json
null

Categories

Get categories

Authorizations:
SessionAuthenticationHeaderTokenAuthentication

Responses

Response Schema: application/json
Array
name
string
slug
string
key
string
url
string <url>
children
Array of objects (CategoryItemSerializer) >= 0

Response samples

Content type
application/json
[]

Create a new category

Authorizations:
SessionAuthentication
Request Body schema: application/json
required
name
required
string
slug
string

A URL-friendly name for the category. Will be generated automatically if not provided. Must be unique within the current set of children.

parent
string <url>

The URL of the parent category.

Request samples

Content type
application/json
{
  • "name": "Category 1",
  • "slug": "string",
  • "parent": "string"
}

Fetch a single category

Authorizations:
SessionAuthenticationHeaderTokenAuthentication

Responses

Response Schema: application/json
name
string
slug
string
key
string
url
string <url>
children
Array of objects (CategoryItemSerializer) >= 0

Response samples

Content type
application/json
{}

Update a category

Authorizations:
SessionAuthentication
Request Body schema: application/json
required
subject
string
slug
string

A URL-friendly name for the category. Will be generated automatically if not provided. Must be unique within the current set of children.

parent
string <url>

The URL of the parent category.

Responses

Response Schema: application/json
name
string
slug
string
key
string
url
string <url>
children
Array of objects (CategoryItemSerializer) >= 0

Request samples

Content type
application/json
{
  • "subject": "Category 1",
  • "slug": "string",
  • "parent": "string"
}

Response samples

Content type
application/json
{}

Delete a category

Authorizations:
SessionAuthenticationHeaderTokenAuthentication

Responses

Response Schema: application/json
any

Response samples

Content type
application/json
null

Pinning

Pin dataset

Authorizations:
SessionAuthenticationHeaderTokenAuthentication

Responses

Un-pin dataset

Authorizations:
SessionAuthenticationHeaderTokenAuthentication

Responses

Coordinate Systems

List available coordinate systems

query Parameters
kind
string (CoordinateSystemKind)
Enum: "geographic 2D" "geocentric" "geographic 3D" "projected" "vertical" "compound"
q
string
Example: q=pacific+ocean

Free text search query

Responses

Response Schema: application/json
Array
id
string
url
string <url>
name
string
kind
string (CoordinateSystemKind)
Enum: "geographic 2D" "geocentric" "geographic 3D" "projected" "vertical" "compound"
unit_horizontal
string or null

Null for vertical coordinate systems

unit_vertical
string or null

Non-null for vertical and compound coordinate systems; null otherwise

url_external
string <url>
srid
integer or null
Deprecated

Integer identifier for EPSG coordinate systems only. Use id instead

Response samples

Content type
application/json
[]

Retrieve information about a coordinate system

path Parameters
id
required
any
Example: EPSG:4326

Responses

Response Schema: application/json
id
string
url
string <url>
name
string
kind
string (CoordinateSystemKind)
Enum: "geographic 2D" "geocentric" "geographic 3D" "projected" "vertical" "compound"
unit_horizontal
string or null

Null for vertical coordinate systems

unit_vertical
string or null

Non-null for vertical and compound coordinate systems; null otherwise

url_external
string <url>
srid
integer or null
Deprecated

Integer identifier for EPSG coordinate systems only. Use id instead

definition
string

Response samples

Content type
application/json
{
  • "id": "EPSG:4326",
  • "name": "WGS 84",
  • "kind": "geographic 2D",
  • "unit_horizontal": "degree",
  • "unit_vertical": null,
  • "url_external": "https://epsg.io/4326",
  • "srid": 4326,
  • "definition": "GEOGCRS[\"WGS 84\",DATUM[\"World Geodetic System 1984\",ELLIPSOID[\"WGS 84\",6378137,298.257223563,LENGTHUNIT[\"metre\",1]]],PRIMEM[\"Greenwich\",0,ANGLEUNIT[\"degree\",0.0174532925199433]],CS[ellipsoidal,2],AXIS[\"geodetic latitude (Lat)\",north,ORDER[1],ANGLEUNIT[\"degree\",0.0174532925199433]],AXIS[\"geodetic longitude (Lon)\",east,ORDER[2],ANGLEUNIT[\"degree\",0.0174532925199433]],USAGE[SCOPE[\"Horizontal component of 3D system.\"],AREA[\"World.\"],BBOX[-90,-180,90,180]],ID[\"EPSG\",4326]]\n"
}