Download OpenAPI specification:Download
Documentation for Koordinates REST APIs.
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.
APIs for created and managing API tokens. Valid scopes:
query
– Query layer datatiles
– Access cartographic tile images (WMTS)catalog
– View the data catalog and access catalog services (CS-W)wxs:wfs
– Access OGC Web Feature Services (WFS)documents:read
– Search and view documentsdocuments:write
– Create, edit and delete documentslayers:read
– Search and view tables and layerslayers:write
– Create, edit and delete tables and layersnotifications:read
– Retrieve notificationssets:read
– Search and view setssets:write
– Create, edit and delete setssources:read
– Search and view data sourcessources:write
– Create, edit and delete data sourcesexports:read
– Search, view and download exported dataexports:write
– Create new data exportsusers:read
– View group and user informationusers:write
– Manage users and groupstokens:read
– View your API tokenstokens:write
– Manage your API tokensrepos:read
– Search and view Kart reposrepos:push
– Push commits to Kart reposrepos:write
– Create, edit and delete Kart reposviewers:read
– Search and view MapViewersviewers:write
– Create, edit and delete MapViewers[- {
- "id": 531,
- "name": "Example Token",
- "key_hint": "0035ee...",
- "site": "example.koordinates.com"
}
]
{- "id": 531,
- "name": "Example Token",
- "key_hint": "0035ee...",
- "site": "example.koordinates.com",
- "scope": "layers:read documents:read",
- "created_at": "2019-08-24T14:15:22Z",
- "expires_at": "2019-08-24T14:15:22Z",
- "referrers": [
- "string"
]
}
[- {
- "name": "Category 3",
- "slug": "category-3",
- "key": "category-1/category-2/category-3",
- "children": [
- { }
]
}
]
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. |
{- "name": "Category 1",
- "slug": "string",
- "parent": "string"
}
{- "name": "Category 3",
- "slug": "category-3",
- "key": "category-1/category-2/category-3",
- "children": [
- { }
]
}
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. |
{- "subject": "Category 1",
- "slug": "string",
- "parent": "string"
}
{- "name": "Category 3",
- "slug": "category-3",
- "key": "category-1/category-2/category-3",
- "children": [
- { }
]
}
kind | string (CoordinateSystemKind) Enum: "geographic 2D" "geocentric" "geographic 3D" "projected" "vertical" "compound" |
q | string Example: q=pacific+ocean Free text search query |
[- {
- "id": "EPSG:4326",
- "name": "WGS 84",
- "kind": "geographic 2D",
- "unit_horizontal": "degree",
- "unit_vertical": null,
- "srid": 4326
}
]
id required | any Example: EPSG:4326 |
{- "id": "EPSG:4326",
- "name": "WGS 84",
- "kind": "geographic 2D",
- "unit_horizontal": "degree",
- "unit_vertical": null,
- "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"
}
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.
DOIs can be defined in the following ways:
10.5072/FK2SJ1J03K
https://doi.org/10.5072/FK2SJ1J03K
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.
{- "identifier": "doi:10.10000/ABC1-DEF9"
}
null
{- "identifier": "doi:10.10000/ABC1-DEF9"
}
{- "identifier": "doi:10.10000/ABC1-DEF9"
}
null
{- "identifier": "doi:10.10000/ABC1-DEF9"
}
The Data Sources API provides read and write access to sources, datasources and scans.
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.
Info sources merely provide a way to point humans to some data. They are never scanned by Koordinates; they don’t have datasources; and you can’t create layers from them.
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.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.url_remote
: A URL of the form "cifs://host/sharename", optionally with extra path segments. Must not contain credentials.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"]
A URL source defines an FTP, HTTP or HTTPS url to an archive Koordinates can scan for data.
Currently accepts these archives:
URL sources accept the following extra fields:
url_remote
: The URL to download the archive. Must not contain credentials.url_remote
: The URL to the WFS server endpoint. Must not contain credentials.Returns a list of all the sources available to you.
{- "id": 1,
- "name": "harbour-images.zip",
- "type": "upload",
- "description": "",
- "description_html": "",
- "categories": "string",
- "user": {
- "id": 3,
- "name": "Bob Jones"
}, - "last_scanned_at": null,
- "scan_schedule": null,
- "options": "{}",
- "metadata": null
}
To create a source, post to this view.
string
(required). The type of source to create. Example: info. Choices: info upload cifs arcgis wfs postgresstring
(required). The name of the new source.string|id
(optional)string|id
(optional). The group or user (at least one required) that owns the source, by ID or API URL.string
(optional). The remote URL to the source, not required for info or uploadsourcesstring
(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".name | string |
type | string |
description | string |
categories | string |
user | number |
object (SourcePostOptions) | |
url_remote | string <url> |
scan_schedule | string |
{- "name": "Bob's ArcGIS 10 Server",
- "type": "arcgis",
- "description": "All of Bob's data",
- "categories": "string",
- "user": 3,
- "options": {
- "username": "bob",
- "password": "sekret_p@55w0rd"
}, - "scan_schedule": "@daily"
}
{- "id": 1,
- "name": "Bob's ArcGIS 10 Server",
- "type": "arcgis",
- "description": "All of Bob's data",
- "description_html": "<p>All of Bob's data</p>",
- "categories": "string",
- "user": {
- "id": 3,
- "name": "Bob Jones"
}, - "last_scanned_at": null,
- "scan_schedule": "@daily",
- "options": "{}",
- "metadata": null,
}
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:
Starts a scan for this source. No post data is required.
{- "id": 1,
- "name": "Bob's ArcGIS 10 Server",
- "type": "arcgis",
- "description": "All of Bob's data",
- "description_html": "<p>All of Bob's data</p>",
- "categories": "string",
- "user": {
- "id": 3,
- "name": "Bob Jones"
}, - "last_scanned_at": null,
- "scan_schedule": "@daily",
- "options": "{}",
- "metadata": null,
}
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.
{- "id": 4,
- "status": "completed",
- "started_at": "2013-10-13T02:53:28Z",
- "completed_at": "2012-10-13T02:53:47Z",
- "change_counts": {
- "deleted": 0,
- "updated": 0,
- "added": 0
}, - "progress": 1
}
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.
{- "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"
}
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.
{- "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": [
- null
], - "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"
}
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:
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>
{- "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"
}
{- "identifier": "doi:10.10000/ABC1-DEF9"
}
null
{- "identifier": "doi:10.10000/ABC1-DEF9"
}
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) |
{- "crs": "EPSG:26767",
- "formats": {
- "raster": "application/x-hdf;subtype=kea",
- "vector": "applicaton/x-ogc-filegdb"
}, - "items": [
- {
- "color": "#003399",
- "tiles": [
- "2017_BL32_1000_1323"
], - "raster_resolution_multiplier": 1,
- "include_raster_tab": true,
- "include_geometry_field": true,
- "include_hatching": false,
- "include_xdata": false
}
], - "name": "string",
- "extent": "string",
- "options": { },
- "delivery": {
- "method": "download"
}
}
{- "actions": {
- "POST": {
- "id": {
- "required": true,
- "read_only": true,
- "label": "string",
- "type": "string"
}, - "name": {
- "required": true,
- "read_only": true,
- "label": "string",
- "type": "string"
}, - "created_at": {
- "required": true,
- "read_only": true,
- "label": "string",
- "type": "string"
}, - "created_via": {
- "required": true,
- "read_only": true,
- "label": "string",
- "type": "string"
}, - "state": {
- "required": true,
- "read_only": true,
- "label": "string",
- "type": "string"
}, - "url": {
- "required": true,
- "read_only": true,
- "label": "string",
- "type": "string"
}, - "download:url": {
- "required": true,
- "read_only": true,
- "label": "string",
- "type": "string"
}, - "extent": {
- "required": true,
- "read_only": true,
- "label": "string",
- "type": "string"
}, - "delivery": {
- "required": true,
- "read_only": true,
- "label": "string",
- "type": "nested object",
- "children": {
- "property1": {
- "required": true,
- "read_only": true,
- "label": "string",
- "type": "string"
}, - "property2": {
- "required": true,
- "read_only": true,
- "label": "string",
- "type": "string"
}
}
}, - "formats": {
- "required": true,
- "read_only": true,
- "label": "string",
- "type": "nested object",
- "children": {
- "property1": {
- "required": true,
- "read_only": true,
- "label": "string",
- "type": "string"
}, - "property2": {
- "required": true,
- "read_only": true,
- "label": "string",
- "type": "string"
}
}
}, - "items": {
- "required": true,
- "read_only": true,
- "label": "string",
- "type": "list",
- "child": {
- "required": true,
- "read_only": true,
- "label": "string",
- "type": "nested object",
- "children": {
- "property1": {
- "required": true,
- "read_only": true,
- "label": "string",
- "type": "string"
}, - "property2": {
- "required": true,
- "read_only": true,
- "label": "string",
- "type": "string"
}
}
}
}, - "crs": {
- "required": true,
- "read_only": true,
- "label": "string",
- "type": "string"
}, - "options": {
- "required": true,
- "read_only": true,
- "label": "string",
- "type": "nested object",
- "children": {
- "property1": {
- "required": true,
- "read_only": true,
- "label": "string",
- "type": "string"
}, - "property2": {
- "required": true,
- "read_only": true,
- "label": "string",
- "type": "string"
}
}
}, - "expansions": [
- "string"
], - "filters": {
- "created_via": "web",
- "state": "complete",
- "user": 5,
- "created_at": "2000-01-01 01:01:01.000000",
- "delivery_method": "download"
}
}
}
}
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.
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
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) |
{- "crs": "EPSG:26767",
- "formats": {
- "raster": "application/x-hdf;subtype=kea",
- "vector": "applicaton/x-ogc-filegdb"
}, - "items": [
- {
- "color": "#003399",
- "tiles": [
- "2017_BL32_1000_1323"
], - "raster_resolution_multiplier": 1,
- "include_raster_tab": true,
- "include_geometry_field": true,
- "include_hatching": false,
- "include_xdata": false
}
], - "name": "string",
- "extent": "string",
- "options": { },
- "delivery": {
- "method": "download"
}
}
{- "invalid_reasons": [
- "over-size-limit:max-{overall-size-limit}"
], - "is_valid": true,
- "items": [
- {
- "color": "#003399",
- "tiles": [
- "2017_BL32_1000_1323"
], - "raster_resolution_multiplier": 1,
- "include_raster_tab": true,
- "include_geometry_field": true,
- "include_hatching": false,
- "include_xdata": false,
- "is_valid": true,
- "size_estimate_zipped": 0,
- "invalid_reasons": [
- "over-size-limit:${mime-type}:max-{format-size-limit}"
]
}
], - "name": "local-anomalies",
- "size_estimate_zipped": 386247930323,
- "suggested_crs": [
- {
- "id": "EPSG:4326",
- "name": "WGS 84",
- "kind": "geographic 2D",
- "unit_horizontal": "degree",
- "unit_vertical": null,
- "srid": 4326
}
], - "suggested_crs_vertical": [
- {
- "id": "EPSG:4326",
- "name": "WGS 84",
- "kind": "geographic 2D",
- "unit_horizontal": "degree",
- "unit_vertical": null,
- "srid": 4326
}
]
}
Get the groups configured for this site.
q | string Free-text search query |
access_requests_enabled | boolean Filter groups with or without access requests |
[- {
- "id": 0,
- "url": "string",
- "name": "string",
- "country": "string",
- "org": "string",
- "access_requests_enabled": true
}
]
Returns a list of permissions granted to users within this group.
[- {
- "id": "user.99999",
- "user": {
- "id": 99999,
- "first_name": "Jane",
- "last_name": "Dory",
- "url": "string",
- "country": "US"
}, - "permission": "view",
}
]
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 groupupdate
- modify the permissions for an existing permissiondelete
- delete a permission that currently existsThe 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.
action | string Enum: "create" "update" "delete" |
object | |
url | string Required for |
[- {
- "action": "update",
- "value": {
- "permission": "view",
- "user": 99999
},
}
]
{- "id": "user.99999",
- "user": {
- "id": 99999,
- "first_name": "Jane",
- "last_name": "Dory",
- "url": "string",
- "country": "US"
}, - "permission": "view",
}
permission | string Enum: "view" "manage_data" "admin" |
user | number |
{- "permission": "view",
- "user": 99999
}
{- "id": "user.99999",
- "user": {
- "id": 99999,
- "first_name": "Jane",
- "last_name": "Dory",
- "url": "string",
- "country": "US"
}, - "permission": "view",
}
Fetches all outstanding access requests for the group.
[- {
- "id": 5,
- "created_at": "2020-05-16T23:37:45.632286Z",
- "user": {
- "id": 99999,
- "first_name": "Jane",
- "last_name": "Dory",
- "url": "string",
- "country": "US"
}
}
]
List layers (at layers/
) and tables (at tables/
) respectively. List views follow the Catalog API semantics.
[- {
- "id": 123,
- "type": "layer",
- "title": "Fictional Boundary Points",
- "first_published_at": "2013-12-03T03:56:55Z",
- "published_at": "2013-12-03T03:56:55Z",
- "featured_at": null,
- "user_permissions": [
- "find, view, download"
], - "public_access": "download"
}
]
All fields except name
and data.datasources
are optional.
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 |
permissions | string <uri> |
publish_to_catalog_services | boolean |
object (LayersAutoupdateSerializer) | |
required | object (LayersDataSerializer) |
tilegrids | Array of arrays |
{- "title": "Fictional Boundary Points",
- "description": "These points are totally fictional!",
- "collected": "2013-01-01",
- "license": {
- "id": 3,
- "title": "Creative Commons Attribution 3.0 New Zealand",
- "type": 1,
- "type_name": "Creative Commons 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": {
- "behavior": "yes-noschema",
- "schedule": "0 0 0,4 * *"
}, - "data": {
- "datasources": {
- "id": 345
}, - "encoding": "utf-8",
- "crs": "EPSG:4326",
- "elevation_field": "Z",
- "primary_key_field": "id",
- "geometry_field": "GEOMETRY, WKT, [X, Y], null"
}, - "tilegrids": "[]"
}
{- "title": "Fictional Boundary Points",
- "id": 123,
- "type": "layer",
- "collected_at": [
- "2013-01-01"
], - "created at": [
- "2013-01-01"
], - "first_published_at": [
- "2013-01-01"
], - "user_permissions": [
- "find, view, download"
], - "user": {
- "id": 3,
- "first_name": "Bob",
- "last_name": "Jones",
- "country": "NY"
}, - "description": "These points are totally fictional!",
- "description_html"": "<p>These points are totally fictional!</p>",
- "group": {
- "id": 7,
- "name": "A group"
}, - "data": {
- "storage": "Classic",
- "encoding": "none",
- "extent": {
- "type": "Polygon",
- "coordinates": [
- [
- [
- "167.59282355089192, -45.03245508994864"
]
]
]
}, - "crs": "EPSG:4326",
- "crs_display": "WGS 84",
- "primary_key_fields": "GEOMETRY",
- "datasource_count": 1,
- "geometry_field": "GEOMETRY",
- "geometry_type": "point",
- "tile_revision": 1,
- "fields": [
- {
- "name": "GEOMETRY",
- "type": "geometry"
}
], - "feature_count": 200,
- "import_started_at": "2013-12-03T15:00:27.870364Z",
- "import_ended_at": "2013-12-03T15:00:27.870364Z",
- "import_log": {
- "invalid_geometries": 0,
- "messages": 0
}, - "change_summary": {
- "deleted": 0,
- "updated": 0,
- "inserted": 2,
- "schema_changes": {
- "added": [ ],
- "change": [ ],
- "geometry_type_changed": false,
- "primary_keys_changed": false,
- "srid_changed": false
}
}, - "source_summary": {
- "paths": "fictional_points.shp",
- "filenames": "fictional_points.zip",
- "descriptions": "Example description",
- "types": "Upload",
- "formats": "Shapefile"
}, - "update_available": false,
- "raster_resolution": null,
- "empty_geometry_count": 0,
- "has_z": false,
- "export_formats": [
- {
- "name": "Shapefile",
- "mimetype": "application/x-zipped-shp"
}
]
}, - "kind": "vector",
- "categories": [ ],
- "tags": [ ],
- "license": null,
- "metadata": null,
- "elevation_field": "",
- "autoupdate": {
- "behavior": "yes-noschema",
- "schedule": "0 0 0,4 * *"
}, - "supplier_reference": " ",
- "tilegrids": [ ],
- "num_views": 1050,
- "num_downloads": 0,
- "repository": { },
- "public_access": "download",
- "settings": { },
- "default_style": null
}
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.
{- "id": 123,
- "type": "layer",
- "first_published_at": "2013-01-01T00:01:01",
- "published_at": "2013-12-03T03:56:55Z"
}
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)
{- "title": "Fictional Boundary Points",
- "id": 123,
- "type": "layer",
- "collected_at": [
- "2013-01-01"
], - "created at": [
- "2013-01-01"
], - "first_published_at": [
- "2013-01-01"
], - "user_permissions": [
- "find, view, download"
], - "user": {
- "id": 3,
- "first_name": "Bob",
- "last_name": "Jones",
- "country": "NY"
}, - "description": "These points are totally fictional!",
- "description_html"": "<p>These points are totally fictional!</p>",
- "group": {
- "id": 7,
- "name": "A group"
}, - "data": {
- "storage": "Classic",
- "encoding": "none",
- "extent": {
- "type": "Polygon",
- "coordinates": [
- [
- [
- "167.59282355089192, -45.03245508994864"
]
]
]
}, - "crs": "EPSG:4326",
- "crs_display": "WGS 84",
- "primary_key_fields": "GEOMETRY",
- "datasource_count": 1,
- "geometry_field": "GEOMETRY",
- "geometry_type": "point",
- "tile_revision": 1,
- "fields": [
- {
- "name": "GEOMETRY",
- "type": "geometry"
}
], - "feature_count": 200,
- "import_started_at": "2013-12-03T15:00:27.870364Z",
- "import_ended_at": "2013-12-03T15:00:27.870364Z",
- "import_log": {
- "invalid_geometries": 0,
- "messages": 0
}, - "change_summary": {
- "deleted": 0,
- "updated": 0,
- "inserted": 2,
- "schema_changes": {
- "added": [ ],
- "change": [ ],
- "geometry_type_changed": false,
- "primary_keys_changed": false,
- "srid_changed": false
}
}, - "source_summary": {
- "paths": "fictional_points.shp",
- "filenames": "fictional_points.zip",
- "descriptions": "Example description",
- "types": "Upload",
- "formats": "Shapefile"
}, - "update_available": false,
- "raster_resolution": null,
- "empty_geometry_count": 0,
- "has_z": false,
- "export_formats": [
- {
- "name": "Shapefile",
- "mimetype": "application/x-zipped-shp"
}
]
}, - "kind": "vector",
- "categories": [ ],
- "tags": [ ],
- "license": null,
- "metadata": null,
- "elevation_field": "",
- "autoupdate": {
- "behavior": "yes-noschema",
- "schedule": "0 0 0,4 * *"
}, - "supplier_reference": " ",
- "tilegrids": [ ],
- "num_views": 1050,
- "num_downloads": 0,
- "repository": { },
- "public_access": "download",
- "settings": { },
- "default_style": null
}
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.
{- "id": 123,
- "created_at": [
- "2013-03-01 00:00:01"
], - "reference": "More data",
- "data_import": false,
- "status": "importing",
- "progress": 0.5
}
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/
.
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 |
{- "title": "Fictional Boundary Points",
- "description": "These points are totally fictional!",
- "collected": [
- "2013-01-01"
], - "license": {
- "id": 3,
- "title": "Creative Commons Attribution 3.0 New Zealand",
- "type": 1,
- "type_name": "Creative Commons license",
}, - "supplier_reference": "TIVPAS",
- "version_reference": "added more data",
- "default_style_id": 3,
- "publish": true,
- "user": {
- "id": 3,
- "name": "Bob Jones"
}, - "categoties": [
- "topographic/nz-topo-offshore-islands-data/terrain"
], - "tags": [
- [
- "tag1",
- "tag2"
]
], - "publish_to_catalog_services": true,
- "autoupdate": {
- "behavior": "yes-noschema",
- "schedule": "0 0 0,4 * *"
}, - "data": {
- "datasources": {
- "id": 345
}, - "encoding": "utf-8",
- "crs": "EPSG:4326",
- "elevation_field": "Z",
- "primary_key_field": "id",
- "geometry_field": "GEOMETRY, WKT, [X, Y], null"
}, - "tilegrids": "EPSG:2193",
- "default_style": 10
}
{ }
{- "identifier": "doi:10.10000/ABC1-DEF9"
}
null
{- "identifier": "doi:10.10000/ABC1-DEF9"
}
[- {
- "id": "1",
- "title": "Creative Commons Attribution 3.0 New Zealand",
- "type": "cc-by",
- "jurisdiction": "nz",
- "version": "3.0",
- "slug": "attribution-3-0-new-zealand",
- "text": "THE WORK (AS DEFINED BELOW) IS PROVIDED UNDER THE TERMS OF THIS CREATIVE COMMONS PUBLIC LICENCE.",
- "linked_item_counts": {
- "layers": 0,
- "documents": 0
}
}
]
Note that only custom licenses can be created.
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 |
{- "title": "The Unlicense",
- "text": "string",
- "slug": "string",
- "url_external": "string"
}
{- "id": "1",
- "title": "Creative Commons Attribution 3.0 New Zealand",
- "type": "cc-by",
- "jurisdiction": "nz",
- "version": "3.0",
- "slug": "attribution-3-0-new-zealand",
- "text": "THE WORK (AS DEFINED BELOW) IS PROVIDED UNDER THE TERMS OF THIS CREATIVE COMMONS PUBLIC LICENCE.",
- "linked_item_counts": {
- "layers": 0,
- "documents": 0
}
}
Note that only custom licenses can be updated.
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 |
{- "title": "The Unlicense",
- "text": "string",
- "slug": "string",
- "url_external": "string",
- "description": "These points are totally fictional!",
- "collected": "2013-01-01",
- "license": {
- "id": 3,
- "title": "Creative Commons Attribution 3.0 New Zealand",
- "type": 1,
- "type_name": "Creative Commons 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": {
- "behavior": "yes-noschema",
- "schedule": "0 0 0,4 * *"
}, - "data": {
- "datasources": {
- "id": 345
}, - "encoding": "utf-8",
- "crs": "EPSG:4326",
- "elevation_field": "Z",
- "primary_key_field": "id",
- "geometry_field": "GEOMETRY, WKT, [X, Y], null"
}, - "tilegrids": "[]"
}
{- "id": "1",
- "title": "Creative Commons Attribution 3.0 New Zealand",
- "type": "cc-by",
- "jurisdiction": "nz",
- "version": "3.0",
- "slug": "attribution-3-0-new-zealand",
- "text": "THE WORK (AS DEFINED BELOW) IS PROVIDED UNDER THE TERMS OF THIS CREATIVE COMMONS PUBLIC LICENCE.",
- "linked_item_counts": {
- "layers": 0,
- "documents": 0
}
}
The Raster Query API allows users to request information related to a point location from one or more Koordinates grid or raster datasets.
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.
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.
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 |
{- "key": 1,
- "layer": 1132,
- "x": -41.27831,
- "y": 174.77694,
- "callback": false
}
[- {
- "key": "string",
- "authority": "string",
- "short_name": "string",
- "label": "string",
- "auth_method": [ ],
- "auth_scopes": [ ],
- "domain": "string",
- "template_urls": [
- {
- "name": "string",
- "service_url": "string"
}
]
}
]
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.
The set query API returns similar information to the Vector and Raster API endpoints, with a few notable differences
The URL for the Koordinates site will be https://koordinates.com/services/query/v1/set
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
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.
{- "name": "string",
- "owner": "string",
- "owner_short": "string",
- "domain": "example.koordinates.com",
- "copyright": "string",
- "ui_version": "string",
- "theme": {
- "background_color": "string",
- "secondary_color": "string",
- "primary_text_color": "string",
- "primary_color": "string",
- "logo": "string",
- "secondary_logo": "string",
- "favicon": "string"
}, - "user_menus": [
- {
- "title": "string",
- "items": [
- {
- "type": "link",
- "title": "string",
- "url": "string"
}
]
}
], - "help_menus": [
- {
- "title": "string",
- "url": "string"
}
], - "hs_property_id": "string",
- "ecommerce": true,
- "flags": { },
- "geocoder": { },
- "basemap": { },
- "sentry_dsn": "string",
- "org_url": "string",
- "tile_cdn_urls": "string",
- "tilegrids": [
- "string"
], - "geotag": {
- "country_code": "string",
- "state_code": "string",
- "name": "string",
- "key": "string",
- "extent": { }
}
}
[- {
- "status": "pending",
- "url": "string",
- "id": 0,
- "created_by": {
- "id": 99999,
- "first_name": "Jane",
- "last_name": "Dory",
- "url": "string",
- "country": "US"
}, - "updated_by": {
- "id": 99999,
- "first_name": "Jane",
- "last_name": "Dory",
- "url": "string",
- "country": "US"
}, - "user": {
- "id": 99999,
- "first_name": "Jane",
- "last_name": "Dory",
- "url": "string",
- "country": "US"
}, - "created_at": "2020-05-16T23:37:45.632286Z",
- "updated_at": "2020-05-16T23:37:45.632286Z"
}
]
user_id required | number ID of the user the request is tied to |
{- "user_id": 0
}
{- "status": "pending",
- "url": "string",
- "id": 0,
- "created_by": {
- "id": 99999,
- "first_name": "Jane",
- "last_name": "Dory",
- "url": "string",
- "country": "US"
}, - "updated_by": {
- "id": 99999,
- "first_name": "Jane",
- "last_name": "Dory",
- "url": "string",
- "country": "US"
}, - "user": {
- "id": 99999,
- "first_name": "Jane",
- "last_name": "Dory",
- "url": "string",
- "country": "US"
}, - "created_at": "2020-05-16T23:37:45.632286Z",
- "updated_at": "2020-05-16T23:37:45.632286Z"
}
{- "user_menus": [
- {
- "title": "string",
- "items": {
- "type": "string",
- "title": "string",
- "url": "string"
}
}
]
}
{- "user_menus": [
- {
- "title": "string",
- "items": [
- {
- "type": "link",
- "title": "string",
- "url": "string"
}
]
}
]
}
Returns detail about the user who is currently authenticated with the API.
{- "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": {
- "administer_data": true,
- "enable_kart_clone": true,
- "can_see_repodatasets": true,
- "can_see_site_tickets": true,
- "can_manage_own_tickets": true,
- "can_view_reports": true
}, - "contexts": [
- {
- "name": "string",
- "type": "string",
- "context": "string",
- "role": "string",
- "domain": "string",
- "org": { },
- "flags": { },
- "logo": "string",
- "background_color": "1e1b25"
}
], - "remote_auth": false,
- "remote_auth_org": {
- "id": "o9xzyQC27q13FwT",
- "name": "Example Org",
- "country": "US",
- "logo_owner_url": "string",
- "logo_square_url": "string",
- "slug": "example-org"
}, - "locale": "en-US",
- "geoip": {
- "country_code": "AU",
- "state_code": "string",
- "name": "Australia",
- "key": "global/australia/australia"
}, - "is_authenticated": true,
- "notification_preferences": {
- "email_when_download_ready": true
}
}
The Vector Query API allows users to request information related to a point location from one or more Koordinates vector datasets.
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
The vector query API returns in:
content-type: application/vnd.koordinates.setQuery+json
. Results are encoded as GeoJSON-compatible Feature objects.content-type: application/vnd.koordinates.vectorQuery+xml
. A schema is available. Geometries are encoded as GML v3 geometry objects.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.
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.
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 |
{- "key": 1,
- "layer": 743,
- "x": -41.27831,
- "y": 174.77694,
- "max_results": 1,
- "radius": 1000,
- "geometry": false,
- "with_field_names": false,
- "callback": false
}