Skip to content

License API

The Koordinates License API provides access to licences that can be applied to layers, tables, sources and documents. It also provides access to the Creative Commons API by property lookup, as well as custom built-in licences.

GET/licenses/List licences

Returns a paginated list of the licences available on the site. Each licence includes the full licence text, so the list can be large.

Response 200

Headers

Content-Type: application/json

Body

[
{
"id": 9,
"title": "Creative Commons Attribution 3.0 New Zealand",
"type": "cc-by",
"jurisdiction": "nz",
"version": "3.0",
"url": "https://{domain}/services/api/v1.x/licenses/9/",
"url_html": "https://{domain}/license/attribution-3-0-new-zealand/",
"url_fulltext": "https://{domain}/services/api/v1.x/licenses/9/fulltext/",
"linked_item_counts": {"layers": 9, "documents": 0},
"slug": "attribution-3-0-new-zealand",
"text": "…"
}
// …
]
GET/licenses/{id}/Get licence detail

Response 200

Headers

Content-Type: application/json

Body

{
"id": 9,
"title": "Creative Commons Attribution 3.0 New Zealand",
"type": "cc-by",
"jurisdiction": "nz",
"version": "3.0",
"url": "https://{domain}/services/api/v1.x/licenses/9/",
"url_html": "https://{domain}/license/attribution-3-0-new-zealand/",
"url_fulltext": "https://{domain}/services/api/v1.x/licenses/9/fulltext/",
"linked_item_counts": {"layers": 9, "documents": 0},
"slug": "attribution-3-0-new-zealand",
"text": "…",
"url_external": "https://creativecommons.org/licenses/…"
}

Get the full text of a licence on its own from /licenses/{id}/fulltext/ (returns a JSON string).

GET/licenses/{slug}/{jurisdiction}/Returns CC licence for given attributes
  • slug: string (required). The slug is a string that defines the type of Creative Commons licence. It must start with cc-by and can optionally contain nc (non-commercial), sa (share-alike), nd (no derivatives) terms, separated by hyphens. Note that a CC licence cannot be both sa and nd. Example: cc-by-sa
  • jurisdiction: string (optional). The jurisdiction for a ported Creative Commons licence. Example: nz

If jurisdiction is omitted, the unported licence is returned. If no licence matches (for example cc-by-nd-sa, which isn’t a valid combination) the response is 404.

Response 200

Headers

Content-Type: application/json

Body

{
"id": 12,
"title": "Creative Commons Attribution-Share Alike 3.0 New Zealand",
"type": "cc-by-sa",
"jurisdiction": "nz",
"version": "3.0",
"url": "https://{domain}/services/api/v1.x/licenses/12/",
"url_html": "https://{domain}/license/attribution-share-alike-3-0-new-zealand/",
"url_fulltext": "https://{domain}/services/api/v1.x/licenses/12/fulltext/",
"linked_item_counts": {"layers": 9, "documents": 0},
"slug": "attribution-share-alike-3-0-new-zealand",
"text": "…",
"url_external": "https://creativecommons.org/licenses/…"
}