BIS

BIS Structure queries API

The Structure queries API from BIS — 12 operation(s) for structure queries.

OpenAPI Specification

bis-structure-queries-api-openapi.yml Raw ↑
openapi: 3.0.0
info:
  version: 1.4.0
  title: SDMX RESTful Data availability queries Structure queries API
  description: 'The BIS SDMX RESTful API is a subset of the official SDMX RESTful API v1.4.0, released in June 2019.


    This service offers programmatic access to the BIS statistical data and metadata released to the public.


    For additional information about the SDMX RESTful API, check the [official v1.4.0 sdmx-rest specification](https://github.com/sdmx-twg/sdmx-rest/tree/v1.4.0) or the [v1.4.0 documentation](https://github.com/sdmx-twg/sdmx-rest/tree/v1.4.0/v2_1/ws/rest/docs). In addition the [**useful tips for consumers**](https://github.com/sdmx-twg/sdmx-rest/blob/master/doc/tips.md) provide general guidance on the SDMX RESTful API.

    '
servers:
- description: BIS Stats API
  url: https://stats.bis.org/api/v1
tags:
- name: Structure queries
paths:
  /datastructure/{agencyID}/{resourceID}/{version}:
    get:
      summary: Get data structures
      tags:
      - Structure queries
      parameters:
      - $ref: '#/components/parameters/agencies'
      - $ref: '#/components/parameters/resourceIDs'
      - $ref: '#/components/parameters/versions'
      - $ref: '#/components/parameters/references'
      - $ref: '#/components/parameters/structDetail'
      - $ref: '#/components/parameters/accept-encoding'
      responses:
        '200':
          $ref: '#/components/responses/200-struct'
        '400':
          $ref: '#/components/responses/400'
        '404':
          $ref: '#/components/responses/404'
        '406':
          $ref: '#/components/responses/406'
        '500':
          $ref: '#/components/responses/500'
        '501':
          $ref: '#/components/responses/501'
        '503':
          $ref: '#/components/responses/503'
  /dataflow/{agencyID}/{resourceID}/{version}:
    get:
      summary: Get dataflows
      tags:
      - Structure queries
      parameters:
      - $ref: '#/components/parameters/agencies'
      - $ref: '#/components/parameters/resourceIDs'
      - $ref: '#/components/parameters/versions'
      - $ref: '#/components/parameters/references'
      - $ref: '#/components/parameters/structDetail'
      - $ref: '#/components/parameters/accept-encoding'
      responses:
        '200':
          $ref: '#/components/responses/200-struct'
        '400':
          $ref: '#/components/responses/400'
        '404':
          $ref: '#/components/responses/404'
        '406':
          $ref: '#/components/responses/406'
        '500':
          $ref: '#/components/responses/500'
        '501':
          $ref: '#/components/responses/501'
        '503':
          $ref: '#/components/responses/503'
  /categorisation/{agencyID}/{resourceID}/{version}:
    get:
      summary: Get categorisations
      tags:
      - Structure queries
      parameters:
      - $ref: '#/components/parameters/agencies'
      - $ref: '#/components/parameters/resourceIDs'
      - $ref: '#/components/parameters/versions'
      - $ref: '#/components/parameters/references'
      - $ref: '#/components/parameters/structDetail'
      - $ref: '#/components/parameters/accept-encoding'
      responses:
        '200':
          $ref: '#/components/responses/200-struct'
        '400':
          $ref: '#/components/responses/400'
        '404':
          $ref: '#/components/responses/404'
        '406':
          $ref: '#/components/responses/406'
        '500':
          $ref: '#/components/responses/500'
        '501':
          $ref: '#/components/responses/501'
        '503':
          $ref: '#/components/responses/503'
  /contentconstraint/{agencyID}/{resourceID}/{version}:
    get:
      summary: Get content constraints
      tags:
      - Structure queries
      parameters:
      - $ref: '#/components/parameters/agencies'
      - $ref: '#/components/parameters/resourceIDs'
      - $ref: '#/components/parameters/versions'
      - $ref: '#/components/parameters/references'
      - $ref: '#/components/parameters/structDetail'
      - $ref: '#/components/parameters/accept-encoding'
      responses:
        '200':
          $ref: '#/components/responses/200-struct'
        '400':
          $ref: '#/components/responses/400'
        '404':
          $ref: '#/components/responses/404'
        '406':
          $ref: '#/components/responses/406'
        '500':
          $ref: '#/components/responses/500'
        '501':
          $ref: '#/components/responses/501'
        '503':
          $ref: '#/components/responses/503'
  /actualconstraint/{agencyID}/{resourceID}/{version}:
    get:
      summary: Get actual constraints
      tags:
      - Structure queries
      parameters:
      - $ref: '#/components/parameters/agencies'
      - $ref: '#/components/parameters/resourceIDs'
      - $ref: '#/components/parameters/versions'
      - $ref: '#/components/parameters/references'
      - $ref: '#/components/parameters/structDetail'
      - $ref: '#/components/parameters/accept-encoding'
      responses:
        '200':
          $ref: '#/components/responses/200-struct'
        '400':
          $ref: '#/components/responses/400'
        '404':
          $ref: '#/components/responses/404'
        '406':
          $ref: '#/components/responses/406'
        '500':
          $ref: '#/components/responses/500'
        '501':
          $ref: '#/components/responses/501'
        '503':
          $ref: '#/components/responses/503'
  /allowedconstraint/{agencyID}/{resourceID}/{version}:
    get:
      summary: Get allowed constraints
      tags:
      - Structure queries
      parameters:
      - $ref: '#/components/parameters/agencies'
      - $ref: '#/components/parameters/resourceIDs'
      - $ref: '#/components/parameters/versions'
      - $ref: '#/components/parameters/references'
      - $ref: '#/components/parameters/structDetail'
      - $ref: '#/components/parameters/accept-encoding'
      responses:
        '200':
          $ref: '#/components/responses/200-struct'
        '400':
          $ref: '#/components/responses/400'
        '404':
          $ref: '#/components/responses/404'
        '406':
          $ref: '#/components/responses/406'
        '500':
          $ref: '#/components/responses/500'
        '501':
          $ref: '#/components/responses/501'
        '503':
          $ref: '#/components/responses/503'
  /structure/{agencyID}/{resourceID}/{version}:
    get:
      summary: Get structures
      tags:
      - Structure queries
      parameters:
      - $ref: '#/components/parameters/agencies'
      - $ref: '#/components/parameters/resourceIDs'
      - $ref: '#/components/parameters/versions'
      - $ref: '#/components/parameters/references'
      - $ref: '#/components/parameters/structDetail'
      - $ref: '#/components/parameters/accept-encoding'
      responses:
        '200':
          $ref: '#/components/responses/200-struct'
        '400':
          $ref: '#/components/responses/400'
        '404':
          $ref: '#/components/responses/404'
        '406':
          $ref: '#/components/responses/406'
        '500':
          $ref: '#/components/responses/500'
        '501':
          $ref: '#/components/responses/501'
        '503':
          $ref: '#/components/responses/503'
  /conceptscheme/{agencyID}/{resourceID}/{version}:
    get:
      summary: Get concept schemes
      tags:
      - Structure queries
      parameters:
      - $ref: '#/components/parameters/agencies'
      - $ref: '#/components/parameters/resourceIDs'
      - $ref: '#/components/parameters/versions'
      - $ref: '#/components/parameters/references'
      - $ref: '#/components/parameters/structDetail'
      - $ref: '#/components/parameters/accept-encoding'
      responses:
        '200':
          $ref: '#/components/responses/200-struct'
        '400':
          $ref: '#/components/responses/400'
        '404':
          $ref: '#/components/responses/404'
        '406':
          $ref: '#/components/responses/406'
        '500':
          $ref: '#/components/responses/500'
        '501':
          $ref: '#/components/responses/501'
        '503':
          $ref: '#/components/responses/503'
  /codelist/{agencyID}/{resourceID}/{version}:
    get:
      summary: Get codelists
      tags:
      - Structure queries
      parameters:
      - $ref: '#/components/parameters/agencies'
      - $ref: '#/components/parameters/resourceIDs'
      - $ref: '#/components/parameters/versions'
      - $ref: '#/components/parameters/references'
      - $ref: '#/components/parameters/structDetail'
      - $ref: '#/components/parameters/accept-encoding'
      responses:
        '200':
          $ref: '#/components/responses/200-struct'
        '400':
          $ref: '#/components/responses/400'
        '404':
          $ref: '#/components/responses/404'
        '406':
          $ref: '#/components/responses/406'
        '500':
          $ref: '#/components/responses/500'
        '501':
          $ref: '#/components/responses/501'
        '503':
          $ref: '#/components/responses/503'
  /categoryscheme/{agencyID}/{resourceID}/{version}:
    get:
      summary: Get category schemes
      tags:
      - Structure queries
      parameters:
      - $ref: '#/components/parameters/agencies'
      - $ref: '#/components/parameters/resourceIDs'
      - $ref: '#/components/parameters/versions'
      - $ref: '#/components/parameters/references'
      - $ref: '#/components/parameters/structDetail'
      - $ref: '#/components/parameters/accept-encoding'
      responses:
        '200':
          $ref: '#/components/responses/200-struct'
        '400':
          $ref: '#/components/responses/400'
        '404':
          $ref: '#/components/responses/404'
        '406':
          $ref: '#/components/responses/406'
        '500':
          $ref: '#/components/responses/500'
        '501':
          $ref: '#/components/responses/501'
        '503':
          $ref: '#/components/responses/503'
  /hierarchicalcodelist/{agencyID}/{resourceID}/{version}:
    get:
      summary: Get hierarchical codelists
      tags:
      - Structure queries
      parameters:
      - $ref: '#/components/parameters/agencies'
      - $ref: '#/components/parameters/resourceIDs'
      - $ref: '#/components/parameters/versions'
      - $ref: '#/components/parameters/references'
      - $ref: '#/components/parameters/structDetail'
      - $ref: '#/components/parameters/accept-encoding'
      responses:
        '200':
          $ref: '#/components/responses/200-struct'
        '400':
          $ref: '#/components/responses/400'
        '404':
          $ref: '#/components/responses/404'
        '406':
          $ref: '#/components/responses/406'
        '500':
          $ref: '#/components/responses/500'
        '501':
          $ref: '#/components/responses/501'
        '503':
          $ref: '#/components/responses/503'
  /agencyscheme/{agencyID}/{resourceID}/{version}:
    get:
      summary: Get agency schemes
      tags:
      - Structure queries
      parameters:
      - $ref: '#/components/parameters/agencies'
      - $ref: '#/components/parameters/resourceIDs'
      - $ref: '#/components/parameters/versions'
      - $ref: '#/components/parameters/references'
      - $ref: '#/components/parameters/structDetail'
      - $ref: '#/components/parameters/accept-encoding'
      responses:
        '200':
          $ref: '#/components/responses/200-struct'
        '400':
          $ref: '#/components/responses/400'
        '404':
          $ref: '#/components/responses/404'
        '406':
          $ref: '#/components/responses/406'
        '500':
          $ref: '#/components/responses/500'
        '501':
          $ref: '#/components/responses/501'
        '503':
          $ref: '#/components/responses/503'
components:
  responses:
    '500':
      description: Internal server error
    200-struct:
      description: OK
      content:
        application/vnd.sdmx.structure+xml;version=2.1:
          schema:
            type: string
        application/vnd.sdmx.structure+json;version=1.0.0:
          schema:
            type: string
        application/vnd.sdmx.structure+edi;version=1.0:
          schema:
            type: string
    '501':
      description: Not implemented
    '404':
      description: Not found
    '400':
      description: Bad syntax
    '406':
      description: Not acceptable
    '503':
      description: Service unavailable
  parameters:
    accept-encoding:
      in: header
      name: Accept-Encoding
      description: "Specifies whether the response should be compressed and how. \n\n`identity` (the default) indicates that no compression will be performed.\n"
      schema:
        type: string
        enum:
        - br
        - compress
        - deflate
        - exi
        - gzip
        - identity
        - pack200-gzip
        - zstd
        default: identity
    resourceIDs:
      in: path
      name: resourceID
      description: "The id of the artefact to be returned.\n\nIt is possible to set more than one id, using `+` as separator (e.g. CL_FREQ+CL_CONF_STATUS).\n\nThe keyword `all` can be used to indicate that any artefact of the specified resource type, {agencyID} and {version} should be returned. \n"
      required: true
      schema:
        type: string
        pattern: ^([A-Za-z\d_@$-]+(\+[A-Za-z\d_@$-]+)*)*$
    references:
      in: query
      name: references
      description: "Instructs the web service to return (or not) the artefacts referenced by the artefact to be returned.\n\nPossible values are: \n\n* `none`: No references will be returned\n* `parents`: Returns the artefacts that use the artefact matching the query\n* `parentsandsiblings`: Returns the artefacts that use the artefact matching the query, as well as the artefacts referenced by these artefacts\n* `children`: Returns the artefacts referenced by the artefact to be returned\n* `descendants`: References of references, up to any level, will be returned\n* `all`: The combination of parentsandsiblings and descendants\n* In addition, a concrete type of resource may also be used (for example, references=codelist).\n"
      required: false
      schema:
        type: string
        enum:
        - none
        - parents
        - parentsandsiblings
        - children
        - descendants
        - all
        - datastructure
        - categoryscheme
        - conceptscheme
        - codelist
        - hierarchicalcodelist
        - agencyscheme
        - dataflow
        - provisionagreement
        - categorisation
        - contentconstraint
        - actualconstraint
        - allowedconstraint
        default: none
    agencies:
      in: path
      name: agencyID
      description: "The agency maintaining the artefact to be returned. \n\nIt is possible to set more than one agency, using `+` as separator (e.g. BIS+ECB).\n\nThe keyword `all` can be used to indicate that artefacts maintained by any maintenance agency should be returned.\n"
      required: true
      schema:
        type: string
        pattern: ^(([A-Za-z][A-Za-z\d_-]*)(\.[A-Za-z][A-Za-z\d_-]*)*,)?[A-Za-z\d_@$-]+(\+([A-Za-z][A-Za-z\d_-]*(\.[A-Za-z][A-Za-z\d_-]*)*,)?[A-Za-z\d_@$-]+)*$
    versions:
      in: path
      name: version
      description: "The version of the artefact to be returned. \n\nIt is possible to set more than one version, using `+` as separator (e.g. 1.0+2.1).\n\nThe keyword `all` can be used to return all versions of the matching resource.\n\nThe keyword `latest` can be used to return the latest production version of the matching resource.\n"
      required: true
      schema:
        type: string
        pattern: ^(all|latest|[\d]+(\.[\d]+)*(\+[\d]+(\.[\d]+)*)*)$
    structDetail:
      in: query
      name: detail
      description: "The amount of information to be returned. \n\nPossible values are: \n\n* `allstubs`: All artefacts should be returned as stubs, containing only identification information, as well as the artefacts' name\n* `referencestubs`: Referenced artefacts should be returned as stubs, containing only identification information, as well as the artefacts' name\n* `referencepartial`: Referenced item schemes should only include items used by the artefact to be returned. For example, a concept scheme would only contain the concepts used in a DSD, and its isPartial flag would be set to `true`\n* `allcompletestubs`: All artefacts should be returned as complete stubs, containing identification information, the artefacts' name, description, annotations and isFinal information\n* `referencecompletestubs`: Referenced artefacts should be returned as complete stubs, containing identification information, the artefacts' name, description, annotations and isFinal information\n* `full`: All available information for all artefacts should be returned\n"
      required: false
      schema:
        type: string
        enum:
        - allstubs
        - referencestubs
        - referencepartial
        - allcompletestubs
        - referencecompletestubs
        - full
        default: full