openapi: 3.0.2
info:
  version: 5.1.23
  title: hub-search
  description: >
    Hub-Search is a powerful search solution designed to function as a Metadata
    Search Service for the Open Data Portal. This API facilitates the discovery
    and retrieval of metadata, making it easier for users to find datasets and
    resources. Hub-Search seamlessly integrates with Elastic Search to provide
    robust and precise search capabilities.

    Hub-Search API not only simplifies searching but also fosters transparency
    and knowledge sharing. It empowers users to easily discover valuable data
    resources, improving data accessibility and utilization.

    This introduction sets the stage for exploring the Hub-Search Open API.
    Detailed information on authentication, API endpoints, error handling, and
    practical examples can be found in the subsequent sections.
  x-logo:
    url: images/logo
servers:
  - url: ''
x-tagGroups:
  - name: Searching
    tags:
      - Search
      - Feeds
  - name: DCAT-AP
    tags:
      - Datasets
      - Catalogues
      - Vocabularies
  - name: Misc
    tags:
      - Gazetteer
      - Ckan
paths:
  /search:
    get:
      description: >-
        To retrieve the data, send a GET request to the specified URL of the API
        endpoint with the resource path "/search" at the end of the URL. See the
        example here right. To obtain the desired result, use one or more of the
        parameters listed below. The parameters are pairs of names and their
        corresponding values, so-called name-value pairs. These are added to the
        URL with a "?" sign, the name and value are always separated using a '='
        sign, the pairs are separated using a '&' sign. A syntactically correct
        request looks like the following example
        https://example.org/api/hub/search/search?q=cat&filter=dataset
      summary: Search
      operationId: searchGet
      tags:
        - Search
      parameters:
        - in: query
          name: q
          description: The query
          schema:
            type: string
        - in: query
          name: filter
          description: Filter queries by document type
          deprecated: true
          schema:
            type: string
        - in: query
          name: filters
          description: >-
            Filters queries by one or a combination of the current document
            types
          schema:
            type: array
            items:
              type: string
          explode: false
        - in: query
          name: facets
          description: >-
            Filter queries by facets (string as json, e.g.
            'facets={"catalog":["catalog-x"]}')
          schema:
            type: string
        - in: query
          name: page
          description: The page number of matching results
          schema:
            type: integer
            minimum: 0
            default: 0
        - in: query
          name: limit
          description: The maximum number of matching datasets per page
          schema:
            type: integer
            minimum: 0
            maximum: 1000
            default: 10
        - in: query
          name: fields
          description: Filter queries by document fields (e.g. 'fields=title')
          schema:
            type: array
            items:
              type: string
          explode: false
        - in: query
          name: minDate
          description: Filter queries by minimum Date
          schema:
            type: string
            format: date-time
        - in: query
          name: maxDate
          description: Filter queries by maximum Date
          schema:
            type: string
            format: date-time
        - in: query
          name: boost
          description: >-
            Boost document fields (boost.field=1.0 or boost.field.subfield=1.0,
            e.g. boost.title=3.0)
          schema:
            type: object
        - in: query
          name: globalAggregation
          description: Counting of facets globally or locally (default true)
          schema:
            type: boolean
        - in: query
          name: facetOperator
          description: >-
            Filtering queries by facets are combined with "AND" or "OR" (default
            "OR")
          schema:
            type: string
            enum:
              - AND
              - OR
        - in: query
          name: facetGroupOperator
          description: >-
            Filtering queries by facetgroups are combined with "AND" or "OR"
            (default "AND")
          schema:
            type: string
            enum:
              - AND
              - OR
        - in: query
          name: bboxMinLon
          description: Filter queries by bounding box minimum longitude
          schema:
            type: number
            format: float
            minimum: -180
            maximum: 180
        - in: query
          name: bboxMaxLon
          description: Filter queries by bounding box maximum longitude
          schema:
            type: number
            format: float
            minimum: -180
            maximum: 180
        - in: query
          name: bboxMaxLat
          description: Filter queries by bounding box maximum latitude
          schema:
            type: number
            format: float
            minimum: -90
            maximum: 90
        - in: query
          name: bboxMinLat
          description: Filter queries by bounding box minimum latitude
          schema:
            type: number
            format: float
            minimum: -90
            maximum: 90
        - in: query
          name: sort
          description: >-
            Sorting of the search result (usage "field+asc" or "field+desc",
            default is desc)
          schema:
            type: array
            items:
              type: string
          explode: false
        - in: query
          name: filterDistributions
          description: >-
            If datasets are searched by facets distributions are returned
            filtered (default false)
          schema:
            type: boolean
        - in: query
          name: aggregation
          description: Enables aggregation of facets (default true)
          schema:
            type: boolean
        - in: query
          name: includes
          description: Descides which fields are included in the response (default all)
          schema:
            type: array
            items:
              type: string
          explode: false
        - in: query
          name: scroll
          description: Enable scroll and return a scroll id
          schema:
            type: boolean
            default: false
        - in: query
          name: minScoring
          description: Filter by minimum quality measurement scoring value
          schema:
            type: integer
        - in: query
          name: maxScoring
          description: Filter by maximum quality measurement scoring value
          schema:
            type: integer
        - in: query
          name: aggregationAllFields
          description: Aggregate all facets
          schema:
            type: boolean
            default: true
        - in: query
          name: aggregationFields
          description: >-
            Aggregate selected facets (ignored if aggregationAllFields is set
            true)
          schema:
            type: array
            items:
              type: string
          explode: false
        - in: query
          name: countryData
          description: >-
            If enabled only datasets from country catalogues are returned. If
            disabled only datasets from non-country catalogues are returned. If
            not specified (null), no filtering is performed.
          schema:
            type: boolean
        - in: query
          name: showScore
          description: >-
            If enabled the score is returned for each result. Disabled as
            default.
          schema:
            type: boolean
        - in: query
          name: vocabulary
          description: Filter by vocabulary id. Only effective when filter=vocabulary.
          schema:
            type: array
            items:
              type: string
          explode: false
        - in: query
          name: resource
          description: >-
            Filter by resource types. Only effective when "resource" is in
            "filters", for example, "filters=catalogue,resource" or
            "filters=resource".
          schema:
            type: array
            items:
              type: string
          explode: false
        - in: query
          name: dataServices
          description: >-
            Only show datasets which have a distribution with at least one
            access service (true). Default show all (false).
          schema:
            type: boolean
        - in: query
          name: autocomplete
          description: Search with autocomplete style via title field. Default false.
          schema:
            type: boolean
        - in: query
          name: superCatalogue
          description: >-
            Deprecated. Please use "superCatalog" in the "facets" for filtering
            datasets or catalogues search result.
          deprecated: true
          schema:
            type: string
        - in: query
          name: countOnly
          description: >-
            When set to true, the search result contains only the count of the
            search result.
          schema:
            type: boolean
            default: false
      responses:
        '200':
          $ref: '#/components/responses/QuerySuccess'
        '400':
          $ref: '#/components/responses/BadRequest'
        '500':
          $ref: '#/components/responses/InternalServerError'
    post:
      description: >-
        To retrieve the data, send a POST request to the specified URL of the
        API endpoint with the resource path "/search" at the end of the URL. See
        the example here right. To obtain the desired result, use one or more of
        the parameters listed below. The parameters are pairs of names and their
        corresponding values, so-called name-value pairs. The request sent to
        the server with POST is stored in the request body according to Request
        Body Schema below. See the syntax of the request here on the right.
      summary: Search
      operationId: searchPost
      tags:
        - Search
      requestBody:
        description: Query
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/Query'
      responses:
        '200':
          $ref: '#/components/responses/QuerySuccess'
        '400':
          $ref: '#/components/responses/BadRequest'
        '500':
          $ref: '#/components/responses/InternalServerError'
  /scroll:
    get:
      description: >-
        Make a GET request to the specified URL of the API endpoint with the
        resource path "/scroll" at the end of the URL if you want to retrieve
        large number of results (or even all results) from a single search
        request. First you have to obtain the required parameter ScrollID (do so
        using method GET to the specified URL of the API endpoint with the
        resource path "search" at the end of the URL). Use SCROLL the same way
        you use cursor on a traditional database.
      summary: Scroll
      operationId: scrollGet
      tags:
        - Search
      parameters:
        - in: query
          name: scrollId
          description: The scroll id
          required: true
          schema:
            type: string
      responses:
        '200':
          $ref: '#/components/responses/QuerySuccess'
        '400':
          $ref: '#/components/responses/BadRequest'
        '500':
          $ref: '#/components/responses/InternalServerError'
  /{lang}/feeds/datasets.atom:
    get:
      description: >-
        Make a GET request to the specified URL of the API endpoint with the
        resource path "/{lang}/feeds/datasets.atom" at the end of the URL to get
        datasets' feeds in Atom format. Set the language element {lang} in the
        URL to preferred language (see path parameters here below, the languages
        abbreviation are made according to the standards). A syntactically
        correct request looks like the following example
        https://example.org/api/de/feeds/datasets.atom?q=hund
      summary: Atom
      operationId: datasets.atom
      tags:
        - Feeds
      parameters:
        - in: query
          name: q
          description: The query
          schema:
            type: string
        - in: query
          name: facets
          description: >-
            Filter queries by facets (string as json, e.g.
            'facets={"catalog":["catalog-x"]}')
          schema:
            type: string
        - in: query
          name: page
          description: The page number of matching results
          schema:
            type: integer
            minimum: 0
        - in: query
          name: limit
          description: The maximum number of matching datasets per page
          schema:
            type: integer
            minimum: 1
            maximum: 1000
        - in: query
          name: fields
          description: Filter queries by document fields (e.g. 'fields=title')
          schema:
            type: array
            items:
              type: string
        - in: query
          name: minDate
          description: Filter queries by minimum Date
          schema:
            type: string
            format: date-time
        - in: query
          name: maxDate
          description: Filter queries by maximum Date
          schema:
            type: string
            format: date-time
        - in: query
          name: boost
          description: >-
            Boost document fields (boost.field=1.0 or boost.field.subfield=1.0,
            e.g. boost.title=3.0)
          schema:
            type: object
        - in: query
          name: globalAggregation
          description: Counting of facets globally or locally (default true)
          schema:
            type: boolean
        - in: query
          name: facetOperator
          description: >-
            Filtering queries by facets are combined with "AND" or "OR" (default
            "OR")
          schema:
            type: string
            enum:
              - AND
              - OR
        - in: query
          name: facetGroupOperator
          description: >-
            Filtering queries by facetgroups are combined with "AND" or "OR"
            (default "AND")
          schema:
            type: string
            enum:
              - AND
              - OR
        - in: query
          name: bboxMinLon
          description: Filter queries by bounding box minimum longitude
          schema:
            type: number
            format: float
            minimum: -180
            maximum: 180
        - in: query
          name: bboxMaxLon
          description: Filter queries by bounding box maximum longitude
          schema:
            type: number
            format: float
            minimum: -180
            maximum: 180
        - in: query
          name: bboxMaxLat
          description: Filter queries by bounding box maximum latitude
          schema:
            type: number
            format: float
            minimum: -90
            maximum: 90
        - in: query
          name: bboxMinLat
          description: Filter queries by bounding box minimum latitude
          schema:
            type: number
            format: float
            minimum: -90
            maximum: 90
        - in: query
          name: sort
          description: >-
            Sorting of the search result (usage "field+asc" or "field+desc",
            default is desc)
          schema:
            type: array
            items:
              type: string
        - in: query
          name: filterDistributions
          description: >-
            If datasets are searched by facets distributions are returned
            filtered (default false)
          schema:
            type: boolean
        - in: path
          name: lang
          description: The feed is returned in the requested language
          required: true
          schema:
            type: string
            enum:
              - bg
              - es
              - cs
              - da
              - et
              - el
              - en
              - fr
              - ga
              - hr
              - it
              - lv
              - lt
              - hu
              - mt
              - nl
              - pl
              - pt
              - ro
              - sk
              - sl
              - fi
              - sv
              - 'no'
              - de
        - in: query
          name: minScoring
          description: Filter by minimum quality measurement scoring value
          schema:
            type: integer
        - in: query
          name: maxScoring
          description: Filter by maximum quality measurement scoring value
          schema:
            type: integer
        - in: query
          name: countryData
          description: >-
            If enabled only datasets from country catalogues are returned. If
            disabled only datasets from non-country catalogues are returned. If
            not specified (null), no filtering is performed.
          schema:
            type: boolean
        - in: query
          name: vocabulary
          description: Filter by vocabulary id. Only effective when filter=vocabulary.
          schema:
            type: array
            items:
              type: string
      responses:
        '200':
          $ref: '#/components/responses/QuerySuccess'
        '400':
          $ref: '#/components/responses/BadRequest'
        '500':
          $ref: '#/components/responses/InternalServerError'
  /{lang}/feeds/datasets.rss:
    get:
      description: >-
        Make a GET request to the specified URL of the API endpoint with the
        resource path "/{lang}/feeds/datasets.rss" at the end of the URL to get
        datasets' feeds in RSS format. Set the language element {lang} in the
        URL to preferred  language (see path parameters here below, the
        languages abbreviation are made according to the standards). A
        syntactically correct request looks like the following example
        https://example.org/api/de/feeds/datasets.rss?q=hund
      summary: RSS
      operationId: datasets.rss
      tags:
        - Feeds
      parameters:
        - in: query
          name: q
          description: The query
          schema:
            type: string
        - in: query
          name: facets
          description: >-
            Filter queries by facets (string as json, e.g.
            'facets={"catalog":["catalog-x"]}')
          schema:
            type: string
        - in: query
          name: page
          description: The page number of matching results
          schema:
            type: integer
            minimum: 0
        - in: query
          name: limit
          description: The maximum number of matching datasets per page
          schema:
            type: integer
            minimum: 1
            maximum: 1000
        - in: query
          name: fields
          description: Filter queries by document fields (e.g. 'fields=title')
          schema:
            type: array
            items:
              type: string
        - in: query
          name: minDate
          description: Filter queries by minimum Date
          schema:
            type: string
            format: date-time
        - in: query
          name: maxDate
          description: Filter queries by maximum Date
          schema:
            type: string
            format: date-time
        - in: query
          name: boost
          description: >-
            Boost document fields (boost.field=1.0 or boost.field.subfield=1.0,
            e.g. boost.title=3.0)
          schema:
            type: object
        - in: query
          name: globalAggregation
          description: Counting of facets globally or locally (default true)
          schema:
            type: boolean
        - in: query
          name: facetOperator
          description: >-
            Filtering queries by facets are combined with "AND" or "OR" (default
            "OR")
          schema:
            type: string
            enum:
              - AND
              - OR
        - in: query
          name: facetGroupOperator
          description: >-
            Filtering queries by facetgroups are combined with "AND" or "OR"
            (default "AND")
          schema:
            type: string
            enum:
              - AND
              - OR
        - in: query
          name: bboxMinLon
          description: Filter queries by bounding box minimum longitude
          schema:
            type: number
            format: float
            minimum: -180
            maximum: 180
        - in: query
          name: bboxMaxLon
          description: Filter queries by bounding box maximum longitude
          schema:
            type: number
            format: float
            minimum: -180
            maximum: 180
        - in: query
          name: bboxMaxLat
          description: Filter queries by bounding box maximum latitude
          schema:
            type: number
            format: float
            minimum: -90
            maximum: 90
        - in: query
          name: bboxMinLat
          description: Filter queries by bounding box minimum latitude
          schema:
            type: number
            format: float
            minimum: -90
            maximum: 90
        - in: query
          name: sort
          description: >-
            Sorting of the search result (usage "field+asc" or "field+desc",
            default is desc)
          schema:
            type: array
            items:
              type: string
        - in: query
          name: filterDistributions
          description: >-
            If datasets are searched by facets distributions are returned
            filtered (default false)
          schema:
            type: boolean
        - in: path
          name: lang
          description: The feed is returned in the requested language
          required: true
          schema:
            type: string
            enum:
              - bg
              - es
              - cs
              - da
              - et
              - el
              - en
              - fr
              - ga
              - hr
              - it
              - lv
              - lt
              - hu
              - mt
              - nl
              - pl
              - pt
              - ro
              - sk
              - sl
              - fi
              - sv
              - 'no'
              - de
        - in: query
          name: minScoring
          description: Filter by minimum quality measurement scoring value
          schema:
            type: integer
        - in: query
          name: maxScoring
          description: Filter by maximum quality measurement scoring value
          schema:
            type: integer
        - in: query
          name: countryData
          description: >-
            If enabled only datasets from country catalogues are returned. If
            disabled only datasets from non-country catalogues are returned. If
            not specified (null), no filtering is performed.
          schema:
            type: boolean
      responses:
        '200':
          $ref: '#/components/responses/QuerySuccess'
        '400':
          $ref: '#/components/responses/BadRequest'
        '500':
          $ref: '#/components/responses/InternalServerError'
  /{lang}/feeds/datasets/{id}.rss:
    get:
      description: >-
        Make a GET request to the specified URL of the API endpoint with the
        resource path "{lang}/feeds/datasets/{id}.rss" to retrieve the RSS feed
        of a dataset with an exact ID.  Set the language element {lang} in the
        URL to preferred language (see path parameters here below, the languages
        abbreviation are made according to the standards), set the unique
        identifier of the dataset as {id} element of the URL.
      summary: RSS for a single dataset
      operationId: datasetrevisions.rss
      tags:
        - Feeds
      parameters:
        - in: path
          name: lang
          description: The feed is returned in the requested language
          required: true
          schema:
            type: string
            enum:
              - bg
              - es
              - cs
              - da
              - et
              - el
              - en
              - fr
              - ga
              - hr
              - it
              - lv
              - lt
              - hu
              - mt
              - nl
              - pl
              - pt
              - ro
              - sk
              - sl
              - fi
              - sv
              - 'no'
              - de
        - in: path
          name: id
          description: Id of the requested dataset
          required: true
          schema:
            type: string
      responses:
        '200':
          $ref: '#/components/responses/QuerySuccess'
        '400':
          $ref: '#/components/responses/BadRequest'
        '500':
          $ref: '#/components/responses/InternalServerError'
  /sitemap:
    get:
      description: >-
        Make a GET request to the specified URL of the API endpoint with the
        resource path "/sitemap" at the end of the URL to get the Sitemap index
        that lists all existing Sitemaps with IDs. If successful, the response
        contains an XML file, grouping multiple Sitemap files.
      summary: Sitemap Meta
      operationId: readSitemapIndex
      tags:
        - Sitemap
      responses:
        '200':
          $ref: '#/components/responses/QuerySuccess'
        '500':
          $ref: '#/components/responses/InternalServerError'
  /sitemap/{id}:
    get:
      description: >-
        Make a GET request to the specified URL of the API endpoint with the
        resource path "sitemap/{id}" at the end of the URL to get a Sitemap in
        XML format. Set the unique identifier of the Sitemap as {id} element of
        the URL.
      summary: Sitemap Datasets
      operationId: readSitemap
      tags:
        - Sitemap
      parameters:
        - name: id
          in: path
          description: Id of the requested sitemap
          required: true
          schema:
            type: integer
            minimum: 1
      responses:
        '200':
          $ref: '#/components/responses/QuerySuccess'
        '500':
          $ref: '#/components/responses/InternalServerError'
  /datasets:
    get:
      description: >-
        You can get a list of datasets of an exact catalogue making a GET
        request to the specified URL of the API endpoint with the resource path
        "/datasets" at the end of the URL and required query parameter
        'catalogue'. The value of the query parameter is the unique ID of the
        catalog (you can get the IDs of all existing catalogs using the 'List
        Catalogues' operation).  If successful, the response will contain an
        array with the IDs of all records in the catalog.
      summary: List datasets
      operationId: listDatasets
      tags:
        - Datasets
      parameters:
        - in: query
          name: catalogue
          required: true
          description: Catalogue to which the datasets belong.
          schema:
            type: string
        - in: query
          name: alias
          description: Alias, default 'read'
          schema:
            type: string
            default: read
      responses:
        '200':
          $ref: '#/components/responses/DatasetSuccess'
        '400':
          $ref: '#/components/responses/BadRequest'
        '404':
          $ref: '#/components/responses/NotFound'
        '500':
          $ref: '#/components/responses/InternalServerError'
    post:
      description: >-
        This function is reserved for internal use only and is not part of our
        public API offerings
      summary: Create a dataset
      operationId: createDataset
      tags:
        - Datasets
      parameters:
        - in: query
          name: synchronous
          description: If disabled the execution is asynchronous (response code 202)
          schema:
            type: boolean
            default: true
      security:
        - ApiKeyAuth: []
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/Dataset'
      responses:
        '201':
          $ref: '#/components/responses/DatasetSuccessId'
        '202':
          description: Accepted
        '400':
          $ref: '#/components/responses/BadRequest'
        '500':
          $ref: '#/components/responses/InternalServerError'
  /datasets/{id}:
    get:
      description: >-
        You can get a dataset making GET request to the specified URL of the API
        endpoint with the resource path "datasets/{id}" at the end of the URL.
        Set the unique ID  of the dataset as {id} element of the  URL.
      summary: Get a dataset
      operationId: readDataset
      security:
        - BearerAuth: []
      tags:
        - Datasets
      parameters:
        - name: id
          in: path
          description: Id of the requested dataset
          required: true
          schema:
            type: string
      responses:
        '200':
          $ref: '#/components/responses/DatasetSuccess'
        '400':
          $ref: '#/components/responses/BadRequest'
        '404':
          $ref: '#/components/responses/NotFound'
        '500':
          $ref: '#/components/responses/InternalServerError'
    put:
      description: >-
        This function is reserved for internal use only and is not part of our
        public API offerings. You must be authorized to create or update a
        dataset. As an authorized user, you make a PUT request to the specified
        URL of the API endpoint with the resource path "datasets/{id}" and
        specify the unique ID of the dataset as the {id} element of the URL.
      summary: Create or Update a dataset
      operationId: createOrUpdateDataset
      tags:
        - Datasets
      security:
        - ApiKeyAuth: []
      parameters:
        - name: id
          in: path
          description: Id of the created or updated dataset
          required: true
          schema:
            type: string
        - in: query
          name: synchronous
          description: If disabled the execution is asynchronous (response code 202)
          schema:
            type: boolean
            default: true
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/Dataset'
        required: true
      responses:
        '200':
          $ref: '#/components/responses/DatasetSuccessId'
        '201':
          $ref: '#/components/responses/DatasetSuccessId'
        '202':
          description: Accepted
        '400':
          $ref: '#/components/responses/BadRequest'
        '404':
          $ref: '#/components/responses/NotFound'
        '500':
          $ref: '#/components/responses/InternalServerError'
    patch:
      description: >-
        This function is reserved for internal use only and is not part of our
        public API offerings. You must be authorized to edit a dataset. As an
        authorized user, you make a PATCH request to the specified URL of the
        API endpoint adding the resource path "datasets/{id}" to the end of the
        URL. Specify the unique ID of the dataset as the {id} element of the
        URL.
      summary: Modify a dataset
      operationId: modifyDataset
      tags:
        - Datasets
      security:
        - ApiKeyAuth: []
      parameters:
        - name: id
          in: path
          description: Id of the modified dataset
          required: true
          schema:
            type: string
        - in: query
          name: synchronous
          description: If disabled the execution is asynchronous (response code 202)
          schema:
            type: boolean
            default: true
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/Dataset'
        required: true
      responses:
        '200':
          $ref: '#/components/responses/DatasetSuccessId'
        '202':
          description: Accepted
        '400':
          $ref: '#/components/responses/BadRequest'
        '404':
          $ref: '#/components/responses/NotFound'
        '500':
          $ref: '#/components/responses/InternalServerError'
    delete:
      description: >-
        This function is reserved for internal use only and is not part of our
        public API offerings. You must be authorized to delete a dataset. As an
        authorized user, you make a DELETE request to the specified URL of the
        API endpoint with the resource path "datasets/{id}" at the end of the
        URL and specify the unique ID of the dataset as the {id} element of the
        URL.
      summary: Delete a dataset
      operationId: deleteDataset
      tags:
        - Datasets
      security:
        - ApiKeyAuth: []
      parameters:
        - name: id
          in: path
          description: Id of the requested dataset
          required: true
          schema:
            type: string
        - in: query
          name: synchronous
          description: If disbled the execution is asynchronous (response code 202)
          schema:
            type: boolean
            default: true
      responses:
        '200':
          $ref: '#/components/responses/DatasetSuccessId'
        '202':
          description: Accepted
        '400':
          $ref: '#/components/responses/BadRequest'
        '404':
          $ref: '#/components/responses/NotFound'
        '500':
          $ref: '#/components/responses/InternalServerError'
  /datasets/{id}/{revision}:
    get:
      deprecated: true
      description: >-
        Deprecated. Please use `GET /datasets/{id}/revisions/{revisionId}`
        instead.
      summary: Get a specific dataset version
      operationId: readDatasetRevision
      tags:
        - Datasets
      parameters:
        - name: id
          in: path
          description: Id of the requested dataset
          required: true
          schema:
            type: string
        - name: revision
          in: path
          description: Id of the requested dataset version
          required: true
          schema:
            type: string
      responses:
        '200':
          $ref: '#/components/responses/DatasetSuccess'
        '400':
          $ref: '#/components/responses/BadRequest'
        '404':
          $ref: '#/components/responses/NotFound'
        '500':
          $ref: '#/components/responses/InternalServerError'
  /datasets/{id}/revisions/{revisionId}:
    put:
      description: >-
        This function is reserved for internal use only and is not part of our
        public API offerings. You must be authorized for this operation. As an
        authorized user you can create a dataset-revision, sending PUT request
        to the specified URL of the API endpoint with the resource path
        `datasets/{id}/revisions/{revisionId}` at the end of the URL. Set the
        unique ID of the dataset which owns the dataset-revision as `{id}`
        element of the URL.
      summary: Create specific dataset revision
      operationId: createDatasetRevision
      tags:
        - Datasets
      security:
        - ApiKeyAuth: []
      parameters:
        - name: id
          in: path
          description: Id of the requested dataset
          required: true
          schema:
            type: string
        - name: revisionId
          in: path
          description: Id of the requested dataset revision
          required: true
          schema:
            type: string
        - in: query
          name: synchronous
          description: If disabled the execution is asynchronous (response code 202)
          schema:
            type: boolean
            default: true
      responses:
        '201':
          $ref: '#/components/responses/DatasetRevisionSuccessId'
        '400':
          $ref: '#/components/responses/BadRequest'
        '404':
          $ref: '#/components/responses/NotFound'
        '500':
          $ref: '#/components/responses/InternalServerError'
    get:
      description: >-
        When a dataset is updated, the current dataset is saved as a revision.
        To get a specific dataset's revision make GET request to the specified
        URL of the API endpoint with the resource path
        `datasets/{id}/revisions/{revisionId}` at the end of the URL. Set the
        unique ID of the dataset as `{id}` and revision ID as `{revisionId}`
        elements of the URL.
      summary: Get a specific dataset revision
      operationId: readDatasetRevisionByRevisionId
      tags:
        - Datasets
      parameters:
        - name: id
          in: path
          description: Id of the requested dataset
          required: true
          schema:
            type: string
        - name: revisionId
          in: path
          description: Id of the requested dataset revision
          required: true
          schema:
            type: string
      responses:
        '200':
          $ref: '#/components/responses/DatasetSuccess'
        '400':
          $ref: '#/components/responses/BadRequest'
        '404':
          $ref: '#/components/responses/NotFound'
        '500':
          $ref: '#/components/responses/InternalServerError'
    delete:
      description: >-
        This function is reserved for internal use only and is not part of our
        public API offerings. You must be authorized to delete a
        dataset-revision. As an authorized user, you make a DELETE request to
        the specified URL of the API endpoint with the resource path
        `datasets/{id}/revisions/{revisionId}` at the end of the URL. Specify
        the unique ID of the dataset as the `{id}` and revision ID as
        `{revisionId}` elements of the URL.
      summary: Delete a specific dataset version
      operationId: deleteDatasetRevision
      tags:
        - Datasets
      security:
        - ApiKeyAuth: []
      parameters:
        - name: id
          in: path
          description: Id of the requested dataset
          required: true
          schema:
            type: string
        - name: revisionId
          in: path
          description: Id of the requested dataset revision
          required: true
          schema:
            type: string
        - in: query
          name: synchronous
          description: If disabled the execution is asynchronous (response code 202)
          schema:
            type: boolean
            default: true
      responses:
        '200':
          $ref: '#/components/responses/DatasetRevisionSuccessId'
        '202':
          description: Accepted
        '400':
          $ref: '#/components/responses/BadRequest'
        '404':
          $ref: '#/components/responses/NotFound'
        '500':
          $ref: '#/components/responses/InternalServerError'
  /bulk/datasets:
    put:
      description: >-
        This function is reserved for internal use only and is not part of our
        public API offerings. You must be authorized for this operation. As an
        authorized user you can create or update multiple datasets. Send PUT
        request to specified URL of the API endpoint with the resource path
        "/bulk/datasets". According to the Request Body Schema the required
        parameter is key - value pair with 'datasets' as key and an array of
        Datasets Objects as value. By creating Dataset Object, the ID can be
        freely chosen for every new dataset. The catalogue ID determines the
        catalogue to which the dataset is added. The dataset ID is scoped within
        the catalogue. If the combination of dataset ID and catalogue ID already
        exists, the dataset is updated. Otherwise, a new dataset is created.
        This operation is not atomic.
      summary: Bulk-create/update of datasets
      operationId: createOrUpdateDatasetBulk
      tags:
        - Datasets
      parameters:
        - in: query
          name: synchronous
          description: If disabled the execution is asynchronous (response code 202)
          schema:
            type: boolean
            default: true
      security:
        - ApiKeyAuth: []
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/DatasetArray'
      responses:
        '200':
          $ref: '#/components/responses/DatasetSuccessBulk'
        '202':
          description: Accepted
        '400':
          $ref: '#/components/responses/BadRequest'
        '500':
          $ref: '#/components/responses/InternalServerError'
  /catalogues:
    get:
      description: >-
        You can get a list of catalogues making a GET request to specified URL
        of the API endpoint with the  the resource path "catalogues" at the end.
        If successful, the response contains an array with IDs of all the
        catalogues.
      summary: List catalogues
      operationId: listCatalogues
      tags:
        - Catalogues
      parameters:
        - in: query
          name: alias
          description: Alias, default 'read'
          schema:
            type: string
            default: read
      responses:
        '200':
          $ref: '#/components/responses/CataloguesSuccessArray'
        '400':
          $ref: '#/components/responses/BadRequest'
        '404':
          $ref: '#/components/responses/NotFound'
        '500':
          $ref: '#/components/responses/InternalServerError'
    post:
      description: >-
        This function is reserved for internal use only and is not part of our
        public API offerings. You must be authorized for this operation.
      summary: Create a catalogue
      operationId: createCatalogue
      tags:
        - Catalogues
      parameters:
        - in: query
          name: synchronous
          description: If disabled the execution is asynchronous (response code 202)
          schema:
            type: boolean
            default: true
      security:
        - ApiKeyAuth: []
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/Catalogue'
      responses:
        '201':
          $ref: '#/components/responses/CatalogueSuccessId'
        '202':
          description: Accepted
        '400':
          $ref: '#/components/responses/BadRequest'
        '500':
          $ref: '#/components/responses/InternalServerError'
  /catalogues/{id}:
    get:
      description: >-
        You can get a catalogue  making GET request to the specified URL of the
        API endpoint with the resource path "catalogues/{id}" at the end of the
        URL and set the unique ID of the catalogue as {id} element of the URL.
        If successful, the response contains the Catalogue object for a valid
        ID.
      summary: Get a catalogue
      operationId: readCatalogue
      tags:
        - Catalogues
      parameters:
        - name: id
          in: path
          description: Id of the requested catalogue
          required: true
          schema:
            type: string
      responses:
        '200':
          $ref: '#/components/responses/CatalogueSuccess'
        '400':
          $ref: '#/components/responses/BadRequest'
        '404':
          $ref: '#/components/responses/NotFound'
        '500':
          $ref: '#/components/responses/InternalServerError'
    put:
      description: >-
        This function is reserved for internal use only and is not part of our
        public API offerings. You must be authorized for this operation. As an
        authorized user you can create or update a catalogue, sending PUT
        request to the specified URL of the API endpoint with the resource path
        "catalogues/{id}" at the end of the URL, the ID can be freely chosen for
        every new catalogue. If the catalogue ID already exists, the catalogue
        with the indicated ID is updated.
      summary: Create or Update a catalogue
      operationId: createOrUpdateCatalogue
      tags:
        - Catalogues
      security:
        - ApiKeyAuth: []
      parameters:
        - name: id
          in: path
          description: Id of the created or updated catalogue
          required: true
          schema:
            type: string
        - in: query
          name: synchronous
          description: If disbled the execution is asynchronous (response code 202)
          schema:
            type: boolean
            default: true
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/Catalogue'
        required: true
      responses:
        '200':
          $ref: '#/components/responses/CatalogueSuccessId'
        '201':
          $ref: '#/components/responses/CatalogueSuccessId'
        '202':
          description: Accepted
        '400':
          $ref: '#/components/responses/BadRequest'
        '404':
          $ref: '#/components/responses/NotFound'
        '500':
          $ref: '#/components/responses/InternalServerError'
    patch:
      description: >-
        This function is reserved for internal use only and is not part of our
        public API offerings. You must be authorized for this operation. As an
        authorized user you can modify a catalogue, sending PATCH request to the
        specified URL of the API endpoint with the resource path
        "catalogues/{id}" and specify the unique ID of the catalogue as the {id}
        element of the URL.
      summary: Modify a catalogue
      operationId: modifyCatalogue
      tags:
        - Catalogues
      security:
        - ApiKeyAuth: []
      parameters:
        - name: id
          in: path
          description: Id of the modified catalogue
          required: true
          schema:
            type: string
        - in: query
          name: synchronous
          description: If disabled the execution is asynchronous (response code 202)
          schema:
            type: boolean
            default: true
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/Catalogue'
        required: true
      responses:
        '200':
          $ref: '#/components/responses/CatalogueSuccessId'
        '202':
          description: Accepted
        '400':
          $ref: '#/components/responses/BadRequest'
        '404':
          $ref: '#/components/responses/NotFound'
        '500':
          $ref: '#/components/responses/InternalServerError'
    delete:
      description: >-
        This function is reserved for internal use only and is not part of our
        public API offerings. You must be authorized for this operation. As an
        authorized user you can delete a catalogue, sending DELETE request the
        specified URL of the API endpoint with the resource path
        "catalogues/{id}" at the end of the URL. Specify the unique ID of the
        catalogue as the {id} element of the URL.
      summary: Delete a catalogue
      operationId: deleteCatalogue
      tags:
        - Catalogues
      security:
        - ApiKeyAuth: []
      parameters:
        - name: id
          in: path
          description: Id of the requested catalogue
          required: true
          schema:
            type: string
      responses:
        '200':
          $ref: '#/components/responses/CatalogueSuccessId'
        '202':
          description: Accepted
        '400':
          $ref: '#/components/responses/BadRequest'
        '404':
          $ref: '#/components/responses/NotFound'
        '500':
          $ref: '#/components/responses/InternalServerError'
  /vocabularies:
    get:
      description: >-
        You can get a list of controlled vocabularies used by the portal sending
        a GET request to the specified URL of the API endpoint with the resource
        path "vocabularies" at the end of the URL. If successful, the response
        contains an array with IDs of all the vocabularies.
      summary: Get list of indexed vocabularies
      operationId: readVocabularies
      tags:
        - Vocabularies
      responses:
        '200':
          $ref: '#/components/responses/VocabularySuccess'
        '400':
          $ref: '#/components/responses/BadRequest'
        '404':
          $ref: '#/components/responses/NotFound'
        '500':
          $ref: '#/components/responses/InternalServerError'
  /vocabularies/{vocabulary}:
    get:
      description: >-
        You can get a vocabulary, making GET request to  the specified URL of
        the API endpoint with the resource path "vocabularies/{vocabulary}". Set
        the unique ID of the vocabulary as {vocabulary} element of the URL. If
        successful, the response contains the Vocabulary object for a valid ID.
      summary: Get a vocabulary
      operationId: readVocabulary
      tags:
        - Vocabularies
      parameters:
        - name: vocabulary
          in: path
          description: Id of the requested vocabulary
          required: true
          schema:
            type: string
      responses:
        '200':
          $ref: '#/components/responses/VocabularySuccess'
        '400':
          $ref: '#/components/responses/BadRequest'
        '404':
          $ref: '#/components/responses/NotFound'
        '500':
          $ref: '#/components/responses/InternalServerError'
    put:
      description: >-
        This function is reserved for internal use only and is not part of our
        public API offerings. You must be authorized for this operation. As an
        authorized user you can create or update a vocabulary, sending PUT
        request to the specified URL of the API endpoint with the resource path
        "vocabularies/{vocabulary}" at the end of the URL. Set the unique ID of
        the vocabulary as {vocabulary} element of the URL, if the vocabulary ID
        already exists, the vocabulary is updated.
      summary: Create or Update a vocabulary
      operationId: createOrUpdateVocabulary
      tags:
        - Vocabularies
      security:
        - ApiKeyAuth: []
      parameters:
        - name: vocabulary
          in: path
          description: Id of the created or updated vocabulary
          required: true
          schema:
            type: string
        - in: query
          name: synchronous
          description: If disbled the execution is asynchronous (response code 202)
          schema:
            type: boolean
            default: true
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/Vocabulary'
        required: true
      responses:
        '200':
          $ref: '#/components/responses/VocabularySuccess'
        '201':
          $ref: '#/components/responses/VocabularySuccess'
        '202':
          description: Accepted
        '400':
          $ref: '#/components/responses/BadRequest'
        '404':
          $ref: '#/components/responses/NotFound'
        '500':
          $ref: '#/components/responses/InternalServerError'
    delete:
      description: >-
        This function is reserved for internal use only and is not part of our
        public API offerings. You must be authorized for this operation. As an
        authorized user you can  delete a vocabulary by sending your DELETE
        request to the specified URL of the API endpoint with the resource path
        "/vocabularies/{vocabulary}". Set the {vocabulary} as the unique ID of
        the vocabulary you want to delete.
      summary: Delete a vocabulary
      operationId: deleteVocabulary
      tags:
        - Vocabularies
      security:
        - ApiKeyAuth: []
      parameters:
        - name: vocabulary
          in: path
          description: Id of the to be deleted vocabulary
          required: true
          schema:
            type: string
      responses:
        '200':
          $ref: '#/components/responses/VocabularySuccessId'
        '202':
          description: Accepted
        '400':
          $ref: '#/components/responses/BadRequest'
        '404':
          $ref: '#/components/responses/NotFound'
        '500':
          $ref: '#/components/responses/InternalServerError'
  /vocabularies/{vocabulary}/:
    post:
      description: >-
        This function is reserved for internal use only and is not part of our
        public API offerings. You must be authorized for this operation. As an
        authorized user you can add a term to a vocabulary sending a POST
        request to the specified URL of the API endpoint with the resource path
        "/vocabularies/{vocabulary}". Set the unique ID of the vocabulary as
        {vocabulary} element of the URL.
      summary: Create a vocable
      operationId: createVocable
      tags:
        - Vocabularies
      parameters:
        - name: vocabulary
          in: path
          description: Vocabulary of the created vocable
          required: true
          schema:
            type: string
        - in: query
          name: synchronous
          description: If disabled the execution is asynchronous (response code 202)
          schema:
            type: boolean
            default: true
      security:
        - ApiKeyAuth: []
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/Vocable'
      responses:
        '201':
          $ref: '#/components/responses/VocableSuccessId'
        '202':
          description: Accepted
        '400':
          $ref: '#/components/responses/BadRequest'
        '500':
          $ref: '#/components/responses/InternalServerError'
  /vocabularies/{vocabulary}/vocable:
    get:
      description: >-
        Returns a vocable for a given vocabulary based on the resource
        identifier aka URI of that vocable. For example
        `http://www.opendefinition.org/licenses/cc-by.`
      summary: Get a vocable by URI
      operationId: readVocableByResource
      tags:
        - Vocabularies
      parameters:
        - name: vocabulary
          in: path
          description: Vocabulary of the requested vocable
          required: true
          schema:
            type: string
        - name: resource
          in: query
          description: URI of the requested vocable
          required: true
          schema:
            type: string
      responses:
        '200':
          $ref: '#/components/responses/VocableSuccess'
        '400':
          $ref: '#/components/responses/BadRequest'
        '404':
          $ref: '#/components/responses/NotFound'
        '500':
          $ref: '#/components/responses/InternalServerError'
  /vocabularies/{vocabulary}/{id}:
    get:
      description: >-
        You can get a vocable, making GET request to the specified URL of the
        API endpoint with the resource path "/vocabularies/{vocabulary}/{id}".
        Set the unique ID of the vocabulary as {vocabulary} element, set the
        unique ID of the vocable as {id} element of the URL. If successful, the
        response contains the Vocable object for a valid ID.
      summary: Get a vocable
      operationId: readVocable
      tags:
        - Vocabularies
      parameters:
        - name: vocabulary
          in: path
          description: Vocabulary of the requested vocable
          required: true
          schema:
            type: string
        - name: id
          in: path
          description: Id of the requested vocable
          required: true
          schema:
            type: string
      responses:
        '200':
          $ref: '#/components/responses/VocableSuccess'
        '400':
          $ref: '#/components/responses/BadRequest'
        '404':
          $ref: '#/components/responses/NotFound'
        '500':
          $ref: '#/components/responses/InternalServerError'
    put:
      description: >-
        This function is reserved for internal use only and is not part of our
        public API offerings. You must be authorized for this operation. As an
        authorized user you can create or update a vocable, sending PUT request
        to the specified URL of the API endpoint with the resource path
        "/vocabularies/{vocabulary}/{id}" at the end of the URL. Set the unique
        ID of the vocabulary as {vocabulary} element, set the unique ID of the
        vocable as {id} element of the URL, if the vocable ID already exists,
        the vocable is updated.
      summary: Create or Update a vocable
      operationId: createOrUpdateVocable
      tags:
        - Vocabularies
      security:
        - ApiKeyAuth: []
      parameters:
        - name: vocabulary
          in: path
          description: Vocabulary of the created or updated vocable
          required: true
          schema:
            type: string
        - name: id
          in: path
          description: Id of the created or updated Vocable
          required: true
          schema:
            type: string
        - in: query
          name: synchronous
          description: If disabled the execution is asynchronous (response code 202)
          schema:
            type: boolean
            default: true
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/Vocable'
        required: true
      responses:
        '200':
          $ref: '#/components/responses/VocableSuccessId'
        '201':
          $ref: '#/components/responses/VocableSuccessId'
        '202':
          description: Accepted
        '400':
          $ref: '#/components/responses/BadRequest'
        '404':
          $ref: '#/components/responses/NotFound'
        '500':
          $ref: '#/components/responses/InternalServerError'
    patch:
      description: >-
        This function is reserved for internal use only and is not part of our
        public API offerings. You must be authorized for this operation. As an
        authorized user you can modify a vocable with an exact ID, sending PATCH
        request to the specified URL of the API endpoint with the resource path
        "/vocabularies/{vocabulary}/{id}". Set the unique ID of the vocabulary
        as {vocabulary} element, set the unique ID of the vocable you want to
        modify as {id} element of the URL.
      summary: Modify a vocable
      operationId: modifyVocable
      tags:
        - Vocabularies
      security:
        - ApiKeyAuth: []
      parameters:
        - name: vocabulary
          in: path
          description: Vocabulary of the modified vocable
          required: true
          schema:
            type: string
        - name: id
          in: path
          description: Id of the modified vocable
          required: true
          schema:
            type: string
        - in: query
          name: synchronous
          description: If disabled the execution is asynchronous (response code 202)
          schema:
            type: boolean
            default: true
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/Vocable'
        required: true
      responses:
        '200':
          $ref: '#/components/responses/VocableSuccessId'
        '202':
          description: Accepted
        '400':
          $ref: '#/components/responses/BadRequest'
        '404':
          $ref: '#/components/responses/NotFound'
        '500':
          $ref: '#/components/responses/InternalServerError'
    delete:
      description: >-
        This function is reserved for internal use only and is not part of our
        public API offerings. You must be authorized for this operation. As an
        authorized user you can delete a vocable, sending DELETE request to the
        specified URL of the API endpoint with the resource path
        "/vocabularies/{vocabulary}/{id}" at the end of the URL. Set the unique
        ID of the vocabulary as {vocabulary} element, set the unique ID of the
        vocable you want to delete as {id} element of the URL.
      summary: Delete a vocable
      operationId: deleteVocable
      tags:
        - Vocabularies
      security:
        - ApiKeyAuth: []
      parameters:
        - name: vocabulary
          in: path
          description: Vocabulary of the deleted vocable
          required: true
          schema:
            type: string
        - name: id
          in: path
          description: Id of the deleted vocabulary
          required: true
          schema:
            type: string
      responses:
        '200':
          $ref: '#/components/responses/VocableSuccessId'
        '202':
          description: Accepted
        '400':
          $ref: '#/components/responses/BadRequest'
        '404':
          $ref: '#/components/responses/NotFound'
        '500':
          $ref: '#/components/responses/InternalServerError'
  /gazetteer/autocomplete:
    get:
      description: >-
        You can get a list of Gazetteer entries making a GET request to the
        specified URL of the API endpoint with the resource path
        "/gazetteer/autocomplete" with required parameter 'q'. The value of the
        parameter is any string (e.g. a place name). If successful, the response
        contains an array with gazetteer entries. Your query matches the values
        of the name-value pairs of the returned entries in whole words and/ or
        substrings.
      summary: Gazetteer
      operationId: gazetteerAutocomplete
      tags:
        - Gazetteer
      parameters:
        - in: query
          name: q
          description: The query string
          schema:
            type: string
      responses:
        '200':
          $ref: '#/components/responses/QuerySuccess'
        '400':
          $ref: '#/components/responses/BadRequest'
        '500':
          $ref: '#/components/responses/InternalServerError'
  /ckan/package_search:
    get:
      description: >-
        You can search for datasets (on CKAN data management versions datasets
        called "packages" ) satisfying a given search criteria, send a GET
        request to the specified URL of the API endpoint with the resource path
        "/ckan/package_search". To obtain the desired result, use one or more of
        the parameters listed below.
      summary: Package search
      operationId: ckanPackageSearch
      tags:
        - Ckan
      parameters:
        - in: query
          name: q
          description: The query
          schema:
            type: string
        - in: query
          name: fq
          description: Any filter queries to apply
          schema:
            type: string
        - in: query
          name: sort
          description: Sorting of the search results
          schema:
            type: string
        - in: query
          name: rows
          description: The number of matching rows to return
          schema:
            type: integer
        - in: query
          name: start
          description: >-
            The offset in the complete result for where the set of returned
            datasets should begin
          schema:
            type: integer
        - in: query
          name: facet
          description: Whether to enable faceted results
          schema:
            type: boolean
        - in: query
          name: facet.mincount
          description: >-
            The minimum counts for facet fields should be included in the
            results
          schema:
            type: integer
        - in: query
          name: facet.field
          description: >-
            The minimum counts for facet fields should be included in the
            results
          schema:
            type: array
            items:
              type: string
      responses:
        '200':
          $ref: '#/components/responses/QuerySuccess'
        '400':
          $ref: '#/components/responses/BadRequest'
        '500':
          $ref: '#/components/responses/InternalServerError'
  /ckan/package_show:
    get:
      description: >-
        Get the metadata of a dataset (on CKAN data management versions datasets
        called "packages")  making GET request to the specified URL of the API
        endpoint with the resource path "ckan/package_show" and  with required
        parameter 'id'. The value of the parameter is the unique ID of the
        dataset. If successful, the response contains the metadata of the
        dataset and its resources.
      summary: Package show
      operationId: ckanPackageShow
      tags:
        - Ckan
      parameters:
        - in: query
          name: id
          description: The id of the requested dataset
          required: true
          schema:
            type: string
      responses:
        '200':
          $ref: '#/components/responses/QuerySuccess'
        '400':
          $ref: '#/components/responses/BadRequest'
        '404':
          $ref: '#/components/responses/NotFound'
        '500':
          $ref: '#/components/responses/InternalServerError'
components:
  securitySchemes:
    ApiKeyAuth:
      type: apiKey
      in: header
      name: X-API-Key
    BearerAuth:
      type: http
      scheme: bearer
      bearerFormat: JWT
  schemas:
    Query:
      description: Query
      type: object
      properties:
        q:
          type: string
          description: The query
        filter:
          type: string
          description: Filter queries by document type
        facets:
          type: object
          description: >-
            Filter queries by facets (string as json, e.g.
            'facets={"catalog":["catalog-x"]}')
          additionalProperties:
            type: array
            items:
              type: string
        page:
          type: integer
          minimum: 0
          description: The page number of matching results
        limit:
          type: integer
          description: The maximum number of matching datasets per page
          minimum: 0
          maximum: 1000
        fields:
          type: array
          description: Filter queries by document fields (e.g. 'fields=title')
          items:
            type: string
        searchParams:
          type: object
          properties:
            minDate:
              type: string
              description: Filter queries by minimum Date
              format: date-time
            maxDate:
              type: string
              description: Filter queries by maximum Date
              format: date-time
            boundingBox:
              $ref: '#/components/schemas/BoundingBox'
            scoring:
              type: object
              properties:
                min:
                  type: integer
                max:
                  type: integer
        boost:
          type: object
          description: Boost document fields
          additionalProperties:
            type: number
            description: Use field or field.subfield
            format: float
        globalAggregation:
          type: boolean
          description: Counting of facets globally or locally (default true)
        facetOperator:
          type: string
          description: >-
            Filtering queries by facets are combined with "AND" or "OR" (default
            "OR")
          enum:
            - AND
            - OR
        facetGroupOperator:
          type: string
          description: >-
            Filtering queries by facetgroups are combined with "AND" or "OR"
            (default "AND")
          enum:
            - AND
            - OR
        sort:
          type: array
          description: >-
            Sorting of the search result (usage "field+asc" or "field+desc",
            default is desc)
          items:
            type: string
        filterDistributions:
          type: boolean
          description: >-
            If datasets are searched by facets distributions are returned
            filtered (default false)
        aggregation:
          type: boolean
          description: Enables aggregation of facets (default true)
        includes:
          type: array
          description: Descides which fields are included in the response (default all)
          items:
            type: string
        scroll:
          type: boolean
          description: Enables scroll and returns a scroll id (default true)
        minScoring:
          type: integer
          description: Filter by minimum quality measurement scoring value
        maxScoring:
          type: integer
          description: Filter by maximum quality measurement scoring value
        aggregationAllFields:
          type: boolean
          description: Aggregate all facets (default true)
        aggregationFields:
          type: array
          description: >-
            Aggregate selected facets (ignored if aggregationAllFields is set
            true)
          items:
            type: string
        countryData:
          type: boolean
          description: >-
            If enabled only datasets from country catalogues are returned. If
            disabled only datasets from non-country catalogues are returned. If
            not specified (null), no filtering is performed.
    BoundingBox:
      type: object
      description: Filter queries by bounding box
      properties:
        minLon:
          type: number
          description: Minimum longitude
          format: float
          minimum: -180
          maximum: 180
        maxLon:
          type: number
          description: Maximum longitude
          format: float
          minimum: -180
          maximum: 180
        maxLat:
          type: number
          description: Maximum latitude
          format: float
          minimum: -90
          maximum: 90
        minLat:
          type: number
          description: Minimum latitude
          format: float
          minimum: -90
          maximum: 90
    DatasetArray:
      description: A array of datasets
      type: object
      required:
        - datasets
      properties:
        datasets:
          type: array
          items:
            $ref: '#/components/schemas/Dataset'
          minItems: 1
          maxItems: 500
    Dataset:
      description: A representation of a dataset
      type: object
      properties:
        references:
          type: string
        adms_identifier:
          type: array
          items:
            type: object
            properties:
              identifier:
                type: string
              scheme:
                type: string
              resource:
                type: string
        type:
          type: object
          properties:
            id:
              type: string
            resource:
              type: string
            label:
              type: string
        source:
          type: array
          items:
            type: string
        was_generated_by:
          type: array
          items:
            type: string
        temporal:
          type: array
          items:
            type: object
            properties:
              lte:
                oneOf:
                  - $ref: '#/components/schemas/Date'
                  - $ref: '#/components/schemas/DateTime'
              gte:
                oneOf:
                  - $ref: '#/components/schemas/Date'
                  - $ref: '#/components/schemas/DateTime'
        title:
          type: object
          additionalProperties:
            type: string
        distributions:
          type: array
          items:
            type: object
            properties:
              id:
                type: string
              type:
                type: object
                properties:
                  resource:
                    type: string
                  label:
                    type: string
              status:
                type: object
                properties:
                  resource:
                    type: string
                  label:
                    type: string
              issued:
                oneOf:
                  - $ref: '#/components/schemas/Date'
                  - $ref: '#/components/schemas/DateTime'
              spatial_resolution_in_meters:
                type: integer
              byte_size:
                type: integer
              compress_format:
                type: object
                properties:
                  resource:
                    type: string
                  label:
                    type: string
              license_attribution_by_text:
                type: object
                additionalProperties:
                  type: string
              package_format:
                type: object
                properties:
                  resource:
                    type: string
                  label:
                    type: string
              access_url:
                type: array
                items:
                  type: string
              media_type:
                type: string
              language:
                type: array
                items:
                  type: object
                  properties:
                    id:
                      type: string
                    resource:
                      type: string
                    label:
                      type: string
              access_service:
                type: array
                items:
                  type: object
                  properties:
                    applicable_legislation:
                      type: array
                      items:
                        type: string
                    page:
                      type: array
                      items:
                        type: object
                        properties:
                          title:
                            type: object
                            additionalProperties:
                              type: string
                          description:
                            type: object
                            additionalProperties:
                              type: string
                          format:
                            type: object
                            properties:
                              id:
                                type: string
                              label:
                                type: string
                              resource:
                                type: string
                          resource:
                            type: string
                    title:
                      type: object
                      additionalProperties:
                        type: string
                    availability:
                      type: object
                      properties:
                        resource:
                          type: string
                        label:
                          type: string
                    hvd_category:
                      type: array
                      items:
                        type: object
                        properties:
                          id:
                            type: string
                          label:
                            type: object
                            additionalProperties:
                              type: string
                          resource:
                            type: string
                    description:
                      type: object
                      additionalProperties:
                        type: string
                    endpoint_url:
                      type: array
                      items:
                        type: string
                    contact_point:
                      type: array
                      items:
                        type: object
                        properties:
                          type:
                            type: string
                          name:
                            type: string
                          email:
                            type: string
                          address:
                            type: string
                          telephone:
                            type: string
                          url:
                            type: array
                            items:
                              type: string
                          organisation_name:
                            type: string
                          resource:
                            type: string
                    rights:
                      type: array
                      items:
                        type: object
                        properties:
                          resource:
                            type: string
                          label:
                            type: string
                  required:
                    - title
                    - endpoint_url
              page:
                type: array
                items:
                  type: object
                  properties:
                    title:
                      type: object
                      additionalProperties:
                        type: string
                    description:
                      type: object
                      additionalProperties:
                        type: string
                    format:
                      type: object
                      properties:
                        id:
                          type: string
                        label:
                          type: string
                        resource:
                          type: string
                    resource:
                      type: string
              checksum:
                type: object
                properties:
                  algorithm:
                    type: string
                  checksum_value:
                    type: string
              license:
                type: object
                properties:
                  resource:
                    type: string
                  label:
                    type: string
                  homepage:
                    type: string
                  description:
                    type: string
              applicable_legislation:
                type: array
                items:
                  type: string
              rights:
                type: object
                properties:
                  resource:
                    type: string
                  label:
                    type: string
              title:
                type: object
                additionalProperties:
                  type: string
              format:
                type: object
                properties:
                  id:
                    type: string
                  resource:
                    type: string
                  label:
                    type: string
              temporal_resolution:
                type: string
              has_policy:
                type: string
              description:
                type: object
                additionalProperties:
                  type: string
              availability:
                type: object
                properties:
                  resource:
                    type: string
                  label:
                    type: string
              modified:
                oneOf:
                  - $ref: '#/components/schemas/Date'
                  - $ref: '#/components/schemas/DateTime'
              download_url:
                type: array
                items:
                  type: string
              conforms_to:
                type: array
                items:
                  type: object
                  properties:
                    resource:
                      type: string
                    label:
                      type: string
            required:
              - access_url
        translation_meta:
          type: object
          properties:
            full_available_languages:
              type: array
              items:
                type: string
            details:
              type: object
              additionalProperties:
                type: object
                properties:
                  machine_translated:
                    type: boolean
                  original_language:
                    type: string
                  issued:
                    oneOf:
                      - $ref: '#/components/schemas/Date'
                      - $ref: '#/components/schemas/DateTime'
                  received:
                    oneOf:
                      - $ref: '#/components/schemas/Date'
                      - $ref: '#/components/schemas/DateTime'
            status:
              type: string
        identifier:
          type: array
          items:
            type: string
        extended_metadata:
          type: object
          properties:
            is_used_by:
              type: array
              items:
                type: string
        num_series:
          type: integer
        spatial_resource:
          type: array
          items:
            type: object
            properties:
              id:
                type: string
              label:
                type: string
              resource:
                type: string
        creator:
          type: object
          properties:
            type:
              type: string
            name:
              type: string
            email:
              type: string
            homepage:
              type: string
            resource:
              type: string
        keywords:
          type: array
          items:
            type: object
            properties:
              id:
                type: string
              label:
                type: string
              language:
                type: string
        issued:
          oneOf:
            - $ref: '#/components/schemas/Date'
            - $ref: '#/components/schemas/DateTime'
        categories:
          type: array
          items:
            type: object
            properties:
              id:
                type: string
              label:
                type: object
                additionalProperties:
                  type: string
              resource:
                type: string
        is_hvd:
          type: boolean
        stat_unit_measure:
          type: array
          items:
            type: string
        political_geocoding_level_uri:
          type: array
          items:
            type: object
            properties:
              resource:
                type: string
              label:
                type: string
        language:
          type: array
          items:
            type: object
            properties:
              id:
                type: string
              resource:
                type: string
              label:
                type: string
        publisher:
          type: object
          properties:
            type:
              type: string
            name:
              type: string
            email:
              type: string
            homepage:
              type: string
            resource:
              type: string
        deadline:
          oneOf:
            - $ref: '#/components/schemas/Date'
            - $ref: '#/components/schemas/DateTime'
        modified:
          oneOf:
            - $ref: '#/components/schemas/Date'
            - $ref: '#/components/schemas/DateTime'
        is_version_of:
          type: array
          items:
            type: string
        dimension:
          type: array
          items:
            type: string
        availability:
          type: object
          properties:
            resource:
              type: string
            label:
              type: string
        spatial_resolution_in_meters:
          type: integer
        political_geocoding_uri:
          type: array
          items:
            type: object
            properties:
              resource:
                type: string
              label:
                type: string
        has_version:
          type: array
          items:
            type: string
        access_right:
          type: object
          properties:
            resource:
              type: string
            label:
              type: string
        is_referenced_by:
          type: array
          items:
            type: string
        originator:
          type: array
          items:
            type: object
            properties:
              type:
                type: string
              name:
                type: string
              email:
                type: string
              homepage:
                type: string
              resource:
                type: string
        temporal_resolution:
          type: string
        resource:
          type: string
        maintainer:
          type: array
          items:
            type: object
            properties:
              type:
                type: string
              name:
                type: string
              email:
                type: string
              homepage:
                type: string
              resource:
                type: string
        description:
          type: object
          additionalProperties:
            type: string
        contributor:
          type: array
          items:
            type: object
            properties:
              type:
                type: string
              name:
                type: string
              email:
                type: string
              homepage:
                type: string
              resource:
                type: string
        provenance:
          type: array
          items:
            type: object
            properties:
              resource:
                type: string
              label:
                type: string
        quality_process_uri:
          type: string
        country:
          type: object
          properties:
            id:
              type: string
            label:
              type: string
            resource:
              type: string
        catalog_record:
          type: object
          properties:
            modified:
              oneOf:
                - $ref: '#/components/schemas/Date'
                - $ref: '#/components/schemas/DateTime'
            issued:
              oneOf:
                - $ref: '#/components/schemas/Date'
                - $ref: '#/components/schemas/DateTime'
        contributor_id:
          type: array
          items:
            type: object
            properties:
              resource:
                type: string
              label:
                type: string
        accrual_periodicity:
          type: object
          properties:
            resource:
              type: string
            label:
              type: string
        subject:
          type: array
          items:
            type: object
            properties:
              label:
                type: object
                additionalProperties:
                  type: string
              resource:
                type: string
        quality_meas:
          type: object
          properties:
            scoring:
              type: integer
        id:
          type: string
        relation:
          type: array
          items:
            type: string
        page:
          type: array
          items:
            type: object
            properties:
              title:
                type: object
                additionalProperties:
                  type: string
              description:
                type: object
                additionalProperties:
                  type: string
              format:
                type: object
                properties:
                  id:
                    type: string
                  label:
                    type: string
                  resource:
                    type: string
              resource:
                type: string
        sample:
          type: array
          items:
            type: string
        hvd_category:
          type: array
          items:
            type: object
            properties:
              id:
                type: string
              label:
                type: object
                additionalProperties:
                  type: string
              resource:
                type: string
        conforms_to:
          type: array
          items:
            type: object
            properties:
              resource:
                type: string
              label:
                type: string
        qualified_attribution:
          type: array
          items:
            type: string
        attribute:
          type: array
          items:
            type: string
        has_quality_annotation:
          type: array
          items:
            type: string
        landing_page:
          type: array
          items:
            type: object
            properties:
              title:
                type: object
                additionalProperties:
                  type: string
              description:
                type: object
                additionalProperties:
                  type: string
              format:
                type: object
                properties:
                  id:
                    type: string
                  label:
                    type: string
                  resource:
                    type: string
              resource:
                type: string
        version_notes:
          type: object
          additionalProperties:
            type: string
        version_info:
          type: string
        geocoding_description:
          type: object
          additionalProperties:
            type: string
        qualified_relation:
          type: array
          items:
            type: object
            properties:
              relation:
                type: array
                items:
                  type: string
              had_role:
                type: array
                items:
                  type: string
        applicable_legislation:
          type: array
          items:
            type: string
        legal_basis:
          type: object
          additionalProperties:
            type: string
        contact_point:
          type: array
          items:
            type: object
            properties:
              type:
                type: string
              name:
                type: string
              email:
                type: string
              address:
                type: string
              telephone:
                type: string
              url:
                type: array
                items:
                  type: string
              organisation_name:
                type: string
              resource:
                type: string
        catalog:
          type: object
          properties:
            id:
              type: string
            is_part_of:
              type: string
          required:
            - id
        open_data_presence:
          type: array
          items:
            type: object
            properties:
              id:
                type: string
              label:
                type: string
        spatial:
          type: array
          items:
            type: object
    CatalogueArray:
      description: A array of catalogues
      type: object
      required:
        - catalogues
      properties:
        catalogues:
          type: array
          items:
            $ref: '#/components/schemas/Catalogue'
          minItems: 1
          maxItems: 100
    Catalogue:
      description: A representation of a catalogue
      type: object
      properties:
        is_open_data_presence:
          type: boolean
        description:
          type: object
          additionalProperties:
            type: string
        spatial:
          type: array
          items:
            type: object
        id:
          type: string
        modified:
          oneOf:
            - $ref: '#/components/schemas/Date'
            - $ref: '#/components/schemas/DateTime'
        is_part_of:
          type: string
        availability:
          type: object
          properties:
            resource:
              type: string
            label:
              type: string
        visualisation_data:
          type: string
        catalogueLogo:
          type: array
          items:
            type: string
        title:
          type: object
          additionalProperties:
            type: string
        catalogueProfile:
          type: array
          items:
            type: string
        theme_taxonomy:
          type: array
          items:
            type: string
        license:
          type: object
          properties:
            homepage:
              type: string
            description:
              type: string
            label:
              type: string
            resource:
              type: string
        language:
          type: array
          items:
            type: object
            properties:
              id:
                type: string
              resource:
                type: string
              label:
                type: string
        catalogueInterestingDatasets:
          type: array
          items:
            type: string
        country:
          type: object
          properties:
            id:
              type: string
            label:
              type: string
            resource:
              type: string
        publisher:
          type: object
          properties:
            address:
              type: object
              properties:
                postalCode:
                  type: string
                street:
                  type: string
                locality:
                  type: string
            homepage:
              type: string
            name:
              type: string
            email:
              type: string
          required:
            - name
        visualisation_selection:
          type: array
          items:
            type: string
        catalog:
          type: array
          items:
            type: string
        issued:
          oneOf:
            - $ref: '#/components/schemas/Date'
            - $ref: '#/components/schemas/DateTime'
        rights:
          type: object
          properties:
            resource:
              type: string
            label:
              type: string
        creator:
          type: object
          properties:
            type:
              type: string
            name:
              type: string
            email:
              type: string
            homepage:
              type: string
            resource:
              type: string
        catalogueBackground:
          type: array
          items:
            type: string
        catalogueFavIcon:
          type: array
          items:
            type: string
        homepage:
          type: string
        has_part:
          type: array
          items:
            type: string
        spatial_resource:
          type: array
          items:
            type: object
            properties:
              id:
                type: string
              label:
                type: string
              resource:
                type: string
    DistributionArray:
      description: A array of Distribution
      type: object
      required:
        - distributions
      properties:
        distributions:
          type: array
          items:
            $ref: '#/components/schemas/Distribution'
          minItems: 1
          maxItems: 100
    Distribution:
      type: object
      properties:
        id:
          type: string
        resource:
          type: string
        title:
          type: object
          additionalProperties:
            type: string
        description:
          type: object
          additionalProperties:
            type: string
        access_url:
          type: array
          items:
            type: string
        download_url:
          type: array
          items:
            type: string
        format:
          type: object
          properties:
            id:
              type: string
            label:
              type: string
            resource:
              type: string
        license:
          type: object
          properties:
            id:
              type: string
            label:
              type: string
            description:
              type: string
            resource:
              type: string
            la_url:
              type: string
        byte_size:
          type: integer
        checksum:
          type: object
          properties:
            algorithm:
              type: string
            checksum_value:
              type: string
        language:
          type: array
          items:
            type: object
            properties:
              id:
                type: string
              label:
                type: string
              resource:
                type: string
        media_type:
          type: string
        issued:
          oneOf:
            - $ref: '#/components/schemas/Date'
            - $ref: '#/components/schemas/DateTime'
        modified:
          oneOf:
            - $ref: '#/components/schemas/Date'
            - $ref: '#/components/schemas/DateTime'
        rights:
          type: object
          properties:
            label:
              type: string
            resource:
              type: string
        status:
          type: object
          properties:
            label:
              type: string
            resource:
              type: string
        page:
          type: array
          items:
            type: object
            properties:
              title:
                type: object
                additionalProperties:
                  type: string
              description:
                type: object
                additionalProperties:
                  type: string
              format:
                type: object
                properties:
                  id:
                    type: string
                  label:
                    type: string
                  resource:
                    type: string
              resource:
                type: string
        conforms_to:
          type: array
          items:
            type: object
            properties:
              label:
                type: string
              resource:
                type: string
        availability:
          type: object
          properties:
            label:
              type: string
            resource:
              type: string
        access_service:
          type: array
          items:
            type: object
            properties:
              title:
                type: object
                additionalProperties:
                  type: string
              description:
                type: object
                additionalProperties:
                  type: string
              endpoint_url:
                type: array
                items:
                  type: string
        compress_format:
          type: object
          properties:
            label:
              type: string
            resource:
              type: string
        package_format:
          type: object
          properties:
            label:
              type: string
            resource:
              type: string
        has_policy:
          type: string
        type:
          type: object
          properties:
            label:
              type: string
            resource:
              type: string
        extended_metadata:
          type: object
          properties:
            is_used_by:
              type: array
              items:
                type: string
    Vocabulary:
      description: A representation of a Vocabulary
      type: object
      required:
        - vocab
      properties:
        vocab:
          type: array
          items:
            $ref: '#/components/schemas/Vocable'
    Vocable:
      description: A representation of a vocable
      type: object
      properties:
        id:
          type: string
        title:
          type: object
          additionalProperties:
            type: string
        resource:
          type: string
    Date:
      type: string
      format: date
    DateTime:
      type: string
      format: date-time
  responses:
    DatasetSuccess:
      description: Dataset response object
      content:
        application/json:
          schema:
            type: object
            properties:
              success:
                type: boolean
                default: true
              result:
                $ref: '#/components/schemas/Dataset'
    DatasetSuccessId:
      description: Dataset response ID
      content:
        application/json:
          schema:
            type: object
            properties:
              success:
                type: boolean
                default: true
              result:
                type: object
                properties:
                  id:
                    type: string
    DatasetRevisionSuccessId:
      description: Dataset revision response ID
      content:
        application/json:
          schema:
            type: object
            properties:
              success:
                type: boolean
                default: true
              result:
                type: object
                properties:
                  id:
                    type: string
    DatasetSuccessBulk:
      description: Dataset response bulk
      content:
        application/json:
          schema:
            type: object
            properties:
              datasets:
                type: array
                items:
                  type: object
                  properties:
                    success:
                      type: boolean
                    status:
                      type: integer
                    message:
                      type: string
                    id:
                      type: string
    CataloguesSuccessArray:
      description: Catalogues response
      content:
        application/json:
          example:
            - string1
            - string2
            - string3
          schema:
            type: array
            items:
              type: string
    CatalogueSuccess:
      description: Catalogue response object
      content:
        application/json:
          schema:
            type: object
            properties:
              success:
                type: boolean
                default: true
              result:
                $ref: '#/components/schemas/Catalogue'
    CatalogueSuccessId:
      description: Catalogue response object
      content:
        application/json:
          schema:
            type: object
            properties:
              success:
                type: boolean
                default: true
              result:
                type: object
                properties:
                  id:
                    type: string
    CatalogueSuccessBulk:
      description: Catalogue response bulk
      content:
        application/json:
          schema:
            type: object
            properties:
              datasets:
                type: array
                items:
                  type: object
                  properties:
                    success:
                      type: boolean
                    status:
                      type: integer
                    message:
                      type: string
                    id:
                      type: string
    VocabularySuccess:
      description: Vocabulary response
      content:
        application/json:
          schema:
            type: object
            properties:
              datasets:
                type: array
                items:
                  type: object
                  properties:
                    success:
                      type: boolean
                    status:
                      type: integer
                    message:
                      type: string
                    id:
                      type: string
    VocabularySuccessId:
      description: Vocabulary response object
      content:
        application/json:
          schema:
            type: object
            properties:
              success:
                type: boolean
                default: true
              result:
                type: object
                properties:
                  id:
                    type: string
    VocableSuccess:
      description: Vocabulary response object
      content:
        application/json:
          schema:
            type: object
            properties:
              success:
                type: boolean
                default: true
              result:
                $ref: '#/components/schemas/Vocable'
    VocableSuccessId:
      description: Vocabulary response object
      content:
        application/json:
          schema:
            type: object
            properties:
              success:
                type: boolean
                default: true
              result:
                type: object
                properties:
                  id:
                    type: string
    QuerySuccess:
      description: The query was successfully processed
      content:
        application/json:
          schema:
            type: object
    Created:
      description: Created
    Accepted:
      description: Accepted
    NoContent:
      description: No content
    BadRequest:
      description: Validation error / Bad request
      content:
        application/json:
          schema:
            type: object
            properties:
              success:
                type: boolean
                default: false
              message:
                type: string
    NotFound:
      description: Not found
      content:
        application/json:
          schema:
            type: object
            properties:
              success:
                type: boolean
                default: false
              message:
                type: string
    InternalServerError:
      description: Internal Server Error
      content:
        application/json:
          schema:
            type: object
            properties:
              success:
                type: boolean
                default: false
              message:
                type: string
