Skip to content

Instantly share code, notes, and snippets.

@MTRNord
Last active June 28, 2019 12:57
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save MTRNord/7b92c501283ca120a0cd38dffe07acf7 to your computer and use it in GitHub Desktop.
Save MTRNord/7b92c501283ca120a0cd38dffe07acf7 to your computer and use it in GitHub Desktop.
The openapi description of the ckan API used by opendata.schleswig-holstein.de
openapi: 3.0.1
info:
title: OpenData Schleswig-Holstein
description: The opendata portal of Schleswig-Holstein
termsOfService: >-
https://www.schleswig-holstein.de/DE/Schwerpunkte/openData/Infos/infos_node.html
contact:
email: opendata@lr.landsh.de
version: '3'
externalDocs:
description: Find out more about CKAN
url: 'https://docs.ckan.org/en/2.8/api/'
servers:
- url: 'https://opendata.schleswig-holstein.de/api/3/action'
tags:
- name: Actions
description: Actions of the API
paths:
/package_list:
summary: List of the names of the site’s datasets (packages).
get:
tags:
- Actions
summary: Get all available packages
parameters:
- name: limit
in: query
description: >-
if given, the list of datasets will be broken into pages of at most
limit datasets per page and only one page will be returned at a time
required: false
schema:
type: integer
format: int64
responses:
'200':
description: OK
content:
application/json:
schema:
$ref: '#/components/schemas/PackageList'
/package_revision_list:
summary: Return a dataset (package)’s revisions as a list of dictionaries.
get:
tags:
- Actions
summary: Return a dataset (package)’s revisions as a list of dictionaries.
parameters:
- name: id
in: query
description: the id or name of the dataset
required: true
schema:
type: string
responses:
'200':
description: OK
content:
application/json:
schema:
$ref: '#/components/schemas/PackageRevisionsList'
/package_show:
summary: Return the metadata of a dataset (package) and its resources.
get:
summary: Return the metadata of a dataset (package) and its resources.
tags:
- Actions
parameters:
- name: id
in: query
description: the id or name of the dataset
required: true
schema:
type: string
- name: use_default_schema
in: query
description: >-
use default package schema instead of a custom schema defined with
an IDatasetForm plugin
required: false
schema:
type: boolean
default: false
- name: include_tracking
in: query
description: add tracking information to dataset and resources
required: false
schema:
type: boolean
default: false
responses:
'200':
description: OK
content:
application/json:
schema:
$ref: '#/components/schemas/Package'
/resource_show:
summary: Return the metadata of a resource.
get:
summary: Return the metadata of a resource.
tags:
- Actions
parameters:
- name: id
in: query
description: the id or name of the resource
required: true
schema:
type: string
- name: include_tracking
in: query
description: add tracking information to dataset and resources
required: false
schema:
type: boolean
default: false
responses:
'200':
description: OK
content:
application/json:
schema:
$ref: '#/components/schemas/Resource'
components:
schemas:
PackageList:
description: List of the names of the site’s datasets (packages).
type: object
properties:
help:
type: string
success:
type: boolean
result:
type: array
items:
type: string
required:
- help
- success
- result
PackageRevisionsList:
description: List of the revisions of the site’s datasets (packages).
type: object
properties:
help:
type: string
success:
type: boolean
result:
type: object
properties:
id:
type: string
timestamp:
type: string
format: date-time
message:
type: string
author:
type: string
approved_timestamp:
type: string
required:
- help
- success
- result
Package:
description: A package
type: object
properties:
help:
type: string
success:
type: boolean
result:
type: object
properties:
license_title:
type: string
maintainer:
type: string
relationships_as_object:
type: object
private:
type: boolean
maintainer_email:
type: string
num_tags:
type: integer
id:
type: string
metadata_created:
type: string
format: date-time
owner_org:
type: string
metadata_modified:
type: string
format: date-time
author:
type: string
author_email:
type: string
state:
type: string
version:
type: string
archiver:
type: object
properties:
status:
type: string
is_broken:
type: boolean
reason:
type: string
status_id:
type: integer
license_id:
type: string
type:
type: string
resources:
type: array
items:
$ref: '#/components/schemas/ResourceRAW'
num_resources:
type: integer
tags:
type: array
items:
type: object
properties:
vocabulary_id:
type: string
state:
type: string
display_name:
type: string
id:
type: string
name:
type: string
groups:
type: array
items:
type: object
properties:
display_name:
type: string
description:
type: string
title:
type: string
image_display_url:
type: string
id:
type: string
name:
type: string
creator_user_id:
type: string
relationships_as_subject:
type: object
name:
type: string
isopen:
type: boolean
url:
type: string
notes:
type: string
title:
type: string
qa:
type: object
properties:
openness_score_reason:
type: string
updated:
type: string
format: date-time
openness_score:
type: integer
extras:
type: array
items:
type: object
properties:
key:
type: string
value:
type: string
license_url:
type: string
organization:
type: object
properties:
description:
type: string
created:
type: string
title:
type: string
name:
type: string
is_organization:
type: boolean
state:
type: string
image_url:
type: string
revision_id:
type: string
type:
type: string
id:
type: string
approval_status:
type: string
revision_id:
type: string
required:
- help
- success
- result
ResourceRAW:
description: A resource
type: object
properties:
cache_last_updated:
type: string
package_id:
type: string
id:
type: string
size:
type: integer
state:
type: string
archiver:
type: object
properties:
is_broken_printable:
type: string
updated:
type: string
format: date-time
cache_filepath:
type: string
last_success:
type: string
format: date-time
size:
type: integer
failure_count:
type: integer
etag:
type: string
status:
type: string
url_redirected_to:
type: string
hash:
type: string
is_broken:
type: boolean
reason:
type: string
status_id:
type: integer
last_modified:
type: string
format: date-time
resource_timestamp:
type: string
format: date-time
mimetype:
type: string
cache_url:
type: string
created:
type: string
format: date-time
first_failure:
type: string
format: date-time
hash:
type: string
description:
type: string
format:
type: string
mimetype_inner:
type: string
url_type:
type: string
access_url:
type: string
mimetype:
type: string
cache_url:
type: string
name:
type: string
license:
type: string
created:
type: string
format: date-time
url:
type: string
uri:
type: string
qa:
type: object
properties:
updated:
type: string
format: date-time
openness_score:
type: integer
archival_timestamp:
type: string
format: date-time
format:
type: string
created:
type: string
format: date-time
resource_timestamp:
type: string
format: date-time
openness_score_reason:
type: string
last_modified:
type: string
format: date-time
position:
type: integer
revision_id:
type: string
resource_type:
type: string
Resource:
description: A resource response
type: object
properties:
help:
type: string
success:
type: boolean
result:
$ref: '#/components/schemas/ResourceRAW'
required:
- help
- success
- result
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment