openapi: 3.0.3
info:
  title: Open Energy Platform API
  version: v0
  description: OpenAPI schema for the Open Energy Platform REST API.
paths:
  /api/v0/advanced/connection/close:
    post:
      operationId: advanced_connection_close_create
      description: |-
        Runs `close_raw_connection` against the OEDB.

        Part of the **advanced** interface: a thin, authenticated passthrough to the database that exists to be driven by a client library rather than by hand. A call carrying no `connection_id` runs and commits on its own; one carrying the pair from `connection/open` and `cursor/open` joins that transaction, which is what lets several calls be committed or rolled back together. A session no call has used for a while is closed, with its cursors and its uncommitted transaction: by default after 30 seconds, or 10 minutes while it has an open cursor or uncommitted work. A call that is still running keeps its session open however long it takes. A later call under a closed session's id starts a new, empty session under that id.
      tags:
      - 'Advanced: Connection'
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/AdvancedRequest'
          application/x-www-form-urlencoded:
            schema:
              $ref: '#/components/schemas/AdvancedRequest'
          multipart/form-data:
            schema:
              $ref: '#/components/schemas/AdvancedRequest'
      security:
      - basicAuth: []
      - cookieAuth: []
      - tokenAuth: []
      - {}
      responses:
        '400':
          content:
            application/json:
              schema:
                type: object
                additionalProperties: {}
          description: 'The request could not be carried out as sent: a payload key
            missing or holding something this endpoint cannot use, a column name that
            is not a Postgres identifier, or a query the database refused. The body
            carries `reason` or `error` naming which.'
        '403':
          content:
            application/json:
              schema:
                type: object
                additionalProperties: {}
          description: 'Authenticated, but not permitted: the table belongs to somebody
            else, or is under embargo, or the operation needs a level of permission
            on it that this account does not hold.'
        '200':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/AdvancedResponse'
          description: The result of `close_raw_connection`, under `content`.
  /api/v0/advanced/connection/close_all:
    get:
      operationId: advanced_connection_close_all_retrieve
      description: |-
        Closes all of this account's open database connections. The way out of a session left open by a client that stopped without closing it.

        Part of the **advanced** interface: a thin, authenticated passthrough to the database that exists to be driven by a client library rather than by hand. A call carrying no `connection_id` runs and commits on its own; one carrying the pair from `connection/open` and `cursor/open` joins that transaction, which is what lets several calls be committed or rolled back together. A session no call has used for a while is closed, with its cursors and its uncommitted transaction: by default after 30 seconds, or 10 minutes while it has an open cursor or uncommitted work. A call that is still running keeps its session open however long it takes. A later call under a closed session's id starts a new, empty session under that id.
      summary: Close every connection this account holds
      tags:
      - 'Advanced: Connection'
      security:
      - basicAuth: []
      - cookieAuth: []
      - tokenAuth: []
      - {}
      responses:
        '403':
          content:
            application/json:
              schema:
                type: object
                additionalProperties: {}
          description: 'Authenticated, but not permitted: the table belongs to somebody
            else, or is under embargo, or the operation needs a level of permission
            on it that this account does not hold.'
        '200':
          content:
            application/json:
              schema:
                type: object
                additionalProperties: {}
          description: Closed.
  /api/v0/advanced/connection/commit:
    post:
      operationId: advanced_connection_commit_create
      description: |-
        Runs `commit_raw_connection` against the OEDB.

        Part of the **advanced** interface: a thin, authenticated passthrough to the database that exists to be driven by a client library rather than by hand. A call carrying no `connection_id` runs and commits on its own; one carrying the pair from `connection/open` and `cursor/open` joins that transaction, which is what lets several calls be committed or rolled back together. A session no call has used for a while is closed, with its cursors and its uncommitted transaction: by default after 30 seconds, or 10 minutes while it has an open cursor or uncommitted work. A call that is still running keeps its session open however long it takes. A later call under a closed session's id starts a new, empty session under that id.
      tags:
      - 'Advanced: Connection'
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/AdvancedRequest'
          application/x-www-form-urlencoded:
            schema:
              $ref: '#/components/schemas/AdvancedRequest'
          multipart/form-data:
            schema:
              $ref: '#/components/schemas/AdvancedRequest'
      security:
      - basicAuth: []
      - cookieAuth: []
      - tokenAuth: []
      - {}
      responses:
        '400':
          content:
            application/json:
              schema:
                type: object
                additionalProperties: {}
          description: 'The request could not be carried out as sent: a payload key
            missing or holding something this endpoint cannot use, a column name that
            is not a Postgres identifier, or a query the database refused. The body
            carries `reason` or `error` naming which.'
        '403':
          content:
            application/json:
              schema:
                type: object
                additionalProperties: {}
          description: 'Authenticated, but not permitted: the table belongs to somebody
            else, or is under embargo, or the operation needs a level of permission
            on it that this account does not hold.'
        '200':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/AdvancedResponse'
          description: The result of `commit_raw_connection`, under `content`.
        '429':
          content:
            application/json:
              schema:
                type: object
                additionalProperties: {}
          description: 'This account (or, without a login, all anonymous clients together)
            already holds its limit of explicit sessions, the ones opened with `connection/open`.
            Only those count: a call carrying no `connection_id` does not take a place.
            `reason` names the limit and how to close sessions. No `Retry-After`:
            waiting helps only once a session is closed.'
        '503':
          content:
            application/json:
              schema:
                type: object
                additionalProperties: {}
          description: No database connection became free in time. Nothing is wrong
            with the request; retry after the `Retry-After` seconds.
  /api/v0/advanced/connection/open:
    post:
      operationId: advanced_connection_open_create
      description: |-
        Runs `open_raw_connection` against the OEDB.

        Part of the **advanced** interface: a thin, authenticated passthrough to the database that exists to be driven by a client library rather than by hand. A call carrying no `connection_id` runs and commits on its own; one carrying the pair from `connection/open` and `cursor/open` joins that transaction, which is what lets several calls be committed or rolled back together. A session no call has used for a while is closed, with its cursors and its uncommitted transaction: by default after 30 seconds, or 10 minutes while it has an open cursor or uncommitted work. A call that is still running keeps its session open however long it takes. A later call under a closed session's id starts a new, empty session under that id.
      tags:
      - 'Advanced: Connection'
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/AdvancedRequest'
          application/x-www-form-urlencoded:
            schema:
              $ref: '#/components/schemas/AdvancedRequest'
          multipart/form-data:
            schema:
              $ref: '#/components/schemas/AdvancedRequest'
      security:
      - basicAuth: []
      - cookieAuth: []
      - tokenAuth: []
      - {}
      responses:
        '400':
          content:
            application/json:
              schema:
                type: object
                additionalProperties: {}
          description: 'The request could not be carried out as sent: a payload key
            missing or holding something this endpoint cannot use, a column name that
            is not a Postgres identifier, or a query the database refused. The body
            carries `reason` or `error` naming which.'
        '403':
          content:
            application/json:
              schema:
                type: object
                additionalProperties: {}
          description: 'Authenticated, but not permitted: the table belongs to somebody
            else, or is under embargo, or the operation needs a level of permission
            on it that this account does not hold.'
        '200':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/AdvancedResponse'
          description: The result of `open_raw_connection`, under `content`.
        '429':
          content:
            application/json:
              schema:
                type: object
                additionalProperties: {}
          description: 'This account (or, without a login, all anonymous clients together)
            already holds its limit of explicit sessions, the ones opened with `connection/open`.
            Only those count: a call carrying no `connection_id` does not take a place.
            `reason` names the limit and how to close sessions. No `Retry-After`:
            waiting helps only once a session is closed.'
        '503':
          content:
            application/json:
              schema:
                type: object
                additionalProperties: {}
          description: No database connection became free in time. Nothing is wrong
            with the request; retry after the `Retry-After` seconds.
  /api/v0/advanced/connection/rollback:
    post:
      operationId: advanced_connection_rollback_create
      description: |-
        Runs `rollback_raw_connection` against the OEDB.

        Part of the **advanced** interface: a thin, authenticated passthrough to the database that exists to be driven by a client library rather than by hand. A call carrying no `connection_id` runs and commits on its own; one carrying the pair from `connection/open` and `cursor/open` joins that transaction, which is what lets several calls be committed or rolled back together. A session no call has used for a while is closed, with its cursors and its uncommitted transaction: by default after 30 seconds, or 10 minutes while it has an open cursor or uncommitted work. A call that is still running keeps its session open however long it takes. A later call under a closed session's id starts a new, empty session under that id.
      tags:
      - 'Advanced: Connection'
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/AdvancedRequest'
          application/x-www-form-urlencoded:
            schema:
              $ref: '#/components/schemas/AdvancedRequest'
          multipart/form-data:
            schema:
              $ref: '#/components/schemas/AdvancedRequest'
      security:
      - basicAuth: []
      - cookieAuth: []
      - tokenAuth: []
      - {}
      responses:
        '400':
          content:
            application/json:
              schema:
                type: object
                additionalProperties: {}
          description: 'The request could not be carried out as sent: a payload key
            missing or holding something this endpoint cannot use, a column name that
            is not a Postgres identifier, or a query the database refused. The body
            carries `reason` or `error` naming which.'
        '403':
          content:
            application/json:
              schema:
                type: object
                additionalProperties: {}
          description: 'Authenticated, but not permitted: the table belongs to somebody
            else, or is under embargo, or the operation needs a level of permission
            on it that this account does not hold.'
        '200':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/AdvancedResponse'
          description: The result of `rollback_raw_connection`, under `content`.
  /api/v0/advanced/cursor/close:
    post:
      operationId: advanced_cursor_close_create
      description: |-
        Runs `close_cursor` against the OEDB.

        Part of the **advanced** interface: a thin, authenticated passthrough to the database that exists to be driven by a client library rather than by hand. A call carrying no `connection_id` runs and commits on its own; one carrying the pair from `connection/open` and `cursor/open` joins that transaction, which is what lets several calls be committed or rolled back together. A session no call has used for a while is closed, with its cursors and its uncommitted transaction: by default after 30 seconds, or 10 minutes while it has an open cursor or uncommitted work. A call that is still running keeps its session open however long it takes. A later call under a closed session's id starts a new, empty session under that id.
      tags:
      - 'Advanced: Cursor'
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/AdvancedRequest'
          application/x-www-form-urlencoded:
            schema:
              $ref: '#/components/schemas/AdvancedRequest'
          multipart/form-data:
            schema:
              $ref: '#/components/schemas/AdvancedRequest'
      security:
      - basicAuth: []
      - cookieAuth: []
      - tokenAuth: []
      - {}
      responses:
        '400':
          content:
            application/json:
              schema:
                type: object
                additionalProperties: {}
          description: 'The request could not be carried out as sent: a payload key
            missing or holding something this endpoint cannot use, a column name that
            is not a Postgres identifier, or a query the database refused. The body
            carries `reason` or `error` naming which.'
        '403':
          content:
            application/json:
              schema:
                type: object
                additionalProperties: {}
          description: 'Authenticated, but not permitted: the table belongs to somebody
            else, or is under embargo, or the operation needs a level of permission
            on it that this account does not hold.'
        '200':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/AdvancedResponse'
          description: The result of `close_cursor`, under `content`.
        '429':
          content:
            application/json:
              schema:
                type: object
                additionalProperties: {}
          description: 'This account (or, without a login, all anonymous clients together)
            already holds its limit of explicit sessions, the ones opened with `connection/open`.
            Only those count: a call carrying no `connection_id` does not take a place.
            `reason` names the limit and how to close sessions. No `Retry-After`:
            waiting helps only once a session is closed.'
        '503':
          content:
            application/json:
              schema:
                type: object
                additionalProperties: {}
          description: No database connection became free in time. Nothing is wrong
            with the request; retry after the `Retry-After` seconds.
  /api/v0/advanced/cursor/fetch_all:
    post:
      operationId: advanced_cursor_fetch_all_create
      description: |-
        Streams rows from a cursor opened by `advanced/cursor/open`, one JSON array per line rather than one document -- so a large result can be read without holding it whole.

        Part of the **advanced** interface: a thin, authenticated passthrough to the database that exists to be driven by a client library rather than by hand. A call carrying no `connection_id` runs and commits on its own; one carrying the pair from `connection/open` and `cursor/open` joins that transaction, which is what lets several calls be committed or rolled back together. A session no call has used for a while is closed, with its cursors and its uncommitted transaction: by default after 30 seconds, or 10 minutes while it has an open cursor or uncommitted work. A call that is still running keeps its session open however long it takes. A later call under a closed session's id starts a new, empty session under that id.
      summary: Fetch rows from an open cursor
      tags:
      - 'Advanced: Cursor'
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/AdvancedRequest'
          application/x-www-form-urlencoded:
            schema:
              $ref: '#/components/schemas/AdvancedRequest'
          multipart/form-data:
            schema:
              $ref: '#/components/schemas/AdvancedRequest'
      security:
      - basicAuth: []
      - cookieAuth: []
      - tokenAuth: []
      - {}
      responses:
        '400':
          content:
            application/json:
              schema:
                type: object
                additionalProperties: {}
          description: 'The request could not be carried out as sent: a payload key
            missing or holding something this endpoint cannot use, a column name that
            is not a Postgres identifier, or a query the database refused. The body
            carries `reason` or `error` naming which.'
        '403':
          content:
            application/json:
              schema:
                type: object
                additionalProperties: {}
          description: 'Authenticated, but not permitted: the table belongs to somebody
            else, or is under embargo, or the operation needs a level of permission
            on it that this account does not hold.'
        '200':
          content:
            application/json:
              schema:
                type: object
                additionalProperties: {}
          description: One row per line, each a JSON array of cell values in column
            order.
  /api/v0/advanced/cursor/fetch_many:
    post:
      operationId: advanced_cursor_fetch_many_create
      description: |-
        Streams rows from a cursor opened by `advanced/cursor/open`, one JSON array per line rather than one document -- so a large result can be read without holding it whole.

        Part of the **advanced** interface: a thin, authenticated passthrough to the database that exists to be driven by a client library rather than by hand. A call carrying no `connection_id` runs and commits on its own; one carrying the pair from `connection/open` and `cursor/open` joins that transaction, which is what lets several calls be committed or rolled back together. A session no call has used for a while is closed, with its cursors and its uncommitted transaction: by default after 30 seconds, or 10 minutes while it has an open cursor or uncommitted work. A call that is still running keeps its session open however long it takes. A later call under a closed session's id starts a new, empty session under that id.
      summary: Fetch rows from an open cursor
      tags:
      - 'Advanced: Cursor'
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/AdvancedRequest'
          application/x-www-form-urlencoded:
            schema:
              $ref: '#/components/schemas/AdvancedRequest'
          multipart/form-data:
            schema:
              $ref: '#/components/schemas/AdvancedRequest'
      security:
      - basicAuth: []
      - cookieAuth: []
      - tokenAuth: []
      - {}
      responses:
        '400':
          content:
            application/json:
              schema:
                type: object
                additionalProperties: {}
          description: 'The request could not be carried out as sent: a payload key
            missing or holding something this endpoint cannot use, a column name that
            is not a Postgres identifier, or a query the database refused. The body
            carries `reason` or `error` naming which.'
        '403':
          content:
            application/json:
              schema:
                type: object
                additionalProperties: {}
          description: 'Authenticated, but not permitted: the table belongs to somebody
            else, or is under embargo, or the operation needs a level of permission
            on it that this account does not hold.'
        '200':
          content:
            application/json:
              schema:
                type: object
                additionalProperties: {}
          description: One row per line, each a JSON array of cell values in column
            order.
  /api/v0/advanced/cursor/fetch_one:
    post:
      operationId: advanced_cursor_fetch_one_create
      description: |-
        Runs `fetchone` against the OEDB.

        Part of the **advanced** interface: a thin, authenticated passthrough to the database that exists to be driven by a client library rather than by hand. A call carrying no `connection_id` runs and commits on its own; one carrying the pair from `connection/open` and `cursor/open` joins that transaction, which is what lets several calls be committed or rolled back together. A session no call has used for a while is closed, with its cursors and its uncommitted transaction: by default after 30 seconds, or 10 minutes while it has an open cursor or uncommitted work. A call that is still running keeps its session open however long it takes. A later call under a closed session's id starts a new, empty session under that id.
      tags:
      - 'Advanced: Cursor'
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/AdvancedRequest'
          application/x-www-form-urlencoded:
            schema:
              $ref: '#/components/schemas/AdvancedRequest'
          multipart/form-data:
            schema:
              $ref: '#/components/schemas/AdvancedRequest'
      security:
      - basicAuth: []
      - cookieAuth: []
      - tokenAuth: []
      - {}
      responses:
        '400':
          content:
            application/json:
              schema:
                type: object
                additionalProperties: {}
          description: 'The request could not be carried out as sent: a payload key
            missing or holding something this endpoint cannot use, a column name that
            is not a Postgres identifier, or a query the database refused. The body
            carries `reason` or `error` naming which.'
        '403':
          content:
            application/json:
              schema:
                type: object
                additionalProperties: {}
          description: 'Authenticated, but not permitted: the table belongs to somebody
            else, or is under embargo, or the operation needs a level of permission
            on it that this account does not hold.'
        '200':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/AdvancedResponse'
          description: The result of `fetchone`, under `content`.
        '429':
          content:
            application/json:
              schema:
                type: object
                additionalProperties: {}
          description: 'This account (or, without a login, all anonymous clients together)
            already holds its limit of explicit sessions, the ones opened with `connection/open`.
            Only those count: a call carrying no `connection_id` does not take a place.
            `reason` names the limit and how to close sessions. No `Retry-After`:
            waiting helps only once a session is closed.'
        '503':
          content:
            application/json:
              schema:
                type: object
                additionalProperties: {}
          description: No database connection became free in time. Nothing is wrong
            with the request; retry after the `Retry-After` seconds.
  /api/v0/advanced/cursor/open:
    post:
      operationId: advanced_cursor_open_create
      description: |-
        Runs `open_cursor` against the OEDB.

        Part of the **advanced** interface: a thin, authenticated passthrough to the database that exists to be driven by a client library rather than by hand. A call carrying no `connection_id` runs and commits on its own; one carrying the pair from `connection/open` and `cursor/open` joins that transaction, which is what lets several calls be committed or rolled back together. A session no call has used for a while is closed, with its cursors and its uncommitted transaction: by default after 30 seconds, or 10 minutes while it has an open cursor or uncommitted work. A call that is still running keeps its session open however long it takes. A later call under a closed session's id starts a new, empty session under that id.
      tags:
      - 'Advanced: Cursor'
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/AdvancedRequest'
          application/x-www-form-urlencoded:
            schema:
              $ref: '#/components/schemas/AdvancedRequest'
          multipart/form-data:
            schema:
              $ref: '#/components/schemas/AdvancedRequest'
      security:
      - basicAuth: []
      - cookieAuth: []
      - tokenAuth: []
      - {}
      responses:
        '400':
          content:
            application/json:
              schema:
                type: object
                additionalProperties: {}
          description: 'The request could not be carried out as sent: a payload key
            missing or holding something this endpoint cannot use, a column name that
            is not a Postgres identifier, or a query the database refused. The body
            carries `reason` or `error` naming which.'
        '403':
          content:
            application/json:
              schema:
                type: object
                additionalProperties: {}
          description: 'Authenticated, but not permitted: the table belongs to somebody
            else, or is under embargo, or the operation needs a level of permission
            on it that this account does not hold.'
        '200':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/AdvancedResponse'
          description: The result of `open_cursor`, under `content`.
        '429':
          content:
            application/json:
              schema:
                type: object
                additionalProperties: {}
          description: 'This account (or, without a login, all anonymous clients together)
            already holds its limit of explicit sessions, the ones opened with `connection/open`.
            Only those count: a call carrying no `connection_id` does not take a place.
            `reason` names the limit and how to close sessions. No `Retry-After`:
            waiting helps only once a session is closed.'
        '503':
          content:
            application/json:
              schema:
                type: object
                additionalProperties: {}
          description: No database connection became free in time. Nothing is wrong
            with the request; retry after the `Retry-After` seconds.
  /api/v0/advanced/delete:
    post:
      operationId: advanced_delete_create
      description: |-
        Runs `data_delete` against the OEDB.

        Part of the **advanced** interface: a thin, authenticated passthrough to the database that exists to be driven by a client library rather than by hand. A call carrying no `connection_id` runs and commits on its own; one carrying the pair from `connection/open` and `cursor/open` joins that transaction, which is what lets several calls be committed or rolled back together. A session no call has used for a while is closed, with its cursors and its uncommitted transaction: by default after 30 seconds, or 10 minutes while it has an open cursor or uncommitted work. A call that is still running keeps its session open however long it takes. A later call under a closed session's id starts a new, empty session under that id.
      tags:
      - Advanced
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/AdvancedRequest'
          application/x-www-form-urlencoded:
            schema:
              $ref: '#/components/schemas/AdvancedRequest'
          multipart/form-data:
            schema:
              $ref: '#/components/schemas/AdvancedRequest'
      security:
      - basicAuth: []
      - cookieAuth: []
      - tokenAuth: []
      - {}
      responses:
        '400':
          content:
            application/json:
              schema:
                type: object
                additionalProperties: {}
          description: 'The request could not be carried out as sent: a payload key
            missing or holding something this endpoint cannot use, a column name that
            is not a Postgres identifier, or a query the database refused. The body
            carries `reason` or `error` naming which.'
        '403':
          content:
            application/json:
              schema:
                type: object
                additionalProperties: {}
          description: 'Authenticated, but not permitted: the table belongs to somebody
            else, or is under embargo, or the operation needs a level of permission
            on it that this account does not hold.'
        '200':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/AdvancedResponse'
          description: The result of `data_delete`, under `content`.
        '429':
          content:
            application/json:
              schema:
                type: object
                additionalProperties: {}
          description: 'This account (or, without a login, all anonymous clients together)
            already holds its limit of explicit sessions, the ones opened with `connection/open`.
            Only those count: a call carrying no `connection_id` does not take a place.
            `reason` names the limit and how to close sessions. No `Retry-After`:
            waiting helps only once a session is closed.'
        '503':
          content:
            application/json:
              schema:
                type: object
                additionalProperties: {}
          description: No database connection became free in time. Nothing is wrong
            with the request; retry after the `Retry-After` seconds.
  /api/v0/advanced/do_begin_twophase:
    post:
      operationId: advanced_do_begin_twophase_create
      description: |-
        Runs `do_begin_twophase` against the OEDB.

        Part of the **advanced** interface: a thin, authenticated passthrough to the database that exists to be driven by a client library rather than by hand. A call carrying no `connection_id` runs and commits on its own; one carrying the pair from `connection/open` and `cursor/open` joins that transaction, which is what lets several calls be committed or rolled back together. A session no call has used for a while is closed, with its cursors and its uncommitted transaction: by default after 30 seconds, or 10 minutes while it has an open cursor or uncommitted work. A call that is still running keeps its session open however long it takes. A later call under a closed session's id starts a new, empty session under that id.
      tags:
      - 'Advanced: Two phase'
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/AdvancedRequest'
          application/x-www-form-urlencoded:
            schema:
              $ref: '#/components/schemas/AdvancedRequest'
          multipart/form-data:
            schema:
              $ref: '#/components/schemas/AdvancedRequest'
      security:
      - basicAuth: []
      - cookieAuth: []
      - tokenAuth: []
      - {}
      responses:
        '400':
          content:
            application/json:
              schema:
                type: object
                additionalProperties: {}
          description: 'The request could not be carried out as sent: a payload key
            missing or holding something this endpoint cannot use, a column name that
            is not a Postgres identifier, or a query the database refused. The body
            carries `reason` or `error` naming which.'
        '403':
          content:
            application/json:
              schema:
                type: object
                additionalProperties: {}
          description: 'Authenticated, but not permitted: the table belongs to somebody
            else, or is under embargo, or the operation needs a level of permission
            on it that this account does not hold.'
        '200':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/AdvancedResponse'
          description: The result of `do_begin_twophase`, under `content`.
        '429':
          content:
            application/json:
              schema:
                type: object
                additionalProperties: {}
          description: 'This account (or, without a login, all anonymous clients together)
            already holds its limit of explicit sessions, the ones opened with `connection/open`.
            Only those count: a call carrying no `connection_id` does not take a place.
            `reason` names the limit and how to close sessions. No `Retry-After`:
            waiting helps only once a session is closed.'
        '503':
          content:
            application/json:
              schema:
                type: object
                additionalProperties: {}
          description: No database connection became free in time. Nothing is wrong
            with the request; retry after the `Retry-After` seconds.
  /api/v0/advanced/do_commit_twophase:
    post:
      operationId: advanced_do_commit_twophase_create
      description: |-
        Runs `do_commit_twophase` against the OEDB.

        Part of the **advanced** interface: a thin, authenticated passthrough to the database that exists to be driven by a client library rather than by hand. A call carrying no `connection_id` runs and commits on its own; one carrying the pair from `connection/open` and `cursor/open` joins that transaction, which is what lets several calls be committed or rolled back together. A session no call has used for a while is closed, with its cursors and its uncommitted transaction: by default after 30 seconds, or 10 minutes while it has an open cursor or uncommitted work. A call that is still running keeps its session open however long it takes. A later call under a closed session's id starts a new, empty session under that id.
      tags:
      - 'Advanced: Two phase'
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/AdvancedRequest'
          application/x-www-form-urlencoded:
            schema:
              $ref: '#/components/schemas/AdvancedRequest'
          multipart/form-data:
            schema:
              $ref: '#/components/schemas/AdvancedRequest'
      security:
      - basicAuth: []
      - cookieAuth: []
      - tokenAuth: []
      - {}
      responses:
        '400':
          content:
            application/json:
              schema:
                type: object
                additionalProperties: {}
          description: 'The request could not be carried out as sent: a payload key
            missing or holding something this endpoint cannot use, a column name that
            is not a Postgres identifier, or a query the database refused. The body
            carries `reason` or `error` naming which.'
        '403':
          content:
            application/json:
              schema:
                type: object
                additionalProperties: {}
          description: 'Authenticated, but not permitted: the table belongs to somebody
            else, or is under embargo, or the operation needs a level of permission
            on it that this account does not hold.'
        '200':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/AdvancedResponse'
          description: The result of `do_commit_twophase`, under `content`.
        '429':
          content:
            application/json:
              schema:
                type: object
                additionalProperties: {}
          description: 'This account (or, without a login, all anonymous clients together)
            already holds its limit of explicit sessions, the ones opened with `connection/open`.
            Only those count: a call carrying no `connection_id` does not take a place.
            `reason` names the limit and how to close sessions. No `Retry-After`:
            waiting helps only once a session is closed.'
        '503':
          content:
            application/json:
              schema:
                type: object
                additionalProperties: {}
          description: No database connection became free in time. Nothing is wrong
            with the request; retry after the `Retry-After` seconds.
  /api/v0/advanced/do_prepare_twophase:
    post:
      operationId: advanced_do_prepare_twophase_create
      description: |-
        Runs `do_prepare_twophase` against the OEDB.

        Part of the **advanced** interface: a thin, authenticated passthrough to the database that exists to be driven by a client library rather than by hand. A call carrying no `connection_id` runs and commits on its own; one carrying the pair from `connection/open` and `cursor/open` joins that transaction, which is what lets several calls be committed or rolled back together. A session no call has used for a while is closed, with its cursors and its uncommitted transaction: by default after 30 seconds, or 10 minutes while it has an open cursor or uncommitted work. A call that is still running keeps its session open however long it takes. A later call under a closed session's id starts a new, empty session under that id.
      tags:
      - 'Advanced: Two phase'
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/AdvancedRequest'
          application/x-www-form-urlencoded:
            schema:
              $ref: '#/components/schemas/AdvancedRequest'
          multipart/form-data:
            schema:
              $ref: '#/components/schemas/AdvancedRequest'
      security:
      - basicAuth: []
      - cookieAuth: []
      - tokenAuth: []
      - {}
      responses:
        '400':
          content:
            application/json:
              schema:
                type: object
                additionalProperties: {}
          description: 'The request could not be carried out as sent: a payload key
            missing or holding something this endpoint cannot use, a column name that
            is not a Postgres identifier, or a query the database refused. The body
            carries `reason` or `error` naming which.'
        '403':
          content:
            application/json:
              schema:
                type: object
                additionalProperties: {}
          description: 'Authenticated, but not permitted: the table belongs to somebody
            else, or is under embargo, or the operation needs a level of permission
            on it that this account does not hold.'
        '200':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/AdvancedResponse'
          description: The result of `do_prepare_twophase`, under `content`.
        '429':
          content:
            application/json:
              schema:
                type: object
                additionalProperties: {}
          description: 'This account (or, without a login, all anonymous clients together)
            already holds its limit of explicit sessions, the ones opened with `connection/open`.
            Only those count: a call carrying no `connection_id` does not take a place.
            `reason` names the limit and how to close sessions. No `Retry-After`:
            waiting helps only once a session is closed.'
        '503':
          content:
            application/json:
              schema:
                type: object
                additionalProperties: {}
          description: No database connection became free in time. Nothing is wrong
            with the request; retry after the `Retry-After` seconds.
  /api/v0/advanced/do_recover_twophase:
    post:
      operationId: advanced_do_recover_twophase_create
      description: |-
        Runs `do_recover_twophase` against the OEDB.

        Part of the **advanced** interface: a thin, authenticated passthrough to the database that exists to be driven by a client library rather than by hand. A call carrying no `connection_id` runs and commits on its own; one carrying the pair from `connection/open` and `cursor/open` joins that transaction, which is what lets several calls be committed or rolled back together. A session no call has used for a while is closed, with its cursors and its uncommitted transaction: by default after 30 seconds, or 10 minutes while it has an open cursor or uncommitted work. A call that is still running keeps its session open however long it takes. A later call under a closed session's id starts a new, empty session under that id.
      tags:
      - 'Advanced: Two phase'
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/AdvancedRequest'
          application/x-www-form-urlencoded:
            schema:
              $ref: '#/components/schemas/AdvancedRequest'
          multipart/form-data:
            schema:
              $ref: '#/components/schemas/AdvancedRequest'
      security:
      - basicAuth: []
      - cookieAuth: []
      - tokenAuth: []
      - {}
      responses:
        '400':
          content:
            application/json:
              schema:
                type: object
                additionalProperties: {}
          description: 'The request could not be carried out as sent: a payload key
            missing or holding something this endpoint cannot use, a column name that
            is not a Postgres identifier, or a query the database refused. The body
            carries `reason` or `error` naming which.'
        '403':
          content:
            application/json:
              schema:
                type: object
                additionalProperties: {}
          description: 'Authenticated, but not permitted: the table belongs to somebody
            else, or is under embargo, or the operation needs a level of permission
            on it that this account does not hold.'
        '200':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/AdvancedResponse'
          description: The result of `do_recover_twophase`, under `content`.
        '429':
          content:
            application/json:
              schema:
                type: object
                additionalProperties: {}
          description: 'This account (or, without a login, all anonymous clients together)
            already holds its limit of explicit sessions, the ones opened with `connection/open`.
            Only those count: a call carrying no `connection_id` does not take a place.
            `reason` names the limit and how to close sessions. No `Retry-After`:
            waiting helps only once a session is closed.'
        '503':
          content:
            application/json:
              schema:
                type: object
                additionalProperties: {}
          description: No database connection became free in time. Nothing is wrong
            with the request; retry after the `Retry-After` seconds.
  /api/v0/advanced/do_rollback_twophase:
    post:
      operationId: advanced_do_rollback_twophase_create
      description: |-
        Runs `do_rollback_twophase` against the OEDB.

        Part of the **advanced** interface: a thin, authenticated passthrough to the database that exists to be driven by a client library rather than by hand. A call carrying no `connection_id` runs and commits on its own; one carrying the pair from `connection/open` and `cursor/open` joins that transaction, which is what lets several calls be committed or rolled back together. A session no call has used for a while is closed, with its cursors and its uncommitted transaction: by default after 30 seconds, or 10 minutes while it has an open cursor or uncommitted work. A call that is still running keeps its session open however long it takes. A later call under a closed session's id starts a new, empty session under that id.
      tags:
      - 'Advanced: Two phase'
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/AdvancedRequest'
          application/x-www-form-urlencoded:
            schema:
              $ref: '#/components/schemas/AdvancedRequest'
          multipart/form-data:
            schema:
              $ref: '#/components/schemas/AdvancedRequest'
      security:
      - basicAuth: []
      - cookieAuth: []
      - tokenAuth: []
      - {}
      responses:
        '400':
          content:
            application/json:
              schema:
                type: object
                additionalProperties: {}
          description: 'The request could not be carried out as sent: a payload key
            missing or holding something this endpoint cannot use, a column name that
            is not a Postgres identifier, or a query the database refused. The body
            carries `reason` or `error` naming which.'
        '403':
          content:
            application/json:
              schema:
                type: object
                additionalProperties: {}
          description: 'Authenticated, but not permitted: the table belongs to somebody
            else, or is under embargo, or the operation needs a level of permission
            on it that this account does not hold.'
        '200':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/AdvancedResponse'
          description: The result of `do_rollback_twophase`, under `content`.
        '429':
          content:
            application/json:
              schema:
                type: object
                additionalProperties: {}
          description: 'This account (or, without a login, all anonymous clients together)
            already holds its limit of explicit sessions, the ones opened with `connection/open`.
            Only those count: a call carrying no `connection_id` does not take a place.
            `reason` names the limit and how to close sessions. No `Retry-After`:
            waiting helps only once a session is closed.'
        '503':
          content:
            application/json:
              schema:
                type: object
                additionalProperties: {}
          description: No database connection became free in time. Nothing is wrong
            with the request; retry after the `Retry-After` seconds.
  /api/v0/advanced/get_columns:
    post:
      operationId: advanced_get_columns_create
      description: |-
        Runs `get_columns` against the OEDB.

        Part of the **advanced** interface: a thin, authenticated passthrough to the database that exists to be driven by a client library rather than by hand. A call carrying no `connection_id` runs and commits on its own; one carrying the pair from `connection/open` and `cursor/open` joins that transaction, which is what lets several calls be committed or rolled back together. A session no call has used for a while is closed, with its cursors and its uncommitted transaction: by default after 30 seconds, or 10 minutes while it has an open cursor or uncommitted work. A call that is still running keeps its session open however long it takes. A later call under a closed session's id starts a new, empty session under that id.
      tags:
      - Advanced
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/AdvancedRequest'
          application/x-www-form-urlencoded:
            schema:
              $ref: '#/components/schemas/AdvancedRequest'
          multipart/form-data:
            schema:
              $ref: '#/components/schemas/AdvancedRequest'
      security:
      - basicAuth: []
      - cookieAuth: []
      - tokenAuth: []
      - {}
      responses:
        '400':
          content:
            application/json:
              schema:
                type: object
                additionalProperties: {}
          description: 'The request could not be carried out as sent: a payload key
            missing or holding something this endpoint cannot use, a column name that
            is not a Postgres identifier, or a query the database refused. The body
            carries `reason` or `error` naming which.'
        '403':
          content:
            application/json:
              schema:
                type: object
                additionalProperties: {}
          description: 'Authenticated, but not permitted: the table belongs to somebody
            else, or is under embargo, or the operation needs a level of permission
            on it that this account does not hold.'
        '200':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/AdvancedResponse'
          description: The result of `get_columns`, under `content`.
        '503':
          content:
            application/json:
              schema:
                type: object
                additionalProperties: {}
          description: No database connection became free in time. Nothing is wrong
            with the request; retry after the `Retry-After` seconds.
  /api/v0/advanced/get_foreign_keys:
    post:
      operationId: advanced_get_foreign_keys_create
      description: |-
        Runs `get_foreign_keys` against the OEDB.

        Part of the **advanced** interface: a thin, authenticated passthrough to the database that exists to be driven by a client library rather than by hand. A call carrying no `connection_id` runs and commits on its own; one carrying the pair from `connection/open` and `cursor/open` joins that transaction, which is what lets several calls be committed or rolled back together. A session no call has used for a while is closed, with its cursors and its uncommitted transaction: by default after 30 seconds, or 10 minutes while it has an open cursor or uncommitted work. A call that is still running keeps its session open however long it takes. A later call under a closed session's id starts a new, empty session under that id.
      tags:
      - Advanced
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/AdvancedRequest'
          application/x-www-form-urlencoded:
            schema:
              $ref: '#/components/schemas/AdvancedRequest'
          multipart/form-data:
            schema:
              $ref: '#/components/schemas/AdvancedRequest'
      security:
      - basicAuth: []
      - cookieAuth: []
      - tokenAuth: []
      - {}
      responses:
        '400':
          content:
            application/json:
              schema:
                type: object
                additionalProperties: {}
          description: 'The request could not be carried out as sent: a payload key
            missing or holding something this endpoint cannot use, a column name that
            is not a Postgres identifier, or a query the database refused. The body
            carries `reason` or `error` naming which.'
        '403':
          content:
            application/json:
              schema:
                type: object
                additionalProperties: {}
          description: 'Authenticated, but not permitted: the table belongs to somebody
            else, or is under embargo, or the operation needs a level of permission
            on it that this account does not hold.'
        '200':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/AdvancedResponse'
          description: The result of `get_foreign_keys`, under `content`.
        '503':
          content:
            application/json:
              schema:
                type: object
                additionalProperties: {}
          description: No database connection became free in time. Nothing is wrong
            with the request; retry after the `Retry-After` seconds.
  /api/v0/advanced/get_indexes:
    post:
      operationId: advanced_get_indexes_create
      description: |-
        Runs `get_indexes` against the OEDB.

        Part of the **advanced** interface: a thin, authenticated passthrough to the database that exists to be driven by a client library rather than by hand. A call carrying no `connection_id` runs and commits on its own; one carrying the pair from `connection/open` and `cursor/open` joins that transaction, which is what lets several calls be committed or rolled back together. A session no call has used for a while is closed, with its cursors and its uncommitted transaction: by default after 30 seconds, or 10 minutes while it has an open cursor or uncommitted work. A call that is still running keeps its session open however long it takes. A later call under a closed session's id starts a new, empty session under that id.
      tags:
      - Advanced
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/AdvancedRequest'
          application/x-www-form-urlencoded:
            schema:
              $ref: '#/components/schemas/AdvancedRequest'
          multipart/form-data:
            schema:
              $ref: '#/components/schemas/AdvancedRequest'
      security:
      - basicAuth: []
      - cookieAuth: []
      - tokenAuth: []
      - {}
      responses:
        '400':
          content:
            application/json:
              schema:
                type: object
                additionalProperties: {}
          description: 'The request could not be carried out as sent: a payload key
            missing or holding something this endpoint cannot use, a column name that
            is not a Postgres identifier, or a query the database refused. The body
            carries `reason` or `error` naming which.'
        '403':
          content:
            application/json:
              schema:
                type: object
                additionalProperties: {}
          description: 'Authenticated, but not permitted: the table belongs to somebody
            else, or is under embargo, or the operation needs a level of permission
            on it that this account does not hold.'
        '200':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/AdvancedResponse'
          description: The result of `get_indexes`, under `content`.
        '503':
          content:
            application/json:
              schema:
                type: object
                additionalProperties: {}
          description: No database connection became free in time. Nothing is wrong
            with the request; retry after the `Retry-After` seconds.
  /api/v0/advanced/get_isolation_level:
    post:
      operationId: advanced_get_isolation_level_create
      description: |-
        Runs `get_isolation_level` against the OEDB.

        Part of the **advanced** interface: a thin, authenticated passthrough to the database that exists to be driven by a client library rather than by hand. A call carrying no `connection_id` runs and commits on its own; one carrying the pair from `connection/open` and `cursor/open` joins that transaction, which is what lets several calls be committed or rolled back together. A session no call has used for a while is closed, with its cursors and its uncommitted transaction: by default after 30 seconds, or 10 minutes while it has an open cursor or uncommitted work. A call that is still running keeps its session open however long it takes. A later call under a closed session's id starts a new, empty session under that id.
      tags:
      - Advanced
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/AdvancedRequest'
          application/x-www-form-urlencoded:
            schema:
              $ref: '#/components/schemas/AdvancedRequest'
          multipart/form-data:
            schema:
              $ref: '#/components/schemas/AdvancedRequest'
      security:
      - basicAuth: []
      - cookieAuth: []
      - tokenAuth: []
      - {}
      responses:
        '400':
          content:
            application/json:
              schema:
                type: object
                additionalProperties: {}
          description: 'The request could not be carried out as sent: a payload key
            missing or holding something this endpoint cannot use, a column name that
            is not a Postgres identifier, or a query the database refused. The body
            carries `reason` or `error` naming which.'
        '403':
          content:
            application/json:
              schema:
                type: object
                additionalProperties: {}
          description: 'Authenticated, but not permitted: the table belongs to somebody
            else, or is under embargo, or the operation needs a level of permission
            on it that this account does not hold.'
        '200':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/AdvancedResponse'
          description: The result of `get_isolation_level`, under `content`.
        '429':
          content:
            application/json:
              schema:
                type: object
                additionalProperties: {}
          description: 'This account (or, without a login, all anonymous clients together)
            already holds its limit of explicit sessions, the ones opened with `connection/open`.
            Only those count: a call carrying no `connection_id` does not take a place.
            `reason` names the limit and how to close sessions. No `Retry-After`:
            waiting helps only once a session is closed.'
        '503':
          content:
            application/json:
              schema:
                type: object
                additionalProperties: {}
          description: No database connection became free in time. Nothing is wrong
            with the request; retry after the `Retry-After` seconds.
  /api/v0/advanced/get_pk_constraint:
    post:
      operationId: advanced_get_pk_constraint_create
      description: |-
        Runs `get_pk_constraint` against the OEDB.

        Part of the **advanced** interface: a thin, authenticated passthrough to the database that exists to be driven by a client library rather than by hand. A call carrying no `connection_id` runs and commits on its own; one carrying the pair from `connection/open` and `cursor/open` joins that transaction, which is what lets several calls be committed or rolled back together. A session no call has used for a while is closed, with its cursors and its uncommitted transaction: by default after 30 seconds, or 10 minutes while it has an open cursor or uncommitted work. A call that is still running keeps its session open however long it takes. A later call under a closed session's id starts a new, empty session under that id.
      tags:
      - Advanced
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/AdvancedRequest'
          application/x-www-form-urlencoded:
            schema:
              $ref: '#/components/schemas/AdvancedRequest'
          multipart/form-data:
            schema:
              $ref: '#/components/schemas/AdvancedRequest'
      security:
      - basicAuth: []
      - cookieAuth: []
      - tokenAuth: []
      - {}
      responses:
        '400':
          content:
            application/json:
              schema:
                type: object
                additionalProperties: {}
          description: 'The request could not be carried out as sent: a payload key
            missing or holding something this endpoint cannot use, a column name that
            is not a Postgres identifier, or a query the database refused. The body
            carries `reason` or `error` naming which.'
        '403':
          content:
            application/json:
              schema:
                type: object
                additionalProperties: {}
          description: 'Authenticated, but not permitted: the table belongs to somebody
            else, or is under embargo, or the operation needs a level of permission
            on it that this account does not hold.'
        '200':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/AdvancedResponse'
          description: The result of `get_pk_constraint`, under `content`.
        '503':
          content:
            application/json:
              schema:
                type: object
                additionalProperties: {}
          description: No database connection became free in time. Nothing is wrong
            with the request; retry after the `Retry-After` seconds.
  /api/v0/advanced/get_schema_names:
    post:
      operationId: advanced_get_schema_names_create
      description: |-
        Runs `get_schema_names` against the OEDB.

        Part of the **advanced** interface: a thin, authenticated passthrough to the database that exists to be driven by a client library rather than by hand. A call carrying no `connection_id` runs and commits on its own; one carrying the pair from `connection/open` and `cursor/open` joins that transaction, which is what lets several calls be committed or rolled back together. A session no call has used for a while is closed, with its cursors and its uncommitted transaction: by default after 30 seconds, or 10 minutes while it has an open cursor or uncommitted work. A call that is still running keeps its session open however long it takes. A later call under a closed session's id starts a new, empty session under that id.
      tags:
      - Advanced
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/AdvancedRequest'
          application/x-www-form-urlencoded:
            schema:
              $ref: '#/components/schemas/AdvancedRequest'
          multipart/form-data:
            schema:
              $ref: '#/components/schemas/AdvancedRequest'
      security:
      - basicAuth: []
      - cookieAuth: []
      - tokenAuth: []
      - {}
      responses:
        '400':
          content:
            application/json:
              schema:
                type: object
                additionalProperties: {}
          description: 'The request could not be carried out as sent: a payload key
            missing or holding something this endpoint cannot use, a column name that
            is not a Postgres identifier, or a query the database refused. The body
            carries `reason` or `error` naming which.'
        '403':
          content:
            application/json:
              schema:
                type: object
                additionalProperties: {}
          description: 'Authenticated, but not permitted: the table belongs to somebody
            else, or is under embargo, or the operation needs a level of permission
            on it that this account does not hold.'
        '200':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/AdvancedResponse'
          description: The result of `get_schema_names`, under `content`.
  /api/v0/advanced/get_table_names:
    post:
      operationId: advanced_get_table_names_create
      description: |-
        Runs `get_table_names` against the OEDB.

        Part of the **advanced** interface: a thin, authenticated passthrough to the database that exists to be driven by a client library rather than by hand. A call carrying no `connection_id` runs and commits on its own; one carrying the pair from `connection/open` and `cursor/open` joins that transaction, which is what lets several calls be committed or rolled back together. A session no call has used for a while is closed, with its cursors and its uncommitted transaction: by default after 30 seconds, or 10 minutes while it has an open cursor or uncommitted work. A call that is still running keeps its session open however long it takes. A later call under a closed session's id starts a new, empty session under that id.
      tags:
      - Advanced
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/AdvancedRequest'
          application/x-www-form-urlencoded:
            schema:
              $ref: '#/components/schemas/AdvancedRequest'
          multipart/form-data:
            schema:
              $ref: '#/components/schemas/AdvancedRequest'
      security:
      - basicAuth: []
      - cookieAuth: []
      - tokenAuth: []
      - {}
      responses:
        '400':
          content:
            application/json:
              schema:
                type: object
                additionalProperties: {}
          description: 'The request could not be carried out as sent: a payload key
            missing or holding something this endpoint cannot use, a column name that
            is not a Postgres identifier, or a query the database refused. The body
            carries `reason` or `error` naming which.'
        '403':
          content:
            application/json:
              schema:
                type: object
                additionalProperties: {}
          description: 'Authenticated, but not permitted: the table belongs to somebody
            else, or is under embargo, or the operation needs a level of permission
            on it that this account does not hold.'
        '200':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/AdvancedResponse'
          description: The result of `get_table_names`, under `content`.
  /api/v0/advanced/get_unique_constraints:
    post:
      operationId: advanced_get_unique_constraints_create
      description: |-
        Runs `get_unique_constraints` against the OEDB.

        Part of the **advanced** interface: a thin, authenticated passthrough to the database that exists to be driven by a client library rather than by hand. A call carrying no `connection_id` runs and commits on its own; one carrying the pair from `connection/open` and `cursor/open` joins that transaction, which is what lets several calls be committed or rolled back together. A session no call has used for a while is closed, with its cursors and its uncommitted transaction: by default after 30 seconds, or 10 minutes while it has an open cursor or uncommitted work. A call that is still running keeps its session open however long it takes. A later call under a closed session's id starts a new, empty session under that id.
      tags:
      - Advanced
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/AdvancedRequest'
          application/x-www-form-urlencoded:
            schema:
              $ref: '#/components/schemas/AdvancedRequest'
          multipart/form-data:
            schema:
              $ref: '#/components/schemas/AdvancedRequest'
      security:
      - basicAuth: []
      - cookieAuth: []
      - tokenAuth: []
      - {}
      responses:
        '400':
          content:
            application/json:
              schema:
                type: object
                additionalProperties: {}
          description: 'The request could not be carried out as sent: a payload key
            missing or holding something this endpoint cannot use, a column name that
            is not a Postgres identifier, or a query the database refused. The body
            carries `reason` or `error` naming which.'
        '403':
          content:
            application/json:
              schema:
                type: object
                additionalProperties: {}
          description: 'Authenticated, but not permitted: the table belongs to somebody
            else, or is under embargo, or the operation needs a level of permission
            on it that this account does not hold.'
        '200':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/AdvancedResponse'
          description: The result of `get_unique_constraints`, under `content`.
        '503':
          content:
            application/json:
              schema:
                type: object
                additionalProperties: {}
          description: No database connection became free in time. Nothing is wrong
            with the request; retry after the `Retry-After` seconds.
  /api/v0/advanced/get_view_definition:
    post:
      operationId: advanced_get_view_definition_create
      description: |-
        Runs `get_view_definition` against the OEDB.

        Part of the **advanced** interface: a thin, authenticated passthrough to the database that exists to be driven by a client library rather than by hand. A call carrying no `connection_id` runs and commits on its own; one carrying the pair from `connection/open` and `cursor/open` joins that transaction, which is what lets several calls be committed or rolled back together. A session no call has used for a while is closed, with its cursors and its uncommitted transaction: by default after 30 seconds, or 10 minutes while it has an open cursor or uncommitted work. A call that is still running keeps its session open however long it takes. A later call under a closed session's id starts a new, empty session under that id.
      tags:
      - Advanced
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/AdvancedRequest'
          application/x-www-form-urlencoded:
            schema:
              $ref: '#/components/schemas/AdvancedRequest'
          multipart/form-data:
            schema:
              $ref: '#/components/schemas/AdvancedRequest'
      security:
      - basicAuth: []
      - cookieAuth: []
      - tokenAuth: []
      - {}
      responses:
        '400':
          content:
            application/json:
              schema:
                type: object
                additionalProperties: {}
          description: 'The request could not be carried out as sent: a payload key
            missing or holding something this endpoint cannot use, a column name that
            is not a Postgres identifier, or a query the database refused. The body
            carries `reason` or `error` naming which.'
        '403':
          content:
            application/json:
              schema:
                type: object
                additionalProperties: {}
          description: 'Authenticated, but not permitted: the table belongs to somebody
            else, or is under embargo, or the operation needs a level of permission
            on it that this account does not hold.'
        '200':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/AdvancedResponse'
          description: The result of `get_view_definition`, under `content`.
  /api/v0/advanced/get_view_names:
    post:
      operationId: advanced_get_view_names_create
      description: |-
        Runs `get_view_names` against the OEDB.

        Part of the **advanced** interface: a thin, authenticated passthrough to the database that exists to be driven by a client library rather than by hand. A call carrying no `connection_id` runs and commits on its own; one carrying the pair from `connection/open` and `cursor/open` joins that transaction, which is what lets several calls be committed or rolled back together. A session no call has used for a while is closed, with its cursors and its uncommitted transaction: by default after 30 seconds, or 10 minutes while it has an open cursor or uncommitted work. A call that is still running keeps its session open however long it takes. A later call under a closed session's id starts a new, empty session under that id.
      tags:
      - Advanced
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/AdvancedRequest'
          application/x-www-form-urlencoded:
            schema:
              $ref: '#/components/schemas/AdvancedRequest'
          multipart/form-data:
            schema:
              $ref: '#/components/schemas/AdvancedRequest'
      security:
      - basicAuth: []
      - cookieAuth: []
      - tokenAuth: []
      - {}
      responses:
        '400':
          content:
            application/json:
              schema:
                type: object
                additionalProperties: {}
          description: 'The request could not be carried out as sent: a payload key
            missing or holding something this endpoint cannot use, a column name that
            is not a Postgres identifier, or a query the database refused. The body
            carries `reason` or `error` naming which.'
        '403':
          content:
            application/json:
              schema:
                type: object
                additionalProperties: {}
          description: 'Authenticated, but not permitted: the table belongs to somebody
            else, or is under embargo, or the operation needs a level of permission
            on it that this account does not hold.'
        '200':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/AdvancedResponse'
          description: The result of `get_view_names`, under `content`.
  /api/v0/advanced/has_schema:
    post:
      operationId: advanced_has_schema_create
      description: |-
        Runs `has_schema` against the OEDB.

        Part of the **advanced** interface: a thin, authenticated passthrough to the database that exists to be driven by a client library rather than by hand. A call carrying no `connection_id` runs and commits on its own; one carrying the pair from `connection/open` and `cursor/open` joins that transaction, which is what lets several calls be committed or rolled back together. A session no call has used for a while is closed, with its cursors and its uncommitted transaction: by default after 30 seconds, or 10 minutes while it has an open cursor or uncommitted work. A call that is still running keeps its session open however long it takes. A later call under a closed session's id starts a new, empty session under that id.
      tags:
      - Advanced
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/AdvancedRequest'
          application/x-www-form-urlencoded:
            schema:
              $ref: '#/components/schemas/AdvancedRequest'
          multipart/form-data:
            schema:
              $ref: '#/components/schemas/AdvancedRequest'
      security:
      - basicAuth: []
      - cookieAuth: []
      - tokenAuth: []
      - {}
      responses:
        '400':
          content:
            application/json:
              schema:
                type: object
                additionalProperties: {}
          description: 'The request could not be carried out as sent: a payload key
            missing or holding something this endpoint cannot use, a column name that
            is not a Postgres identifier, or a query the database refused. The body
            carries `reason` or `error` naming which.'
        '403':
          content:
            application/json:
              schema:
                type: object
                additionalProperties: {}
          description: 'Authenticated, but not permitted: the table belongs to somebody
            else, or is under embargo, or the operation needs a level of permission
            on it that this account does not hold.'
        '200':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/AdvancedResponse'
          description: The result of `has_schema`, under `content`.
  /api/v0/advanced/has_table:
    post:
      operationId: advanced_has_table_create
      description: |-
        Runs `has_table` against the OEDB.

        Part of the **advanced** interface: a thin, authenticated passthrough to the database that exists to be driven by a client library rather than by hand. A call carrying no `connection_id` runs and commits on its own; one carrying the pair from `connection/open` and `cursor/open` joins that transaction, which is what lets several calls be committed or rolled back together. A session no call has used for a while is closed, with its cursors and its uncommitted transaction: by default after 30 seconds, or 10 minutes while it has an open cursor or uncommitted work. A call that is still running keeps its session open however long it takes. A later call under a closed session's id starts a new, empty session under that id.
      tags:
      - Advanced
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/AdvancedRequest'
          application/x-www-form-urlencoded:
            schema:
              $ref: '#/components/schemas/AdvancedRequest'
          multipart/form-data:
            schema:
              $ref: '#/components/schemas/AdvancedRequest'
      security:
      - basicAuth: []
      - cookieAuth: []
      - tokenAuth: []
      - {}
      responses:
        '400':
          content:
            application/json:
              schema:
                type: object
                additionalProperties: {}
          description: 'The request could not be carried out as sent: a payload key
            missing or holding something this endpoint cannot use, a column name that
            is not a Postgres identifier, or a query the database refused. The body
            carries `reason` or `error` naming which.'
        '403':
          content:
            application/json:
              schema:
                type: object
                additionalProperties: {}
          description: 'Authenticated, but not permitted: the table belongs to somebody
            else, or is under embargo, or the operation needs a level of permission
            on it that this account does not hold.'
        '200':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/AdvancedResponse'
          description: The result of `has_table`, under `content`.
  /api/v0/advanced/insert:
    post:
      operationId: advanced_insert_create
      description: |-
        Runs `data_insert` against the OEDB.

        Part of the **advanced** interface: a thin, authenticated passthrough to the database that exists to be driven by a client library rather than by hand. A call carrying no `connection_id` runs and commits on its own; one carrying the pair from `connection/open` and `cursor/open` joins that transaction, which is what lets several calls be committed or rolled back together. A session no call has used for a while is closed, with its cursors and its uncommitted transaction: by default after 30 seconds, or 10 minutes while it has an open cursor or uncommitted work. A call that is still running keeps its session open however long it takes. A later call under a closed session's id starts a new, empty session under that id.
      tags:
      - Advanced
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/AdvancedRequest'
          application/x-www-form-urlencoded:
            schema:
              $ref: '#/components/schemas/AdvancedRequest'
          multipart/form-data:
            schema:
              $ref: '#/components/schemas/AdvancedRequest'
      security:
      - basicAuth: []
      - cookieAuth: []
      - tokenAuth: []
      - {}
      responses:
        '400':
          content:
            application/json:
              schema:
                type: object
                additionalProperties: {}
          description: 'The request could not be carried out as sent: a payload key
            missing or holding something this endpoint cannot use, a column name that
            is not a Postgres identifier, or a query the database refused. The body
            carries `reason` or `error` naming which.'
        '403':
          content:
            application/json:
              schema:
                type: object
                additionalProperties: {}
          description: 'Authenticated, but not permitted: the table belongs to somebody
            else, or is under embargo, or the operation needs a level of permission
            on it that this account does not hold.'
        '200':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/AdvancedResponse'
          description: The result of `data_insert`, under `content`.
        '429':
          content:
            application/json:
              schema:
                type: object
                additionalProperties: {}
          description: 'This account (or, without a login, all anonymous clients together)
            already holds its limit of explicit sessions, the ones opened with `connection/open`.
            Only those count: a call carrying no `connection_id` does not take a place.
            `reason` names the limit and how to close sessions. No `Retry-After`:
            waiting helps only once a session is closed.'
        '503':
          content:
            application/json:
              schema:
                type: object
                additionalProperties: {}
          description: No database connection became free in time. Nothing is wrong
            with the request; retry after the `Retry-After` seconds.
  /api/v0/advanced/search:
    post:
      operationId: advanced_search_create
      description: |-
        Runs `data_search` against the OEDB.

        Part of the **advanced** interface: a thin, authenticated passthrough to the database that exists to be driven by a client library rather than by hand. A call carrying no `connection_id` runs and commits on its own; one carrying the pair from `connection/open` and `cursor/open` joins that transaction, which is what lets several calls be committed or rolled back together. A session no call has used for a while is closed, with its cursors and its uncommitted transaction: by default after 30 seconds, or 10 minutes while it has an open cursor or uncommitted work. A call that is still running keeps its session open however long it takes. A later call under a closed session's id starts a new, empty session under that id.
      tags:
      - Advanced
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/AdvancedRequest'
          application/x-www-form-urlencoded:
            schema:
              $ref: '#/components/schemas/AdvancedRequest'
          multipart/form-data:
            schema:
              $ref: '#/components/schemas/AdvancedRequest'
      security:
      - basicAuth: []
      - cookieAuth: []
      - tokenAuth: []
      - {}
      responses:
        '400':
          content:
            application/json:
              schema:
                type: object
                additionalProperties: {}
          description: 'The request could not be carried out as sent: a payload key
            missing or holding something this endpoint cannot use, a column name that
            is not a Postgres identifier, or a query the database refused. The body
            carries `reason` or `error` naming which.'
        '403':
          content:
            application/json:
              schema:
                type: object
                additionalProperties: {}
          description: 'Authenticated, but not permitted: the table belongs to somebody
            else, or is under embargo, or the operation needs a level of permission
            on it that this account does not hold.'
        '200':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/AdvancedResponse'
          description: The result of `data_search`, under `content`.
        '429':
          content:
            application/json:
              schema:
                type: object
                additionalProperties: {}
          description: 'This account (or, without a login, all anonymous clients together)
            already holds its limit of explicit sessions, the ones opened with `connection/open`.
            Only those count: a call carrying no `connection_id` does not take a place.
            `reason` names the limit and how to close sessions. No `Retry-After`:
            waiting helps only once a session is closed.'
        '503':
          content:
            application/json:
              schema:
                type: object
                additionalProperties: {}
          description: No database connection became free in time. Nothing is wrong
            with the request; retry after the `Retry-After` seconds.
  /api/v0/advanced/set_isolation_level:
    post:
      operationId: advanced_set_isolation_level_create
      description: |-
        Runs `set_isolation_level` against the OEDB.

        Part of the **advanced** interface: a thin, authenticated passthrough to the database that exists to be driven by a client library rather than by hand. A call carrying no `connection_id` runs and commits on its own; one carrying the pair from `connection/open` and `cursor/open` joins that transaction, which is what lets several calls be committed or rolled back together. A session no call has used for a while is closed, with its cursors and its uncommitted transaction: by default after 30 seconds, or 10 minutes while it has an open cursor or uncommitted work. A call that is still running keeps its session open however long it takes. A later call under a closed session's id starts a new, empty session under that id.
      tags:
      - Advanced
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/AdvancedRequest'
          application/x-www-form-urlencoded:
            schema:
              $ref: '#/components/schemas/AdvancedRequest'
          multipart/form-data:
            schema:
              $ref: '#/components/schemas/AdvancedRequest'
      security:
      - basicAuth: []
      - cookieAuth: []
      - tokenAuth: []
      - {}
      responses:
        '400':
          content:
            application/json:
              schema:
                type: object
                additionalProperties: {}
          description: 'The request could not be carried out as sent: a payload key
            missing or holding something this endpoint cannot use, a column name that
            is not a Postgres identifier, or a query the database refused. The body
            carries `reason` or `error` naming which.'
        '403':
          content:
            application/json:
              schema:
                type: object
                additionalProperties: {}
          description: 'Authenticated, but not permitted: the table belongs to somebody
            else, or is under embargo, or the operation needs a level of permission
            on it that this account does not hold.'
        '200':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/AdvancedResponse'
          description: The result of `set_isolation_level`, under `content`.
        '429':
          content:
            application/json:
              schema:
                type: object
                additionalProperties: {}
          description: 'This account (or, without a login, all anonymous clients together)
            already holds its limit of explicit sessions, the ones opened with `connection/open`.
            Only those count: a call carrying no `connection_id` does not take a place.
            `reason` names the limit and how to close sessions. No `Retry-After`:
            waiting helps only once a session is closed.'
        '503':
          content:
            application/json:
              schema:
                type: object
                additionalProperties: {}
          description: No database connection became free in time. Nothing is wrong
            with the request; retry after the `Retry-After` seconds.
  /api/v0/advanced/update:
    post:
      operationId: advanced_update_create
      description: |-
        Runs `data_update` against the OEDB.

        Part of the **advanced** interface: a thin, authenticated passthrough to the database that exists to be driven by a client library rather than by hand. A call carrying no `connection_id` runs and commits on its own; one carrying the pair from `connection/open` and `cursor/open` joins that transaction, which is what lets several calls be committed or rolled back together. A session no call has used for a while is closed, with its cursors and its uncommitted transaction: by default after 30 seconds, or 10 minutes while it has an open cursor or uncommitted work. A call that is still running keeps its session open however long it takes. A later call under a closed session's id starts a new, empty session under that id.
      tags:
      - Advanced
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/AdvancedRequest'
          application/x-www-form-urlencoded:
            schema:
              $ref: '#/components/schemas/AdvancedRequest'
          multipart/form-data:
            schema:
              $ref: '#/components/schemas/AdvancedRequest'
      security:
      - basicAuth: []
      - cookieAuth: []
      - tokenAuth: []
      - {}
      responses:
        '400':
          content:
            application/json:
              schema:
                type: object
                additionalProperties: {}
          description: 'The request could not be carried out as sent: a payload key
            missing or holding something this endpoint cannot use, a column name that
            is not a Postgres identifier, or a query the database refused. The body
            carries `reason` or `error` naming which.'
        '403':
          content:
            application/json:
              schema:
                type: object
                additionalProperties: {}
          description: 'Authenticated, but not permitted: the table belongs to somebody
            else, or is under embargo, or the operation needs a level of permission
            on it that this account does not hold.'
        '200':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/AdvancedResponse'
          description: The result of `data_update`, under `content`.
        '429':
          content:
            application/json:
              schema:
                type: object
                additionalProperties: {}
          description: 'This account (or, without a login, all anonymous clients together)
            already holds its limit of explicit sessions, the ones opened with `connection/open`.
            Only those count: a call carrying no `connection_id` does not take a place.
            `reason` names the limit and how to close sessions. No `Retry-After`:
            waiting helps only once a session is closed.'
        '503':
          content:
            application/json:
              schema:
                type: object
                additionalProperties: {}
          description: No database connection became free in time. Nothing is wrong
            with the request; retry after the `Retry-After` seconds.
  /api/v0/datasets/:
    get:
      operationId: datasets_list
      description: 'Every published dataset on the platform, plus the caller''s own
        drafts, by name, a page at a time. `mine` and `published` narrow that and
        never widen it: `mine=true&published=false` lists the caller''s drafts. Each
        item is a summary: the dataset''s read body without `metadata.resources`,
        plus `resource_count`. The resources themselves are on the dataset''s own
        read and its `resources/`. **Public.** A draft is visible only to its creator;
        nobody else finds it listed.'
      summary: List datasets
      parameters:
      - in: query
        name: mine
        schema:
          enum:
          - 'true'
          - 'false'
          type: string
          minLength: 1
        description: |-
          `true`: only the caller's own datasets, drafts included. Needs a login: asked anonymously it is a 401.

          * `true` - true
          * `false` - false
      - name: page
        required: false
        in: query
        description: A page number within the paginated result set.
        schema:
          type: integer
      - name: page_size
        required: false
        in: query
        description: 'How many per page: 20 if left out, at most 100.'
        schema:
          type: integer
      - in: query
        name: published
        schema:
          enum:
          - 'true'
          - 'false'
          type: string
          minLength: 1
        description: |-
          `true`: published datasets only. `false`: drafts only, which are only ever the caller's own, so none for an anonymous caller.

          * `true` - true
          * `false` - false
      tags:
      - Datasets
      security:
      - basicAuth: []
      - cookieAuth: []
      - tokenAuth: []
      - {}
      responses:
        '400':
          content:
            application/json:
              schema:
                type: object
                additionalProperties: {}
          description: 'A filter holds something other than `true` or `false`: DRF''s
            map names the parameter.'
        '401':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Refusal'
          description: '`mine=true`, asked without a login.'
        '404':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Refusal'
          description: 'No such page: `page` is past the last one, or not a number.'
        '200':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/PaginatedDatasetSummaryList'
          description: ''
    post:
      operationId: datasets_create
      description: Creates a catalogue entry that tables can then be assigned to.
        The name must be free; a taken one is refused naming the field. `topics` must
        name existing topics, and never the draft pseudo-topic; a 400 names any that
        do not. **Requires authentication.** The account that creates a dataset is
        its creator, the one who may change it. A new dataset is a draft, visible
        only to its creator until it is published.
      summary: Create a dataset
      tags:
      - Datasets
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/DatasetCreate'
            examples:
              DatasetExample:
                value:
                  name: test_dataset
                  title: Wind Power Dataset Germany
                  description: Contains hourly wind generation data for Germany.
                  at_id: https://example.org/datasets/test_dataset
                  topics:
                  - energy
                summary: Example request body for creating a dataset
                description: Use this JSON object to create a new dataset. The `at_id`
                  field is optional and can contain a persistent identifier; `topics`
                  is optional too.
          application/x-www-form-urlencoded:
            schema:
              $ref: '#/components/schemas/DatasetCreate'
          multipart/form-data:
            schema:
              $ref: '#/components/schemas/DatasetCreate'
        required: true
      security:
      - basicAuth: []
      - cookieAuth: []
      - tokenAuth: []
      responses:
        '400':
          content:
            application/json:
              schema:
                type: object
                additionalProperties: {}
          description: 'The request could not be carried out as sent: DRF''s map of
            each field to what is wrong with it -- an unknown topic or a taken name
            among them -- or `{"detail": ...}` when the body is not JSON. Nothing
            was written.'
        '401':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Refusal'
          description: No credentials, or credentials this platform does not know.
        '201':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/DatasetRead'
          description: ''
  /api/v0/datasets/{dataset_name}/:
    get:
      operationId: datasets_retrieve
      description: Returns a single dataset with its metadata. **Public.** A draft
        is visible only to its creator; anyone else gets 404, as for a name that does
        not exist.
      summary: Get dataset
      parameters:
      - in: path
        name: dataset_name
        schema:
          type: string
        description: 'The dataset''s name: its permanent identifier, fixed at creation.
          Names are global and are never reused.'
        required: true
      tags:
      - Datasets
      security:
      - basicAuth: []
      - cookieAuth: []
      - tokenAuth: []
      - {}
      responses:
        '404':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Refusal'
          description: 'No dataset of that name, or another user''s draft: the two
            answer alike, word for word.'
        '200':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/DatasetRead'
          description: ''
    patch:
      operationId: datasets_partial_update
      description: 'Changes the dataset''s title, description, `at_id` or topics.
        A key left out is left as it is: `topics` replaces the whole set (`[]` empties
        it), and an omitted `at_id` keeps the stored one. `name` is fixed at creation,
        so sending it is a 400, even unchanged. Topics must exist and may not be the
        draft pseudo-topic; a 400 names any that do not. An update that changes nothing
        writes nothing and leaves `modified_at` as it was. Answers with the dataset
        as it now is. `PUT` is not offered and answers 405. **Requires authentication**,
        and only the dataset''s creator may change it. A draft is visible only to
        its creator; anyone else gets 404, as for a name that does not exist.'
      summary: Update dataset
      parameters:
      - in: path
        name: dataset_name
        schema:
          type: string
        description: 'The dataset''s name: its permanent identifier, fixed at creation.
          Names are global and are never reused.'
        required: true
      tags:
      - Datasets
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/PatchedDatasetPatch'
            examples:
              UpdateDatasetExample:
                value:
                  title: Updated Wind Power Dataset Germany
                  topics:
                  - energy
                summary: Change the title and replace the topics
          application/x-www-form-urlencoded:
            schema:
              $ref: '#/components/schemas/PatchedDatasetPatch'
          multipart/form-data:
            schema:
              $ref: '#/components/schemas/PatchedDatasetPatch'
      security:
      - basicAuth: []
      - cookieAuth: []
      - tokenAuth: []
      responses:
        '400':
          content:
            application/json:
              schema:
                type: object
                additionalProperties: {}
          description: 'The request could not be carried out as sent: DRF''s map of
            each field to what is wrong with it -- an unknown topic or a taken name
            among them -- or `{"detail": ...}` when the body is not JSON. Nothing
            was written.'
        '401':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Refusal'
          description: No credentials, or credentials this platform does not know.
        '403':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Refusal'
          description: 'Authenticated, but the dataset is somebody else''s: only its
            creator may change it.'
        '404':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Refusal'
          description: 'No dataset of that name, or another user''s draft: the two
            answer alike, word for word.'
        '200':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/DatasetRead'
          description: ''
    delete:
      operationId: datasets_destroy
      description: Deletes the dataset. Its member tables are not deleted; they only
        leave it. The address is the confirmation a published dataset asks for, and
        a repeated delete is a 404. **Requires authentication**, and only the dataset's
        creator may change it. A draft is visible only to its creator; anyone else
        gets 404, as for a name that does not exist.
      summary: Delete dataset
      parameters:
      - in: path
        name: dataset_name
        schema:
          type: string
        description: 'The dataset''s name: its permanent identifier, fixed at creation.
          Names are global and are never reused.'
        required: true
      tags:
      - Datasets
      security:
      - basicAuth: []
      - cookieAuth: []
      - tokenAuth: []
      responses:
        '401':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Refusal'
          description: No credentials, or credentials this platform does not know.
        '403':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Refusal'
          description: 'Authenticated, but the dataset is somebody else''s: only its
            creator may change it.'
        '404':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Refusal'
          description: 'No dataset of that name, or another user''s draft: the two
            answer alike, word for word.'
        '204':
          description: Deleted. The body is empty.
  /api/v0/datasets/{dataset_name}/assign-tables/:
    post:
      operationId: datasets_assign_tables_create
      description: Assigns existing OEP tables to an existing dataset; the tables'
        topics are added to the dataset's. Any published table not under embargo may
        be assigned; a draft or embargoed table needs Data editor on it, and one that
        does not qualify refuses the whole request. A name that is no table is reported
        in `missing` rather than refused. At most 2,500 tables in one call. **Requires
        authentication**, and only the dataset's creator may change it. A draft is
        visible only to its creator; anyone else gets 404, as for a name that does
        not exist.
      summary: Assign tables to dataset
      parameters:
      - in: path
        name: dataset_name
        schema:
          type: string
        description: 'The dataset''s name: its permanent identifier, fixed at creation.
          Names are global and are never reused.'
        required: true
      tags:
      - Datasets
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/DatasetAssignTables'
            examples:
              AssignTablesExample:
                value:
                  tables:
                  - name: germany_wind_hourly
                  - name: germany_wind_daily
                summary: Example request body for assigning tables
          application/x-www-form-urlencoded:
            schema:
              $ref: '#/components/schemas/DatasetAssignTables'
          multipart/form-data:
            schema:
              $ref: '#/components/schemas/DatasetAssignTables'
        required: true
      security:
      - basicAuth: []
      - cookieAuth: []
      - tokenAuth: []
      responses:
        '401':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Refusal'
          description: No credentials, or credentials this platform does not know.
        '404':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Refusal'
          description: 'No dataset of that name, or another user''s draft: the two
            answer alike, word for word.'
        '200':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/DatasetAssigned'
          description: ''
        '400':
          content:
            application/json:
              schema:
                type: object
                additionalProperties: {}
          description: 'The table list is unusable, or names more than 2,500: DRF''s
            map of each field to what is wrong with it.'
        '403':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Refusal'
          description: Authenticated, but the dataset is somebody else's, or a table
            named is a draft or under embargo and the account holds no Data editor
            on it. Nothing was assigned.
  /api/v0/datasets/{dataset_name}/publish/:
    post:
      operationId: datasets_publish_create
      description: 'Publishes the dataset: it enters the catalogue and anyone may
        read it. The publish gate runs now and needs at least one member table and
        at least one topic; a dataset failing it is a 409 listing the failed checks
        in `failed`, and nothing is written. Members may be drafts or under embargo.
        Publishing a published dataset republishes it: the gate runs again and `published_at`
        becomes now. Never moves `modified_at`. No request body. **Requires authentication**,
        and only the dataset''s creator may change it. A draft is visible only to
        its creator; anyone else gets 404, as for a name that does not exist.'
      summary: Publish a dataset
      parameters:
      - in: path
        name: dataset_name
        schema:
          type: string
        description: 'The dataset''s name: its permanent identifier, fixed at creation.
          Names are global and are never reused.'
        required: true
      tags:
      - Datasets
      security:
      - basicAuth: []
      - cookieAuth: []
      - tokenAuth: []
      responses:
        '401':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Refusal'
          description: No credentials, or credentials this platform does not know.
        '403':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Refusal'
          description: 'Authenticated, but the dataset is somebody else''s: only its
            creator may change it.'
        '404':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Refusal'
          description: 'No dataset of that name, or another user''s draft: the two
            answer alike, word for word.'
        '409':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/PublishGateRefusal'
          description: The dataset does not pass the publish gate, which needs at
            least one member table and at least one topic. Nothing was written.
        '200':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/DatasetRead'
          description: ''
  /api/v0/datasets/{dataset_name}/resources/:
    get:
      operationId: datasets_resources_list
      description: Returns the tables/resources that belong to a dataset, by name,
        a page at a time. **Public.** A draft is visible only to its creator; anyone
        else gets 404, as for a name that does not exist.
      summary: List dataset resources
      parameters:
      - in: path
        name: dataset_name
        schema:
          type: string
        description: 'The dataset''s name: its permanent identifier, fixed at creation.
          Names are global and are never reused.'
        required: true
      - name: page
        required: false
        in: query
        description: A page number within the paginated result set.
        schema:
          type: integer
      - name: page_size
        required: false
        in: query
        description: 'How many per page: 20 if left out, at most 100.'
        schema:
          type: integer
      tags:
      - Datasets
      security:
      - basicAuth: []
      - cookieAuth: []
      - tokenAuth: []
      - {}
      responses:
        '404':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Refusal'
          description: 'No dataset of that name, or another user''s draft: the two
            answer alike, word for word. No such page: `page` is past the last one,
            or not a number.'
        '200':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/PaginatedDatasetResourceList'
          description: ''
  /api/v0/datasets/{dataset_name}/unassign-tables/:
    post:
      operationId: datasets_unassign_tables_create
      description: Removes the named tables from the dataset. The tables are not deleted
        -- a dataset is a catalogue entry, and leaving it is not leaving the platform.
        A name the dataset does not hold is reported in `missing` rather than refused,
        so a repeated call is safe. The dataset's topics stay as they are. At most
        2,500 tables in one call. **Requires authentication**, and only the dataset's
        creator may change it. A draft is visible only to its creator; anyone else
        gets 404, as for a name that does not exist.
      summary: Unassign tables from a dataset
      parameters:
      - in: path
        name: dataset_name
        schema:
          type: string
        description: 'The dataset''s name: its permanent identifier, fixed at creation.
          Names are global and are never reused.'
        required: true
      tags:
      - Datasets
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/DatasetAssignTables'
          application/x-www-form-urlencoded:
            schema:
              $ref: '#/components/schemas/DatasetAssignTables'
          multipart/form-data:
            schema:
              $ref: '#/components/schemas/DatasetAssignTables'
        required: true
      security:
      - basicAuth: []
      - cookieAuth: []
      - tokenAuth: []
      responses:
        '401':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Refusal'
          description: No credentials, or credentials this platform does not know.
        '403':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Refusal'
          description: 'Authenticated, but the dataset is somebody else''s: only its
            creator may change it.'
        '404':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Refusal'
          description: 'No dataset of that name, or another user''s draft: the two
            answer alike, word for word.'
        '200':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/DatasetUnassigned'
          description: ''
        '400':
          content:
            application/json:
              schema:
                type: object
                additionalProperties: {}
          description: 'The table list is unusable, or names more than 2,500: DRF''s
            map of each field to what is wrong with it.'
  /api/v0/datasets/{dataset_name}/unpublish/:
    post:
      operationId: datasets_unpublish_create
      description: 'Returns the dataset to draft: it leaves the catalogue, other users
        get 404 for it, and scenario citations of it stop resolving. Always allowed
        for the creator; unpublishing a draft succeeds and writes nothing. Never moves
        `modified_at`. No request body. **Requires authentication**, and only the
        dataset''s creator may change it. A draft is visible only to its creator;
        anyone else gets 404, as for a name that does not exist.'
      summary: Unpublish a dataset
      parameters:
      - in: path
        name: dataset_name
        schema:
          type: string
        description: 'The dataset''s name: its permanent identifier, fixed at creation.
          Names are global and are never reused.'
        required: true
      tags:
      - Datasets
      security:
      - basicAuth: []
      - cookieAuth: []
      - tokenAuth: []
      responses:
        '401':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Refusal'
          description: No credentials, or credentials this platform does not know.
        '403':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Refusal'
          description: 'Authenticated, but the dataset is somebody else''s: only its
            creator may change it.'
        '404':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Refusal'
          description: 'No dataset of that name, or another user''s draft: the two
            answer alike, word for word.'
        '200':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/DatasetRead'
          description: ''
  /api/v0/datasets/list_all/scenario/:
    get:
      operationId: datasets_list_all_scenario_list
      description: |-
        Used for the scenario bundles react app to be able to populate
        form select options with existing datasets from scenario topic.
      tags:
      - Tables
      security:
      - basicAuth: []
      - cookieAuth: []
      - tokenAuth: []
      - {}
      responses:
        '200':
          content:
            application/json:
              schema:
                type: array
                items:
                  $ref: '#/components/schemas/ScenarioDataTables'
          description: ''
  /api/v0/db/table-sizes/:
    get:
      operationId: db_table_sizes_retrieve
      description: How much space tables take in the database. Without `table` this
        lists every table; with one it describes that table in detail.
      summary: Table sizes
      parameters:
      - in: query
        name: table
        schema:
          type: string
        description: One table's name. Omit it for the whole list.
      tags:
      - Tables
      security:
      - basicAuth: []
      - cookieAuth: []
      - tokenAuth: []
      - {}
      responses:
        '404':
          content:
            application/json:
              schema:
                type: object
                additionalProperties: {}
          description: No table of that name on this platform.
        '200':
          content:
            application/json:
              schema:
                type: object
                additionalProperties: {}
          description: The sizes.
  /api/v0/factsheet/frameworks/:
    get:
      operationId: factsheet_frameworks_list
      description: |-
        Used for the scenario bundles react app to be able to select a existing
        framework or model factsheet.
      tags:
      - Factsheets
      security:
      - basicAuth: []
      - cookieAuth: []
      - tokenAuth: []
      - {}
      responses:
        '200':
          content:
            application/json:
              schema:
                type: array
                items:
                  $ref: '#/components/schemas/Energyframework'
          description: ''
  /api/v0/factsheet/models/:
    get:
      operationId: factsheet_models_list
      description: |-
        Used for the scenario bundles react app to be able to select a existing
        framework or model factsheet.
      tags:
      - Factsheets
      security:
      - basicAuth: []
      - cookieAuth: []
      - tokenAuth: []
      - {}
      responses:
        '200':
          content:
            application/json:
              schema:
                type: array
                items:
                  $ref: '#/components/schemas/Energymodel'
          description: ''
  /api/v0/oekg/sparql/:
    post:
      operationId: oekg_sparql_create
      description: |-
        Hands a query to the graph store and returns what comes back. **Reads only**: a query that would update or delete is refused whatever the caller's permissions, so this is not a way to write to the graph. The scenario-bundle endpoints are, and they validate what they write against the OEKG shape.

        Authenticated by token. A `format` other than `json` is returned with the store's own content type rather than parsed.
      summary: Query the OEKG with SPARQL
      tags:
      - OEKG SPARQL
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/Sparql'
          application/x-www-form-urlencoded:
            schema:
              $ref: '#/components/schemas/Sparql'
          multipart/form-data:
            schema:
              $ref: '#/components/schemas/Sparql'
        required: true
      security:
      - tokenAuth: []
      responses:
        '400':
          content:
            application/json:
              schema:
                type: object
                additionalProperties: {}
          description: 'The request could not be carried out as sent: a payload key
            missing or holding something this endpoint cannot use, a column name that
            is not a Postgres identifier, or a query the database refused. The body
            carries `reason` or `error` naming which.'
        '401':
          content:
            application/json:
              schema:
                type: object
                additionalProperties: {}
          description: No credentials, or credentials this platform does not know.
        '200':
          content:
            application/json:
              schema:
                type: object
                additionalProperties: {}
          description: The store's answer, in the format asked for.
  /api/v0/organizations/{organization}/table-permissions/remove/:
    post:
      operationId: organizations_table_permissions_remove
      description: 'Takes the organization''s role away on every Table named, in one
        transaction: all of them or none. A Table where it holds no role is listed
        under `unchanged`, so sending the same request again succeeds. Refused when
        the organization''s old Admin grant is a Table''s only Admin; asks for `confirm`
        first when the caller would lose their own access to, or Admin on, a Table.
        Needs no membership of the organization, but Table admin on every Table: Admin,
        directly or through an organization, or platform admin. At most 2,500 Tables
        per request.'
      summary: Remove an organization from many tables
      parameters:
      - in: path
        name: organization
        schema:
          type: integer
        description: The organization, by id.
        required: true
      tags:
      - 'Tables: permissions'
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/BulkRemove'
          application/x-www-form-urlencoded:
            schema:
              $ref: '#/components/schemas/BulkRemove'
          multipart/form-data:
            schema:
              $ref: '#/components/schemas/BulkRemove'
        required: true
      security:
      - basicAuth: []
      - cookieAuth: []
      - tokenAuth: []
      - {}
      responses:
        '401':
          content:
            application/json:
              schema:
                type: object
                additionalProperties: {}
          description: No credentials, or credentials this platform does not know.
        '200':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/BulkResult'
          description: What was written.
        '400':
          content:
            application/json:
              schema:
                type: object
                additionalProperties: {}
          description: Nothing was written. `tables` was not a list of table names,
            named more tables than one request takes (`reason` gives the limit), or
            `level` is not a role an organization may be given; or, for a share, the
            caller is not a member of the organization. `field` names the input.
        '403':
          content:
            application/json:
              schema:
                type: object
                additionalProperties: {}
          description: Not a Table admin on every Table named. `tables` lists those
            it is not; nothing was written.
        '404':
          content:
            application/json:
              schema:
                type: object
                additionalProperties: {}
          description: No organization of that id, or a named Table does not exist
            (`tables` lists them). Nothing was written.
        '409':
          content:
            application/json:
              schema:
                type: object
                additionalProperties: {}
          description: 'Nothing was written, and `code` says why; `tables` names the
            Tables. `last_admin`: the organization''s old Admin grant is the only
            Admin there -- give someone Admin first; confirming does not change this
            answer. `confirmation_needed`: the removal would take the caller''s own
            access to, or Admin on, these Tables; send the same request again with
            `confirm` holding those `tables`.'
  /api/v0/organizations/{organization}/table-permissions/share/:
    post:
      operationId: organizations_table_permissions_share
      description: 'Gives the organization the role on every Table named, in one transaction:
        all of them or none. A share only ever raises a role: where the organization
        holds that role or more already (an old Admin grant included), the Table is
        left as it is and listed under `unchanged`. The caller must be a member of
        the organization and a Table admin on every Table: Admin, directly or through
        an organization, or platform admin. At most 2,500 Tables per request.'
      summary: Share many tables with an organization
      parameters:
      - in: path
        name: organization
        schema:
          type: integer
        description: The organization, by id.
        required: true
      tags:
      - 'Tables: permissions'
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/BulkShare'
          application/x-www-form-urlencoded:
            schema:
              $ref: '#/components/schemas/BulkShare'
          multipart/form-data:
            schema:
              $ref: '#/components/schemas/BulkShare'
        required: true
      security:
      - basicAuth: []
      - cookieAuth: []
      - tokenAuth: []
      - {}
      responses:
        '401':
          content:
            application/json:
              schema:
                type: object
                additionalProperties: {}
          description: No credentials, or credentials this platform does not know.
        '200':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/BulkResult'
          description: What was written.
        '400':
          content:
            application/json:
              schema:
                type: object
                additionalProperties: {}
          description: Nothing was written. `tables` was not a list of table names,
            named more tables than one request takes (`reason` gives the limit), or
            `level` is not a role an organization may be given; or, for a share, the
            caller is not a member of the organization. `field` names the input.
        '403':
          content:
            application/json:
              schema:
                type: object
                additionalProperties: {}
          description: Not a Table admin on every Table named. `tables` lists those
            it is not; nothing was written.
        '404':
          content:
            application/json:
              schema:
                type: object
                additionalProperties: {}
          description: No organization of that id, or a named Table does not exist
            (`tables` lists them). Nothing was written.
  /api/v0/scenario-bundle/scenario/manage-datasets/:
    post:
      operationId: scenario_bundle_scenario_manage_datasets_create
      description: '**Superseded** by the scenario-bundle dataset-link endpoints under
        `/api/v0/scenario-bundles/<uid>/scenarios/<sid>/datasets/`, which validate
        what they write against the OEKG shape and say on every read whether a citation
        still resolves. This route writes predicates the canonical shape does not
        validate; it is kept for scripts written against it before that API existed.'
      summary: Attach datasets to a scenario (superseded)
      tags:
      - Scenario Bundles (legacy)
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/ScenarioBundleScenarioDataset'
          application/x-www-form-urlencoded:
            schema:
              $ref: '#/components/schemas/ScenarioBundleScenarioDataset'
          multipart/form-data:
            schema:
              $ref: '#/components/schemas/ScenarioBundleScenarioDataset'
        required: true
      security:
      - basicAuth: []
      - cookieAuth: []
      - tokenAuth: []
      responses:
        '400':
          content:
            application/json:
              schema:
                type: object
                additionalProperties: {}
          description: 'The request could not be carried out as sent: a payload key
            missing or holding something this endpoint cannot use, a column name that
            is not a Postgres identifier, or a query the database refused. The body
            carries `reason` or `error` naming which.'
        '401':
          content:
            application/json:
              schema:
                type: object
                additionalProperties: {}
          description: No credentials, or credentials this platform does not know.
        '403':
          content:
            application/json:
              schema:
                type: object
                additionalProperties: {}
          description: 'Authenticated, but not permitted: the table belongs to somebody
            else, or is under embargo, or the operation needs a level of permission
            on it that this account does not hold.'
        '200':
          content:
            application/json:
              schema:
                type: object
                additionalProperties: {}
          description: What was attached.
  /api/v0/scenario-bundles/:
    get:
      operationId: scenario_bundles_list
      description: |-
        A page of summaries: identifier, acronym, label, version and counts.

        Not bundles. A listing that returned whole bundles would carry every
        client the whole corpus, and would drag the relational resolution a
        dataset link needs across every link of every bundle on a public
        endpoint -- which is how the two listings next door on this platform
        became unusable.

        `?acronym=` is the filter the contract depends on: it is how a pipeline
        holding no state between runs finds its own bundle again, and the
        `_meta` it gets back carries the version its next write must send.

        **Public.** No authentication is required, and sending credentials changes nothing about the answer. The OEKG SPARQL endpoint already serves the same data, so a token here would protect nothing while making published research records awkward to read. (The reference page draws a **closed** padlock here. It marks a security requirement the reader already meets, not a protected endpoint -- on that page the closed padlock is the public one.)
      parameters:
      - in: query
        name: acronym
        schema:
          type: string
        description: 'Only the bundle carrying exactly this acronym. **The filter
          the contract depends on**: it is how a pipeline holding no state between
          runs finds its own bundle again, and the `_meta` it gets back carries the
          version its next write has to send.'
      - in: query
        name: author
        schema:
          type: string
        description: The IRI of an author of one of a bundle's study reports. Repeating
          this parameter widens it; different parameters narrow each other, which
          is what a faceted interface means by ticking two boxes in one facet.
      - in: query
        name: descriptor
        schema:
          type: string
        description: The IRI of a descriptor a bundle is tagged with. Repeating this
          parameter widens it; different parameters narrow each other, which is what
          a faceted interface means by ticking two boxes in one facet.
      - in: query
        name: funder
        schema:
          type: string
        description: The IRI of a funder a bundle names. Repeating this parameter
          widens it; different parameters narrow each other, which is what a faceted
          interface means by ticking two boxes in one facet.
      - in: query
        name: organisation
        schema:
          type: string
        description: The IRI of an organisation a bundle names. Repeating this parameter
          widens it; different parameters narrow each other, which is what a faceted
          interface means by ticking two boxes in one facet.
      - in: query
        name: page
        schema:
          type: integer
        description: Which page of the result to return. 1-based.
      - in: query
        name: page_size
        schema:
          type: integer
        description: 'How many entries a page holds. Defaults to 25 and is capped
          at 100: this endpoint is public, and no public collection here has an unbounded
          mode.'
      - in: query
        name: published_from
        schema:
          type: integer
        description: Bundles with a study report published in this year or later.
          Either end of the range may be given alone.
      - in: query
        name: published_to
        schema:
          type: integer
        description: Bundles with a study report published in this year or earlier.
          Either end of the range may be given alone.
      - in: query
        name: year_from
        schema:
          type: integer
        description: Bundles with a scenario year at or after this. Either end of
          the range may be given alone.
      - in: query
        name: year_to
        schema:
          type: integer
        description: Bundles with a scenario year at or before this. Either end of
          the range may be given alone.
      tags:
      - Scenario Bundles
      security:
      - basicAuth: []
      - cookieAuth: []
      - tokenAuth: []
      - {}
      responses:
        '400':
          content:
            application/json:
              schema:
                type: object
                additionalProperties: {}
          description: Refused, and **nothing was written**. The body is either `detail`
            with one sentence, or -- when the payload failed the serializer -- a map
            from field name to what was wrong with it. The payload named a key the
            closed bundle shape does not have, or a value the shape's own `sh:in`
            list does not allow, or the change would introduce a violation of the
            OEKG shape -- `violations` then names them, and `pre_existing_violations`
            counts the ones this write is not blamed for. A write is judged by what
            it *introduces*, so a bundle that was already non-conforming can still
            be repaired through this API.
        '429':
          content:
            application/json:
              schema:
                type: object
                additionalProperties: {}
          description: Throttled. These endpoints are public to read, so they carry
            a ceiling for anonymous callers and a separate one per account. `Retry-After`
            says how long to wait.
        '503':
          content:
            application/json:
              schema:
                type: object
                additionalProperties: {}
          description: 'The OEKG graph store could not be reached, or the shape this
            API validates against is not installed on this server. Neither is an answer
            about the bundle: nothing was read and nothing was written.'
        '200':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ScenarioBundleSummaryPage'
          description: 'A page of summaries. Each carries the two fields a human recognises
            a bundle by at the top level -- `label` and `acronym` -- and everything
            a client cannot write in `_meta`: the identifier, the version, and the
            number of scenarios and study reports the bundle holds.'
    post:
      operationId: scenario_bundles_create
      description: |-
        Create a whole scenario bundle, its scenarios and study reports with it.

        Nothing is written until the payload has been checked for structure,
        the acronym for uniqueness and the assembled **post-state** against the
        OEKG shape -- so an invalid payload leaves the graph untouched, not
        mostly untouched. The write itself is one request, which the store
        makes one transaction, and the acronym check is bound inside it: two
        concurrent creates cannot both take an acronym they both found free.

        **The server mints the identifier.** A client sends none anywhere in
        this API, and `uid` is a rejected key rather than an ignored one. A
        pipeline that keeps no state re-identifies its bundle afterwards with
        `GET /api/v0/scenario-bundles/?acronym=...`.

        Nested `scenarios` and `study_reports` are accepted here and on the
        replace endpoint, and nowhere else: a `PATCH` refuses them, so no
        single call can drop a bundle's parts by omitting them. A scenario's
        `datasets` nest one level deeper, inside it, which is where the shape
        hangs them -- so one call creates a bundle, its scenarios and the data
        each of them cites.

        Unlike every other write, a create is judged strictly: there is no
        pre-state, so there is nothing it can have inherited and every
        violation of the shape is its own.

        **Requires authentication.** Any authenticated account may create a scenario bundle, and the account that creates one becomes its owner, which is what lets it write to the bundle afterwards. (The reference page draws an **open** padlock here. It marks a security requirement not yet met -- use *Authorize* -- not an unprotected endpoint.)
      tags:
      - Scenario Bundles
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/ScenarioBundleCreate'
          application/x-www-form-urlencoded:
            schema:
              $ref: '#/components/schemas/ScenarioBundleCreate'
          multipart/form-data:
            schema:
              $ref: '#/components/schemas/ScenarioBundleCreate'
        required: true
      security:
      - basicAuth: []
      - cookieAuth: []
      - tokenAuth: []
      responses:
        '400':
          content:
            application/json:
              schema:
                type: object
                additionalProperties: {}
          description: Refused, and **nothing was written**. The body is either `detail`
            with one sentence, or -- when the payload failed the serializer -- a map
            from field name to what was wrong with it. The payload named a key the
            closed bundle shape does not have, or a value the shape's own `sh:in`
            list does not allow, or the change would introduce a violation of the
            OEKG shape -- `violations` then names them, and `pre_existing_violations`
            counts the ones this write is not blamed for. A write is judged by what
            it *introduces*, so a bundle that was already non-conforming can still
            be repaired through this API.
        '401':
          content:
            application/json:
              schema:
                type: object
                additionalProperties: {}
          description: No credentials, or credentials this platform does not recognise.
            Reads here need none; writes do.
        '409':
          content:
            application/json:
              schema:
                type: object
                additionalProperties: {}
          description: 'Another bundle already has this acronym, so nothing was written.
            The acronym is how a stateless pipeline finds its own bundle again, so
            two bundles sharing one is not untidy: it is a pipeline writing into a
            stranger''s record.'
        '429':
          content:
            application/json:
              schema:
                type: object
                additionalProperties: {}
          description: Throttled. These endpoints are public to read, so they carry
            a ceiling for anonymous callers and a separate one per account. `Retry-After`
            says how long to wait.
        '503':
          content:
            application/json:
              schema:
                type: object
                additionalProperties: {}
          description: 'The OEKG graph store could not be reached, or the shape this
            API validates against is not installed on this server. Neither is an answer
            about the bundle: nothing was read and nothing was written.'
        '201':
          headers:
            ETag:
              schema:
                type: string
              description: The bundle's current version. Send it back in `If-Match`
                on the next write. It is returned on **every** response that carries
                one, writes included, so a pipeline reads once per run and chains
                its writes; only a lost response forces a re-read. A sub-resource
                has no version of its own -- the tag here is always the containing
                bundle's.
            Location:
              schema:
                type: string
              description: 'Where the created resource can be read. The identifier
                in it was minted by the server: this API accepts none from a client.'
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ScenarioBundleRead'
          description: Created. The body is the bundle as it now stands -- exactly
            what a write accepts, plus `_meta`. `Location` names its URL and `ETag`
            the version the next write has to send back.
  /api/v0/scenario-bundles/{uid}/:
    get:
      operationId: scenario_bundles_retrieve
      description: |-
        Read one bundle, publicly.

        Everything the bundle holds is in this body -- its scenarios, their
        study reports, and the dataset links each scenario cites -- so a client
        can send it straight back to `POST` or to `replace/` without stripping
        anything. Links carry their own URL as well; nesting them here is what
        makes a read round-trippable, and `replace` is the endpoint that turns
        that into a requirement.

        **Public.** No authentication is required, and sending credentials changes nothing about the answer. The OEKG SPARQL endpoint already serves the same data, so a token here would protect nothing while making published research records awkward to read. (The reference page draws a **closed** padlock here. It marks a security requirement the reader already meets, not a protected endpoint -- on that page the closed padlock is the public one.)
      parameters:
      - in: query
        name: expand
        schema:
          type: string
          enum:
          - labels
        description: '`labels` resolves the ontology terms this resource picks into
          `_meta.labels`, from a small label subset rather than the full OEO. A value
          this endpoint does not offer is refused with `400` rather than ignored,
          and the refusal happens before anything is written, so nothing was written
          when one arrives. Values are comma-separated, which matters once an endpoint
          offers two; none offers two yet, and the enum says which one it offers.'
      - in: query
        name: format
        schema:
          type: string
          enum:
          - json
          - json-ld
          - turtle
      - in: path
        name: uid
        schema:
          type: string
        description: The scenario bundle's identifier, as minted by the server on
          create and returned in `_meta.uid`. A pipeline holding no state finds it
          again with `GET /api/v0/scenario-bundles/?acronym=...`.
        required: true
      tags:
      - Scenario Bundles
      security:
      - basicAuth: []
      - cookieAuth: []
      - tokenAuth: []
      - {}
      responses:
        '400':
          content:
            application/json:
              schema:
                type: object
                additionalProperties: {}
          description: Refused, and **nothing was written**. The body is either `detail`
            with one sentence, or -- when the payload failed the serializer -- a map
            from field name to what was wrong with it. The payload named a key the
            closed bundle shape does not have, or a value the shape's own `sh:in`
            list does not allow, or the change would introduce a violation of the
            OEKG shape -- `violations` then names them, and `pre_existing_violations`
            counts the ones this write is not blamed for. A write is judged by what
            it *introduces*, so a bundle that was already non-conforming can still
            be repaired through this API.
        '404':
          content:
            application/json:
              schema:
                type: object
                additionalProperties: {}
          description: No such scenario bundle, or no such resource within it.
        '429':
          content:
            application/json:
              schema:
                type: object
                additionalProperties: {}
          description: Throttled. These endpoints are public to read, so they carry
            a ceiling for anonymous callers and a separate one per account. `Retry-After`
            says how long to wait.
        '503':
          content:
            application/json:
              schema:
                type: object
                additionalProperties: {}
          description: 'The OEKG graph store could not be reached, or the shape this
            API validates against is not installed on this server. Neither is an answer
            about the bundle: nothing was read and nothing was written.'
        '200':
          headers:
            ETag:
              schema:
                type: string
              description: The bundle's current version. Send it back in `If-Match`
                on the next write. It is returned on **every** response that carries
                one, writes included, so a pipeline reads once per run and chains
                its writes; only a lost response forces a re-read. A sub-resource
                has no version of its own -- the tag here is always the containing
                bundle's.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ScenarioBundleRead'
            text/turtle:
              schema:
                $ref: '#/components/schemas/ScenarioBundleRead'
            application/ld+json:
              schema:
                $ref: '#/components/schemas/ScenarioBundleRead'
          description: 'The bundle: exactly what a write accepts, plus `_meta`, with
            its scenarios and study reports nested so that a client can send back
            what it read without stripping anything. `ETag` carries the version the
            next write has to send. On `Accept: text/turtle` or `application/ld+json`
            the same bundle comes back as its stored subgraph instead; `expand` has
            nothing to do there, because triples are already what they are.'
    patch:
      operationId: scenario_bundles_partial_update
      description: |-
        Change the fields this payload names, and no others.

        A key the payload does not mention is **genuinely untouched** -- not
        read and written back -- which is also what stops an unrelated patch
        from re-minting every framework and model in the bundle. An empty list
        is how a multi-valued key is cleared, which is why omission cannot
        mean the same thing.

        Sub-resources are not accepted here, though a read nests them: a
        `PATCH` is partial by nature and nobody sends a whole read to one, so
        accepting `scenarios` would give a single call the power to drop a
        bundle's parts by omitting them. They have their own endpoints.

        A rename answers for the acronym's uniqueness the same way a create
        does, and for the same reason. A shared node -- a contact, an
        organisation, a funder, a region -- may be referenced by `iri` but
        never renamed: other bundles cite it, and one payload may not rewrite
        their labels.

        **This write is judged by what it introduces.** Most bundles in the
        graph were written by the browser and do not conform to the shape; a
        violation this payload did not add is not this caller's to answer for,
        and `pre_existing_violations` reports how many were found. Refusing
        them would make the missing fields -- which are what a human would add
        by patching -- unfixable through this API.

        **Requires authentication**, and only an owner of this scenario bundle may write to it -- a bundle with no recorded owner can be changed by an administrator only. Ownership is the bundle's, whatever part of it this operation names. (The reference page draws an **open** padlock here. It marks a security requirement not yet met -- use *Authorize* -- not an unprotected endpoint.)
      parameters:
      - in: header
        name: If-Match
        schema:
          type: string
        description: 'The entity tag of the bundle state this write applies to, as
          returned in `ETag` by the read it was built from. **Required, with no opt-out**:
          without it a client that has never heard of the header would overwrite a
          change made since it read, and neither party would be told. `*` is refused
          as an absent header rather than honoured as a wildcard, because it satisfies
          the letter of the precondition while withholding the one thing the precondition
          is for. A weak validator (`W/"4"`) and a bare number are both read as the
          version they plainly name.'
        required: true
      - in: path
        name: uid
        schema:
          type: string
        description: The scenario bundle's identifier, as minted by the server on
          create and returned in `_meta.uid`. A pipeline holding no state finds it
          again with `GET /api/v0/scenario-bundles/?acronym=...`.
        required: true
      tags:
      - Scenario Bundles
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/PatchedScenarioBundle'
          application/x-www-form-urlencoded:
            schema:
              $ref: '#/components/schemas/PatchedScenarioBundle'
          multipart/form-data:
            schema:
              $ref: '#/components/schemas/PatchedScenarioBundle'
      security:
      - basicAuth: []
      - cookieAuth: []
      - tokenAuth: []
      responses:
        '400':
          content:
            application/json:
              schema:
                type: object
                additionalProperties: {}
          description: Refused, and **nothing was written**. The body is either `detail`
            with one sentence, or -- when the payload failed the serializer -- a map
            from field name to what was wrong with it. The payload named a key the
            closed bundle shape does not have, or a value the shape's own `sh:in`
            list does not allow, or the change would introduce a violation of the
            OEKG shape -- `violations` then names them, and `pre_existing_violations`
            counts the ones this write is not blamed for. A write is judged by what
            it *introduces*, so a bundle that was already non-conforming can still
            be repaired through this API.
        '401':
          content:
            application/json:
              schema:
                type: object
                additionalProperties: {}
          description: No credentials, or credentials this platform does not recognise.
            Reads here need none; writes do.
        '403':
          content:
            application/json:
              schema:
                type: object
                additionalProperties: {}
          description: Authenticated, but not an owner of this scenario bundle. A
            bundle with no recorded owner is administrator-only.
        '404':
          content:
            application/json:
              schema:
                type: object
                additionalProperties: {}
          description: No such scenario bundle, or no such resource within it.
        '409':
          content:
            application/json:
              schema:
                type: object
                additionalProperties: {}
          description: Either the bundle moved between the read this write was prepared
            from and the write itself, or -- on a rename -- another bundle took the
            acronym. The guard carries both conditions, so this refusal names neither;
            the advice is the same for both. Nothing was written.
        '412':
          content:
            application/json:
              schema:
                type: object
                additionalProperties: {}
          description: '`If-Match` named a version, and it is not the current one.
            Nothing was written. The response says which version the bundle is at.'
        '428':
          content:
            application/json:
              schema:
                type: object
                additionalProperties: {}
          description: '`If-Match` was absent, so this write did not say which version
            it was editing and nothing was written. The response names the current
            entity tag to send.'
        '429':
          content:
            application/json:
              schema:
                type: object
                additionalProperties: {}
          description: Throttled. These endpoints are public to read, so they carry
            a ceiling for anonymous callers and a separate one per account. `Retry-After`
            says how long to wait.
        '503':
          content:
            application/json:
              schema:
                type: object
                additionalProperties: {}
          description: 'The OEKG graph store could not be reached, or the shape this
            API validates against is not installed on this server. Neither is an answer
            about the bundle: nothing was read and nothing was written.'
        '200':
          headers:
            ETag:
              schema:
                type: string
              description: The bundle's current version. Send it back in `If-Match`
                on the next write. It is returned on **every** response that carries
                one, writes included, so a pipeline reads once per run and chains
                its writes; only a lost response forces a re-read. A sub-resource
                has no version of its own -- the tag here is always the containing
                bundle's.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ScenarioBundleRead'
          description: Changed. The body is the bundle as it now stands and `ETag`
            is its new version -- so a pipeline chains writes without reading again.
    delete:
      operationId: scenario_bundles_destroy
      description: |-
        Delete this bundle, in the second of two steps.

        The first step is the read a client needs anyway: it returns the
        version to guard on and the acronym to retype. This step requires both,
        and they defend different accidents -- the version catches a bundle
        that changed since it was read, the acronym catches the wrong bundle
        entirely, which is the realistic failure for a pipeline looping over
        identifiers and the one a version cannot see.

        **The order of the refusals is the contract**, not an implementation
        detail: existence, then ownership, then the version, then the
        confirmation. A repeated delete therefore answers `404`, and a client
        may treat that as success. Answering `204` to it instead would swallow
        the wrong-identifier delete -- a bundle that is gone has no acronym
        left to check a confirmation against, so a blanket success would
        confirm anything.

        `200` with a body rather than `204`, as for a part: the typed
        containment walk can decide that a node another bundle still cites is
        unlinked rather than deleted, and no status code can say that.

        **Requires authentication**, and only an owner of this scenario bundle may write to it -- a bundle with no recorded owner can be changed by an administrator only. Ownership is the bundle's, whatever part of it this operation names. (The reference page draws an **open** padlock here. It marks a security requirement not yet met -- use *Authorize* -- not an unprotected endpoint.)
      parameters:
      - in: header
        name: If-Match
        schema:
          type: string
        description: 'The entity tag of the bundle state this write applies to, as
          returned in `ETag` by the read it was built from. **Required, with no opt-out**:
          without it a client that has never heard of the header would overwrite a
          change made since it read, and neither party would be told. `*` is refused
          as an absent header rather than honoured as a wildcard, because it satisfies
          the letter of the precondition while withholding the one thing the precondition
          is for. A weak validator (`W/"4"`) and a bare number are both read as the
          version they plainly name.'
        required: true
      - in: query
        name: confirm
        schema:
          type: string
        description: 'The bundle''s acronym, retyped. It guards the accident the version
          cannot: right verb, wrong identifier. Compared **exactly** -- normalising
          it away would let `api-test` confirm the deletion of `API-TEST`, which is
          the confusion the check exists to catch.'
        required: true
      - in: path
        name: uid
        schema:
          type: string
        description: The scenario bundle's identifier, as minted by the server on
          create and returned in `_meta.uid`. A pipeline holding no state finds it
          again with `GET /api/v0/scenario-bundles/?acronym=...`.
        required: true
      tags:
      - Scenario Bundles
      security:
      - basicAuth: []
      - cookieAuth: []
      - tokenAuth: []
      responses:
        '400':
          content:
            application/json:
              schema:
                type: object
                additionalProperties: {}
          description: 'The confirmation was missing, or was not this bundle''s acronym,
            so nothing was deleted. `400` rather than `412`: nothing here is a precondition
            on the bundle''s state, and it is exactly as the caller last read it.
            A bundle with no acronym at all cannot be confirmed and so cannot be deleted
            through this API -- give it one with a `PATCH` first.'
        '401':
          content:
            application/json:
              schema:
                type: object
                additionalProperties: {}
          description: No credentials, or credentials this platform does not recognise.
            Reads here need none; writes do.
        '403':
          content:
            application/json:
              schema:
                type: object
                additionalProperties: {}
          description: Authenticated, but not an owner of this scenario bundle. A
            bundle with no recorded owner is administrator-only.
        '404':
          content:
            application/json:
              schema:
                type: object
                additionalProperties: {}
          description: 'No such scenario bundle. A **repeated** delete answers this,
            and a client may treat it as success. `204` instead would swallow the
            wrong-identifier delete: a bundle that is gone has no acronym left to
            check a confirmation against, so a blanket success would confirm anything.'
        '409':
          content:
            application/json:
              schema:
                type: object
                additionalProperties: {}
          description: The bundle moved between the read this delete was prepared
            from and the delete itself, or something outside it started citing a node
            this delete was about to remove. Nothing was deleted. Read it again, check
            it is still the one you meant, and retry.
        '412':
          content:
            application/json:
              schema:
                type: object
                additionalProperties: {}
          description: '`If-Match` named a version, and it is not the current one.
            Nothing was written. The response says which version the bundle is at.'
        '428':
          content:
            application/json:
              schema:
                type: object
                additionalProperties: {}
          description: '`If-Match` was absent, so this write did not say which version
            it was editing and nothing was written. The response names the current
            entity tag to send.'
        '429':
          content:
            application/json:
              schema:
                type: object
                additionalProperties: {}
          description: Throttled. These endpoints are public to read, so they carry
            a ceiling for anonymous callers and a separate one per account. `Retry-After`
            says how long to wait.
        '503':
          content:
            application/json:
              schema:
                type: object
                additionalProperties: {}
          description: 'The OEKG graph store could not be reached, or the shape this
            API validates against is not installed on this server. Neither is an answer
            about the bundle: nothing was read and nothing was written.'
        '200':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/BundleRemoval'
          description: 'Deleted. The body names what was **deleted** and what was
            only **unlinked**, which no status code can say: a node another bundle
            still cites is kept and detached rather than destroyed. No `ETag`, because
            there is no bundle left to have a version. The bundle''s history survives
            and stays readable at its own URL -- one line saying who removed it, when,
            and under which acronym.'
  /api/v0/scenario-bundles/{uid}/history/:
    get:
      operationId: scenario_bundles_history_list
      description: |-
        Read one bundle's change history.

        **Public, but per bundle and paginated.** What makes a bundle read
        public does not transfer -- that rests on the SPARQL endpoint already
        serving the same data, and this is in no graph. What it exposes is not
        bundle content but who edited what, and when; a per-bundle log is a
        record about a bundle, while a global one would be a profile of a
        person's activity across the platform.

        **A deleted bundle's history is still readable**, and is the whole of
        what a whole-bundle delete leaves: one line saying who removed it, when,
        and under which acronym. So existence here means *in the graph or in
        this ledger*, and a bundle nobody ever wrote has neither.

        Two generations of entry share this endpoint. Rows written before this
        API existed carry `era` saying so, and no field-level summary: nothing
        recorded which fields they touched.

        **Public.** No authentication is required, and sending credentials changes nothing about the answer. The OEKG SPARQL endpoint already serves the same data, so a token here would protect nothing while making published research records awkward to read. (The reference page draws a **closed** padlock here. It marks a security requirement the reader already meets, not a protected endpoint -- on that page the closed padlock is the public one.)
      parameters:
      - in: query
        name: expand
        schema:
          type: string
          enum:
          - triples
        description: '`triples` adds the stored payload of each entry, so that a legible
          summary never becomes the only account. A value this endpoint does not offer
          is refused with `400` rather than ignored, and the refusal happens before
          anything is written, so nothing was written when one arrives. Values are
          comma-separated, which matters once an endpoint offers two; none offers
          two yet, and the enum says which one it offers.'
      - in: query
        name: page
        schema:
          type: integer
        description: Which page of the result to return. 1-based.
      - in: query
        name: page_size
        schema:
          type: integer
        description: 'How many entries a page holds. Defaults to 20 and is capped
          at 100: this endpoint is public, and no public collection here has an unbounded
          mode.'
      - in: path
        name: uid
        schema:
          type: string
        description: The scenario bundle's identifier, as minted by the server on
          create and returned in `_meta.uid`. A pipeline holding no state finds it
          again with `GET /api/v0/scenario-bundles/?acronym=...`.
        required: true
      tags:
      - Scenario Bundles
      security:
      - basicAuth: []
      - cookieAuth: []
      - tokenAuth: []
      - {}
      responses:
        '400':
          content:
            application/json:
              schema:
                type: object
                additionalProperties: {}
          description: Refused, and **nothing was written**. The body is either `detail`
            with one sentence, or -- when the payload failed the serializer -- a map
            from field name to what was wrong with it. The payload named a key the
            closed bundle shape does not have, or a value the shape's own `sh:in`
            list does not allow, or the change would introduce a violation of the
            OEKG shape -- `violations` then names them, and `pre_existing_violations`
            counts the ones this write is not blamed for. A write is judged by what
            it *introduces*, so a bundle that was already non-conforming can still
            be repaired through this API.
        '404':
          content:
            application/json:
              schema:
                type: object
                additionalProperties: {}
          description: No such scenario bundle, or no such resource within it.
        '429':
          content:
            application/json:
              schema:
                type: object
                additionalProperties: {}
          description: Throttled. These endpoints are public to read, so they carry
            a ceiling for anonymous callers and a separate one per account. `Retry-After`
            says how long to wait.
        '503':
          content:
            application/json:
              schema:
                type: object
                additionalProperties: {}
          description: 'The OEKG graph store could not be reached, or the shape this
            API validates against is not installed on this server. Neither is an answer
            about the bundle: nothing was read and nothing was written.'
        '200':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/BundleHistoryEntryPage'
          description: 'A page of entries, newest first -- a history is read from
            the present backwards. Each names the verb, the actor as a username, the
            resource, the versions either side of the write, and the fields that changed.
            `changes` is `null` rather than `[]` where there cannot be a summary:
            an empty list would say that nothing changed, and what is known is that
            nothing recorded *what* changed.'
  /api/v0/scenario-bundles/{uid}/replace/:
    post:
      operationId: scenario_bundles_replace_create
      description: |-
        Make this bundle be exactly what the payload declares.

        **This is the only endpoint in the API where leaving something out
        removes it.** Everywhere else a key a payload does not name is
        genuinely untouched; here the payload is the whole bundle, so a field
        it omits is emptied and a scenario, study report or dataset link it
        does not list is removed. What "removed" means is the same typed
        containment walk a `DELETE` uses: a node another bundle still cites is
        unlinked instead, and the answer names both sets.

        **A nested resource keeps its identity when it names one.** Send back
        the `_meta.uid` a read gave it and the existing scenario, report or
        link is updated in place; send none and a new one is created. This is
        the single place a client's `_meta` is read rather than ignored, and it
        is what the container was built for -- without it a re-import would
        delete and recreate every part of the bundle on every run, churning
        identifiers and filling the history with deletions nobody asked for.

        **Running it twice is free.** The second call finds nothing to change,
        writes nothing, leaves the version where it is and records no history
        entry -- so a pipeline that runs nightly does not accumulate a ledger
        of changes it never made.

        Anything in the bundle this API has no vocabulary for -- a predicate no
        field table names, a shared contact's own triples -- is left alone. A
        declaration in this API's vocabulary is a declaration about this API's
        vocabulary, and silence about something a client cannot send is not
        permission to delete it.

        **Requires authentication**, and only an owner of this scenario bundle may write to it -- a bundle with no recorded owner can be changed by an administrator only. Ownership is the bundle's, whatever part of it this operation names. (The reference page draws an **open** padlock here. It marks a security requirement not yet met -- use *Authorize* -- not an unprotected endpoint.)
      parameters:
      - in: header
        name: If-Match
        schema:
          type: string
        description: 'The entity tag of the bundle state this write applies to, as
          returned in `ETag` by the read it was built from. **Required, with no opt-out**:
          without it a client that has never heard of the header would overwrite a
          change made since it read, and neither party would be told. `*` is refused
          as an absent header rather than honoured as a wildcard, because it satisfies
          the letter of the precondition while withholding the one thing the precondition
          is for. A weak validator (`W/"4"`) and a bare number are both read as the
          version they plainly name.'
        required: true
      - in: query
        name: expand
        schema:
          type: string
          enum:
          - labels
        description: '`labels` resolves the ontology terms this resource picks into
          `_meta.labels`, from a small label subset rather than the full OEO. A value
          this endpoint does not offer is refused with `400` rather than ignored,
          and the refusal happens before anything is written, so nothing was written
          when one arrives. Values are comma-separated, which matters once an endpoint
          offers two; none offers two yet, and the enum says which one it offers.'
      - in: path
        name: uid
        schema:
          type: string
        description: The scenario bundle's identifier, as minted by the server on
          create and returned in `_meta.uid`. A pipeline holding no state finds it
          again with `GET /api/v0/scenario-bundles/?acronym=...`.
        required: true
      tags:
      - Scenario Bundles
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/ScenarioBundleReplace'
          application/x-www-form-urlencoded:
            schema:
              $ref: '#/components/schemas/ScenarioBundleReplace'
          multipart/form-data:
            schema:
              $ref: '#/components/schemas/ScenarioBundleReplace'
        required: true
      security:
      - basicAuth: []
      - cookieAuth: []
      - tokenAuth: []
      responses:
        '400':
          content:
            application/json:
              schema:
                type: object
                additionalProperties: {}
          description: 'Refused, and **nothing was written**. Besides the usual payload
            problems: the declaration named a nested scenario, study report or dataset
            link that is not in this bundle -- identifiers are matched, never created
            from -- or declared the same one twice. A replace is also judged by what
            it *introduces*, so dropping a field the bundle needed is refused while
            a violation it already carried is not blamed on this caller.'
        '401':
          content:
            application/json:
              schema:
                type: object
                additionalProperties: {}
          description: No credentials, or credentials this platform does not recognise.
            Reads here need none; writes do.
        '403':
          content:
            application/json:
              schema:
                type: object
                additionalProperties: {}
          description: Authenticated, but not an owner of this scenario bundle. A
            bundle with no recorded owner is administrator-only.
        '404':
          content:
            application/json:
              schema:
                type: object
                additionalProperties: {}
          description: No such scenario bundle, or no such resource within it.
        '409':
          content:
            application/json:
              schema:
                type: object
                additionalProperties: {}
          description: Either the bundle moved between the read this replace was prepared
            from and the write itself, another bundle holds the acronym declared,
            or something outside this bundle started citing a node the replace was
            about to remove. Nothing was written. Read it again, apply the declaration
            to what comes back, and retry.
        '412':
          content:
            application/json:
              schema:
                type: object
                additionalProperties: {}
          description: '`If-Match` named a version, and it is not the current one.
            Nothing was written. The response says which version the bundle is at.'
        '428':
          content:
            application/json:
              schema:
                type: object
                additionalProperties: {}
          description: '`If-Match` was absent, so this write did not say which version
            it was editing and nothing was written. The response names the current
            entity tag to send.'
        '429':
          content:
            application/json:
              schema:
                type: object
                additionalProperties: {}
          description: Throttled. These endpoints are public to read, so they carry
            a ceiling for anonymous callers and a separate one per account. `Retry-After`
            says how long to wait.
        '503':
          content:
            application/json:
              schema:
                type: object
                additionalProperties: {}
          description: 'The OEKG graph store could not be reached, or the shape this
            API validates against is not installed on this server. Neither is an answer
            about the bundle: nothing was read and nothing was written.'
        '200':
          headers:
            ETag:
              schema:
                type: string
              description: The bundle's current version. Send it back in `If-Match`
                on the next write. It is returned on **every** response that carries
                one, writes included, so a pipeline reads once per run and chains
                its writes; only a lost response forces a re-read. A sub-resource
                has no version of its own -- the tag here is always the containing
                bundle's.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ScenarioBundleReplaceRead'
          description: 'The bundle is now what the payload declared. The body is that
            bundle, in the form a write accepts it back, and `_meta.deleted` and `_meta.unlinked`
            say what the declaration removed -- a node another bundle still cites
            is detached rather than destroyed, which no status code can say. `ETag`
            is the new version, so a pipeline chains its next write without reading
            again. A replace that declared what was already there writes nothing:
            the version is unchanged, both lists are empty, and the history records
            nothing.'
  /api/v0/scenario-bundles/{uid}/scenarios/:
    get:
      operationId: scenario_bundles_scenarios_list
      description: |-
        List this bundle's parts of one kind.

        Paginated, although the collection is bounded by its bundle: this is a
        public endpoint and no public collection here has an unbounded mode.
        The nested form inside a bundle read is the exception, and a deliberate
        one -- that one has to be complete, because a client sends it back.

        **Public.** No authentication is required, and sending credentials changes nothing about the answer. The OEKG SPARQL endpoint already serves the same data, so a token here would protect nothing while making published research records awkward to read. (The reference page draws a **closed** padlock here. It marks a security requirement the reader already meets, not a protected endpoint -- on that page the closed padlock is the public one.)
      parameters:
      - in: query
        name: expand
        schema:
          type: string
          enum:
          - labels
        description: '`labels` resolves the ontology terms this resource picks into
          `_meta.labels`, from a small label subset rather than the full OEO. A value
          this endpoint does not offer is refused with `400` rather than ignored,
          and the refusal happens before anything is written, so nothing was written
          when one arrives. Values are comma-separated, which matters once an endpoint
          offers two; none offers two yet, and the enum says which one it offers.'
      - in: query
        name: page
        schema:
          type: integer
        description: Which page of the result to return. 1-based.
      - in: query
        name: page_size
        schema:
          type: integer
        description: 'How many entries a page holds. Defaults to 50 and is capped
          at 200: this endpoint is public, and no public collection here has an unbounded
          mode.'
      - in: path
        name: uid
        schema:
          type: string
        description: The scenario bundle's identifier, as minted by the server on
          create and returned in `_meta.uid`. A pipeline holding no state finds it
          again with `GET /api/v0/scenario-bundles/?acronym=...`.
        required: true
      tags:
      - Scenario Bundles
      security:
      - basicAuth: []
      - cookieAuth: []
      - tokenAuth: []
      - {}
      responses:
        '400':
          content:
            application/json:
              schema:
                type: object
                additionalProperties: {}
          description: Refused, and **nothing was written**. The body is either `detail`
            with one sentence, or -- when the payload failed the serializer -- a map
            from field name to what was wrong with it. The payload named a key the
            closed bundle shape does not have, or a value the shape's own `sh:in`
            list does not allow, or the change would introduce a violation of the
            OEKG shape -- `violations` then names them, and `pre_existing_violations`
            counts the ones this write is not blamed for. A write is judged by what
            it *introduces*, so a bundle that was already non-conforming can still
            be repaired through this API.
        '404':
          content:
            application/json:
              schema:
                type: object
                additionalProperties: {}
          description: No such scenario bundle, or no such resource within it.
        '429':
          content:
            application/json:
              schema:
                type: object
                additionalProperties: {}
          description: Throttled. These endpoints are public to read, so they carry
            a ceiling for anonymous callers and a separate one per account. `Retry-After`
            says how long to wait.
        '503':
          content:
            application/json:
              schema:
                type: object
                additionalProperties: {}
          description: 'The OEKG graph store could not be reached, or the shape this
            API validates against is not installed on this server. Neither is an answer
            about the bundle: nothing was read and nothing was written.'
        '200':
          headers:
            ETag:
              schema:
                type: string
              description: The bundle's current version. Send it back in `If-Match`
                on the next write. It is returned on **every** response that carries
                one, writes included, so a pipeline reads once per run and chains
                its writes; only a lost response forces a re-read. A sub-resource
                has no version of its own -- the tag here is always the containing
                bundle's.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ScenarioReadPage'
          description: A page of this bundle's scenario factsheets.
    post:
      operationId: scenario_bundles_scenarios_create
      description: |-
        Add one part to this bundle.

        The identifier is minted by the server, as everywhere in this API, and
        returned in `Location`. What is validated is the **whole bundle with
        this part in it**: every constraint in the OEKG shape is bundle-local,
        so a part on its own is not a unit the shape can judge, and validating
        one alone would pass vacuously in the places that matter.

        The version guarded, the ownership asked and the entity tag returned
        are all the bundle's. Two clients editing two different parts of one
        bundle therefore do conflict -- the price of one version per bundle,
        and deliberate: conflict granularity follows the aggregate root, and a
        part is not one.

        **Requires authentication**, and only an owner of this scenario bundle may write to it -- a bundle with no recorded owner can be changed by an administrator only. Ownership is the bundle's, whatever part of it this operation names. (The reference page draws an **open** padlock here. It marks a security requirement not yet met -- use *Authorize* -- not an unprotected endpoint.)
      parameters:
      - in: header
        name: If-Match
        schema:
          type: string
        description: 'The entity tag of the bundle state this write applies to, as
          returned in `ETag` by the read it was built from. **Required, with no opt-out**:
          without it a client that has never heard of the header would overwrite a
          change made since it read, and neither party would be told. `*` is refused
          as an absent header rather than honoured as a wildcard, because it satisfies
          the letter of the precondition while withholding the one thing the precondition
          is for. A weak validator (`W/"4"`) and a bare number are both read as the
          version they plainly name.'
        required: true
      - in: query
        name: expand
        schema:
          type: string
          enum:
          - labels
        description: '`labels` resolves the ontology terms this resource picks into
          `_meta.labels`, from a small label subset rather than the full OEO. A value
          this endpoint does not offer is refused with `400` rather than ignored,
          and the refusal happens before anything is written, so nothing was written
          when one arrives. Values are comma-separated, which matters once an endpoint
          offers two; none offers two yet, and the enum says which one it offers.'
      - in: path
        name: uid
        schema:
          type: string
        description: The scenario bundle's identifier, as minted by the server on
          create and returned in `_meta.uid`. A pipeline holding no state finds it
          again with `GET /api/v0/scenario-bundles/?acronym=...`.
        required: true
      tags:
      - Scenario Bundles
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/Scenario'
          application/x-www-form-urlencoded:
            schema:
              $ref: '#/components/schemas/Scenario'
          multipart/form-data:
            schema:
              $ref: '#/components/schemas/Scenario'
        required: true
      security:
      - basicAuth: []
      - cookieAuth: []
      - tokenAuth: []
      responses:
        '400':
          content:
            application/json:
              schema:
                type: object
                additionalProperties: {}
          description: Refused, and **nothing was written**. The body is either `detail`
            with one sentence, or -- when the payload failed the serializer -- a map
            from field name to what was wrong with it. The payload named a key the
            closed bundle shape does not have, or a value the shape's own `sh:in`
            list does not allow, or the change would introduce a violation of the
            OEKG shape -- `violations` then names them, and `pre_existing_violations`
            counts the ones this write is not blamed for. A write is judged by what
            it *introduces*, so a bundle that was already non-conforming can still
            be repaired through this API.
        '401':
          content:
            application/json:
              schema:
                type: object
                additionalProperties: {}
          description: No credentials, or credentials this platform does not recognise.
            Reads here need none; writes do.
        '403':
          content:
            application/json:
              schema:
                type: object
                additionalProperties: {}
          description: Authenticated, but not an owner of this scenario bundle. A
            bundle with no recorded owner is administrator-only.
        '404':
          content:
            application/json:
              schema:
                type: object
                additionalProperties: {}
          description: No such scenario bundle, or no such resource within it.
        '409':
          content:
            application/json:
              schema:
                type: object
                additionalProperties: {}
          description: The bundle moved between the read this write was prepared from
            and the write itself, so **nothing was written**. Read it again, apply
            the change to what comes back, and retry.
        '412':
          content:
            application/json:
              schema:
                type: object
                additionalProperties: {}
          description: '`If-Match` named a version, and it is not the current one.
            Nothing was written. The response says which version the bundle is at.'
        '428':
          content:
            application/json:
              schema:
                type: object
                additionalProperties: {}
          description: '`If-Match` was absent, so this write did not say which version
            it was editing and nothing was written. The response names the current
            entity tag to send.'
        '429':
          content:
            application/json:
              schema:
                type: object
                additionalProperties: {}
          description: Throttled. These endpoints are public to read, so they carry
            a ceiling for anonymous callers and a separate one per account. `Retry-After`
            says how long to wait.
        '503':
          content:
            application/json:
              schema:
                type: object
                additionalProperties: {}
          description: 'The OEKG graph store could not be reached, or the shape this
            API validates against is not installed on this server. Neither is an answer
            about the bundle: nothing was read and nothing was written.'
        '201':
          headers:
            ETag:
              schema:
                type: string
              description: The bundle's current version. Send it back in `If-Match`
                on the next write. It is returned on **every** response that carries
                one, writes included, so a pipeline reads once per run and chains
                its writes; only a lost response forces a re-read. A sub-resource
                has no version of its own -- the tag here is always the containing
                bundle's.
            Location:
              schema:
                type: string
              description: 'Where the created resource can be read. The identifier
                in it was minted by the server: this API accepts none from a client.'
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ScenarioRead'
          description: Created. The body is the scenario factsheet as it now stands,
            `Location` names its URL and `ETag` the **bundle's** new version.
  /api/v0/scenario-bundles/{uid}/scenarios/{pid}/:
    get:
      operationId: scenario_bundles_scenarios_retrieve
      description: |-
        Read one part of a bundle, publicly.

        **Public.** No authentication is required, and sending credentials changes nothing about the answer. The OEKG SPARQL endpoint already serves the same data, so a token here would protect nothing while making published research records awkward to read. (The reference page draws a **closed** padlock here. It marks a security requirement the reader already meets, not a protected endpoint -- on that page the closed padlock is the public one.)
      parameters:
      - in: query
        name: expand
        schema:
          type: string
          enum:
          - labels
        description: '`labels` resolves the ontology terms this resource picks into
          `_meta.labels`, from a small label subset rather than the full OEO. A value
          this endpoint does not offer is refused with `400` rather than ignored,
          and the refusal happens before anything is written, so nothing was written
          when one arrives. Values are comma-separated, which matters once an endpoint
          offers two; none offers two yet, and the enum says which one it offers.'
      - in: path
        name: pid
        schema:
          type: string
        description: The identifier of the part this address names -- a scenario factsheet
          or a study report, depending on the route.
        required: true
      - in: path
        name: uid
        schema:
          type: string
        description: The scenario bundle's identifier, as minted by the server on
          create and returned in `_meta.uid`. A pipeline holding no state finds it
          again with `GET /api/v0/scenario-bundles/?acronym=...`.
        required: true
      tags:
      - Scenario Bundles
      security:
      - basicAuth: []
      - cookieAuth: []
      - tokenAuth: []
      - {}
      responses:
        '400':
          content:
            application/json:
              schema:
                type: object
                additionalProperties: {}
          description: Refused, and **nothing was written**. The body is either `detail`
            with one sentence, or -- when the payload failed the serializer -- a map
            from field name to what was wrong with it. The payload named a key the
            closed bundle shape does not have, or a value the shape's own `sh:in`
            list does not allow, or the change would introduce a violation of the
            OEKG shape -- `violations` then names them, and `pre_existing_violations`
            counts the ones this write is not blamed for. A write is judged by what
            it *introduces*, so a bundle that was already non-conforming can still
            be repaired through this API.
        '404':
          content:
            application/json:
              schema:
                type: object
                additionalProperties: {}
          description: No such scenario bundle, or no such resource within it.
        '429':
          content:
            application/json:
              schema:
                type: object
                additionalProperties: {}
          description: Throttled. These endpoints are public to read, so they carry
            a ceiling for anonymous callers and a separate one per account. `Retry-After`
            says how long to wait.
        '503':
          content:
            application/json:
              schema:
                type: object
                additionalProperties: {}
          description: 'The OEKG graph store could not be reached, or the shape this
            API validates against is not installed on this server. Neither is an answer
            about the bundle: nothing was read and nothing was written.'
        '200':
          headers:
            ETag:
              schema:
                type: string
              description: The bundle's current version. Send it back in `If-Match`
                on the next write. It is returned on **every** response that carries
                one, writes included, so a pipeline reads once per run and chains
                its writes; only a lost response forces a re-read. A sub-resource
                has no version of its own -- the tag here is always the containing
                bundle's.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ScenarioRead'
          description: 'The scenario factsheet: what a write accepts, plus `_meta`.
            `ETag` carries the **bundle''s** version, which is what a write to this
            part has to send back.'
    patch:
      operationId: scenario_bundles_scenarios_partial_update
      description: |-
        Change the fields this payload names, without touching its siblings.

        A key the payload does not mention is genuinely untouched. The part's
        existence is checked **before** the precondition, so a request for a
        part that is not there hears that rather than being told its `If-Match`
        is missing for something that does not exist.

        Like every write here it is judged by what it **introduces**: a
        violation the bundle already carried is reported in
        `pre_existing_violations` and does not refuse the write.

        **Requires authentication**, and only an owner of this scenario bundle may write to it -- a bundle with no recorded owner can be changed by an administrator only. Ownership is the bundle's, whatever part of it this operation names. (The reference page draws an **open** padlock here. It marks a security requirement not yet met -- use *Authorize* -- not an unprotected endpoint.)
      parameters:
      - in: header
        name: If-Match
        schema:
          type: string
        description: 'The entity tag of the bundle state this write applies to, as
          returned in `ETag` by the read it was built from. **Required, with no opt-out**:
          without it a client that has never heard of the header would overwrite a
          change made since it read, and neither party would be told. `*` is refused
          as an absent header rather than honoured as a wildcard, because it satisfies
          the letter of the precondition while withholding the one thing the precondition
          is for. A weak validator (`W/"4"`) and a bare number are both read as the
          version they plainly name.'
        required: true
      - in: query
        name: expand
        schema:
          type: string
          enum:
          - labels
        description: '`labels` resolves the ontology terms this resource picks into
          `_meta.labels`, from a small label subset rather than the full OEO. A value
          this endpoint does not offer is refused with `400` rather than ignored,
          and the refusal happens before anything is written, so nothing was written
          when one arrives. Values are comma-separated, which matters once an endpoint
          offers two; none offers two yet, and the enum says which one it offers.'
      - in: path
        name: pid
        schema:
          type: string
        description: The identifier of the part this address names -- a scenario factsheet
          or a study report, depending on the route.
        required: true
      - in: path
        name: uid
        schema:
          type: string
        description: The scenario bundle's identifier, as minted by the server on
          create and returned in `_meta.uid`. A pipeline holding no state finds it
          again with `GET /api/v0/scenario-bundles/?acronym=...`.
        required: true
      tags:
      - Scenario Bundles
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/PatchedScenario'
          application/x-www-form-urlencoded:
            schema:
              $ref: '#/components/schemas/PatchedScenario'
          multipart/form-data:
            schema:
              $ref: '#/components/schemas/PatchedScenario'
      security:
      - basicAuth: []
      - cookieAuth: []
      - tokenAuth: []
      responses:
        '400':
          content:
            application/json:
              schema:
                type: object
                additionalProperties: {}
          description: Refused, and **nothing was written**. The body is either `detail`
            with one sentence, or -- when the payload failed the serializer -- a map
            from field name to what was wrong with it. The payload named a key the
            closed bundle shape does not have, or a value the shape's own `sh:in`
            list does not allow, or the change would introduce a violation of the
            OEKG shape -- `violations` then names them, and `pre_existing_violations`
            counts the ones this write is not blamed for. A write is judged by what
            it *introduces*, so a bundle that was already non-conforming can still
            be repaired through this API.
        '401':
          content:
            application/json:
              schema:
                type: object
                additionalProperties: {}
          description: No credentials, or credentials this platform does not recognise.
            Reads here need none; writes do.
        '403':
          content:
            application/json:
              schema:
                type: object
                additionalProperties: {}
          description: Authenticated, but not an owner of this scenario bundle. A
            bundle with no recorded owner is administrator-only.
        '404':
          content:
            application/json:
              schema:
                type: object
                additionalProperties: {}
          description: No such scenario bundle, or no such resource within it.
        '409':
          content:
            application/json:
              schema:
                type: object
                additionalProperties: {}
          description: The bundle moved between the read this write was prepared from
            and the write itself, so **nothing was written**. Read it again, apply
            the change to what comes back, and retry.
        '412':
          content:
            application/json:
              schema:
                type: object
                additionalProperties: {}
          description: '`If-Match` named a version, and it is not the current one.
            Nothing was written. The response says which version the bundle is at.'
        '428':
          content:
            application/json:
              schema:
                type: object
                additionalProperties: {}
          description: '`If-Match` was absent, so this write did not say which version
            it was editing and nothing was written. The response names the current
            entity tag to send.'
        '429':
          content:
            application/json:
              schema:
                type: object
                additionalProperties: {}
          description: Throttled. These endpoints are public to read, so they carry
            a ceiling for anonymous callers and a separate one per account. `Retry-After`
            says how long to wait.
        '503':
          content:
            application/json:
              schema:
                type: object
                additionalProperties: {}
          description: 'The OEKG graph store could not be reached, or the shape this
            API validates against is not installed on this server. Neither is an answer
            about the bundle: nothing was read and nothing was written.'
        '200':
          headers:
            ETag:
              schema:
                type: string
              description: The bundle's current version. Send it back in `If-Match`
                on the next write. It is returned on **every** response that carries
                one, writes included, so a pipeline reads once per run and chains
                its writes; only a lost response forces a re-read. A sub-resource
                has no version of its own -- the tag here is always the containing
                bundle's.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ScenarioRead'
          description: Changed. The body is the scenario factsheet as it now stands
            and `ETag` is the bundle's new version.
    delete:
      operationId: scenario_bundles_scenarios_destroy
      description: |-
        Remove this part, and with it what only it holds.

        The same order as a patch -- bundle, part, caller, precondition -- and
        the same write path, because a delete is a write like any other: it is
        validated against the shape, guarded on the bundle's version and
        recorded in the history. What differs is the arithmetic in front of it,
        which is `oekg.removal`'s.

        No retyped confirmation token, unlike the whole-bundle delete. Ceremony
        is proportional to blast radius: this removes one bounded part that can
        be created again, and the history says what it held.

        **Requires authentication**, and only an owner of this scenario bundle may write to it -- a bundle with no recorded owner can be changed by an administrator only. Ownership is the bundle's, whatever part of it this operation names. (The reference page draws an **open** padlock here. It marks a security requirement not yet met -- use *Authorize* -- not an unprotected endpoint.)
      parameters:
      - in: header
        name: If-Match
        schema:
          type: string
        description: 'The entity tag of the bundle state this write applies to, as
          returned in `ETag` by the read it was built from. **Required, with no opt-out**:
          without it a client that has never heard of the header would overwrite a
          change made since it read, and neither party would be told. `*` is refused
          as an absent header rather than honoured as a wildcard, because it satisfies
          the letter of the precondition while withholding the one thing the precondition
          is for. A weak validator (`W/"4"`) and a bare number are both read as the
          version they plainly name.'
        required: true
      - in: path
        name: pid
        schema:
          type: string
        description: The identifier of the part this address names -- a scenario factsheet
          or a study report, depending on the route.
        required: true
      - in: path
        name: uid
        schema:
          type: string
        description: The scenario bundle's identifier, as minted by the server on
          create and returned in `_meta.uid`. A pipeline holding no state finds it
          again with `GET /api/v0/scenario-bundles/?acronym=...`.
        required: true
      tags:
      - Scenario Bundles
      security:
      - basicAuth: []
      - cookieAuth: []
      - tokenAuth: []
      responses:
        '400':
          content:
            application/json:
              schema:
                type: object
                additionalProperties: {}
          description: Refused, and **nothing was written**. The body is either `detail`
            with one sentence, or -- when the payload failed the serializer -- a map
            from field name to what was wrong with it. The payload named a key the
            closed bundle shape does not have, or a value the shape's own `sh:in`
            list does not allow, or the change would introduce a violation of the
            OEKG shape -- `violations` then names them, and `pre_existing_violations`
            counts the ones this write is not blamed for. A write is judged by what
            it *introduces*, so a bundle that was already non-conforming can still
            be repaired through this API.
        '401':
          content:
            application/json:
              schema:
                type: object
                additionalProperties: {}
          description: No credentials, or credentials this platform does not recognise.
            Reads here need none; writes do.
        '403':
          content:
            application/json:
              schema:
                type: object
                additionalProperties: {}
          description: Authenticated, but not an owner of this scenario bundle. A
            bundle with no recorded owner is administrator-only.
        '404':
          content:
            application/json:
              schema:
                type: object
                additionalProperties: {}
          description: No such scenario bundle, or no such resource within it.
        '409':
          content:
            application/json:
              schema:
                type: object
                additionalProperties: {}
          description: The bundle moved between the read this write was prepared from
            and the write itself, so **nothing was written**. Read it again, apply
            the change to what comes back, and retry.
        '412':
          content:
            application/json:
              schema:
                type: object
                additionalProperties: {}
          description: '`If-Match` named a version, and it is not the current one.
            Nothing was written. The response says which version the bundle is at.'
        '428':
          content:
            application/json:
              schema:
                type: object
                additionalProperties: {}
          description: '`If-Match` was absent, so this write did not say which version
            it was editing and nothing was written. The response names the current
            entity tag to send.'
        '429':
          content:
            application/json:
              schema:
                type: object
                additionalProperties: {}
          description: Throttled. These endpoints are public to read, so they carry
            a ceiling for anonymous callers and a separate one per account. `Retry-After`
            says how long to wait.
        '503':
          content:
            application/json:
              schema:
                type: object
                additionalProperties: {}
          description: 'The OEKG graph store could not be reached, or the shape this
            API validates against is not installed on this server. Neither is an answer
            about the bundle: nothing was read and nothing was written.'
        '200':
          headers:
            ETag:
              schema:
                type: string
              description: The bundle's current version. Send it back in `If-Match`
                on the next write. It is returned on **every** response that carries
                one, writes included, so a pipeline reads once per run and chains
                its writes; only a lost response forces a re-read. A sub-resource
                has no version of its own -- the tag here is always the containing
                bundle's.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Removal'
          description: 'Removed. The body names what was **deleted** and what was
            only **unlinked**, which no status code can say: a node another bundle
            still cites is kept and detached rather than destroyed. Only the downgraded
            nodes are listed -- the shared regions, authors and ontology terms every
            delete detaches are the rule, not the news.'
  /api/v0/scenario-bundles/{uid}/scenarios/{sid}/datasets/:
    get:
      operationId: scenario_bundles_scenarios_datasets_list
      description: |-
        List this scenario's links to data on this platform.

        **Public.** No authentication is required, and sending credentials changes nothing about the answer. The OEKG SPARQL endpoint already serves the same data, so a token here would protect nothing while making published research records awkward to read. (The reference page draws a **closed** padlock here. It marks a security requirement the reader already meets, not a protected endpoint -- on that page the closed padlock is the public one.)
      parameters:
      - in: query
        name: expand
        schema:
          type: string
          enum:
          - labels
        description: '`labels` resolves the ontology terms this resource picks into
          `_meta.labels`, from a small label subset rather than the full OEO. A value
          this endpoint does not offer is refused with `400` rather than ignored,
          and the refusal happens before anything is written, so nothing was written
          when one arrives. Values are comma-separated, which matters once an endpoint
          offers two; none offers two yet, and the enum says which one it offers.'
      - in: query
        name: page
        schema:
          type: integer
        description: Which page of the result to return. 1-based.
      - in: query
        name: page_size
        schema:
          type: integer
        description: 'How many entries a page holds. Defaults to 50 and is capped
          at 200: this endpoint is public, and no public collection here has an unbounded
          mode.'
      - in: path
        name: sid
        schema:
          type: string
        description: The identifier of the scenario factsheet these dataset links
          hang off.
        required: true
      - in: path
        name: uid
        schema:
          type: string
        description: The scenario bundle's identifier, as minted by the server on
          create and returned in `_meta.uid`. A pipeline holding no state finds it
          again with `GET /api/v0/scenario-bundles/?acronym=...`.
        required: true
      tags:
      - Scenario Bundles
      security:
      - basicAuth: []
      - cookieAuth: []
      - tokenAuth: []
      - {}
      responses:
        '400':
          content:
            application/json:
              schema:
                type: object
                additionalProperties: {}
          description: Refused, and **nothing was written**. The body is either `detail`
            with one sentence, or -- when the payload failed the serializer -- a map
            from field name to what was wrong with it. The payload named a key the
            closed bundle shape does not have, or a value the shape's own `sh:in`
            list does not allow, or the change would introduce a violation of the
            OEKG shape -- `violations` then names them, and `pre_existing_violations`
            counts the ones this write is not blamed for. A write is judged by what
            it *introduces*, so a bundle that was already non-conforming can still
            be repaired through this API.
        '404':
          content:
            application/json:
              schema:
                type: object
                additionalProperties: {}
          description: No such scenario bundle, or no such resource within it.
        '429':
          content:
            application/json:
              schema:
                type: object
                additionalProperties: {}
          description: Throttled. These endpoints are public to read, so they carry
            a ceiling for anonymous callers and a separate one per account. `Retry-After`
            says how long to wait.
        '503':
          content:
            application/json:
              schema:
                type: object
                additionalProperties: {}
          description: 'The OEKG graph store could not be reached, or the shape this
            API validates against is not installed on this server. Neither is an answer
            about the bundle: nothing was read and nothing was written.'
        '200':
          headers:
            ETag:
              schema:
                type: string
              description: The bundle's current version. Send it back in `If-Match`
                on the next write. It is returned on **every** response that carries
                one, writes included, so a pipeline reads once per run and chains
                its writes; only a lost response forces a re-read. A sub-resource
                has no version of its own -- the tag here is always the containing
                bundle's.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/DatasetLinkReadPage'
          description: 'A page of this scenario''s dataset links. Every link reports
            what it points at **now**: `_meta.resolvable` says whether the named target
            is still on this platform, and `_meta.tables` names the one table for
            `ref: table` or the catalogue entry''s current members for `ref: dataset`.
            That is computed per read and never stored. Both read `null` -- never
            `false` -- when the stored address is not a page on this platform, because
            `false` would claim the target had been deleted. **Resolution is not an
            expansion**: a reader needs it to tell a live citation from a dead one,
            so it is never opt-in.'
    post:
      operationId: scenario_bundles_scenarios_datasets_create
      description: |-
        Record that this scenario consumed or produced some data.

        Four keys and no more: `type` (`input` or `output`), `ref` (`table`,
        `dataset` or `external`), the target's `name`, and `url` where the
        client says where it points rather than letting the router derive it.
        Everything the shape stores follows from them, which is the same fact
        that gives a link no `PATCH`.

        **`ref: external` is an address this platform has no route for** -- a
        databus entry, say. It is not a lesser citation: the address is stored
        exactly as sent, and a read reports that this server cannot say whether
        it still resolves rather than claiming it was deleted. A link naming a
        platform target may send its `url` too, and then `ref` has to be the
        kind that address actually is.

        **The target is not checked.** A link may outlive what it points at --
        a bundle is a published research record, so *this scenario used table
        X* stays true after X is gone -- and blocking here would let one user
        make a stranger's table undeletable. Whether the citation still
        resolves is reported on every read instead.

        `ref: table` is reproducible and `ref: dataset` is current: a dataset
        reference resolves to the catalogue entry's members as they are today,
        not as they were when the link was written. Choosing between them is
        the client's call.

        A duplicate is refused rather than skipped, and what counts as a
        duplicate is not the same question for every kind: a platform target
        compares by what the client said, because the stored URL carries
        whichever host name the request arrived on, while an external link
        compares by its address, which is the only thing identifying it.

        **Requires authentication**, and only an owner of this scenario bundle may write to it -- a bundle with no recorded owner can be changed by an administrator only. Ownership is the bundle's, whatever part of it this operation names. (The reference page draws an **open** padlock here. It marks a security requirement not yet met -- use *Authorize* -- not an unprotected endpoint.)
      parameters:
      - in: header
        name: If-Match
        schema:
          type: string
        description: 'The entity tag of the bundle state this write applies to, as
          returned in `ETag` by the read it was built from. **Required, with no opt-out**:
          without it a client that has never heard of the header would overwrite a
          change made since it read, and neither party would be told. `*` is refused
          as an absent header rather than honoured as a wildcard, because it satisfies
          the letter of the precondition while withholding the one thing the precondition
          is for. A weak validator (`W/"4"`) and a bare number are both read as the
          version they plainly name.'
        required: true
      - in: query
        name: expand
        schema:
          type: string
          enum:
          - labels
        description: '`labels` resolves the ontology terms this resource picks into
          `_meta.labels`, from a small label subset rather than the full OEO. A value
          this endpoint does not offer is refused with `400` rather than ignored,
          and the refusal happens before anything is written, so nothing was written
          when one arrives. Values are comma-separated, which matters once an endpoint
          offers two; none offers two yet, and the enum says which one it offers.'
      - in: path
        name: sid
        schema:
          type: string
        description: The identifier of the scenario factsheet these dataset links
          hang off.
        required: true
      - in: path
        name: uid
        schema:
          type: string
        description: The scenario bundle's identifier, as minted by the server on
          create and returned in `_meta.uid`. A pipeline holding no state finds it
          again with `GET /api/v0/scenario-bundles/?acronym=...`.
        required: true
      tags:
      - Scenario Bundles
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/DatasetLink'
          application/x-www-form-urlencoded:
            schema:
              $ref: '#/components/schemas/DatasetLink'
          multipart/form-data:
            schema:
              $ref: '#/components/schemas/DatasetLink'
        required: true
      security:
      - basicAuth: []
      - cookieAuth: []
      - tokenAuth: []
      responses:
        '400':
          content:
            application/json:
              schema:
                type: object
                additionalProperties: {}
          description: The payload named a key this link does not have, or a `type`
            or `ref` outside the two values each allows -- or the target named cannot
            be addressed on this platform. Nothing was written.
        '401':
          content:
            application/json:
              schema:
                type: object
                additionalProperties: {}
          description: No credentials, or credentials this platform does not recognise.
            Reads here need none; writes do.
        '403':
          content:
            application/json:
              schema:
                type: object
                additionalProperties: {}
          description: Authenticated, but not an owner of this scenario bundle. A
            bundle with no recorded owner is administrator-only.
        '404':
          content:
            application/json:
              schema:
                type: object
                additionalProperties: {}
          description: No such scenario bundle, or no such resource within it.
        '409':
          content:
            application/json:
              schema:
                type: object
                additionalProperties: {}
          description: 'This scenario already links that target in that direction,
            or the bundle moved while this write was being prepared. A duplicate is
            refused rather than silently skipped: two nodes saying one thing would
            leave a later `DELETE` ambiguous, and a caller unable to tell *added*
            from *already there*.'
        '412':
          content:
            application/json:
              schema:
                type: object
                additionalProperties: {}
          description: '`If-Match` named a version, and it is not the current one.
            Nothing was written. The response says which version the bundle is at.'
        '428':
          content:
            application/json:
              schema:
                type: object
                additionalProperties: {}
          description: '`If-Match` was absent, so this write did not say which version
            it was editing and nothing was written. The response names the current
            entity tag to send.'
        '429':
          content:
            application/json:
              schema:
                type: object
                additionalProperties: {}
          description: Throttled. These endpoints are public to read, so they carry
            a ceiling for anonymous callers and a separate one per account. `Retry-After`
            says how long to wait.
        '503':
          content:
            application/json:
              schema:
                type: object
                additionalProperties: {}
          description: 'The OEKG graph store could not be reached, or the shape this
            API validates against is not installed on this server. Neither is an answer
            about the bundle: nothing was read and nothing was written.'
        '201':
          headers:
            ETag:
              schema:
                type: string
              description: The bundle's current version. Send it back in `If-Match`
                on the next write. It is returned on **every** response that carries
                one, writes included, so a pipeline reads once per run and chains
                its writes; only a lost response forces a re-read. A sub-resource
                has no version of its own -- the tag here is always the containing
                bundle's.
            Location:
              schema:
                type: string
              description: 'Where the created resource can be read. The identifier
                in it was minted by the server: this API accepts none from a client.'
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/DatasetLinkRead'
          description: 'Created. `Location` names the link''s URL and `ETag` the bundle''s
            new version. Every link reports what it points at **now**: `_meta.resolvable`
            says whether the named target is still on this platform, and `_meta.tables`
            names the one table for `ref: table` or the catalogue entry''s current
            members for `ref: dataset`. That is computed per read and never stored.
            Both read `null` -- never `false` -- when the stored address is not a
            page on this platform, because `false` would claim the target had been
            deleted. **Resolution is not an expansion**: a reader needs it to tell
            a live citation from a dead one, so it is never opt-in.'
  /api/v0/scenario-bundles/{uid}/scenarios/{sid}/datasets/{did}/:
    get:
      operationId: scenario_bundles_scenarios_datasets_retrieve
      description: |-
        Read one dataset link, publicly.

        `_meta.target_iri` is the address actually stored. It is there because
        it is the only thing that stays true when `ref` comes back `null`: a
        link written before this API existed can point at an address this
        platform has no route for, and the writable payload then genuinely
        cannot express it.

        **Public.** No authentication is required, and sending credentials changes nothing about the answer. The OEKG SPARQL endpoint already serves the same data, so a token here would protect nothing while making published research records awkward to read. (The reference page draws a **closed** padlock here. It marks a security requirement the reader already meets, not a protected endpoint -- on that page the closed padlock is the public one.)
      parameters:
      - in: path
        name: did
        schema:
          type: string
        description: The dataset link's identifier.
        required: true
      - in: query
        name: expand
        schema:
          type: string
          enum:
          - labels
        description: '`labels` resolves the ontology terms this resource picks into
          `_meta.labels`, from a small label subset rather than the full OEO. A value
          this endpoint does not offer is refused with `400` rather than ignored,
          and the refusal happens before anything is written, so nothing was written
          when one arrives. Values are comma-separated, which matters once an endpoint
          offers two; none offers two yet, and the enum says which one it offers.'
      - in: path
        name: sid
        schema:
          type: string
        description: The identifier of the scenario factsheet these dataset links
          hang off.
        required: true
      - in: path
        name: uid
        schema:
          type: string
        description: The scenario bundle's identifier, as minted by the server on
          create and returned in `_meta.uid`. A pipeline holding no state finds it
          again with `GET /api/v0/scenario-bundles/?acronym=...`.
        required: true
      tags:
      - Scenario Bundles
      security:
      - basicAuth: []
      - cookieAuth: []
      - tokenAuth: []
      - {}
      responses:
        '400':
          content:
            application/json:
              schema:
                type: object
                additionalProperties: {}
          description: Refused, and **nothing was written**. The body is either `detail`
            with one sentence, or -- when the payload failed the serializer -- a map
            from field name to what was wrong with it. The payload named a key the
            closed bundle shape does not have, or a value the shape's own `sh:in`
            list does not allow, or the change would introduce a violation of the
            OEKG shape -- `violations` then names them, and `pre_existing_violations`
            counts the ones this write is not blamed for. A write is judged by what
            it *introduces*, so a bundle that was already non-conforming can still
            be repaired through this API.
        '404':
          content:
            application/json:
              schema:
                type: object
                additionalProperties: {}
          description: No such scenario bundle, or no such resource within it.
        '429':
          content:
            application/json:
              schema:
                type: object
                additionalProperties: {}
          description: Throttled. These endpoints are public to read, so they carry
            a ceiling for anonymous callers and a separate one per account. `Retry-After`
            says how long to wait.
        '503':
          content:
            application/json:
              schema:
                type: object
                additionalProperties: {}
          description: 'The OEKG graph store could not be reached, or the shape this
            API validates against is not installed on this server. Neither is an answer
            about the bundle: nothing was read and nothing was written.'
        '200':
          headers:
            ETag:
              schema:
                type: string
              description: The bundle's current version. Send it back in `If-Match`
                on the next write. It is returned on **every** response that carries
                one, writes included, so a pipeline reads once per run and chains
                its writes; only a lost response forces a re-read. A sub-resource
                has no version of its own -- the tag here is always the containing
                bundle's.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/DatasetLinkRead'
          description: 'One dataset link. Every link reports what it points at **now**:
            `_meta.resolvable` says whether the named target is still on this platform,
            and `_meta.tables` names the one table for `ref: table` or the catalogue
            entry''s current members for `ref: dataset`. That is computed per read
            and never stored. Both read `null` -- never `false` -- when the stored
            address is not a page on this platform, because `false` would claim the
            target had been deleted. **Resolution is not an expansion**: a reader
            needs it to tell a live citation from a dead one, so it is never opt-in.'
    delete:
      operationId: scenario_bundles_scenarios_datasets_destroy
      description: |-
        Remove one link. Its target is not touched and never was.

        A link is the only removable thing in this API with no children and
        nothing shared beneath it -- what it points at is an OEP table or
        dataset, which lives in Postgres and which no graph write may reach. It
        still goes through the typed walk, because the guard clause is what
        decides whether *this* node is only claimed by this scenario, and that
        is not a question the class alone answers.

        **Requires authentication**, and only an owner of this scenario bundle may write to it -- a bundle with no recorded owner can be changed by an administrator only. Ownership is the bundle's, whatever part of it this operation names. (The reference page draws an **open** padlock here. It marks a security requirement not yet met -- use *Authorize* -- not an unprotected endpoint.)
      parameters:
      - in: header
        name: If-Match
        schema:
          type: string
        description: 'The entity tag of the bundle state this write applies to, as
          returned in `ETag` by the read it was built from. **Required, with no opt-out**:
          without it a client that has never heard of the header would overwrite a
          change made since it read, and neither party would be told. `*` is refused
          as an absent header rather than honoured as a wildcard, because it satisfies
          the letter of the precondition while withholding the one thing the precondition
          is for. A weak validator (`W/"4"`) and a bare number are both read as the
          version they plainly name.'
        required: true
      - in: path
        name: did
        schema:
          type: string
        description: The dataset link's identifier.
        required: true
      - in: path
        name: sid
        schema:
          type: string
        description: The identifier of the scenario factsheet these dataset links
          hang off.
        required: true
      - in: path
        name: uid
        schema:
          type: string
        description: The scenario bundle's identifier, as minted by the server on
          create and returned in `_meta.uid`. A pipeline holding no state finds it
          again with `GET /api/v0/scenario-bundles/?acronym=...`.
        required: true
      tags:
      - Scenario Bundles
      security:
      - basicAuth: []
      - cookieAuth: []
      - tokenAuth: []
      responses:
        '400':
          content:
            application/json:
              schema:
                type: object
                additionalProperties: {}
          description: Refused, and **nothing was written**. The body is either `detail`
            with one sentence, or -- when the payload failed the serializer -- a map
            from field name to what was wrong with it. The payload named a key the
            closed bundle shape does not have, or a value the shape's own `sh:in`
            list does not allow, or the change would introduce a violation of the
            OEKG shape -- `violations` then names them, and `pre_existing_violations`
            counts the ones this write is not blamed for. A write is judged by what
            it *introduces*, so a bundle that was already non-conforming can still
            be repaired through this API.
        '401':
          content:
            application/json:
              schema:
                type: object
                additionalProperties: {}
          description: No credentials, or credentials this platform does not recognise.
            Reads here need none; writes do.
        '403':
          content:
            application/json:
              schema:
                type: object
                additionalProperties: {}
          description: Authenticated, but not an owner of this scenario bundle. A
            bundle with no recorded owner is administrator-only.
        '404':
          content:
            application/json:
              schema:
                type: object
                additionalProperties: {}
          description: No such scenario bundle, or no such resource within it.
        '409':
          content:
            application/json:
              schema:
                type: object
                additionalProperties: {}
          description: The bundle moved between the read this write was prepared from
            and the write itself, so **nothing was written**. Read it again, apply
            the change to what comes back, and retry.
        '412':
          content:
            application/json:
              schema:
                type: object
                additionalProperties: {}
          description: '`If-Match` named a version, and it is not the current one.
            Nothing was written. The response says which version the bundle is at.'
        '428':
          content:
            application/json:
              schema:
                type: object
                additionalProperties: {}
          description: '`If-Match` was absent, so this write did not say which version
            it was editing and nothing was written. The response names the current
            entity tag to send.'
        '429':
          content:
            application/json:
              schema:
                type: object
                additionalProperties: {}
          description: Throttled. These endpoints are public to read, so they carry
            a ceiling for anonymous callers and a separate one per account. `Retry-After`
            says how long to wait.
        '503':
          content:
            application/json:
              schema:
                type: object
                additionalProperties: {}
          description: 'The OEKG graph store could not be reached, or the shape this
            API validates against is not installed on this server. Neither is an answer
            about the bundle: nothing was read and nothing was written.'
        '200':
          headers:
            ETag:
              schema:
                type: string
              description: The bundle's current version. Send it back in `If-Match`
                on the next write. It is returned on **every** response that carries
                one, writes included, so a pipeline reads once per run and chains
                its writes; only a lost response forces a re-read. A sub-resource
                has no version of its own -- the tag here is always the containing
                bundle's.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Removal'
          description: 'Removed. The body names what was **deleted** and what was
            only **unlinked**, which no status code can say: a node another bundle
            still cites is kept and detached rather than destroyed. Only the downgraded
            nodes are listed -- the shared regions, authors and ontology terms every
            delete detaches are the rule, not the news.'
  /api/v0/scenario-bundles/{uid}/study-reports/:
    get:
      operationId: scenario_bundles_study_reports_list
      description: |-
        List this bundle's parts of one kind.

        Paginated, although the collection is bounded by its bundle: this is a
        public endpoint and no public collection here has an unbounded mode.
        The nested form inside a bundle read is the exception, and a deliberate
        one -- that one has to be complete, because a client sends it back.

        **Public.** No authentication is required, and sending credentials changes nothing about the answer. The OEKG SPARQL endpoint already serves the same data, so a token here would protect nothing while making published research records awkward to read. (The reference page draws a **closed** padlock here. It marks a security requirement the reader already meets, not a protected endpoint -- on that page the closed padlock is the public one.)
      parameters:
      - in: query
        name: expand
        schema:
          type: string
          enum:
          - labels
        description: '`labels` resolves the ontology terms this resource picks into
          `_meta.labels`, from a small label subset rather than the full OEO. A value
          this endpoint does not offer is refused with `400` rather than ignored,
          and the refusal happens before anything is written, so nothing was written
          when one arrives. Values are comma-separated, which matters once an endpoint
          offers two; none offers two yet, and the enum says which one it offers.'
      - in: query
        name: page
        schema:
          type: integer
        description: Which page of the result to return. 1-based.
      - in: query
        name: page_size
        schema:
          type: integer
        description: 'How many entries a page holds. Defaults to 50 and is capped
          at 200: this endpoint is public, and no public collection here has an unbounded
          mode.'
      - in: path
        name: uid
        schema:
          type: string
        description: The scenario bundle's identifier, as minted by the server on
          create and returned in `_meta.uid`. A pipeline holding no state finds it
          again with `GET /api/v0/scenario-bundles/?acronym=...`.
        required: true
      tags:
      - Scenario Bundles
      security:
      - basicAuth: []
      - cookieAuth: []
      - tokenAuth: []
      - {}
      responses:
        '400':
          content:
            application/json:
              schema:
                type: object
                additionalProperties: {}
          description: Refused, and **nothing was written**. The body is either `detail`
            with one sentence, or -- when the payload failed the serializer -- a map
            from field name to what was wrong with it. The payload named a key the
            closed bundle shape does not have, or a value the shape's own `sh:in`
            list does not allow, or the change would introduce a violation of the
            OEKG shape -- `violations` then names them, and `pre_existing_violations`
            counts the ones this write is not blamed for. A write is judged by what
            it *introduces*, so a bundle that was already non-conforming can still
            be repaired through this API.
        '404':
          content:
            application/json:
              schema:
                type: object
                additionalProperties: {}
          description: No such scenario bundle, or no such resource within it.
        '429':
          content:
            application/json:
              schema:
                type: object
                additionalProperties: {}
          description: Throttled. These endpoints are public to read, so they carry
            a ceiling for anonymous callers and a separate one per account. `Retry-After`
            says how long to wait.
        '503':
          content:
            application/json:
              schema:
                type: object
                additionalProperties: {}
          description: 'The OEKG graph store could not be reached, or the shape this
            API validates against is not installed on this server. Neither is an answer
            about the bundle: nothing was read and nothing was written.'
        '200':
          headers:
            ETag:
              schema:
                type: string
              description: The bundle's current version. Send it back in `If-Match`
                on the next write. It is returned on **every** response that carries
                one, writes included, so a pipeline reads once per run and chains
                its writes; only a lost response forces a re-read. A sub-resource
                has no version of its own -- the tag here is always the containing
                bundle's.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/StudyReportReadPage'
          description: A page of this bundle's study reports.
    post:
      operationId: scenario_bundles_study_reports_create
      description: |-
        Add one part to this bundle.

        The identifier is minted by the server, as everywhere in this API, and
        returned in `Location`. What is validated is the **whole bundle with
        this part in it**: every constraint in the OEKG shape is bundle-local,
        so a part on its own is not a unit the shape can judge, and validating
        one alone would pass vacuously in the places that matter.

        The version guarded, the ownership asked and the entity tag returned
        are all the bundle's. Two clients editing two different parts of one
        bundle therefore do conflict -- the price of one version per bundle,
        and deliberate: conflict granularity follows the aggregate root, and a
        part is not one.

        **Requires authentication**, and only an owner of this scenario bundle may write to it -- a bundle with no recorded owner can be changed by an administrator only. Ownership is the bundle's, whatever part of it this operation names. (The reference page draws an **open** padlock here. It marks a security requirement not yet met -- use *Authorize* -- not an unprotected endpoint.)
      parameters:
      - in: header
        name: If-Match
        schema:
          type: string
        description: 'The entity tag of the bundle state this write applies to, as
          returned in `ETag` by the read it was built from. **Required, with no opt-out**:
          without it a client that has never heard of the header would overwrite a
          change made since it read, and neither party would be told. `*` is refused
          as an absent header rather than honoured as a wildcard, because it satisfies
          the letter of the precondition while withholding the one thing the precondition
          is for. A weak validator (`W/"4"`) and a bare number are both read as the
          version they plainly name.'
        required: true
      - in: query
        name: expand
        schema:
          type: string
          enum:
          - labels
        description: '`labels` resolves the ontology terms this resource picks into
          `_meta.labels`, from a small label subset rather than the full OEO. A value
          this endpoint does not offer is refused with `400` rather than ignored,
          and the refusal happens before anything is written, so nothing was written
          when one arrives. Values are comma-separated, which matters once an endpoint
          offers two; none offers two yet, and the enum says which one it offers.'
      - in: path
        name: uid
        schema:
          type: string
        description: The scenario bundle's identifier, as minted by the server on
          create and returned in `_meta.uid`. A pipeline holding no state finds it
          again with `GET /api/v0/scenario-bundles/?acronym=...`.
        required: true
      tags:
      - Scenario Bundles
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/StudyReport'
          application/x-www-form-urlencoded:
            schema:
              $ref: '#/components/schemas/StudyReport'
          multipart/form-data:
            schema:
              $ref: '#/components/schemas/StudyReport'
        required: true
      security:
      - basicAuth: []
      - cookieAuth: []
      - tokenAuth: []
      responses:
        '400':
          content:
            application/json:
              schema:
                type: object
                additionalProperties: {}
          description: Refused, and **nothing was written**. The body is either `detail`
            with one sentence, or -- when the payload failed the serializer -- a map
            from field name to what was wrong with it. The payload named a key the
            closed bundle shape does not have, or a value the shape's own `sh:in`
            list does not allow, or the change would introduce a violation of the
            OEKG shape -- `violations` then names them, and `pre_existing_violations`
            counts the ones this write is not blamed for. A write is judged by what
            it *introduces*, so a bundle that was already non-conforming can still
            be repaired through this API.
        '401':
          content:
            application/json:
              schema:
                type: object
                additionalProperties: {}
          description: No credentials, or credentials this platform does not recognise.
            Reads here need none; writes do.
        '403':
          content:
            application/json:
              schema:
                type: object
                additionalProperties: {}
          description: Authenticated, but not an owner of this scenario bundle. A
            bundle with no recorded owner is administrator-only.
        '404':
          content:
            application/json:
              schema:
                type: object
                additionalProperties: {}
          description: No such scenario bundle, or no such resource within it.
        '409':
          content:
            application/json:
              schema:
                type: object
                additionalProperties: {}
          description: The bundle moved between the read this write was prepared from
            and the write itself, so **nothing was written**. Read it again, apply
            the change to what comes back, and retry.
        '412':
          content:
            application/json:
              schema:
                type: object
                additionalProperties: {}
          description: '`If-Match` named a version, and it is not the current one.
            Nothing was written. The response says which version the bundle is at.'
        '428':
          content:
            application/json:
              schema:
                type: object
                additionalProperties: {}
          description: '`If-Match` was absent, so this write did not say which version
            it was editing and nothing was written. The response names the current
            entity tag to send.'
        '429':
          content:
            application/json:
              schema:
                type: object
                additionalProperties: {}
          description: Throttled. These endpoints are public to read, so they carry
            a ceiling for anonymous callers and a separate one per account. `Retry-After`
            says how long to wait.
        '503':
          content:
            application/json:
              schema:
                type: object
                additionalProperties: {}
          description: 'The OEKG graph store could not be reached, or the shape this
            API validates against is not installed on this server. Neither is an answer
            about the bundle: nothing was read and nothing was written.'
        '201':
          headers:
            ETag:
              schema:
                type: string
              description: The bundle's current version. Send it back in `If-Match`
                on the next write. It is returned on **every** response that carries
                one, writes included, so a pipeline reads once per run and chains
                its writes; only a lost response forces a re-read. A sub-resource
                has no version of its own -- the tag here is always the containing
                bundle's.
            Location:
              schema:
                type: string
              description: 'Where the created resource can be read. The identifier
                in it was minted by the server: this API accepts none from a client.'
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/StudyReportRead'
          description: Created. The body is the study report as it now stands, `Location`
            names its URL and `ETag` the **bundle's** new version.
  /api/v0/scenario-bundles/{uid}/study-reports/{pid}/:
    get:
      operationId: scenario_bundles_study_reports_retrieve
      description: |-
        Read one part of a bundle, publicly.

        **Public.** No authentication is required, and sending credentials changes nothing about the answer. The OEKG SPARQL endpoint already serves the same data, so a token here would protect nothing while making published research records awkward to read. (The reference page draws a **closed** padlock here. It marks a security requirement the reader already meets, not a protected endpoint -- on that page the closed padlock is the public one.)
      parameters:
      - in: query
        name: expand
        schema:
          type: string
          enum:
          - labels
        description: '`labels` resolves the ontology terms this resource picks into
          `_meta.labels`, from a small label subset rather than the full OEO. A value
          this endpoint does not offer is refused with `400` rather than ignored,
          and the refusal happens before anything is written, so nothing was written
          when one arrives. Values are comma-separated, which matters once an endpoint
          offers two; none offers two yet, and the enum says which one it offers.'
      - in: path
        name: pid
        schema:
          type: string
        description: The identifier of the part this address names -- a scenario factsheet
          or a study report, depending on the route.
        required: true
      - in: path
        name: uid
        schema:
          type: string
        description: The scenario bundle's identifier, as minted by the server on
          create and returned in `_meta.uid`. A pipeline holding no state finds it
          again with `GET /api/v0/scenario-bundles/?acronym=...`.
        required: true
      tags:
      - Scenario Bundles
      security:
      - basicAuth: []
      - cookieAuth: []
      - tokenAuth: []
      - {}
      responses:
        '400':
          content:
            application/json:
              schema:
                type: object
                additionalProperties: {}
          description: Refused, and **nothing was written**. The body is either `detail`
            with one sentence, or -- when the payload failed the serializer -- a map
            from field name to what was wrong with it. The payload named a key the
            closed bundle shape does not have, or a value the shape's own `sh:in`
            list does not allow, or the change would introduce a violation of the
            OEKG shape -- `violations` then names them, and `pre_existing_violations`
            counts the ones this write is not blamed for. A write is judged by what
            it *introduces*, so a bundle that was already non-conforming can still
            be repaired through this API.
        '404':
          content:
            application/json:
              schema:
                type: object
                additionalProperties: {}
          description: No such scenario bundle, or no such resource within it.
        '429':
          content:
            application/json:
              schema:
                type: object
                additionalProperties: {}
          description: Throttled. These endpoints are public to read, so they carry
            a ceiling for anonymous callers and a separate one per account. `Retry-After`
            says how long to wait.
        '503':
          content:
            application/json:
              schema:
                type: object
                additionalProperties: {}
          description: 'The OEKG graph store could not be reached, or the shape this
            API validates against is not installed on this server. Neither is an answer
            about the bundle: nothing was read and nothing was written.'
        '200':
          headers:
            ETag:
              schema:
                type: string
              description: The bundle's current version. Send it back in `If-Match`
                on the next write. It is returned on **every** response that carries
                one, writes included, so a pipeline reads once per run and chains
                its writes; only a lost response forces a re-read. A sub-resource
                has no version of its own -- the tag here is always the containing
                bundle's.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/StudyReportRead'
          description: 'The study report: what a write accepts, plus `_meta`. `ETag`
            carries the **bundle''s** version, which is what a write to this part
            has to send back.'
    patch:
      operationId: scenario_bundles_study_reports_partial_update
      description: |-
        Change the fields this payload names, without touching its siblings.

        A key the payload does not mention is genuinely untouched. The part's
        existence is checked **before** the precondition, so a request for a
        part that is not there hears that rather than being told its `If-Match`
        is missing for something that does not exist.

        Like every write here it is judged by what it **introduces**: a
        violation the bundle already carried is reported in
        `pre_existing_violations` and does not refuse the write.

        **Requires authentication**, and only an owner of this scenario bundle may write to it -- a bundle with no recorded owner can be changed by an administrator only. Ownership is the bundle's, whatever part of it this operation names. (The reference page draws an **open** padlock here. It marks a security requirement not yet met -- use *Authorize* -- not an unprotected endpoint.)
      parameters:
      - in: header
        name: If-Match
        schema:
          type: string
        description: 'The entity tag of the bundle state this write applies to, as
          returned in `ETag` by the read it was built from. **Required, with no opt-out**:
          without it a client that has never heard of the header would overwrite a
          change made since it read, and neither party would be told. `*` is refused
          as an absent header rather than honoured as a wildcard, because it satisfies
          the letter of the precondition while withholding the one thing the precondition
          is for. A weak validator (`W/"4"`) and a bare number are both read as the
          version they plainly name.'
        required: true
      - in: query
        name: expand
        schema:
          type: string
          enum:
          - labels
        description: '`labels` resolves the ontology terms this resource picks into
          `_meta.labels`, from a small label subset rather than the full OEO. A value
          this endpoint does not offer is refused with `400` rather than ignored,
          and the refusal happens before anything is written, so nothing was written
          when one arrives. Values are comma-separated, which matters once an endpoint
          offers two; none offers two yet, and the enum says which one it offers.'
      - in: path
        name: pid
        schema:
          type: string
        description: The identifier of the part this address names -- a scenario factsheet
          or a study report, depending on the route.
        required: true
      - in: path
        name: uid
        schema:
          type: string
        description: The scenario bundle's identifier, as minted by the server on
          create and returned in `_meta.uid`. A pipeline holding no state finds it
          again with `GET /api/v0/scenario-bundles/?acronym=...`.
        required: true
      tags:
      - Scenario Bundles
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/PatchedStudyReport'
          application/x-www-form-urlencoded:
            schema:
              $ref: '#/components/schemas/PatchedStudyReport'
          multipart/form-data:
            schema:
              $ref: '#/components/schemas/PatchedStudyReport'
      security:
      - basicAuth: []
      - cookieAuth: []
      - tokenAuth: []
      responses:
        '400':
          content:
            application/json:
              schema:
                type: object
                additionalProperties: {}
          description: Refused, and **nothing was written**. The body is either `detail`
            with one sentence, or -- when the payload failed the serializer -- a map
            from field name to what was wrong with it. The payload named a key the
            closed bundle shape does not have, or a value the shape's own `sh:in`
            list does not allow, or the change would introduce a violation of the
            OEKG shape -- `violations` then names them, and `pre_existing_violations`
            counts the ones this write is not blamed for. A write is judged by what
            it *introduces*, so a bundle that was already non-conforming can still
            be repaired through this API.
        '401':
          content:
            application/json:
              schema:
                type: object
                additionalProperties: {}
          description: No credentials, or credentials this platform does not recognise.
            Reads here need none; writes do.
        '403':
          content:
            application/json:
              schema:
                type: object
                additionalProperties: {}
          description: Authenticated, but not an owner of this scenario bundle. A
            bundle with no recorded owner is administrator-only.
        '404':
          content:
            application/json:
              schema:
                type: object
                additionalProperties: {}
          description: No such scenario bundle, or no such resource within it.
        '409':
          content:
            application/json:
              schema:
                type: object
                additionalProperties: {}
          description: The bundle moved between the read this write was prepared from
            and the write itself, so **nothing was written**. Read it again, apply
            the change to what comes back, and retry.
        '412':
          content:
            application/json:
              schema:
                type: object
                additionalProperties: {}
          description: '`If-Match` named a version, and it is not the current one.
            Nothing was written. The response says which version the bundle is at.'
        '428':
          content:
            application/json:
              schema:
                type: object
                additionalProperties: {}
          description: '`If-Match` was absent, so this write did not say which version
            it was editing and nothing was written. The response names the current
            entity tag to send.'
        '429':
          content:
            application/json:
              schema:
                type: object
                additionalProperties: {}
          description: Throttled. These endpoints are public to read, so they carry
            a ceiling for anonymous callers and a separate one per account. `Retry-After`
            says how long to wait.
        '503':
          content:
            application/json:
              schema:
                type: object
                additionalProperties: {}
          description: 'The OEKG graph store could not be reached, or the shape this
            API validates against is not installed on this server. Neither is an answer
            about the bundle: nothing was read and nothing was written.'
        '200':
          headers:
            ETag:
              schema:
                type: string
              description: The bundle's current version. Send it back in `If-Match`
                on the next write. It is returned on **every** response that carries
                one, writes included, so a pipeline reads once per run and chains
                its writes; only a lost response forces a re-read. A sub-resource
                has no version of its own -- the tag here is always the containing
                bundle's.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/StudyReportRead'
          description: Changed. The body is the study report as it now stands and
            `ETag` is the bundle's new version.
    delete:
      operationId: scenario_bundles_study_reports_destroy
      description: |-
        Remove this part, and with it what only it holds.

        The same order as a patch -- bundle, part, caller, precondition -- and
        the same write path, because a delete is a write like any other: it is
        validated against the shape, guarded on the bundle's version and
        recorded in the history. What differs is the arithmetic in front of it,
        which is `oekg.removal`'s.

        No retyped confirmation token, unlike the whole-bundle delete. Ceremony
        is proportional to blast radius: this removes one bounded part that can
        be created again, and the history says what it held.

        **Requires authentication**, and only an owner of this scenario bundle may write to it -- a bundle with no recorded owner can be changed by an administrator only. Ownership is the bundle's, whatever part of it this operation names. (The reference page draws an **open** padlock here. It marks a security requirement not yet met -- use *Authorize* -- not an unprotected endpoint.)
      parameters:
      - in: header
        name: If-Match
        schema:
          type: string
        description: 'The entity tag of the bundle state this write applies to, as
          returned in `ETag` by the read it was built from. **Required, with no opt-out**:
          without it a client that has never heard of the header would overwrite a
          change made since it read, and neither party would be told. `*` is refused
          as an absent header rather than honoured as a wildcard, because it satisfies
          the letter of the precondition while withholding the one thing the precondition
          is for. A weak validator (`W/"4"`) and a bare number are both read as the
          version they plainly name.'
        required: true
      - in: path
        name: pid
        schema:
          type: string
        description: The identifier of the part this address names -- a scenario factsheet
          or a study report, depending on the route.
        required: true
      - in: path
        name: uid
        schema:
          type: string
        description: The scenario bundle's identifier, as minted by the server on
          create and returned in `_meta.uid`. A pipeline holding no state finds it
          again with `GET /api/v0/scenario-bundles/?acronym=...`.
        required: true
      tags:
      - Scenario Bundles
      security:
      - basicAuth: []
      - cookieAuth: []
      - tokenAuth: []
      responses:
        '400':
          content:
            application/json:
              schema:
                type: object
                additionalProperties: {}
          description: Refused, and **nothing was written**. The body is either `detail`
            with one sentence, or -- when the payload failed the serializer -- a map
            from field name to what was wrong with it. The payload named a key the
            closed bundle shape does not have, or a value the shape's own `sh:in`
            list does not allow, or the change would introduce a violation of the
            OEKG shape -- `violations` then names them, and `pre_existing_violations`
            counts the ones this write is not blamed for. A write is judged by what
            it *introduces*, so a bundle that was already non-conforming can still
            be repaired through this API.
        '401':
          content:
            application/json:
              schema:
                type: object
                additionalProperties: {}
          description: No credentials, or credentials this platform does not recognise.
            Reads here need none; writes do.
        '403':
          content:
            application/json:
              schema:
                type: object
                additionalProperties: {}
          description: Authenticated, but not an owner of this scenario bundle. A
            bundle with no recorded owner is administrator-only.
        '404':
          content:
            application/json:
              schema:
                type: object
                additionalProperties: {}
          description: No such scenario bundle, or no such resource within it.
        '409':
          content:
            application/json:
              schema:
                type: object
                additionalProperties: {}
          description: The bundle moved between the read this write was prepared from
            and the write itself, so **nothing was written**. Read it again, apply
            the change to what comes back, and retry.
        '412':
          content:
            application/json:
              schema:
                type: object
                additionalProperties: {}
          description: '`If-Match` named a version, and it is not the current one.
            Nothing was written. The response says which version the bundle is at.'
        '428':
          content:
            application/json:
              schema:
                type: object
                additionalProperties: {}
          description: '`If-Match` was absent, so this write did not say which version
            it was editing and nothing was written. The response names the current
            entity tag to send.'
        '429':
          content:
            application/json:
              schema:
                type: object
                additionalProperties: {}
          description: Throttled. These endpoints are public to read, so they carry
            a ceiling for anonymous callers and a separate one per account. `Retry-After`
            says how long to wait.
        '503':
          content:
            application/json:
              schema:
                type: object
                additionalProperties: {}
          description: 'The OEKG graph store could not be reached, or the shape this
            API validates against is not installed on this server. Neither is an answer
            about the bundle: nothing was read and nothing was written.'
        '200':
          headers:
            ETag:
              schema:
                type: string
              description: The bundle's current version. Send it back in `If-Match`
                on the next write. It is returned on **every** response that carries
                one, writes included, so a pipeline reads once per run and chains
                its writes; only a lost response forces a re-read. A sub-resource
                has no version of its own -- the tag here is always the containing
                bundle's.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Removal'
          description: 'Removed. The body names what was **deleted** and what was
            only **unlinked**, which no status code can say: a node another bundle
            still cites is kept and detached rather than destroyed. Only the downgraded
            nodes are listed -- the shared regions, authors and ontology terms every
            delete detaches are the rule, not the news.'
  /api/v0/schema/:
    get:
      operationId: schema_retrieve
      description: |-
        The OpenAPI description of `api/v0`, generated from the code. It is what the reference page renders and what a generated client is built from.

        A copy is committed to the repository and a check keeps the two equal, so this endpoint and the published reference describe the same API.
      summary: This description, as a document
      parameters:
      - in: query
        name: format
        schema:
          type: string
          enum:
          - json
          - yaml
      - in: query
        name: lang
        schema:
          type: string
          enum:
          - af
          - ar
          - ar-dz
          - ast
          - az
          - be
          - bg
          - bn
          - br
          - bs
          - ca
          - ckb
          - cs
          - cy
          - da
          - de
          - dsb
          - el
          - en
          - en-au
          - en-gb
          - eo
          - es
          - es-ar
          - es-co
          - es-mx
          - es-ni
          - es-ve
          - et
          - eu
          - fa
          - fi
          - fr
          - fy
          - ga
          - gd
          - gl
          - he
          - hi
          - hr
          - hsb
          - hu
          - hy
          - ia
          - id
          - ig
          - io
          - is
          - it
          - ja
          - ka
          - kab
          - kk
          - km
          - kn
          - ko
          - ky
          - lb
          - lt
          - lv
          - mk
          - ml
          - mn
          - mr
          - ms
          - my
          - nb
          - ne
          - nl
          - nn
          - os
          - pa
          - pl
          - pt
          - pt-br
          - ro
          - ru
          - sk
          - sl
          - sq
          - sr
          - sr-latn
          - sv
          - sw
          - ta
          - te
          - tg
          - th
          - tk
          - tr
          - tt
          - udm
          - ug
          - uk
          - ur
          - uz
          - vi
          - zh-hans
          - zh-hant
      tags:
      - API description
      security:
      - basicAuth: []
      - cookieAuth: []
      - tokenAuth: []
      - {}
      responses:
        '200':
          content:
            application/vnd.oai.openapi:
              schema:
                type: object
                additionalProperties: {}
            application/yaml:
              schema:
                type: object
                additionalProperties: {}
            application/vnd.oai.openapi+json:
              schema:
                type: object
                additionalProperties: {}
            application/json:
              schema:
                type: object
                additionalProperties: {}
          description: ''
  /api/v0/tables/{table}/:
    get:
      operationId: tables_retrieve
      description: 'The table''s structure: its columns, its indexes and its constraints.
        Not its rows -- those are at `rows/`.'
      summary: Describe a table
      parameters:
      - in: path
        name: table
        schema:
          type: string
        description: 'The table''s name on this platform. **Names are global**: a
          table is addressed by name alone and no two tables share one, whichever
          topic they are published under.'
        required: true
      tags:
      - Tables
      security:
      - basicAuth: []
      - cookieAuth: []
      - tokenAuth: []
      - {}
      responses:
        '404':
          content:
            application/json:
              schema:
                type: object
                additionalProperties: {}
          description: No table of that name on this platform.
        '200':
          content:
            application/json:
              schema:
                type: object
                additionalProperties: {}
          description: '`name`, `columns`, `indexed` and `constraints`, each keyed
            by name.'
    post:
      operationId: tables_create
      description: |-
        Queues a change to an existing table's structure. It is not applied on the spot: it lands in the change-request queue for review.

        **The payload is at the top level here**, unlike the `PUT` on this same address, which reads it out of `query`. `type` decides which kind of change is meant; anything else is refused.
      summary: Change a table's columns or constraints
      parameters:
      - in: path
        name: table
        schema:
          type: string
        description: 'The table''s name on this platform. **Names are global**: a
          table is addressed by name alone and no two tables share one, whichever
          topic they are published under.'
        required: true
      tags:
      - Tables
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/TableAlter'
          application/x-www-form-urlencoded:
            schema:
              $ref: '#/components/schemas/TableAlter'
          multipart/form-data:
            schema:
              $ref: '#/components/schemas/TableAlter'
        required: true
      security:
      - basicAuth: []
      - cookieAuth: []
      - tokenAuth: []
      - {}
      responses:
        '400':
          content:
            application/json:
              schema:
                type: object
                additionalProperties: {}
          description: 'The request could not be carried out as sent: a payload key
            missing or holding something this endpoint cannot use, a column name that
            is not a Postgres identifier, or a query the database refused. The body
            carries `reason` or `error` naming which.'
        '401':
          content:
            application/json:
              schema:
                type: object
                additionalProperties: {}
          description: No credentials, or credentials this platform does not know.
        '403':
          content:
            application/json:
              schema:
                type: object
                additionalProperties: {}
          description: 'Authenticated, but not permitted: the table belongs to somebody
            else, or is under embargo, or the operation needs a level of permission
            on it that this account does not hold.'
        '404':
          content:
            application/json:
              schema:
                type: object
                additionalProperties: {}
          description: No table of that name on this platform.
        '200':
          content:
            application/json:
              schema:
                type: object
                additionalProperties: {}
          description: What the queued change came to.
    put:
      operationId: tables_update
      description: |-
        Creates the table and its metadata row. **Two things about this endpoint catch people out.** The target schema comes from the `is_sandbox` query parameter, not from the payload. And table names are global -- a name already taken anywhere on the platform is a `409`, whichever schema or topic holds it.

        The payload sits under a `query` key rather than at the top level.
      summary: Create a table
      parameters:
      - in: query
        name: is_sandbox
        schema:
          type: boolean
        description: '**Which schema the table is created in, and the one thing worth
          getting right here.** Send `true` and the table lands in the sandbox schema,
          which is where anything not meant to be published belongs. Omit it and the
          table is created in the public `data` schema, visible to everyone -- there
          is no confirmation step and no undo but deleting the table.'
      - in: path
        name: table
        schema:
          type: string
        description: 'The table''s name on this platform. **Names are global**: a
          table is addressed by name alone and no two tables share one, whichever
          topic they are published under.'
        required: true
      tags:
      - Tables
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/TableCreate'
          application/x-www-form-urlencoded:
            schema:
              $ref: '#/components/schemas/TableCreate'
          multipart/form-data:
            schema:
              $ref: '#/components/schemas/TableCreate'
        required: true
      security:
      - basicAuth: []
      - cookieAuth: []
      - tokenAuth: []
      - {}
      responses:
        '400':
          content:
            application/json:
              schema:
                type: object
                additionalProperties: {}
          description: 'The request could not be carried out as sent: a payload key
            missing or holding something this endpoint cannot use, a column name that
            is not a Postgres identifier, or a query the database refused. The body
            carries `reason` or `error` naming which.'
        '401':
          content:
            application/json:
              schema:
                type: object
                additionalProperties: {}
          description: No credentials, or credentials this platform does not know.
        '409':
          content:
            application/json:
              schema:
                type: object
                additionalProperties: {}
          description: A table of that name already exists. Table names are global.
        '201':
          content:
            application/json:
              schema:
                type: object
                additionalProperties: {}
          description: Created. The body is empty; the table is at this URL.
    delete:
      operationId: tables_destroy
      description: Removes the table and its metadata. Irreversible, and it takes
        the rows with it.
      summary: Delete a table
      parameters:
      - in: path
        name: table
        schema:
          type: string
        description: 'The table''s name on this platform. **Names are global**: a
          table is addressed by name alone and no two tables share one, whichever
          topic they are published under.'
        required: true
      tags:
      - Tables
      security:
      - basicAuth: []
      - cookieAuth: []
      - tokenAuth: []
      - {}
      responses:
        '401':
          content:
            application/json:
              schema:
                type: object
                additionalProperties: {}
          description: No credentials, or credentials this platform does not know.
        '403':
          content:
            application/json:
              schema:
                type: object
                additionalProperties: {}
          description: 'Authenticated, but not permitted: the table belongs to somebody
            else, or is under embargo, or the operation needs a level of permission
            on it that this account does not hold.'
        '404':
          content:
            application/json:
              schema:
                type: object
                additionalProperties: {}
          description: No table of that name on this platform.
        '200':
          content:
            application/json:
              schema:
                type: object
                additionalProperties: {}
          description: Deleted. The body is empty.
  /api/v0/tables/{table}/bulk-upload/:
    post:
      operationId: tables_bulk_upload_create
      description: |-
        **The request body is the CSV itself**, not JSON wrapping one. Rows are appended in one transaction: either the whole upload lands or none of it does. It bypasses the edit journal, so there is no per-row history for what it writes -- the `BulkLoadEvent` it leaves is the upload's provenance.

        Send it gzipped (`Content-Encoding: gzip`) unless the file is small: the platform is not the bottleneck on a large upload, the client's uplink is, and CSV compresses well enough to change what is reachable.

        At most one upload per account runs at a time; a second answers `429` with `Retry-After` and writes nothing.
      summary: Append a CSV to a table
      parameters:
      - in: query
        name: delimiter
        schema:
          type: string
        description: 'The CSV delimiter of the body. **Required**: it is not guessed,
          because guessing it wrong loads a whole file into the wrong columns.'
        required: true
      - in: path
        name: table
        schema:
          type: string
        description: 'The table''s name on this platform. **Names are global**: a
          table is addressed by name alone and no two tables share one, whichever
          topic they are published under.'
        required: true
      tags:
      - Tables
      requestBody:
        content:
          text/csv:
            schema:
              type: string
      security:
      - basicAuth: []
      - cookieAuth: []
      - tokenAuth: []
      - {}
      responses:
        '400':
          content:
            application/json:
              schema:
                type: object
                additionalProperties: {}
          description: 'The request could not be carried out as sent: a payload key
            missing or holding something this endpoint cannot use, a column name that
            is not a Postgres identifier, or a query the database refused. The body
            carries `reason` or `error` naming which.'
        '401':
          content:
            application/json:
              schema:
                type: object
                additionalProperties: {}
          description: No credentials, or credentials this platform does not know.
        '403':
          content:
            application/json:
              schema:
                type: object
                additionalProperties: {}
          description: 'Authenticated, but not permitted: the table belongs to somebody
            else, or is under embargo, or the operation needs a level of permission
            on it that this account does not hold.'
        '404':
          content:
            application/json:
              schema:
                type: object
                additionalProperties: {}
          description: No table of that name on this platform.
        '201':
          content:
            application/json:
              schema:
                type: object
                additionalProperties: {}
          description: Appended. `rows` is how many, `id_range` the first and last
            id written, and `event_id` names the BulkLoadEvent this upload left.
        '429':
          content:
            application/json:
              schema:
                type: object
                additionalProperties: {}
          description: Another upload of yours is already running, or the platform
            is at its limit. Nothing was written and no event recorded. `Retry-After`
            says how long to wait.
  /api/v0/tables/{table}/columns/{column}:
    get:
      operationId: tables_columns_retrieve
      description: One column's definition, or the whole set when the address ends
        at `columns/`.
      summary: Describe a column, or every column
      parameters:
      - in: path
        name: column
        schema:
          type: string
        description: The column's name. Omit it for every column.
        required: true
      - in: path
        name: table
        schema:
          type: string
        description: 'The table''s name on this platform. **Names are global**: a
          table is addressed by name alone and no two tables share one, whichever
          topic they are published under.'
        required: true
      tags:
      - Tables
      security:
      - basicAuth: []
      - cookieAuth: []
      - tokenAuth: []
      - {}
      responses:
        '400':
          content:
            application/json:
              schema:
                type: object
                additionalProperties: {}
          description: 'The request could not be carried out as sent: a payload key
            missing or holding something this endpoint cannot use, a column name that
            is not a Postgres identifier, or a query the database refused. The body
            carries `reason` or `error` naming which.'
        '404':
          content:
            application/json:
              schema:
                type: object
                additionalProperties: {}
          description: No table of that name on this platform.
        '200':
          content:
            application/json:
              schema:
                type: object
                additionalProperties: {}
          description: The column definitions, keyed by name.
    post:
      operationId: tables_columns_create
      description: |-
        Changes an existing column's definition.

        The payload sits under a `query` key rather than at the top level.
      summary: Alter a column
      parameters:
      - in: path
        name: column
        schema:
          type: string
        description: The column's name.
        required: true
      - in: path
        name: table
        schema:
          type: string
        description: 'The table''s name on this platform. **Names are global**: a
          table is addressed by name alone and no two tables share one, whichever
          topic they are published under.'
        required: true
      tags:
      - Tables
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/QueryWrapped'
          application/x-www-form-urlencoded:
            schema:
              $ref: '#/components/schemas/QueryWrapped'
          multipart/form-data:
            schema:
              $ref: '#/components/schemas/QueryWrapped'
        required: true
      security:
      - basicAuth: []
      - cookieAuth: []
      - tokenAuth: []
      - {}
      responses:
        '400':
          content:
            application/json:
              schema:
                type: object
                additionalProperties: {}
          description: 'The request could not be carried out as sent: a payload key
            missing or holding something this endpoint cannot use, a column name that
            is not a Postgres identifier, or a query the database refused. The body
            carries `reason` or `error` naming which.'
        '401':
          content:
            application/json:
              schema:
                type: object
                additionalProperties: {}
          description: No credentials, or credentials this platform does not know.
        '403':
          content:
            application/json:
              schema:
                type: object
                additionalProperties: {}
          description: 'Authenticated, but not permitted: the table belongs to somebody
            else, or is under embargo, or the operation needs a level of permission
            on it that this account does not hold.'
        '404':
          content:
            application/json:
              schema:
                type: object
                additionalProperties: {}
          description: No table of that name on this platform.
        '200':
          content:
            application/json:
              schema:
                type: object
                additionalProperties: {}
          description: What the change came to.
    put:
      operationId: tables_columns_update
      description: |-
        Adds a column to an existing table.

        The payload sits under a `query` key rather than at the top level.
      summary: Add a column
      parameters:
      - in: path
        name: column
        schema:
          type: string
        description: The column's name.
        required: true
      - in: path
        name: table
        schema:
          type: string
        description: 'The table''s name on this platform. **Names are global**: a
          table is addressed by name alone and no two tables share one, whichever
          topic they are published under.'
        required: true
      tags:
      - Tables
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/QueryWrapped'
          application/x-www-form-urlencoded:
            schema:
              $ref: '#/components/schemas/QueryWrapped'
          multipart/form-data:
            schema:
              $ref: '#/components/schemas/QueryWrapped'
        required: true
      security:
      - basicAuth: []
      - cookieAuth: []
      - tokenAuth: []
      - {}
      responses:
        '400':
          content:
            application/json:
              schema:
                type: object
                additionalProperties: {}
          description: 'The request could not be carried out as sent: a payload key
            missing or holding something this endpoint cannot use, a column name that
            is not a Postgres identifier, or a query the database refused. The body
            carries `reason` or `error` naming which.'
        '401':
          content:
            application/json:
              schema:
                type: object
                additionalProperties: {}
          description: No credentials, or credentials this platform does not know.
        '403':
          content:
            application/json:
              schema:
                type: object
                additionalProperties: {}
          description: 'Authenticated, but not permitted: the table belongs to somebody
            else, or is under embargo, or the operation needs a level of permission
            on it that this account does not hold.'
        '404':
          content:
            application/json:
              schema:
                type: object
                additionalProperties: {}
          description: No table of that name on this platform.
        '201':
          content:
            application/json:
              schema:
                type: object
                additionalProperties: {}
          description: Added. The body is empty.
  /api/v0/tables/{table}/meta/:
    get:
      operationId: tables_meta_retrieve
      description: The table's OEMetadata document, as stored. A table carries one
        resource, so a reader wanting the table's own fields wants `resources[0]`.
      summary: Read a table's metadata
      parameters:
      - in: path
        name: table
        schema:
          type: string
        description: 'The table''s name on this platform. **Names are global**: a
          table is addressed by name alone and no two tables share one, whichever
          topic they are published under.'
        required: true
      tags:
      - 'Tables: metadata'
      security:
      - basicAuth: []
      - cookieAuth: []
      - tokenAuth: []
      - {}
      responses:
        '404':
          content:
            application/json:
              schema:
                type: object
                additionalProperties: {}
          description: No table of that name on this platform.
        '200':
          content:
            application/json:
              schema:
                type: object
                additionalProperties: {}
          description: The OEMetadata document.
    post:
      operationId: tables_meta_create
      description: Replaces the stored OEMetadata document. The payload is the document
        itself, at the top level -- not wrapped in `query`. An older version is converted
        to the current one, the column list is synchronised with the table's actual
        columns, and the result is validated before anything is stored; a document
        that fails validation is refused and nothing changes. The table's keywords
        become its tags on this platform.
      summary: Set a table's metadata
      parameters:
      - in: path
        name: table
        schema:
          type: string
        description: 'The table''s name on this platform. **Names are global**: a
          table is addressed by name alone and no two tables share one, whichever
          topic they are published under.'
        required: true
      tags:
      - 'Tables: metadata'
      requestBody:
        content:
          application/json:
            schema:
              type: object
              additionalProperties: {}
          application/x-www-form-urlencoded:
            schema:
              type: object
              additionalProperties: {}
          multipart/form-data:
            schema:
              type: object
              additionalProperties: {}
      security:
      - basicAuth: []
      - cookieAuth: []
      - tokenAuth: []
      - {}
      responses:
        '400':
          content:
            application/json:
              schema:
                type: object
                additionalProperties: {}
          description: 'The request could not be carried out as sent: a payload key
            missing or holding something this endpoint cannot use, a column name that
            is not a Postgres identifier, or a query the database refused. The body
            carries `reason` or `error` naming which.'
        '401':
          content:
            application/json:
              schema:
                type: object
                additionalProperties: {}
          description: No credentials, or credentials this platform does not know.
        '403':
          content:
            application/json:
              schema:
                type: object
                additionalProperties: {}
          description: 'Authenticated, but not permitted: the table belongs to somebody
            else, or is under embargo, or the operation needs a level of permission
            on it that this account does not hold.'
        '404':
          content:
            application/json:
              schema:
                type: object
                additionalProperties: {}
          description: No table of that name on this platform.
        '200':
          content:
            application/json:
              schema:
                type: object
                additionalProperties: {}
          description: The metadata as it was stored.
  /api/v0/tables/{table}/move_publish/{topic}/:
    post:
      operationId: tables_move_publish_create
      description: Moves the table into a topic and marks it published. Needs administrator
        permission on the table. An embargo may be given either at the top level or
        inside `query` -- this endpoint reads both, which is worth knowing because
        its neighbours do not.
      summary: Publish a table under a topic
      parameters:
      - in: path
        name: table
        schema:
          type: string
        description: 'The table''s name on this platform. **Names are global**: a
          table is addressed by name alone and no two tables share one, whichever
          topic they are published under.'
        required: true
      - in: path
        name: topic
        schema:
          type: string
        description: The topic to publish under.
        required: true
      tags:
      - Tables
      requestBody:
        content:
          application/json:
            schema:
              type: object
              additionalProperties: {}
          application/x-www-form-urlencoded:
            schema:
              type: object
              additionalProperties: {}
          multipart/form-data:
            schema:
              type: object
              additionalProperties: {}
      security:
      - basicAuth: []
      - cookieAuth: []
      - tokenAuth: []
      - {}
      responses:
        '400':
          content:
            application/json:
              schema:
                type: object
                additionalProperties: {}
          description: 'The request could not be carried out as sent: a payload key
            missing or holding something this endpoint cannot use, a column name that
            is not a Postgres identifier, or a query the database refused. The body
            carries `reason` or `error` naming which.'
        '401':
          content:
            application/json:
              schema:
                type: object
                additionalProperties: {}
          description: No credentials, or credentials this platform does not know.
        '403':
          content:
            application/json:
              schema:
                type: object
                additionalProperties: {}
          description: 'Authenticated, but not permitted: the table belongs to somebody
            else, or is under embargo, or the operation needs a level of permission
            on it that this account does not hold.'
        '404':
          content:
            application/json:
              schema:
                type: object
                additionalProperties: {}
          description: No table of that name on this platform.
        '200':
          content:
            application/json:
              schema:
                type: object
                additionalProperties: {}
          description: Published. The body is empty.
  /api/v0/tables/{table}/permissions/:
    get:
      operationId: tables_permissions_list
      description: 'The users and organizations holding a role on the table, each
        with its level and the levels it may be changed to, plus every role a Holder
        can be given. Needs a login and no role: the table''s permission page shows
        the same list to anyone. `can_manage` says whether the caller may write.'
      summary: List a table's Holders
      parameters:
      - in: path
        name: table
        schema:
          type: string
        description: 'The table''s name on this platform. **Names are global**: a
          table is addressed by name alone and no two tables share one, whichever
          topic they are published under.'
        required: true
      tags:
      - 'Tables: permissions'
      security:
      - basicAuth: []
      - cookieAuth: []
      - tokenAuth: []
      - {}
      responses:
        '401':
          content:
            application/json:
              schema:
                type: object
                additionalProperties: {}
          description: No credentials, or credentials this platform does not know.
        '404':
          content:
            application/json:
              schema:
                type: object
                additionalProperties: {}
          description: No table of that name on this platform.
        '200':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HolderList'
          description: The table's Holders.
    post:
      operationId: tables_permissions_create
      description: 'Adds a Holder: a user by name, at any role, or an organization
        the caller is a member of, at Data maintainer at most -- Admin is given to
        users only. A Holder the table already has is refused; change its role instead.
        Needs a login and Table admin on the table: Admin, directly or through an
        organization, or platform admin. The same rules hold as in the table''s access
        drawer and permission page.'
      summary: Give a user or an organization a role on a table
      parameters:
      - in: path
        name: table
        schema:
          type: string
        description: 'The table''s name on this platform. **Names are global**: a
          table is addressed by name alone and no two tables share one, whichever
          topic they are published under.'
        required: true
      tags:
      - 'Tables: permissions'
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/HolderAdd'
          application/x-www-form-urlencoded:
            schema:
              $ref: '#/components/schemas/HolderAdd'
          multipart/form-data:
            schema:
              $ref: '#/components/schemas/HolderAdd'
        required: true
      security:
      - basicAuth: []
      - cookieAuth: []
      - tokenAuth: []
      - {}
      responses:
        '401':
          content:
            application/json:
              schema:
                type: object
                additionalProperties: {}
          description: No credentials, or credentials this platform does not know.
        '404':
          content:
            application/json:
              schema:
                type: object
                additionalProperties: {}
          description: No table of that name on this platform.
        '201':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Holder'
          description: The new Holder.
        '400':
          content:
            application/json:
              schema:
                type: object
                additionalProperties: {}
          description: 'The request cannot be carried out as sent: a level outside
            the offered roles, Admin for an organization, an organization the caller
            is not a member of, or a user that does not exist. `reason` says which
            and `field` names the input. Nothing was written.'
        '403':
          content:
            application/json:
              schema:
                type: object
                additionalProperties: {}
          description: Not a Table admin on this table. Nothing was written.
  /api/v0/tables/{table}/permissions/{holder}/:
    patch:
      operationId: tables_permissions_partial_update
      description: 'Gives the Holder another of its `roles`. The role it already holds
        changes nothing and answers 200. A change that would leave the table without
        a user holding direct Admin, or without any Admin at all, is refused; one
        that takes the caller''s own Admin away asks for `confirm` first. Needs a
        login and Table admin on the table: Admin, directly or through an organization,
        or platform admin. The same rules hold as in the table''s access drawer and
        permission page.'
      summary: Change a Holder's role on a table
      parameters:
      - in: path
        name: holder
        schema:
          type: string
        description: 'The Holder''s key as the list gives it: `user:<id>` or `org:<id>`.'
        required: true
      - in: path
        name: table
        schema:
          type: string
        description: 'The table''s name on this platform. **Names are global**: a
          table is addressed by name alone and no two tables share one, whichever
          topic they are published under.'
        required: true
      tags:
      - 'Tables: permissions'
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/PatchedHolderChange'
          application/x-www-form-urlencoded:
            schema:
              $ref: '#/components/schemas/PatchedHolderChange'
          multipart/form-data:
            schema:
              $ref: '#/components/schemas/PatchedHolderChange'
      security:
      - basicAuth: []
      - cookieAuth: []
      - tokenAuth: []
      - {}
      responses:
        '401':
          content:
            application/json:
              schema:
                type: object
                additionalProperties: {}
          description: No credentials, or credentials this platform does not know.
        '200':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Holder'
          description: The Holder as it now stands.
        '400':
          content:
            application/json:
              schema:
                type: object
                additionalProperties: {}
          description: 'The request cannot be carried out as sent: a level outside
            the offered roles, Admin for an organization, an organization the caller
            is not a member of, or a user that does not exist. `reason` says which
            and `field` names the input. Nothing was written.'
        '403':
          content:
            application/json:
              schema:
                type: object
                additionalProperties: {}
          description: Not a Table admin on this table. Nothing was written.
        '404':
          content:
            application/json:
              schema:
                type: object
                additionalProperties: {}
          description: No table of that name, or the table has no such Holder -- which
            a repeated delete also meets.
        '409':
          content:
            application/json:
              schema:
                type: object
                additionalProperties: {}
          description: 'Nothing was written, and `code` says why. `last_admin`: the
            table must keep a user with direct Admin, or, where it has none, its last
            Admin grant of any kind -- give someone else Admin first; confirming does
            not change this answer. `confirmation_needed`: the change would take the
            caller''s own Admin, or all their access, away. `reason` says which; send
            the same request again with `confirm` to make it.'
    delete:
      operationId: tables_permissions_destroy
      description: 'Takes the Holder''s role away; removal is the only way to no access.
        The last user holding direct Admin cannot be removed, nor the last Admin grant
        of a table no user holds Admin on. Removing the caller''s own Admin, or all
        their access, asks for `confirm` first -- as a query parameter here, because
        a client cannot rely on a DELETE''s body being sent. Needs a login and Table
        admin on the table: Admin, directly or through an organization, or platform
        admin. The same rules hold as in the table''s access drawer and permission
        page.'
      summary: Remove a Holder from a table
      parameters:
      - in: query
        name: confirm
        schema:
          type: boolean
        description: '`true` after a 409 with `code: confirmation_needed`.'
      - in: path
        name: holder
        schema:
          type: string
        description: 'The Holder''s key as the list gives it: `user:<id>` or `org:<id>`.'
        required: true
      - in: path
        name: table
        schema:
          type: string
        description: 'The table''s name on this platform. **Names are global**: a
          table is addressed by name alone and no two tables share one, whichever
          topic they are published under.'
        required: true
      tags:
      - 'Tables: permissions'
      security:
      - basicAuth: []
      - cookieAuth: []
      - tokenAuth: []
      - {}
      responses:
        '401':
          content:
            application/json:
              schema:
                type: object
                additionalProperties: {}
          description: No credentials, or credentials this platform does not know.
        '204':
          description: Removed. No body.
        '403':
          content:
            application/json:
              schema:
                type: object
                additionalProperties: {}
          description: Not a Table admin on this table. Nothing was written.
        '404':
          content:
            application/json:
              schema:
                type: object
                additionalProperties: {}
          description: No table of that name, or the table has no such Holder -- which
            a repeated delete also meets.
        '409':
          content:
            application/json:
              schema:
                type: object
                additionalProperties: {}
          description: 'Nothing was written, and `code` says why. `last_admin`: the
            table must keep a user with direct Admin, or, where it has none, its last
            Admin grant of any kind -- give someone else Admin first; confirming does
            not change this answer. `confirmation_needed`: the change would take the
            caller''s own Admin, or all their access, away. `reason` says which; send
            the same request again with `confirm` to make it.'
  /api/v0/tables/{table}/rows/{row_id}:
    get:
      operationId: tables_rows_retrieve
      description: 'One row by id, or the rows a filter selects. The filter parameters
        and a row id are mutually exclusive: an id already names one row, so sending
        both is refused rather than silently resolved one way.'
      summary: Read rows
      parameters:
      - in: query
        name: column
        schema:
          type: string
        description: Return only this column. Repeat the parameter for several. Each
          must be a Postgres identifier; anything else is refused rather than ignored.
      - in: query
        name: form
        schema:
          type: string
        description: '`csv` returns the rows as CSV instead of JSON.'
      - in: query
        name: limit
        schema:
          type: integer
        description: At most this many rows. Not accepted together with a row id.
      - in: query
        name: offset
        schema:
          type: integer
        description: Skip this many rows first. Not accepted together with a row id.
      - in: query
        name: orderby
        schema:
          type: string
        description: Sort by this column. Not accepted together with a row id.
      - in: path
        name: row_id
        schema:
          type: integer
        description: One row's id. Omit it to address the whole table; the filter
          parameters are then what select rows.
        required: true
      - in: path
        name: table
        schema:
          type: string
        description: 'The table''s name on this platform. **Names are global**: a
          table is addressed by name alone and no two tables share one, whichever
          topic they are published under.'
        required: true
      - in: query
        name: where
        schema:
          type: string
        description: A filter, as `column=value`, `column>value`, `column<value` or
          the negated forms. Repeat the parameter to apply several. Not accepted together
          with a row id in the path -- the id already names the row.
      tags:
      - Tables
      security:
      - basicAuth: []
      - cookieAuth: []
      - tokenAuth: []
      - {}
      responses:
        '400':
          content:
            application/json:
              schema:
                type: object
                additionalProperties: {}
          description: 'The request could not be carried out as sent: a payload key
            missing or holding something this endpoint cannot use, a column name that
            is not a Postgres identifier, or a query the database refused. The body
            carries `reason` or `error` naming which.'
        '403':
          content:
            application/json:
              schema:
                type: object
                additionalProperties: {}
          description: 'Authenticated, but not permitted: the table belongs to somebody
            else, or is under embargo, or the operation needs a level of permission
            on it that this account does not hold.'
        '404':
          content:
            application/json:
              schema:
                type: object
                additionalProperties: {}
          description: No table of that name on this platform.
        '200':
          content:
            application/json:
              schema:
                type: object
                additionalProperties: {}
          description: The rows, as a list of objects keyed by column name.
    post:
      operationId: tables_rows_create
      description: |-
        At `rows/new` this inserts and answers `201`. At `rows/<id>` it updates that row, and at `rows/` it updates the rows a filter selects.

        The payload sits under a `query` key rather than at the top level.
      summary: Insert or update rows
      parameters:
      - in: path
        name: row_id
        schema:
          type: integer
        description: One row's id. Omit it to address the whole table; the filter
          parameters are then what select rows.
        required: true
      - in: path
        name: table
        schema:
          type: string
        description: 'The table''s name on this platform. **Names are global**: a
          table is addressed by name alone and no two tables share one, whichever
          topic they are published under.'
        required: true
      tags:
      - Tables
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/Row'
          application/x-www-form-urlencoded:
            schema:
              $ref: '#/components/schemas/Row'
          multipart/form-data:
            schema:
              $ref: '#/components/schemas/Row'
        required: true
      security:
      - basicAuth: []
      - cookieAuth: []
      - tokenAuth: []
      - {}
      responses:
        '400':
          content:
            application/json:
              schema:
                type: object
                additionalProperties: {}
          description: 'The request could not be carried out as sent: a payload key
            missing or holding something this endpoint cannot use, a column name that
            is not a Postgres identifier, or a query the database refused. The body
            carries `reason` or `error` naming which.'
        '401':
          content:
            application/json:
              schema:
                type: object
                additionalProperties: {}
          description: No credentials, or credentials this platform does not know.
        '403':
          content:
            application/json:
              schema:
                type: object
                additionalProperties: {}
          description: 'Authenticated, but not permitted: the table belongs to somebody
            else, or is under embargo, or the operation needs a level of permission
            on it that this account does not hold.'
        '404':
          content:
            application/json:
              schema:
                type: object
                additionalProperties: {}
          description: No table of that name on this platform.
        '200':
          content:
            application/json:
              schema:
                type: object
                additionalProperties: {}
          description: The rows as they now stand.
        '201':
          content:
            application/json:
              schema:
                type: object
                additionalProperties: {}
          description: Inserted.
    put:
      operationId: tables_rows_update
      description: |-
        Updates the row at this id, or inserts it there if it is not yet taken. **An id never changes**: an `id` in the payload that disagrees with the one in the address is a `409` rather than a move. Requires an id -- `rows/new` is a `POST`.

        The payload sits under a `query` key rather than at the top level.
      summary: Put one row at an id
      parameters:
      - in: path
        name: row_id
        schema:
          type: integer
        description: The row's id.
        required: true
      - in: path
        name: table
        schema:
          type: string
        description: 'The table''s name on this platform. **Names are global**: a
          table is addressed by name alone and no two tables share one, whichever
          topic they are published under.'
        required: true
      tags:
      - Tables
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/Row'
          application/x-www-form-urlencoded:
            schema:
              $ref: '#/components/schemas/Row'
          multipart/form-data:
            schema:
              $ref: '#/components/schemas/Row'
        required: true
      security:
      - basicAuth: []
      - cookieAuth: []
      - tokenAuth: []
      - {}
      responses:
        '400':
          content:
            application/json:
              schema:
                type: object
                additionalProperties: {}
          description: 'The request could not be carried out as sent: a payload key
            missing or holding something this endpoint cannot use, a column name that
            is not a Postgres identifier, or a query the database refused. The body
            carries `reason` or `error` naming which.'
        '401':
          content:
            application/json:
              schema:
                type: object
                additionalProperties: {}
          description: No credentials, or credentials this platform does not know.
        '403':
          content:
            application/json:
              schema:
                type: object
                additionalProperties: {}
          description: 'Authenticated, but not permitted: the table belongs to somebody
            else, or is under embargo, or the operation needs a level of permission
            on it that this account does not hold.'
        '404':
          content:
            application/json:
              schema:
                type: object
                additionalProperties: {}
          description: No table of that name on this platform.
        '409':
          content:
            application/json:
              schema:
                type: object
                additionalProperties: {}
          description: A table of that name already exists. Table names are global.
        '200':
          content:
            application/json:
              schema:
                type: object
                additionalProperties: {}
          description: Updated.
        '201':
          content:
            application/json:
              schema:
                type: object
                additionalProperties: {}
          description: Inserted at that id.
    delete:
      operationId: tables_rows_destroy
      description: One row by id, or the rows a `where` filter selects. Deleting with
        neither deletes every row in the table.
      summary: Delete rows
      parameters:
      - in: query
        name: column
        schema:
          type: string
        description: Return only this column. Repeat the parameter for several. Each
          must be a Postgres identifier; anything else is refused rather than ignored.
      - in: query
        name: form
        schema:
          type: string
        description: '`csv` returns the rows as CSV instead of JSON.'
      - in: query
        name: limit
        schema:
          type: integer
        description: At most this many rows. Not accepted together with a row id.
      - in: query
        name: offset
        schema:
          type: integer
        description: Skip this many rows first. Not accepted together with a row id.
      - in: query
        name: orderby
        schema:
          type: string
        description: Sort by this column. Not accepted together with a row id.
      - in: path
        name: row_id
        schema:
          type: integer
        description: One row's id. Omit it to address the whole table; the filter
          parameters are then what select rows.
        required: true
      - in: path
        name: table
        schema:
          type: string
        description: 'The table''s name on this platform. **Names are global**: a
          table is addressed by name alone and no two tables share one, whichever
          topic they are published under.'
        required: true
      - in: query
        name: where
        schema:
          type: string
        description: A filter, as `column=value`, `column>value`, `column<value` or
          the negated forms. Repeat the parameter to apply several. Not accepted together
          with a row id in the path -- the id already names the row.
      tags:
      - Tables
      security:
      - basicAuth: []
      - cookieAuth: []
      - tokenAuth: []
      - {}
      responses:
        '400':
          content:
            application/json:
              schema:
                type: object
                additionalProperties: {}
          description: 'The request could not be carried out as sent: a payload key
            missing or holding something this endpoint cannot use, a column name that
            is not a Postgres identifier, or a query the database refused. The body
            carries `reason` or `error` naming which.'
        '401':
          content:
            application/json:
              schema:
                type: object
                additionalProperties: {}
          description: No credentials, or credentials this platform does not know.
        '403':
          content:
            application/json:
              schema:
                type: object
                additionalProperties: {}
          description: 'Authenticated, but not permitted: the table belongs to somebody
            else, or is under embargo, or the operation needs a level of permission
            on it that this account does not hold.'
        '404':
          content:
            application/json:
              schema:
                type: object
                additionalProperties: {}
          description: No table of that name on this platform.
        '200':
          content:
            application/json:
              schema:
                type: object
                additionalProperties: {}
          description: What was deleted.
  /api/v0/tables/{table}/rows/new:
    get:
      operationId: tables_rows_new_retrieve
      description: 'One row by id, or the rows a filter selects. The filter parameters
        and a row id are mutually exclusive: an id already names one row, so sending
        both is refused rather than silently resolved one way.'
      summary: Read rows
      parameters:
      - in: query
        name: column
        schema:
          type: string
        description: Return only this column. Repeat the parameter for several. Each
          must be a Postgres identifier; anything else is refused rather than ignored.
      - in: query
        name: form
        schema:
          type: string
        description: '`csv` returns the rows as CSV instead of JSON.'
      - in: query
        name: limit
        schema:
          type: integer
        description: At most this many rows. Not accepted together with a row id.
      - in: query
        name: offset
        schema:
          type: integer
        description: Skip this many rows first. Not accepted together with a row id.
      - in: query
        name: orderby
        schema:
          type: string
        description: Sort by this column. Not accepted together with a row id.
      - in: path
        name: row_id
        schema:
          type: integer
        description: One row's id. Omit it to address the whole table; the filter
          parameters are then what select rows.
        required: true
      - in: path
        name: table
        schema:
          type: string
        description: 'The table''s name on this platform. **Names are global**: a
          table is addressed by name alone and no two tables share one, whichever
          topic they are published under.'
        required: true
      - in: query
        name: where
        schema:
          type: string
        description: A filter, as `column=value`, `column>value`, `column<value` or
          the negated forms. Repeat the parameter to apply several. Not accepted together
          with a row id in the path -- the id already names the row.
      tags:
      - Tables
      security:
      - basicAuth: []
      - cookieAuth: []
      - tokenAuth: []
      - {}
      responses:
        '400':
          content:
            application/json:
              schema:
                type: object
                additionalProperties: {}
          description: 'The request could not be carried out as sent: a payload key
            missing or holding something this endpoint cannot use, a column name that
            is not a Postgres identifier, or a query the database refused. The body
            carries `reason` or `error` naming which.'
        '403':
          content:
            application/json:
              schema:
                type: object
                additionalProperties: {}
          description: 'Authenticated, but not permitted: the table belongs to somebody
            else, or is under embargo, or the operation needs a level of permission
            on it that this account does not hold.'
        '404':
          content:
            application/json:
              schema:
                type: object
                additionalProperties: {}
          description: No table of that name on this platform.
        '200':
          content:
            application/json:
              schema:
                type: object
                additionalProperties: {}
          description: The rows, as a list of objects keyed by column name.
    post:
      operationId: tables_rows_new_create
      description: |-
        At `rows/new` this inserts and answers `201`. At `rows/<id>` it updates that row, and at `rows/` it updates the rows a filter selects.

        The payload sits under a `query` key rather than at the top level.
      summary: Insert or update rows
      parameters:
      - in: path
        name: row_id
        schema:
          type: integer
        description: One row's id. Omit it to address the whole table; the filter
          parameters are then what select rows.
        required: true
      - in: path
        name: table
        schema:
          type: string
        description: 'The table''s name on this platform. **Names are global**: a
          table is addressed by name alone and no two tables share one, whichever
          topic they are published under.'
        required: true
      tags:
      - Tables
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/Row'
          application/x-www-form-urlencoded:
            schema:
              $ref: '#/components/schemas/Row'
          multipart/form-data:
            schema:
              $ref: '#/components/schemas/Row'
        required: true
      security:
      - basicAuth: []
      - cookieAuth: []
      - tokenAuth: []
      - {}
      responses:
        '400':
          content:
            application/json:
              schema:
                type: object
                additionalProperties: {}
          description: 'The request could not be carried out as sent: a payload key
            missing or holding something this endpoint cannot use, a column name that
            is not a Postgres identifier, or a query the database refused. The body
            carries `reason` or `error` naming which.'
        '401':
          content:
            application/json:
              schema:
                type: object
                additionalProperties: {}
          description: No credentials, or credentials this platform does not know.
        '403':
          content:
            application/json:
              schema:
                type: object
                additionalProperties: {}
          description: 'Authenticated, but not permitted: the table belongs to somebody
            else, or is under embargo, or the operation needs a level of permission
            on it that this account does not hold.'
        '404':
          content:
            application/json:
              schema:
                type: object
                additionalProperties: {}
          description: No table of that name on this platform.
        '200':
          content:
            application/json:
              schema:
                type: object
                additionalProperties: {}
          description: The rows as they now stand.
        '201':
          content:
            application/json:
              schema:
                type: object
                additionalProperties: {}
          description: Inserted.
    put:
      operationId: tables_rows_new_update
      description: |-
        Updates the row at this id, or inserts it there if it is not yet taken. **An id never changes**: an `id` in the payload that disagrees with the one in the address is a `409` rather than a move. Requires an id -- `rows/new` is a `POST`.

        The payload sits under a `query` key rather than at the top level.
      summary: Put one row at an id
      parameters:
      - in: path
        name: row_id
        schema:
          type: integer
        description: The row's id.
        required: true
      - in: path
        name: table
        schema:
          type: string
        description: 'The table''s name on this platform. **Names are global**: a
          table is addressed by name alone and no two tables share one, whichever
          topic they are published under.'
        required: true
      tags:
      - Tables
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/Row'
          application/x-www-form-urlencoded:
            schema:
              $ref: '#/components/schemas/Row'
          multipart/form-data:
            schema:
              $ref: '#/components/schemas/Row'
        required: true
      security:
      - basicAuth: []
      - cookieAuth: []
      - tokenAuth: []
      - {}
      responses:
        '400':
          content:
            application/json:
              schema:
                type: object
                additionalProperties: {}
          description: 'The request could not be carried out as sent: a payload key
            missing or holding something this endpoint cannot use, a column name that
            is not a Postgres identifier, or a query the database refused. The body
            carries `reason` or `error` naming which.'
        '401':
          content:
            application/json:
              schema:
                type: object
                additionalProperties: {}
          description: No credentials, or credentials this platform does not know.
        '403':
          content:
            application/json:
              schema:
                type: object
                additionalProperties: {}
          description: 'Authenticated, but not permitted: the table belongs to somebody
            else, or is under embargo, or the operation needs a level of permission
            on it that this account does not hold.'
        '404':
          content:
            application/json:
              schema:
                type: object
                additionalProperties: {}
          description: No table of that name on this platform.
        '409':
          content:
            application/json:
              schema:
                type: object
                additionalProperties: {}
          description: A table of that name already exists. Table names are global.
        '200':
          content:
            application/json:
              schema:
                type: object
                additionalProperties: {}
          description: Updated.
        '201':
          content:
            application/json:
              schema:
                type: object
                additionalProperties: {}
          description: Inserted at that id.
    delete:
      operationId: tables_rows_new_destroy
      description: One row by id, or the rows a `where` filter selects. Deleting with
        neither deletes every row in the table.
      summary: Delete rows
      parameters:
      - in: query
        name: column
        schema:
          type: string
        description: Return only this column. Repeat the parameter for several. Each
          must be a Postgres identifier; anything else is refused rather than ignored.
      - in: query
        name: form
        schema:
          type: string
        description: '`csv` returns the rows as CSV instead of JSON.'
      - in: query
        name: limit
        schema:
          type: integer
        description: At most this many rows. Not accepted together with a row id.
      - in: query
        name: offset
        schema:
          type: integer
        description: Skip this many rows first. Not accepted together with a row id.
      - in: query
        name: orderby
        schema:
          type: string
        description: Sort by this column. Not accepted together with a row id.
      - in: path
        name: row_id
        schema:
          type: integer
        description: One row's id. Omit it to address the whole table; the filter
          parameters are then what select rows.
        required: true
      - in: path
        name: table
        schema:
          type: string
        description: 'The table''s name on this platform. **Names are global**: a
          table is addressed by name alone and no two tables share one, whichever
          topic they are published under.'
        required: true
      - in: query
        name: where
        schema:
          type: string
        description: A filter, as `column=value`, `column>value`, `column<value` or
          the negated forms. Repeat the parameter to apply several. Not accepted together
          with a row id in the path -- the id already names the row.
      tags:
      - Tables
      security:
      - basicAuth: []
      - cookieAuth: []
      - tokenAuth: []
      - {}
      responses:
        '400':
          content:
            application/json:
              schema:
                type: object
                additionalProperties: {}
          description: 'The request could not be carried out as sent: a payload key
            missing or holding something this endpoint cannot use, a column name that
            is not a Postgres identifier, or a query the database refused. The body
            carries `reason` or `error` naming which.'
        '401':
          content:
            application/json:
              schema:
                type: object
                additionalProperties: {}
          description: No credentials, or credentials this platform does not know.
        '403':
          content:
            application/json:
              schema:
                type: object
                additionalProperties: {}
          description: 'Authenticated, but not permitted: the table belongs to somebody
            else, or is under embargo, or the operation needs a level of permission
            on it that this account does not hold.'
        '404':
          content:
            application/json:
              schema:
                type: object
                additionalProperties: {}
          description: No table of that name on this platform.
        '200':
          content:
            application/json:
              schema:
                type: object
                additionalProperties: {}
          description: What was deleted.
  /api/v0/tables/{table}/unpublish:
    post:
      operationId: tables_unpublish_create
      description: Marks the table not published. It keeps its topic and its rows;
        what changes is whether it is listed. Needs administrator permission on the
        table.
      summary: Unpublish a table
      parameters:
      - in: path
        name: table
        schema:
          type: string
        description: 'The table''s name on this platform. **Names are global**: a
          table is addressed by name alone and no two tables share one, whichever
          topic they are published under.'
        required: true
      tags:
      - Tables
      security:
      - basicAuth: []
      - cookieAuth: []
      - tokenAuth: []
      - {}
      responses:
        '401':
          content:
            application/json:
              schema:
                type: object
                additionalProperties: {}
          description: No credentials, or credentials this platform does not know.
        '403':
          content:
            application/json:
              schema:
                type: object
                additionalProperties: {}
          description: 'Authenticated, but not permitted: the table belongs to somebody
            else, or is under embargo, or the operation needs a level of permission
            on it that this account does not hold.'
        '404':
          content:
            application/json:
              schema:
                type: object
                additionalProperties: {}
          description: No table of that name on this platform.
        '200':
          content:
            application/json:
              schema:
                type: object
                additionalProperties: {}
          description: Unpublished. The body is empty.
  /api/v0/schema/{schema}/tables/{table}/:
    get:
      operationId: schema_tables_retrieve
      description: |-
        The table's structure: its columns, its indexes and its constraints. Not its rows -- those are at `rows/`.

        **Deprecated.** This is the older, schema-qualified spelling of the same endpoint. Use `/api/v0/tables/{table}/` instead: it reaches the same view, and the `{schema}` segment here selects nothing.
      summary: Describe a table
      parameters:
      - in: path
        name: schema
        required: true
        schema:
          type: string
        description: '**Ignored.** This segment is not captured by the route, so no
          value of it changes where the request goes: table names are global on this
          platform and the table is found by name alone. It is here because the address
          requires a segment, not because it selects anything.'
      - in: path
        name: table
        schema:
          type: string
        description: 'The table''s name on this platform. **Names are global**: a
          table is addressed by name alone and no two tables share one, whichever
          topic they are published under.'
        required: true
      tags:
      - Tables (legacy addresses)
      security:
      - basicAuth: []
      - cookieAuth: []
      - tokenAuth: []
      - {}
      responses:
        '404':
          content:
            application/json:
              schema:
                type: object
                additionalProperties: {}
          description: No table of that name on this platform.
        '200':
          content:
            application/json:
              schema:
                type: object
                additionalProperties: {}
          description: '`name`, `columns`, `indexed` and `constraints`, each keyed
            by name.'
      deprecated: true
    post:
      operationId: schema_tables_create
      description: |-
        Queues a change to an existing table's structure. It is not applied on the spot: it lands in the change-request queue for review.

        **The payload is at the top level here**, unlike the `PUT` on this same address, which reads it out of `query`. `type` decides which kind of change is meant; anything else is refused.

        **Deprecated.** This is the older, schema-qualified spelling of the same endpoint. Use `/api/v0/tables/{table}/` instead: it reaches the same view, and the `{schema}` segment here selects nothing.
      summary: Change a table's columns or constraints
      parameters:
      - in: path
        name: schema
        required: true
        schema:
          type: string
        description: '**Ignored.** This segment is not captured by the route, so no
          value of it changes where the request goes: table names are global on this
          platform and the table is found by name alone. It is here because the address
          requires a segment, not because it selects anything.'
      - in: path
        name: table
        schema:
          type: string
        description: 'The table''s name on this platform. **Names are global**: a
          table is addressed by name alone and no two tables share one, whichever
          topic they are published under.'
        required: true
      tags:
      - Tables (legacy addresses)
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/TableAlter'
          application/x-www-form-urlencoded:
            schema:
              $ref: '#/components/schemas/TableAlter'
          multipart/form-data:
            schema:
              $ref: '#/components/schemas/TableAlter'
        required: true
      security:
      - basicAuth: []
      - cookieAuth: []
      - tokenAuth: []
      - {}
      responses:
        '400':
          content:
            application/json:
              schema:
                type: object
                additionalProperties: {}
          description: 'The request could not be carried out as sent: a payload key
            missing or holding something this endpoint cannot use, a column name that
            is not a Postgres identifier, or a query the database refused. The body
            carries `reason` or `error` naming which.'
        '401':
          content:
            application/json:
              schema:
                type: object
                additionalProperties: {}
          description: No credentials, or credentials this platform does not know.
        '403':
          content:
            application/json:
              schema:
                type: object
                additionalProperties: {}
          description: 'Authenticated, but not permitted: the table belongs to somebody
            else, or is under embargo, or the operation needs a level of permission
            on it that this account does not hold.'
        '404':
          content:
            application/json:
              schema:
                type: object
                additionalProperties: {}
          description: No table of that name on this platform.
        '200':
          content:
            application/json:
              schema:
                type: object
                additionalProperties: {}
          description: What the queued change came to.
      deprecated: true
    put:
      operationId: schema_tables_update
      description: |-
        Creates the table and its metadata row. **Two things about this endpoint catch people out.** The target schema comes from the `is_sandbox` query parameter, not from the payload. And table names are global -- a name already taken anywhere on the platform is a `409`, whichever schema or topic holds it.

        The payload sits under a `query` key rather than at the top level.

        **Deprecated.** This is the older, schema-qualified spelling of the same endpoint. Use `/api/v0/tables/{table}/` instead: it reaches the same view, and the `{schema}` segment here selects nothing.
      summary: Create a table
      parameters:
      - in: path
        name: schema
        required: true
        schema:
          type: string
        description: '**Ignored.** This segment is not captured by the route, so no
          value of it changes where the request goes: table names are global on this
          platform and the table is found by name alone. It is here because the address
          requires a segment, not because it selects anything.'
      - in: query
        name: is_sandbox
        schema:
          type: boolean
        description: '**Which schema the table is created in, and the one thing worth
          getting right here.** Send `true` and the table lands in the sandbox schema,
          which is where anything not meant to be published belongs. Omit it and the
          table is created in the public `data` schema, visible to everyone -- there
          is no confirmation step and no undo but deleting the table.'
      - in: path
        name: table
        schema:
          type: string
        description: 'The table''s name on this platform. **Names are global**: a
          table is addressed by name alone and no two tables share one, whichever
          topic they are published under.'
        required: true
      tags:
      - Tables (legacy addresses)
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/TableCreate'
          application/x-www-form-urlencoded:
            schema:
              $ref: '#/components/schemas/TableCreate'
          multipart/form-data:
            schema:
              $ref: '#/components/schemas/TableCreate'
        required: true
      security:
      - basicAuth: []
      - cookieAuth: []
      - tokenAuth: []
      - {}
      responses:
        '400':
          content:
            application/json:
              schema:
                type: object
                additionalProperties: {}
          description: 'The request could not be carried out as sent: a payload key
            missing or holding something this endpoint cannot use, a column name that
            is not a Postgres identifier, or a query the database refused. The body
            carries `reason` or `error` naming which.'
        '401':
          content:
            application/json:
              schema:
                type: object
                additionalProperties: {}
          description: No credentials, or credentials this platform does not know.
        '409':
          content:
            application/json:
              schema:
                type: object
                additionalProperties: {}
          description: A table of that name already exists. Table names are global.
        '201':
          content:
            application/json:
              schema:
                type: object
                additionalProperties: {}
          description: Created. The body is empty; the table is at this URL.
      deprecated: true
    delete:
      operationId: schema_tables_destroy
      description: |-
        Removes the table and its metadata. Irreversible, and it takes the rows with it.

        **Deprecated.** This is the older, schema-qualified spelling of the same endpoint. Use `/api/v0/tables/{table}/` instead: it reaches the same view, and the `{schema}` segment here selects nothing.
      summary: Delete a table
      parameters:
      - in: path
        name: schema
        required: true
        schema:
          type: string
        description: '**Ignored.** This segment is not captured by the route, so no
          value of it changes where the request goes: table names are global on this
          platform and the table is found by name alone. It is here because the address
          requires a segment, not because it selects anything.'
      - in: path
        name: table
        schema:
          type: string
        description: 'The table''s name on this platform. **Names are global**: a
          table is addressed by name alone and no two tables share one, whichever
          topic they are published under.'
        required: true
      tags:
      - Tables (legacy addresses)
      security:
      - basicAuth: []
      - cookieAuth: []
      - tokenAuth: []
      - {}
      responses:
        '401':
          content:
            application/json:
              schema:
                type: object
                additionalProperties: {}
          description: No credentials, or credentials this platform does not know.
        '403':
          content:
            application/json:
              schema:
                type: object
                additionalProperties: {}
          description: 'Authenticated, but not permitted: the table belongs to somebody
            else, or is under embargo, or the operation needs a level of permission
            on it that this account does not hold.'
        '404':
          content:
            application/json:
              schema:
                type: object
                additionalProperties: {}
          description: No table of that name on this platform.
        '200':
          content:
            application/json:
              schema:
                type: object
                additionalProperties: {}
          description: Deleted. The body is empty.
      deprecated: true
  /api/v0/schema/{schema}/tables/{table}/bulk-upload/:
    post:
      operationId: schema_tables_bulk_upload_create
      description: |-
        **The request body is the CSV itself**, not JSON wrapping one. Rows are appended in one transaction: either the whole upload lands or none of it does. It bypasses the edit journal, so there is no per-row history for what it writes -- the `BulkLoadEvent` it leaves is the upload's provenance.

        Send it gzipped (`Content-Encoding: gzip`) unless the file is small: the platform is not the bottleneck on a large upload, the client's uplink is, and CSV compresses well enough to change what is reachable.

        At most one upload per account runs at a time; a second answers `429` with `Retry-After` and writes nothing.

        **Deprecated.** This is the older, schema-qualified spelling of the same endpoint. Use `/api/v0/tables/{table}/bulk-upload/` instead: it reaches the same view, and the `{schema}` segment here selects nothing.
      summary: Append a CSV to a table
      parameters:
      - in: path
        name: schema
        required: true
        schema:
          type: string
        description: '**Ignored.** This segment is not captured by the route, so no
          value of it changes where the request goes: table names are global on this
          platform and the table is found by name alone. It is here because the address
          requires a segment, not because it selects anything.'
      - in: query
        name: delimiter
        schema:
          type: string
        description: 'The CSV delimiter of the body. **Required**: it is not guessed,
          because guessing it wrong loads a whole file into the wrong columns.'
        required: true
      - in: path
        name: table
        schema:
          type: string
        description: 'The table''s name on this platform. **Names are global**: a
          table is addressed by name alone and no two tables share one, whichever
          topic they are published under.'
        required: true
      tags:
      - Tables (legacy addresses)
      requestBody:
        content:
          text/csv:
            schema:
              type: string
      security:
      - basicAuth: []
      - cookieAuth: []
      - tokenAuth: []
      - {}
      responses:
        '400':
          content:
            application/json:
              schema:
                type: object
                additionalProperties: {}
          description: 'The request could not be carried out as sent: a payload key
            missing or holding something this endpoint cannot use, a column name that
            is not a Postgres identifier, or a query the database refused. The body
            carries `reason` or `error` naming which.'
        '401':
          content:
            application/json:
              schema:
                type: object
                additionalProperties: {}
          description: No credentials, or credentials this platform does not know.
        '403':
          content:
            application/json:
              schema:
                type: object
                additionalProperties: {}
          description: 'Authenticated, but not permitted: the table belongs to somebody
            else, or is under embargo, or the operation needs a level of permission
            on it that this account does not hold.'
        '404':
          content:
            application/json:
              schema:
                type: object
                additionalProperties: {}
          description: No table of that name on this platform.
        '201':
          content:
            application/json:
              schema:
                type: object
                additionalProperties: {}
          description: Appended. `rows` is how many, `id_range` the first and last
            id written, and `event_id` names the BulkLoadEvent this upload left.
        '429':
          content:
            application/json:
              schema:
                type: object
                additionalProperties: {}
          description: Another upload of yours is already running, or the platform
            is at its limit. Nothing was written and no event recorded. `Retry-After`
            says how long to wait.
      deprecated: true
  /api/v0/schema/{schema}/tables/{table}/columns/{column}:
    get:
      operationId: schema_tables_columns_retrieve
      description: |-
        One column's definition, or the whole set when the address ends at `columns/`.

        **Deprecated.** This is the older, schema-qualified spelling of the same endpoint. Use `/api/v0/tables/{table}/columns/{column}` instead: it reaches the same view, and the `{schema}` segment here selects nothing.
      summary: Describe a column, or every column
      parameters:
      - in: path
        name: schema
        required: true
        schema:
          type: string
        description: '**Ignored.** This segment is not captured by the route, so no
          value of it changes where the request goes: table names are global on this
          platform and the table is found by name alone. It is here because the address
          requires a segment, not because it selects anything.'
      - in: path
        name: column
        schema:
          type: string
        description: The column's name. Omit it for every column.
        required: true
      - in: path
        name: table
        schema:
          type: string
        description: 'The table''s name on this platform. **Names are global**: a
          table is addressed by name alone and no two tables share one, whichever
          topic they are published under.'
        required: true
      tags:
      - Tables (legacy addresses)
      security:
      - basicAuth: []
      - cookieAuth: []
      - tokenAuth: []
      - {}
      responses:
        '400':
          content:
            application/json:
              schema:
                type: object
                additionalProperties: {}
          description: 'The request could not be carried out as sent: a payload key
            missing or holding something this endpoint cannot use, a column name that
            is not a Postgres identifier, or a query the database refused. The body
            carries `reason` or `error` naming which.'
        '404':
          content:
            application/json:
              schema:
                type: object
                additionalProperties: {}
          description: No table of that name on this platform.
        '200':
          content:
            application/json:
              schema:
                type: object
                additionalProperties: {}
          description: The column definitions, keyed by name.
      deprecated: true
    post:
      operationId: schema_tables_columns_create
      description: |-
        Changes an existing column's definition.

        The payload sits under a `query` key rather than at the top level.

        **Deprecated.** This is the older, schema-qualified spelling of the same endpoint. Use `/api/v0/tables/{table}/columns/{column}` instead: it reaches the same view, and the `{schema}` segment here selects nothing.
      summary: Alter a column
      parameters:
      - in: path
        name: schema
        required: true
        schema:
          type: string
        description: '**Ignored.** This segment is not captured by the route, so no
          value of it changes where the request goes: table names are global on this
          platform and the table is found by name alone. It is here because the address
          requires a segment, not because it selects anything.'
      - in: path
        name: column
        schema:
          type: string
        description: The column's name.
        required: true
      - in: path
        name: table
        schema:
          type: string
        description: 'The table''s name on this platform. **Names are global**: a
          table is addressed by name alone and no two tables share one, whichever
          topic they are published under.'
        required: true
      tags:
      - Tables (legacy addresses)
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/QueryWrapped'
          application/x-www-form-urlencoded:
            schema:
              $ref: '#/components/schemas/QueryWrapped'
          multipart/form-data:
            schema:
              $ref: '#/components/schemas/QueryWrapped'
        required: true
      security:
      - basicAuth: []
      - cookieAuth: []
      - tokenAuth: []
      - {}
      responses:
        '400':
          content:
            application/json:
              schema:
                type: object
                additionalProperties: {}
          description: 'The request could not be carried out as sent: a payload key
            missing or holding something this endpoint cannot use, a column name that
            is not a Postgres identifier, or a query the database refused. The body
            carries `reason` or `error` naming which.'
        '401':
          content:
            application/json:
              schema:
                type: object
                additionalProperties: {}
          description: No credentials, or credentials this platform does not know.
        '403':
          content:
            application/json:
              schema:
                type: object
                additionalProperties: {}
          description: 'Authenticated, but not permitted: the table belongs to somebody
            else, or is under embargo, or the operation needs a level of permission
            on it that this account does not hold.'
        '404':
          content:
            application/json:
              schema:
                type: object
                additionalProperties: {}
          description: No table of that name on this platform.
        '200':
          content:
            application/json:
              schema:
                type: object
                additionalProperties: {}
          description: What the change came to.
      deprecated: true
    put:
      operationId: schema_tables_columns_update
      description: |-
        Adds a column to an existing table.

        The payload sits under a `query` key rather than at the top level.

        **Deprecated.** This is the older, schema-qualified spelling of the same endpoint. Use `/api/v0/tables/{table}/columns/{column}` instead: it reaches the same view, and the `{schema}` segment here selects nothing.
      summary: Add a column
      parameters:
      - in: path
        name: schema
        required: true
        schema:
          type: string
        description: '**Ignored.** This segment is not captured by the route, so no
          value of it changes where the request goes: table names are global on this
          platform and the table is found by name alone. It is here because the address
          requires a segment, not because it selects anything.'
      - in: path
        name: column
        schema:
          type: string
        description: The column's name.
        required: true
      - in: path
        name: table
        schema:
          type: string
        description: 'The table''s name on this platform. **Names are global**: a
          table is addressed by name alone and no two tables share one, whichever
          topic they are published under.'
        required: true
      tags:
      - Tables (legacy addresses)
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/QueryWrapped'
          application/x-www-form-urlencoded:
            schema:
              $ref: '#/components/schemas/QueryWrapped'
          multipart/form-data:
            schema:
              $ref: '#/components/schemas/QueryWrapped'
        required: true
      security:
      - basicAuth: []
      - cookieAuth: []
      - tokenAuth: []
      - {}
      responses:
        '400':
          content:
            application/json:
              schema:
                type: object
                additionalProperties: {}
          description: 'The request could not be carried out as sent: a payload key
            missing or holding something this endpoint cannot use, a column name that
            is not a Postgres identifier, or a query the database refused. The body
            carries `reason` or `error` naming which.'
        '401':
          content:
            application/json:
              schema:
                type: object
                additionalProperties: {}
          description: No credentials, or credentials this platform does not know.
        '403':
          content:
            application/json:
              schema:
                type: object
                additionalProperties: {}
          description: 'Authenticated, but not permitted: the table belongs to somebody
            else, or is under embargo, or the operation needs a level of permission
            on it that this account does not hold.'
        '404':
          content:
            application/json:
              schema:
                type: object
                additionalProperties: {}
          description: No table of that name on this platform.
        '201':
          content:
            application/json:
              schema:
                type: object
                additionalProperties: {}
          description: Added. The body is empty.
      deprecated: true
  /api/v0/schema/{schema}/tables/{table}/meta/:
    get:
      operationId: schema_tables_meta_retrieve
      description: |-
        The table's OEMetadata document, as stored. A table carries one resource, so a reader wanting the table's own fields wants `resources[0]`.

        **Deprecated.** This is the older, schema-qualified spelling of the same endpoint. Use `/api/v0/tables/{table}/meta/` instead: it reaches the same view, and the `{schema}` segment here selects nothing.
      summary: Read a table's metadata
      parameters:
      - in: path
        name: schema
        required: true
        schema:
          type: string
        description: '**Ignored.** This segment is not captured by the route, so no
          value of it changes where the request goes: table names are global on this
          platform and the table is found by name alone. It is here because the address
          requires a segment, not because it selects anything.'
      - in: path
        name: table
        schema:
          type: string
        description: 'The table''s name on this platform. **Names are global**: a
          table is addressed by name alone and no two tables share one, whichever
          topic they are published under.'
        required: true
      tags:
      - Tables (legacy addresses)
      security:
      - basicAuth: []
      - cookieAuth: []
      - tokenAuth: []
      - {}
      responses:
        '404':
          content:
            application/json:
              schema:
                type: object
                additionalProperties: {}
          description: No table of that name on this platform.
        '200':
          content:
            application/json:
              schema:
                type: object
                additionalProperties: {}
          description: The OEMetadata document.
      deprecated: true
    post:
      operationId: schema_tables_meta_create
      description: |-
        Replaces the stored OEMetadata document. The payload is the document itself, at the top level -- not wrapped in `query`. An older version is converted to the current one, the column list is synchronised with the table's actual columns, and the result is validated before anything is stored; a document that fails validation is refused and nothing changes. The table's keywords become its tags on this platform.

        **Deprecated.** This is the older, schema-qualified spelling of the same endpoint. Use `/api/v0/tables/{table}/meta/` instead: it reaches the same view, and the `{schema}` segment here selects nothing.
      summary: Set a table's metadata
      parameters:
      - in: path
        name: schema
        required: true
        schema:
          type: string
        description: '**Ignored.** This segment is not captured by the route, so no
          value of it changes where the request goes: table names are global on this
          platform and the table is found by name alone. It is here because the address
          requires a segment, not because it selects anything.'
      - in: path
        name: table
        schema:
          type: string
        description: 'The table''s name on this platform. **Names are global**: a
          table is addressed by name alone and no two tables share one, whichever
          topic they are published under.'
        required: true
      tags:
      - Tables (legacy addresses)
      requestBody:
        content:
          application/json:
            schema:
              type: object
              additionalProperties: {}
          application/x-www-form-urlencoded:
            schema:
              type: object
              additionalProperties: {}
          multipart/form-data:
            schema:
              type: object
              additionalProperties: {}
      security:
      - basicAuth: []
      - cookieAuth: []
      - tokenAuth: []
      - {}
      responses:
        '400':
          content:
            application/json:
              schema:
                type: object
                additionalProperties: {}
          description: 'The request could not be carried out as sent: a payload key
            missing or holding something this endpoint cannot use, a column name that
            is not a Postgres identifier, or a query the database refused. The body
            carries `reason` or `error` naming which.'
        '401':
          content:
            application/json:
              schema:
                type: object
                additionalProperties: {}
          description: No credentials, or credentials this platform does not know.
        '403':
          content:
            application/json:
              schema:
                type: object
                additionalProperties: {}
          description: 'Authenticated, but not permitted: the table belongs to somebody
            else, or is under embargo, or the operation needs a level of permission
            on it that this account does not hold.'
        '404':
          content:
            application/json:
              schema:
                type: object
                additionalProperties: {}
          description: No table of that name on this platform.
        '200':
          content:
            application/json:
              schema:
                type: object
                additionalProperties: {}
          description: The metadata as it was stored.
      deprecated: true
  /api/v0/schema/{schema}/tables/{table}/move_publish/{topic}/:
    post:
      operationId: schema_tables_move_publish_create
      description: |-
        Moves the table into a topic and marks it published. Needs administrator permission on the table. An embargo may be given either at the top level or inside `query` -- this endpoint reads both, which is worth knowing because its neighbours do not.

        **Deprecated.** This is the older, schema-qualified spelling of the same endpoint. Use `/api/v0/tables/{table}/move_publish/{topic}/` instead: it reaches the same view, and the `{schema}` segment here selects nothing.
      summary: Publish a table under a topic
      parameters:
      - in: path
        name: schema
        required: true
        schema:
          type: string
        description: '**Ignored.** This segment is not captured by the route, so no
          value of it changes where the request goes: table names are global on this
          platform and the table is found by name alone. It is here because the address
          requires a segment, not because it selects anything.'
      - in: path
        name: table
        schema:
          type: string
        description: 'The table''s name on this platform. **Names are global**: a
          table is addressed by name alone and no two tables share one, whichever
          topic they are published under.'
        required: true
      - in: path
        name: topic
        schema:
          type: string
        description: The topic to publish under.
        required: true
      tags:
      - Tables (legacy addresses)
      requestBody:
        content:
          application/json:
            schema:
              type: object
              additionalProperties: {}
          application/x-www-form-urlencoded:
            schema:
              type: object
              additionalProperties: {}
          multipart/form-data:
            schema:
              type: object
              additionalProperties: {}
      security:
      - basicAuth: []
      - cookieAuth: []
      - tokenAuth: []
      - {}
      responses:
        '400':
          content:
            application/json:
              schema:
                type: object
                additionalProperties: {}
          description: 'The request could not be carried out as sent: a payload key
            missing or holding something this endpoint cannot use, a column name that
            is not a Postgres identifier, or a query the database refused. The body
            carries `reason` or `error` naming which.'
        '401':
          content:
            application/json:
              schema:
                type: object
                additionalProperties: {}
          description: No credentials, or credentials this platform does not know.
        '403':
          content:
            application/json:
              schema:
                type: object
                additionalProperties: {}
          description: 'Authenticated, but not permitted: the table belongs to somebody
            else, or is under embargo, or the operation needs a level of permission
            on it that this account does not hold.'
        '404':
          content:
            application/json:
              schema:
                type: object
                additionalProperties: {}
          description: No table of that name on this platform.
        '200':
          content:
            application/json:
              schema:
                type: object
                additionalProperties: {}
          description: Published. The body is empty.
      deprecated: true
  /api/v0/schema/{schema}/tables/{table}/rows/{row_id}:
    get:
      operationId: schema_tables_rows_retrieve
      description: |-
        One row by id, or the rows a filter selects. The filter parameters and a row id are mutually exclusive: an id already names one row, so sending both is refused rather than silently resolved one way.

        **Deprecated.** This is the older, schema-qualified spelling of the same endpoint. Use `/api/v0/tables/{table}/rows/{row_id}` instead: it reaches the same view, and the `{schema}` segment here selects nothing.
      summary: Read rows
      parameters:
      - in: path
        name: schema
        required: true
        schema:
          type: string
        description: '**Ignored.** This segment is not captured by the route, so no
          value of it changes where the request goes: table names are global on this
          platform and the table is found by name alone. It is here because the address
          requires a segment, not because it selects anything.'
      - in: query
        name: column
        schema:
          type: string
        description: Return only this column. Repeat the parameter for several. Each
          must be a Postgres identifier; anything else is refused rather than ignored.
      - in: query
        name: form
        schema:
          type: string
        description: '`csv` returns the rows as CSV instead of JSON.'
      - in: query
        name: limit
        schema:
          type: integer
        description: At most this many rows. Not accepted together with a row id.
      - in: query
        name: offset
        schema:
          type: integer
        description: Skip this many rows first. Not accepted together with a row id.
      - in: query
        name: orderby
        schema:
          type: string
        description: Sort by this column. Not accepted together with a row id.
      - in: path
        name: row_id
        schema:
          type: integer
        description: One row's id. Omit it to address the whole table; the filter
          parameters are then what select rows.
        required: true
      - in: path
        name: table
        schema:
          type: string
        description: 'The table''s name on this platform. **Names are global**: a
          table is addressed by name alone and no two tables share one, whichever
          topic they are published under.'
        required: true
      - in: query
        name: where
        schema:
          type: string
        description: A filter, as `column=value`, `column>value`, `column<value` or
          the negated forms. Repeat the parameter to apply several. Not accepted together
          with a row id in the path -- the id already names the row.
      tags:
      - Tables (legacy addresses)
      security:
      - basicAuth: []
      - cookieAuth: []
      - tokenAuth: []
      - {}
      responses:
        '400':
          content:
            application/json:
              schema:
                type: object
                additionalProperties: {}
          description: 'The request could not be carried out as sent: a payload key
            missing or holding something this endpoint cannot use, a column name that
            is not a Postgres identifier, or a query the database refused. The body
            carries `reason` or `error` naming which.'
        '403':
          content:
            application/json:
              schema:
                type: object
                additionalProperties: {}
          description: 'Authenticated, but not permitted: the table belongs to somebody
            else, or is under embargo, or the operation needs a level of permission
            on it that this account does not hold.'
        '404':
          content:
            application/json:
              schema:
                type: object
                additionalProperties: {}
          description: No table of that name on this platform.
        '200':
          content:
            application/json:
              schema:
                type: object
                additionalProperties: {}
          description: The rows, as a list of objects keyed by column name.
      deprecated: true
    post:
      operationId: schema_tables_rows_create
      description: |-
        At `rows/new` this inserts and answers `201`. At `rows/<id>` it updates that row, and at `rows/` it updates the rows a filter selects.

        The payload sits under a `query` key rather than at the top level.

        **Deprecated.** This is the older, schema-qualified spelling of the same endpoint. Use `/api/v0/tables/{table}/rows/{row_id}` instead: it reaches the same view, and the `{schema}` segment here selects nothing.
      summary: Insert or update rows
      parameters:
      - in: path
        name: schema
        required: true
        schema:
          type: string
        description: '**Ignored.** This segment is not captured by the route, so no
          value of it changes where the request goes: table names are global on this
          platform and the table is found by name alone. It is here because the address
          requires a segment, not because it selects anything.'
      - in: path
        name: row_id
        schema:
          type: integer
        description: One row's id. Omit it to address the whole table; the filter
          parameters are then what select rows.
        required: true
      - in: path
        name: table
        schema:
          type: string
        description: 'The table''s name on this platform. **Names are global**: a
          table is addressed by name alone and no two tables share one, whichever
          topic they are published under.'
        required: true
      tags:
      - Tables (legacy addresses)
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/Row'
          application/x-www-form-urlencoded:
            schema:
              $ref: '#/components/schemas/Row'
          multipart/form-data:
            schema:
              $ref: '#/components/schemas/Row'
        required: true
      security:
      - basicAuth: []
      - cookieAuth: []
      - tokenAuth: []
      - {}
      responses:
        '400':
          content:
            application/json:
              schema:
                type: object
                additionalProperties: {}
          description: 'The request could not be carried out as sent: a payload key
            missing or holding something this endpoint cannot use, a column name that
            is not a Postgres identifier, or a query the database refused. The body
            carries `reason` or `error` naming which.'
        '401':
          content:
            application/json:
              schema:
                type: object
                additionalProperties: {}
          description: No credentials, or credentials this platform does not know.
        '403':
          content:
            application/json:
              schema:
                type: object
                additionalProperties: {}
          description: 'Authenticated, but not permitted: the table belongs to somebody
            else, or is under embargo, or the operation needs a level of permission
            on it that this account does not hold.'
        '404':
          content:
            application/json:
              schema:
                type: object
                additionalProperties: {}
          description: No table of that name on this platform.
        '200':
          content:
            application/json:
              schema:
                type: object
                additionalProperties: {}
          description: The rows as they now stand.
        '201':
          content:
            application/json:
              schema:
                type: object
                additionalProperties: {}
          description: Inserted.
      deprecated: true
    put:
      operationId: schema_tables_rows_update
      description: |-
        Updates the row at this id, or inserts it there if it is not yet taken. **An id never changes**: an `id` in the payload that disagrees with the one in the address is a `409` rather than a move. Requires an id -- `rows/new` is a `POST`.

        The payload sits under a `query` key rather than at the top level.

        **Deprecated.** This is the older, schema-qualified spelling of the same endpoint. Use `/api/v0/tables/{table}/rows/{row_id}` instead: it reaches the same view, and the `{schema}` segment here selects nothing.
      summary: Put one row at an id
      parameters:
      - in: path
        name: schema
        required: true
        schema:
          type: string
        description: '**Ignored.** This segment is not captured by the route, so no
          value of it changes where the request goes: table names are global on this
          platform and the table is found by name alone. It is here because the address
          requires a segment, not because it selects anything.'
      - in: path
        name: row_id
        schema:
          type: integer
        description: The row's id.
        required: true
      - in: path
        name: table
        schema:
          type: string
        description: 'The table''s name on this platform. **Names are global**: a
          table is addressed by name alone and no two tables share one, whichever
          topic they are published under.'
        required: true
      tags:
      - Tables (legacy addresses)
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/Row'
          application/x-www-form-urlencoded:
            schema:
              $ref: '#/components/schemas/Row'
          multipart/form-data:
            schema:
              $ref: '#/components/schemas/Row'
        required: true
      security:
      - basicAuth: []
      - cookieAuth: []
      - tokenAuth: []
      - {}
      responses:
        '400':
          content:
            application/json:
              schema:
                type: object
                additionalProperties: {}
          description: 'The request could not be carried out as sent: a payload key
            missing or holding something this endpoint cannot use, a column name that
            is not a Postgres identifier, or a query the database refused. The body
            carries `reason` or `error` naming which.'
        '401':
          content:
            application/json:
              schema:
                type: object
                additionalProperties: {}
          description: No credentials, or credentials this platform does not know.
        '403':
          content:
            application/json:
              schema:
                type: object
                additionalProperties: {}
          description: 'Authenticated, but not permitted: the table belongs to somebody
            else, or is under embargo, or the operation needs a level of permission
            on it that this account does not hold.'
        '404':
          content:
            application/json:
              schema:
                type: object
                additionalProperties: {}
          description: No table of that name on this platform.
        '409':
          content:
            application/json:
              schema:
                type: object
                additionalProperties: {}
          description: A table of that name already exists. Table names are global.
        '200':
          content:
            application/json:
              schema:
                type: object
                additionalProperties: {}
          description: Updated.
        '201':
          content:
            application/json:
              schema:
                type: object
                additionalProperties: {}
          description: Inserted at that id.
      deprecated: true
    delete:
      operationId: schema_tables_rows_destroy
      description: |-
        One row by id, or the rows a `where` filter selects. Deleting with neither deletes every row in the table.

        **Deprecated.** This is the older, schema-qualified spelling of the same endpoint. Use `/api/v0/tables/{table}/rows/{row_id}` instead: it reaches the same view, and the `{schema}` segment here selects nothing.
      summary: Delete rows
      parameters:
      - in: path
        name: schema
        required: true
        schema:
          type: string
        description: '**Ignored.** This segment is not captured by the route, so no
          value of it changes where the request goes: table names are global on this
          platform and the table is found by name alone. It is here because the address
          requires a segment, not because it selects anything.'
      - in: query
        name: column
        schema:
          type: string
        description: Return only this column. Repeat the parameter for several. Each
          must be a Postgres identifier; anything else is refused rather than ignored.
      - in: query
        name: form
        schema:
          type: string
        description: '`csv` returns the rows as CSV instead of JSON.'
      - in: query
        name: limit
        schema:
          type: integer
        description: At most this many rows. Not accepted together with a row id.
      - in: query
        name: offset
        schema:
          type: integer
        description: Skip this many rows first. Not accepted together with a row id.
      - in: query
        name: orderby
        schema:
          type: string
        description: Sort by this column. Not accepted together with a row id.
      - in: path
        name: row_id
        schema:
          type: integer
        description: One row's id. Omit it to address the whole table; the filter
          parameters are then what select rows.
        required: true
      - in: path
        name: table
        schema:
          type: string
        description: 'The table''s name on this platform. **Names are global**: a
          table is addressed by name alone and no two tables share one, whichever
          topic they are published under.'
        required: true
      - in: query
        name: where
        schema:
          type: string
        description: A filter, as `column=value`, `column>value`, `column<value` or
          the negated forms. Repeat the parameter to apply several. Not accepted together
          with a row id in the path -- the id already names the row.
      tags:
      - Tables (legacy addresses)
      security:
      - basicAuth: []
      - cookieAuth: []
      - tokenAuth: []
      - {}
      responses:
        '400':
          content:
            application/json:
              schema:
                type: object
                additionalProperties: {}
          description: 'The request could not be carried out as sent: a payload key
            missing or holding something this endpoint cannot use, a column name that
            is not a Postgres identifier, or a query the database refused. The body
            carries `reason` or `error` naming which.'
        '401':
          content:
            application/json:
              schema:
                type: object
                additionalProperties: {}
          description: No credentials, or credentials this platform does not know.
        '403':
          content:
            application/json:
              schema:
                type: object
                additionalProperties: {}
          description: 'Authenticated, but not permitted: the table belongs to somebody
            else, or is under embargo, or the operation needs a level of permission
            on it that this account does not hold.'
        '404':
          content:
            application/json:
              schema:
                type: object
                additionalProperties: {}
          description: No table of that name on this platform.
        '200':
          content:
            application/json:
              schema:
                type: object
                additionalProperties: {}
          description: What was deleted.
      deprecated: true
  /api/v0/schema/{schema}/tables/{table}/rows/new:
    get:
      operationId: schema_tables_rows_new_retrieve
      description: |-
        One row by id, or the rows a filter selects. The filter parameters and a row id are mutually exclusive: an id already names one row, so sending both is refused rather than silently resolved one way.

        **Deprecated.** This is the older, schema-qualified spelling of the same endpoint. Use `/api/v0/tables/{table}/rows/new` instead: it reaches the same view, and the `{schema}` segment here selects nothing.
      summary: Read rows
      parameters:
      - in: path
        name: schema
        required: true
        schema:
          type: string
        description: '**Ignored.** This segment is not captured by the route, so no
          value of it changes where the request goes: table names are global on this
          platform and the table is found by name alone. It is here because the address
          requires a segment, not because it selects anything.'
      - in: query
        name: column
        schema:
          type: string
        description: Return only this column. Repeat the parameter for several. Each
          must be a Postgres identifier; anything else is refused rather than ignored.
      - in: query
        name: form
        schema:
          type: string
        description: '`csv` returns the rows as CSV instead of JSON.'
      - in: query
        name: limit
        schema:
          type: integer
        description: At most this many rows. Not accepted together with a row id.
      - in: query
        name: offset
        schema:
          type: integer
        description: Skip this many rows first. Not accepted together with a row id.
      - in: query
        name: orderby
        schema:
          type: string
        description: Sort by this column. Not accepted together with a row id.
      - in: path
        name: row_id
        schema:
          type: integer
        description: One row's id. Omit it to address the whole table; the filter
          parameters are then what select rows.
        required: true
      - in: path
        name: table
        schema:
          type: string
        description: 'The table''s name on this platform. **Names are global**: a
          table is addressed by name alone and no two tables share one, whichever
          topic they are published under.'
        required: true
      - in: query
        name: where
        schema:
          type: string
        description: A filter, as `column=value`, `column>value`, `column<value` or
          the negated forms. Repeat the parameter to apply several. Not accepted together
          with a row id in the path -- the id already names the row.
      tags:
      - Tables (legacy addresses)
      security:
      - basicAuth: []
      - cookieAuth: []
      - tokenAuth: []
      - {}
      responses:
        '400':
          content:
            application/json:
              schema:
                type: object
                additionalProperties: {}
          description: 'The request could not be carried out as sent: a payload key
            missing or holding something this endpoint cannot use, a column name that
            is not a Postgres identifier, or a query the database refused. The body
            carries `reason` or `error` naming which.'
        '403':
          content:
            application/json:
              schema:
                type: object
                additionalProperties: {}
          description: 'Authenticated, but not permitted: the table belongs to somebody
            else, or is under embargo, or the operation needs a level of permission
            on it that this account does not hold.'
        '404':
          content:
            application/json:
              schema:
                type: object
                additionalProperties: {}
          description: No table of that name on this platform.
        '200':
          content:
            application/json:
              schema:
                type: object
                additionalProperties: {}
          description: The rows, as a list of objects keyed by column name.
      deprecated: true
    post:
      operationId: schema_tables_rows_new_create
      description: |-
        At `rows/new` this inserts and answers `201`. At `rows/<id>` it updates that row, and at `rows/` it updates the rows a filter selects.

        The payload sits under a `query` key rather than at the top level.

        **Deprecated.** This is the older, schema-qualified spelling of the same endpoint. Use `/api/v0/tables/{table}/rows/new` instead: it reaches the same view, and the `{schema}` segment here selects nothing.
      summary: Insert or update rows
      parameters:
      - in: path
        name: schema
        required: true
        schema:
          type: string
        description: '**Ignored.** This segment is not captured by the route, so no
          value of it changes where the request goes: table names are global on this
          platform and the table is found by name alone. It is here because the address
          requires a segment, not because it selects anything.'
      - in: path
        name: row_id
        schema:
          type: integer
        description: One row's id. Omit it to address the whole table; the filter
          parameters are then what select rows.
        required: true
      - in: path
        name: table
        schema:
          type: string
        description: 'The table''s name on this platform. **Names are global**: a
          table is addressed by name alone and no two tables share one, whichever
          topic they are published under.'
        required: true
      tags:
      - Tables (legacy addresses)
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/Row'
          application/x-www-form-urlencoded:
            schema:
              $ref: '#/components/schemas/Row'
          multipart/form-data:
            schema:
              $ref: '#/components/schemas/Row'
        required: true
      security:
      - basicAuth: []
      - cookieAuth: []
      - tokenAuth: []
      - {}
      responses:
        '400':
          content:
            application/json:
              schema:
                type: object
                additionalProperties: {}
          description: 'The request could not be carried out as sent: a payload key
            missing or holding something this endpoint cannot use, a column name that
            is not a Postgres identifier, or a query the database refused. The body
            carries `reason` or `error` naming which.'
        '401':
          content:
            application/json:
              schema:
                type: object
                additionalProperties: {}
          description: No credentials, or credentials this platform does not know.
        '403':
          content:
            application/json:
              schema:
                type: object
                additionalProperties: {}
          description: 'Authenticated, but not permitted: the table belongs to somebody
            else, or is under embargo, or the operation needs a level of permission
            on it that this account does not hold.'
        '404':
          content:
            application/json:
              schema:
                type: object
                additionalProperties: {}
          description: No table of that name on this platform.
        '200':
          content:
            application/json:
              schema:
                type: object
                additionalProperties: {}
          description: The rows as they now stand.
        '201':
          content:
            application/json:
              schema:
                type: object
                additionalProperties: {}
          description: Inserted.
      deprecated: true
    put:
      operationId: schema_tables_rows_new_update
      description: |-
        Updates the row at this id, or inserts it there if it is not yet taken. **An id never changes**: an `id` in the payload that disagrees with the one in the address is a `409` rather than a move. Requires an id -- `rows/new` is a `POST`.

        The payload sits under a `query` key rather than at the top level.

        **Deprecated.** This is the older, schema-qualified spelling of the same endpoint. Use `/api/v0/tables/{table}/rows/new` instead: it reaches the same view, and the `{schema}` segment here selects nothing.
      summary: Put one row at an id
      parameters:
      - in: path
        name: schema
        required: true
        schema:
          type: string
        description: '**Ignored.** This segment is not captured by the route, so no
          value of it changes where the request goes: table names are global on this
          platform and the table is found by name alone. It is here because the address
          requires a segment, not because it selects anything.'
      - in: path
        name: row_id
        schema:
          type: integer
        description: The row's id.
        required: true
      - in: path
        name: table
        schema:
          type: string
        description: 'The table''s name on this platform. **Names are global**: a
          table is addressed by name alone and no two tables share one, whichever
          topic they are published under.'
        required: true
      tags:
      - Tables (legacy addresses)
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/Row'
          application/x-www-form-urlencoded:
            schema:
              $ref: '#/components/schemas/Row'
          multipart/form-data:
            schema:
              $ref: '#/components/schemas/Row'
        required: true
      security:
      - basicAuth: []
      - cookieAuth: []
      - tokenAuth: []
      - {}
      responses:
        '400':
          content:
            application/json:
              schema:
                type: object
                additionalProperties: {}
          description: 'The request could not be carried out as sent: a payload key
            missing or holding something this endpoint cannot use, a column name that
            is not a Postgres identifier, or a query the database refused. The body
            carries `reason` or `error` naming which.'
        '401':
          content:
            application/json:
              schema:
                type: object
                additionalProperties: {}
          description: No credentials, or credentials this platform does not know.
        '403':
          content:
            application/json:
              schema:
                type: object
                additionalProperties: {}
          description: 'Authenticated, but not permitted: the table belongs to somebody
            else, or is under embargo, or the operation needs a level of permission
            on it that this account does not hold.'
        '404':
          content:
            application/json:
              schema:
                type: object
                additionalProperties: {}
          description: No table of that name on this platform.
        '409':
          content:
            application/json:
              schema:
                type: object
                additionalProperties: {}
          description: A table of that name already exists. Table names are global.
        '200':
          content:
            application/json:
              schema:
                type: object
                additionalProperties: {}
          description: Updated.
        '201':
          content:
            application/json:
              schema:
                type: object
                additionalProperties: {}
          description: Inserted at that id.
      deprecated: true
    delete:
      operationId: schema_tables_rows_new_destroy
      description: |-
        One row by id, or the rows a `where` filter selects. Deleting with neither deletes every row in the table.

        **Deprecated.** This is the older, schema-qualified spelling of the same endpoint. Use `/api/v0/tables/{table}/rows/new` instead: it reaches the same view, and the `{schema}` segment here selects nothing.
      summary: Delete rows
      parameters:
      - in: path
        name: schema
        required: true
        schema:
          type: string
        description: '**Ignored.** This segment is not captured by the route, so no
          value of it changes where the request goes: table names are global on this
          platform and the table is found by name alone. It is here because the address
          requires a segment, not because it selects anything.'
      - in: query
        name: column
        schema:
          type: string
        description: Return only this column. Repeat the parameter for several. Each
          must be a Postgres identifier; anything else is refused rather than ignored.
      - in: query
        name: form
        schema:
          type: string
        description: '`csv` returns the rows as CSV instead of JSON.'
      - in: query
        name: limit
        schema:
          type: integer
        description: At most this many rows. Not accepted together with a row id.
      - in: query
        name: offset
        schema:
          type: integer
        description: Skip this many rows first. Not accepted together with a row id.
      - in: query
        name: orderby
        schema:
          type: string
        description: Sort by this column. Not accepted together with a row id.
      - in: path
        name: row_id
        schema:
          type: integer
        description: One row's id. Omit it to address the whole table; the filter
          parameters are then what select rows.
        required: true
      - in: path
        name: table
        schema:
          type: string
        description: 'The table''s name on this platform. **Names are global**: a
          table is addressed by name alone and no two tables share one, whichever
          topic they are published under.'
        required: true
      - in: query
        name: where
        schema:
          type: string
        description: A filter, as `column=value`, `column>value`, `column<value` or
          the negated forms. Repeat the parameter to apply several. Not accepted together
          with a row id in the path -- the id already names the row.
      tags:
      - Tables (legacy addresses)
      security:
      - basicAuth: []
      - cookieAuth: []
      - tokenAuth: []
      - {}
      responses:
        '400':
          content:
            application/json:
              schema:
                type: object
                additionalProperties: {}
          description: 'The request could not be carried out as sent: a payload key
            missing or holding something this endpoint cannot use, a column name that
            is not a Postgres identifier, or a query the database refused. The body
            carries `reason` or `error` naming which.'
        '401':
          content:
            application/json:
              schema:
                type: object
                additionalProperties: {}
          description: No credentials, or credentials this platform does not know.
        '403':
          content:
            application/json:
              schema:
                type: object
                additionalProperties: {}
          description: 'Authenticated, but not permitted: the table belongs to somebody
            else, or is under embargo, or the operation needs a level of permission
            on it that this account does not hold.'
        '404':
          content:
            application/json:
              schema:
                type: object
                additionalProperties: {}
          description: No table of that name on this platform.
        '200':
          content:
            application/json:
              schema:
                type: object
                additionalProperties: {}
          description: What was deleted.
      deprecated: true
  /api/v0/schema/{schema}/tables/{table}/unpublish:
    post:
      operationId: schema_tables_unpublish_create
      description: |-
        Marks the table not published. It keeps its topic and its rows; what changes is whether it is listed. Needs administrator permission on the table.

        **Deprecated.** This is the older, schema-qualified spelling of the same endpoint. Use `/api/v0/tables/{table}/unpublish` instead: it reaches the same view, and the `{schema}` segment here selects nothing.
      summary: Unpublish a table
      parameters:
      - in: path
        name: schema
        required: true
        schema:
          type: string
        description: '**Ignored.** This segment is not captured by the route, so no
          value of it changes where the request goes: table names are global on this
          platform and the table is found by name alone. It is here because the address
          requires a segment, not because it selects anything.'
      - in: path
        name: table
        schema:
          type: string
        description: 'The table''s name on this platform. **Names are global**: a
          table is addressed by name alone and no two tables share one, whichever
          topic they are published under.'
        required: true
      tags:
      - Tables (legacy addresses)
      security:
      - basicAuth: []
      - cookieAuth: []
      - tokenAuth: []
      - {}
      responses:
        '401':
          content:
            application/json:
              schema:
                type: object
                additionalProperties: {}
          description: No credentials, or credentials this platform does not know.
        '403':
          content:
            application/json:
              schema:
                type: object
                additionalProperties: {}
          description: 'Authenticated, but not permitted: the table belongs to somebody
            else, or is under embargo, or the operation needs a level of permission
            on it that this account does not hold.'
        '404':
          content:
            application/json:
              schema:
                type: object
                additionalProperties: {}
          description: No table of that name on this platform.
        '200':
          content:
            application/json:
              schema:
                type: object
                additionalProperties: {}
          description: Unpublished. The body is empty.
      deprecated: true
components:
  schemas:
    AdvancedRequest:
      type: object
      description: |-
        The envelope every `advanced/` endpoint takes.

        `query` is the action's own payload and its keys differ per endpoint --
        `{"table": ...}` for `has_table`, a where-clause structure for `search`.
        It is read leniently: an object, a JSON **string** holding one, or a
        one-element list holding either. That is not a design, it is what
        `_internal_execute` accepts, and a client sending the object is doing the
        plain thing.

        The two identifiers are how a sequence of calls shares one database
        session: `connection/open` hands back a `connection_id`, `cursor/open` a
        `cursor_id`, and passing them here puts this call inside that transaction.
        Without them the call runs on its own and commits by itself.
      properties:
        query:
          description: This endpoint's own payload. See its description.
        connection_id:
          type: string
          description: From `advanced/connection/open`.
        cursor_id:
          type: string
          description: From `advanced/cursor/open`.
    AdvancedResponse:
      type: object
      description: |-
        What every `advanced/` endpoint answers with.

        The result is under `content`, always -- the endpoints differ in what they
        put there, not in where. The two identifiers come back when the call ran
        inside a session, so a client can thread the next call onto the same one.
      properties:
        content:
          description: The action's result. Its shape is the action's own.
        connection_id:
          type: string
        cursor_id:
          type: string
      required:
      - content
    BulkChange:
      type: object
      properties:
        table:
          type: string
        before:
          type: integer
          nullable: true
          description: The level before; null for no grant.
        after:
          type: integer
          nullable: true
          description: The level now; null for no grant.
      required:
      - after
      - before
      - table
    BulkOrganization:
      type: object
      properties:
        id:
          type: integer
        name:
          type: string
        members:
          type: integer
          description: 'How many members it has: each gains or loses what it holds.'
      required:
      - id
      - members
      - name
    BulkRemove:
      type: object
      properties:
        tables:
          type: array
          items:
            type: string
          description: The Tables, by name. The caller must be a Table admin on every
            one of them.
        confirm:
          description: 'After a 409 with `code: confirmation_needed`: the `tables`
            it named, to confirm exactly those (a Table added to that list since is
            asked about again), or `true` for any.'
      required:
      - tables
    BulkResult:
      type: object
      properties:
        organization:
          $ref: '#/components/schemas/BulkOrganization'
        changed:
          type: array
          items:
            $ref: '#/components/schemas/BulkChange'
          description: One entry per Table written, as it was logged.
        unchanged:
          type: array
          items:
            type: string
          description: 'The Tables left as they were: a share where the organization
            holds that role or more already, a removal where it holds no role.'
      required:
      - changed
      - organization
      - unchanged
    BulkShare:
      type: object
      properties:
        tables:
          type: array
          items:
            type: string
          description: The Tables, by name. The caller must be a Table admin on every
            one of them.
        level:
          type: integer
          description: 'The role: Data editor or Data maintainer, as the levels under
            `roles` of the Holder list give them. Admin is given to users only.'
      required:
      - level
      - tables
    BundleHistoryEntry:
      type: object
      properties:
        era:
          type: string
          description: Which generation of row this is. Entries written before this
            API existed record no verb and no field-level summary.
        verb:
          type: string
          nullable: true
        actor:
          type: string
          nullable: true
          description: A username, not an internal identifier.
        timestamp:
          type: string
          format: date-time
        resource:
          allOf:
          - $ref: '#/components/schemas/ResourceReference'
          description: The class and identifier the write was about.
        acronym:
          type: string
          nullable: true
          description: 'Set on a whole-bundle delete and nowhere else: after that
            write there is no bundle left to read an acronym off, so the line carries
            it.'
        version_before:
          type: integer
          nullable: true
        version_after:
          type: integer
          nullable: true
        changes:
          type: array
          items:
            $ref: '#/components/schemas/HistoryChange'
          nullable: true
          description: '`null` rather than `[]` where there cannot be a summary --
            an empty list would say that nothing changed, and what is known is that
            nothing recorded *what* changed.'
        triples:
          type: object
          additionalProperties: {}
      required:
      - acronym
      - actor
      - changes
      - era
      - resource
      - timestamp
      - verb
      - version_after
      - version_before
    BundleHistoryEntryPage:
      type: object
      properties:
        count:
          type: integer
        next:
          type: string
          format: uri
          nullable: true
        previous:
          type: string
          format: uri
          nullable: true
        results:
          type: array
          items:
            $ref: '#/components/schemas/BundleHistoryEntry'
      required:
      - count
      - next
      - previous
      - results
    BundleMeta:
      type: object
      description: |-
        The two keys that appear only when something was lost after the commit.

        The graph and the relational database cannot share a transaction, and the
        graph commits first. A history entry or an ownership row that could not be
        written afterwards is named beside the success it qualifies rather than
        turned into an error for a write that did happen -- so these are absent on
        an ordinary response and `false` when they are there. Never `true`: a
        client should not have to check something on every response to learn that
        the ordinary thing happened.
      properties:
        history_recorded:
          type: boolean
        ownership_recorded:
          type: boolean
        ownership_forgotten:
          type: boolean
        labels:
          type: object
          additionalProperties:
            type: string
            nullable: true
        uid:
          type: string
        iri:
          type: string
          format: uri
        version:
          type: integer
      required:
      - iri
      - uid
      - version
    BundleRemoval:
      type: object
      properties:
        deleted:
          type: array
          items:
            $ref: '#/components/schemas/RemovedNode'
        unlinked:
          type: array
          items:
            $ref: '#/components/schemas/RemovedNode'
        _meta:
          allOf:
          - $ref: '#/components/schemas/BundleRemovalMeta'
          title: ' meta'
      required:
      - _meta
      - deleted
      - unlinked
    BundleRemovalMeta:
      type: object
      description: |-
        The two keys that appear only when something was lost after the commit.

        The graph and the relational database cannot share a transaction, and the
        graph commits first. A history entry or an ownership row that could not be
        written afterwards is named beside the success it qualifies rather than
        turned into an error for a write that did happen -- so these are absent on
        an ordinary response and `false` when they are there. Never `true`: a
        client should not have to check something on every response to learn that
        the ordinary thing happened.
      properties:
        history_recorded:
          type: boolean
        ownership_recorded:
          type: boolean
        ownership_forgotten:
          type: boolean
        uid:
          type: string
        iri:
          type: string
          format: uri
        acronym:
          type: string
          nullable: true
        version_before:
          type: integer
      required:
      - acronym
      - iri
      - uid
      - version_before
    BundleReplaceMeta:
      type: object
      description: |-
        The bundle's own `_meta`, plus the account of what the replace removed.

        In `_meta` and not beside the fields, for the reason every read-only value
        here is: the top level of a bundle body is exactly what a write accepts, and
        a client that read a replace's answer can send it straight back.
      properties:
        history_recorded:
          type: boolean
        ownership_recorded:
          type: boolean
        ownership_forgotten:
          type: boolean
        labels:
          type: object
          additionalProperties:
            type: string
            nullable: true
        uid:
          type: string
        iri:
          type: string
          format: uri
        version:
          type: integer
        deleted:
          type: array
          items:
            $ref: '#/components/schemas/RemovedNode'
        unlinked:
          type: array
          items:
            $ref: '#/components/schemas/RemovedNode'
      required:
      - deleted
      - iri
      - uid
      - unlinked
      - version
    Dataset:
      type: object
      properties:
        name:
          type: string
          maxLength: 255
        external_url:
          type: string
          format: uri
          nullable: true
          maxLength: 1000
        type:
          $ref: '#/components/schemas/TypeEnum'
      required:
      - name
      - type
    DatasetAssignTables:
      type: object
      properties:
        tables:
          type: array
          items:
            type: object
            additionalProperties:
              type: string
          minItems: 1
      required:
      - tables
    DatasetAssigned:
      type: object
      description: What `assign-tables/` answers.
      properties:
        message:
          type: string
        added:
          type: array
          items:
            type: string
          description: Every table sent that the dataset holds after the call, those
            it held already included, so a repeated call answers as the first.
        missing:
          type: array
          items:
            type: object
            additionalProperties:
              type: string
          description: The references sent that name no table, as sent.
      required:
      - added
      - message
      - missing
    DatasetCreate:
      type: object
      properties:
        name:
          type: string
          description: Name of the dataset
          pattern: ^[-a-zA-Z0-9_]+$
        title:
          type: string
          description: Display name of the dataset, e.g. 'Wind Power Dataset Germany'
        description:
          type: string
          description: Short description of the dataset
        at_id:
          type: string
          format: uri
          description: 'Optional: persistent identifier or URL for the dataset'
        topics:
          type: array
          items:
            type: string
          description: 'Names of existing topics, the dataset''s own set. An unknown
            name, or the draft pseudo-topic, is refused naming it. Optional: a new
            dataset has none without it.'
      required:
      - description
      - name
      - title
    DatasetLink:
      type: object
      description: |-
        A scenario's link to data: what it is, what it points at, and where.

        Not a field table, because a dataset link has no fields of its own: the
        label, the address and the identifier the shape requires all follow from
        these keys. That is also why there is no partial form of this serializer --
        a link is added or removed, never edited.

        **`ref` has to be what a read of this link will report.** A client naming a
        platform target sends `ref` and `name` and lets the router derive the
        address; a client sending back a link it read sends the address it read,
        and then `ref` has to be the kind that address actually is. `ref` is never
        stored -- it is derived from the address on every read -- so a payload
        whose `ref` disagreed with its `url` would be making a claim that vanished
        on the way in and came back different.

        **`name` is the label, and it is deliberately NOT checked against the
        address.** They are one value for a link this API derives -- the address is
        built from the name -- and two independent values for a link written
        through the existing `manage-datasets/` route, which takes a
        human-readable title and a URL separately. Requiring them to agree would
        refuse exactly those links on the way back, which is the round trip issue
        #2473 exists to protect; so a citation may be labelled one thing and point
        at another, and everything that has to know where it points reads the
        address (`oekg.resolution`, via `reference_target`) rather than the label.
        That is #2469's rule, applied to a value a client can now send.
      properties:
        type:
          $ref: '#/components/schemas/TypeEnum'
        ref:
          nullable: true
          oneOf:
          - $ref: '#/components/schemas/RefEnum'
          - $ref: '#/components/schemas/NullEnum'
        name:
          type: string
        url:
          type: string
          nullable: true
      required:
      - name
      - ref
      - type
    DatasetLinkMeta:
      type: object
      description: |-
        The two keys that appear only when something was lost after the commit.

        The graph and the relational database cannot share a transaction, and the
        graph commits first. A history entry or an ownership row that could not be
        written afterwards is named beside the success it qualifies rather than
        turned into an error for a write that did happen -- so these are absent on
        an ordinary response and `false` when they are there. Never `true`: a
        client should not have to check something on every response to learn that
        the ordinary thing happened.
      properties:
        history_recorded:
          type: boolean
        ownership_recorded:
          type: boolean
        ownership_forgotten:
          type: boolean
        labels:
          type: object
          additionalProperties:
            type: string
            nullable: true
        uid:
          type: string
        iri:
          type: string
          format: uri
        type:
          type: string
          format: uri
          description: The OEO class of this resource.
        bundle:
          type: string
        target_iri:
          type: string
          format: uri
          nullable: true
          description: The address actually stored. It is the only thing that stays
            true when `ref` reads `null`, which happens for a link written before
            this API existed that points somewhere this platform has no route for.
        scenario:
          type: string
        resolvable:
          type: boolean
          nullable: true
          description: Whether the named target is still on this platform. `null`
            -- never `false` -- when the stored address is not a page here, because
            `false` would claim the target had been deleted.
        tables:
          type: array
          items:
            $ref: '#/components/schemas/TableEntry'
          nullable: true
          description: 'What the citation means today: the one table for `ref: table`,
            the catalogue entry''s current members for `ref: dataset`, `[]` when the
            named target is gone, and `null` when this server cannot say.'
      required:
      - bundle
      - iri
      - resolvable
      - scenario
      - tables
      - target_iri
      - type
      - uid
    DatasetLinkRead:
      type: object
      description: |-
        A scenario's link to data: what it is, what it points at, and where.

        Not a field table, because a dataset link has no fields of its own: the
        label, the address and the identifier the shape requires all follow from
        these keys. That is also why there is no partial form of this serializer --
        a link is added or removed, never edited.

        **`ref` has to be what a read of this link will report.** A client naming a
        platform target sends `ref` and `name` and lets the router derive the
        address; a client sending back a link it read sends the address it read,
        and then `ref` has to be the kind that address actually is. `ref` is never
        stored -- it is derived from the address on every read -- so a payload
        whose `ref` disagreed with its `url` would be making a claim that vanished
        on the way in and came back different.

        **`name` is the label, and it is deliberately NOT checked against the
        address.** They are one value for a link this API derives -- the address is
        built from the name -- and two independent values for a link written
        through the existing `manage-datasets/` route, which takes a
        human-readable title and a URL separately. Requiring them to agree would
        refuse exactly those links on the way back, which is the round trip issue
        #2473 exists to protect; so a citation may be labelled one thing and point
        at another, and everything that has to know where it points reads the
        address (`oekg.resolution`, via `reference_target`) rather than the label.
        That is #2469's rule, applied to a value a client can now send.
      properties:
        type:
          $ref: '#/components/schemas/TypeEnum'
        ref:
          nullable: true
          oneOf:
          - $ref: '#/components/schemas/RefEnum'
          - $ref: '#/components/schemas/NullEnum'
        name:
          type: string
        url:
          type: string
          nullable: true
        _meta:
          allOf:
          - $ref: '#/components/schemas/DatasetLinkMeta'
          title: ' meta'
      required:
      - _meta
      - name
      - ref
      - type
    DatasetLinkReadPage:
      type: object
      properties:
        count:
          type: integer
        next:
          type: string
          format: uri
          nullable: true
        previous:
          type: string
          format: uri
          nullable: true
        results:
          type: array
          items:
            $ref: '#/components/schemas/DatasetLinkRead'
      required:
      - count
      - next
      - previous
      - results
    DatasetRead:
      type: object
      description: |-
        A Dataset as every read of the API sends it. Every field is read-only:
        no write accepts one of them back.
      properties:
        uuid:
          type: string
          format: uuid
          readOnly: true
        name:
          type: string
          readOnly: true
        metadata:
          type: object
          additionalProperties: {}
          readOnly: true
        created_at:
          type: string
          format: date-time
          readOnly: true
        modified_at:
          type: string
          format: date-time
          readOnly: true
          nullable: true
          description: 'The last Modification of the dataset itself: a change to its
            title, description, topics or member tables. Never moved by publishing
            or unpublishing, nor by changes inside a member table; null for a dataset
            older than the field.'
        published_at:
          type: string
          format: date-time
          readOnly: true
          nullable: true
          description: When the dataset was last published; null for a draft. A republish
            overwrites it.
        creator:
          type: string
          title: Username
          readOnly: true
          nullable: true
          description: The username of the account that created the dataset, the one
            who may change it; null for a dataset older than ownership.
        topics:
          type: array
          items:
            type: string
          readOnly: true
          description: The names of the dataset's own topics, sorted.
      required:
      - created_at
      - creator
      - metadata
      - modified_at
      - name
      - published_at
      - topics
      - uuid
    DatasetResource:
      type: object
      properties:
        id:
          type: integer
          readOnly: true
        name:
          type: string
          maxLength: 1000
        oemetadata:
          nullable: true
        human_readable_name:
          type: string
          nullable: true
          maxLength: 1000
      required:
      - id
      - name
    DatasetSummary:
      type: object
      description: |-
        A Dataset as a list sends it: the read body without the assembled
        `metadata.resources`, plus how many members there are. A member's
        resource entry is its whole schema, so a page of full bodies would run to
        megabytes; the entries stay on the dataset's own read and its paged
        `resources/`.
      properties:
        uuid:
          type: string
          format: uuid
          readOnly: true
        name:
          type: string
          readOnly: true
        metadata:
          type: object
          additionalProperties: {}
          readOnly: true
        created_at:
          type: string
          format: date-time
          readOnly: true
        modified_at:
          type: string
          format: date-time
          readOnly: true
          nullable: true
          description: 'The last Modification of the dataset itself: a change to its
            title, description, topics or member tables. Never moved by publishing
            or unpublishing, nor by changes inside a member table; null for a dataset
            older than the field.'
        published_at:
          type: string
          format: date-time
          readOnly: true
          nullable: true
          description: When the dataset was last published; null for a draft. A republish
            overwrites it.
        creator:
          type: string
          title: Username
          readOnly: true
          nullable: true
          description: The username of the account that created the dataset, the one
            who may change it; null for a dataset older than ownership.
        topics:
          type: array
          items:
            type: string
          readOnly: true
          description: The names of the dataset's own topics, sorted.
        resource_count:
          type: integer
          readOnly: true
          description: 'How many member tables the dataset holds: the `count` its
            `resources/` pages through. A member whose metadata describes no resource
            counts here but has no entry in the dataset''s `metadata.resources`.'
      required:
      - created_at
      - creator
      - metadata
      - modified_at
      - name
      - published_at
      - resource_count
      - topics
      - uuid
    DatasetUnassigned:
      type: object
      description: What `unassign-tables/` answers.
      properties:
        message:
          type: string
        removed:
          type: array
          items:
            type: string
          description: The tables detached.
        missing:
          type: array
          items:
            type: object
            additionalProperties:
              type: string
          description: The references sent that the dataset did not hold, as sent.
      required:
      - message
      - missing
      - removed
    Energyframework:
      type: object
      properties:
        id:
          type: integer
          readOnly: true
        model_name:
          type: string
          title: Name
          description: What is the full model name?
          maxLength: 1000
        acronym:
          type: string
          nullable: true
          description: What is the abbreviation?
          maxLength: 20
        url:
          type: string
          readOnly: true
        license:
          allOf:
          - $ref: '#/components/schemas/LicenseEnum'
          description: |-
            Under which license is the framework published?

            * `Academic Free License v3.0` - Academic Free License v3.0
            * `Apache license 2.0` - Apache license 2.0
            * `Artistic license 2.0` - Artistic license 2.0
            * `Boost Software License 1.0` - Boost Software License 1.0
            * `BSD 2-clause "Simplified" license` - BSD 2-clause "Simplified" license
            * `BSD 3-clause Clear license` - BSD 3-clause Clear license
            * `Creative Commons license family` - Creative Commons license family
            * `Creative Commons Zero v1.0 Universal` - Creative Commons Zero v1.0 Universal
            * `Creative Commons Attribution 4.0` - Creative Commons Attribution 4.0
            * `Creative Commons Attribution Share Alike 4.0` - Creative Commons Attribution Share Alike 4.0
            * `Do What The F*ck You Want To Public License` - Do What The F*ck You Want To Public License
            * `Educational Community License v2.0` - Educational Community License v2.0
            * `Eclipse Public License 1.0` - Eclipse Public License 1.0
            * `European Union Public License 1.1` - European Union Public License 1.1
            * `GNU Affero General Public License v3.0` - GNU Affero General Public License v3.0
            * `GNU General Public License family` - GNU General Public License family
            * `GNU General Public License v2.0` - GNU General Public License v2.0
            * `GNU General Public License v3.0` - GNU General Public License v3.0
            * `GNU Lesser General Public License family` - GNU Lesser General Public License family
            * `GNU Lesser General Public License v2.1` - GNU Lesser General Public License v2.1
            * `GNU Lesser General Public License v3.0` - GNU Lesser General Public License v3.0
            * `ISC` - ISC
            * `LaTeX Project Public License v1.3c` - LaTeX Project Public License v1.3c
            * `Microsoft Public License` - Microsoft Public License
            * `MIT` - MIT
            * `Mozilla Public License 2.0` - Mozilla Public License 2.0
            * `Open Software License 3.0` - Open Software License 3.0
            * `PostgreSQL License` - PostgreSQL License
            * `SIL Open Font License 1.1` - SIL Open Font License 1.1
            * `University of Illinois/NCSA Open Source License` - University of Illinois/NCSA Open Source License
            * `The Unlicense` - The Unlicense
            * `zLib License` - zLib License
            * `BSD 3-clause 'New' or 'Revised' license` - BSD 3-clause 'New' or 'Revised' license
            * `Other` - Other
            * `Unknown` - Unknown
        institutions:
          type: array
          items:
            type: string
            maxLength: 1000
          nullable: true
          title: Institution(s)
          description: Which institutions develop(ed) the model?
      required:
      - id
      - model_name
      - url
    Energymodel:
      type: object
      properties:
        id:
          type: integer
          readOnly: true
        model_name:
          type: string
          title: Name
          description: What is the full model name?
          maxLength: 1000
        acronym:
          type: string
          nullable: true
          description: What is the abbreviation?
          maxLength: 20
        url:
          type: string
          readOnly: true
        license:
          allOf:
          - $ref: '#/components/schemas/LicenseEnum'
          description: |-
            Under which license is the framework published?

            * `Academic Free License v3.0` - Academic Free License v3.0
            * `Apache license 2.0` - Apache license 2.0
            * `Artistic license 2.0` - Artistic license 2.0
            * `Boost Software License 1.0` - Boost Software License 1.0
            * `BSD 2-clause "Simplified" license` - BSD 2-clause "Simplified" license
            * `BSD 3-clause Clear license` - BSD 3-clause Clear license
            * `Creative Commons license family` - Creative Commons license family
            * `Creative Commons Zero v1.0 Universal` - Creative Commons Zero v1.0 Universal
            * `Creative Commons Attribution 4.0` - Creative Commons Attribution 4.0
            * `Creative Commons Attribution Share Alike 4.0` - Creative Commons Attribution Share Alike 4.0
            * `Do What The F*ck You Want To Public License` - Do What The F*ck You Want To Public License
            * `Educational Community License v2.0` - Educational Community License v2.0
            * `Eclipse Public License 1.0` - Eclipse Public License 1.0
            * `European Union Public License 1.1` - European Union Public License 1.1
            * `GNU Affero General Public License v3.0` - GNU Affero General Public License v3.0
            * `GNU General Public License family` - GNU General Public License family
            * `GNU General Public License v2.0` - GNU General Public License v2.0
            * `GNU General Public License v3.0` - GNU General Public License v3.0
            * `GNU Lesser General Public License family` - GNU Lesser General Public License family
            * `GNU Lesser General Public License v2.1` - GNU Lesser General Public License v2.1
            * `GNU Lesser General Public License v3.0` - GNU Lesser General Public License v3.0
            * `ISC` - ISC
            * `LaTeX Project Public License v1.3c` - LaTeX Project Public License v1.3c
            * `Microsoft Public License` - Microsoft Public License
            * `MIT` - MIT
            * `Mozilla Public License 2.0` - Mozilla Public License 2.0
            * `Open Software License 3.0` - Open Software License 3.0
            * `PostgreSQL License` - PostgreSQL License
            * `SIL Open Font License 1.1` - SIL Open Font License 1.1
            * `University of Illinois/NCSA Open Source License` - University of Illinois/NCSA Open Source License
            * `The Unlicense` - The Unlicense
            * `zLib License` - zLib License
            * `BSD 3-clause 'New' or 'Revised' license` - BSD 3-clause 'New' or 'Revised' license
            * `Other` - Other
            * `Unknown` - Unknown
        institutions:
          type: array
          items:
            type: string
            maxLength: 1000
          nullable: true
          title: Institution(s)
          description: Which institutions develop(ed) the model?
      required:
      - id
      - model_name
      - url
    FailedEnum:
      enum:
      - members
      - topics
      type: string
      description: |-
        * `members` - members
        * `topics` - topics
    HistoryChange:
      type: object
      description: One field's worth of a write, rendered at read time from the triples.
      properties:
        field:
          type: string
          nullable: true
          description: '`null` for a triple this cannot attribute to a field -- the
            type and label a minted contact brings with it, say. Reported rather than
            dropped, because dropping it would make the summary look complete when
            it is not.'
        predicate:
          type: string
          format: uri
        removed:
          type: array
          items:
            type: string
        added:
          type: array
          items:
            type: string
      required:
      - added
      - field
      - predicate
      - removed
    Holder:
      type: object
      properties:
        holder:
          type: string
          description: 'The Holder''s key, `user:<id>` or `org:<id>`: its address
            below `permissions/`.'
        kind:
          $ref: '#/components/schemas/KindEnum'
        id:
          type: integer
        name:
          type: string
        level:
          type: integer
        role:
          type: string
          description: The level's name.
        roles:
          type: array
          items:
            type: integer
          description: The levels this Holder may be changed to. An organization stops
            at Data maintainer; one holding Admin from before that rule keeps it in
            this list, and can only be lowered.
        you:
          type: boolean
          description: Whether this is the caller, or an organization they belong
            to.
        members:
          type: integer
          description: An organization's member count.
      required:
      - holder
      - id
      - kind
      - level
      - name
      - role
      - roles
      - you
    HolderAdd:
      type: object
      properties:
        user:
          type: string
          description: A user, by name. Give this or `organization`.
        organization:
          type: integer
          description: An organization the caller is a member of, by id.
        level:
          type: integer
          description: One of the levels under `roles`.
      required:
      - level
    HolderList:
      type: object
      properties:
        table:
          type: string
        can_manage:
          type: boolean
          description: Whether the caller is a Table admin here and may write.
        roles:
          type: array
          items:
            $ref: '#/components/schemas/Role'
          description: Every role a Holder can be given.
        holders:
          type: array
          items:
            $ref: '#/components/schemas/Holder'
          description: Users first, then organizations.
      required:
      - can_manage
      - holders
      - roles
      - table
    IdentifiedDatasetLink:
      type: object
      description: A dataset link that may name the one it already is.
      properties:
        type:
          $ref: '#/components/schemas/TypeEnum'
        ref:
          nullable: true
          oneOf:
          - $ref: '#/components/schemas/RefEnum'
          - $ref: '#/components/schemas/NullEnum'
        name:
          type: string
        url:
          type: string
          nullable: true
      required:
      - name
      - ref
      - type
    IdentifiedScenario:
      type: object
      description: A scenario that may name the one it already is, links and all.
      properties:
        label:
          type: string
        acronym:
          type: string
        abstract:
          type: string
          nullable: true
        study_regions:
          type: array
          items:
            $ref: '#/components/schemas/NodeReference'
        interacting_regions:
          type: array
          items:
            $ref: '#/components/schemas/NodeReference'
        years:
          type: array
          items:
            type: string
            format: date-time
        datasets:
          type: array
          items:
            $ref: '#/components/schemas/IdentifiedDatasetLink'
        scenario_types:
          type: array
          items:
            type: string
      required:
      - acronym
      - label
    IdentifiedStudyReport:
      type: object
      description: A study report that may name the one it already is.
      properties:
        label:
          type: string
        doi:
          type: string
          nullable: true
        publication_date:
          type: string
          format: date-time
        authors:
          type: array
          items:
            $ref: '#/components/schemas/NodeReference'
        reference:
          type: string
          format: uri
          nullable: true
      required:
      - authors
      - label
      - publication_date
    KindEnum:
      enum:
      - user
      - org
      type: string
      description: |-
        * `user` - user
        * `org` - org
    LicenseEnum:
      enum:
      - Academic Free License v3.0
      - Apache license 2.0
      - Artistic license 2.0
      - Boost Software License 1.0
      - BSD 2-clause "Simplified" license
      - BSD 3-clause Clear license
      - Creative Commons license family
      - Creative Commons Zero v1.0 Universal
      - Creative Commons Attribution 4.0
      - Creative Commons Attribution Share Alike 4.0
      - Do What The F*ck You Want To Public License
      - Educational Community License v2.0
      - Eclipse Public License 1.0
      - European Union Public License 1.1
      - GNU Affero General Public License v3.0
      - GNU General Public License family
      - GNU General Public License v2.0
      - GNU General Public License v3.0
      - GNU Lesser General Public License family
      - GNU Lesser General Public License v2.1
      - GNU Lesser General Public License v3.0
      - ISC
      - LaTeX Project Public License v1.3c
      - Microsoft Public License
      - MIT
      - Mozilla Public License 2.0
      - Open Software License 3.0
      - PostgreSQL License
      - SIL Open Font License 1.1
      - University of Illinois/NCSA Open Source License
      - The Unlicense
      - zLib License
      - BSD 3-clause 'New' or 'Revised' license
      - Other
      - Unknown
      type: string
      description: |-
        * `Academic Free License v3.0` - Academic Free License v3.0
        * `Apache license 2.0` - Apache license 2.0
        * `Artistic license 2.0` - Artistic license 2.0
        * `Boost Software License 1.0` - Boost Software License 1.0
        * `BSD 2-clause "Simplified" license` - BSD 2-clause "Simplified" license
        * `BSD 3-clause Clear license` - BSD 3-clause Clear license
        * `Creative Commons license family` - Creative Commons license family
        * `Creative Commons Zero v1.0 Universal` - Creative Commons Zero v1.0 Universal
        * `Creative Commons Attribution 4.0` - Creative Commons Attribution 4.0
        * `Creative Commons Attribution Share Alike 4.0` - Creative Commons Attribution Share Alike 4.0
        * `Do What The F*ck You Want To Public License` - Do What The F*ck You Want To Public License
        * `Educational Community License v2.0` - Educational Community License v2.0
        * `Eclipse Public License 1.0` - Eclipse Public License 1.0
        * `European Union Public License 1.1` - European Union Public License 1.1
        * `GNU Affero General Public License v3.0` - GNU Affero General Public License v3.0
        * `GNU General Public License family` - GNU General Public License family
        * `GNU General Public License v2.0` - GNU General Public License v2.0
        * `GNU General Public License v3.0` - GNU General Public License v3.0
        * `GNU Lesser General Public License family` - GNU Lesser General Public License family
        * `GNU Lesser General Public License v2.1` - GNU Lesser General Public License v2.1
        * `GNU Lesser General Public License v3.0` - GNU Lesser General Public License v3.0
        * `ISC` - ISC
        * `LaTeX Project Public License v1.3c` - LaTeX Project Public License v1.3c
        * `Microsoft Public License` - Microsoft Public License
        * `MIT` - MIT
        * `Mozilla Public License 2.0` - Mozilla Public License 2.0
        * `Open Software License 3.0` - Open Software License 3.0
        * `PostgreSQL License` - PostgreSQL License
        * `SIL Open Font License 1.1` - SIL Open Font License 1.1
        * `University of Illinois/NCSA Open Source License` - University of Illinois/NCSA Open Source License
        * `The Unlicense` - The Unlicense
        * `zLib License` - zLib License
        * `BSD 3-clause 'New' or 'Revised' license` - BSD 3-clause 'New' or 'Revised' license
        * `Other` - Other
        * `Unknown` - Unknown
    NestedScenario:
      type: object
      description: |-
        A scenario as it appears *inside* a bundle payload, links and all.

        The links nest here and not on the bundle because that is where the shape
        hangs them, and they nest at all because of what `replace` does: anything
        in the graph and absent from its payload is removed, so a link a payload
        has no way to mention is a link a re-import destroys. A bundle read nests
        them for the same reason from the other side -- a client sends back what it
        read, without stripping and without losing its citations.

        A scenario's **own** endpoints use the plain serializer above and refuse
        this key: a link has its own URL there, and add-and-remove is its whole
        contract.
      properties:
        label:
          type: string
        acronym:
          type: string
        abstract:
          type: string
          nullable: true
        study_regions:
          type: array
          items:
            $ref: '#/components/schemas/NodeReference'
        interacting_regions:
          type: array
          items:
            $ref: '#/components/schemas/NodeReference'
        years:
          type: array
          items:
            type: string
            format: date-time
        datasets:
          type: array
          items:
            $ref: '#/components/schemas/DatasetLink'
        scenario_types:
          type: array
          items:
            type: string
      required:
      - acronym
      - label
    NestedScenarioRead:
      type: object
      description: |-
        A scenario *inside* a bundle body: the same, plus what it cites.

        Two read shapes for one resource, because there are two write shapes: a
        scenario's own endpoints take no dataset links, and a bundle payload takes
        them nested. The read that a client sends back to `replace` has to be the
        second one, or the citations it does not mention are the citations it
        loses.
      properties:
        label:
          type: string
        acronym:
          type: string
        abstract:
          type: string
          nullable: true
        study_regions:
          type: array
          items:
            $ref: '#/components/schemas/NodeReference'
        interacting_regions:
          type: array
          items:
            $ref: '#/components/schemas/NodeReference'
        years:
          type: array
          items:
            type: string
            format: date-time
        datasets:
          type: array
          items:
            $ref: '#/components/schemas/DatasetLinkRead'
        _meta:
          allOf:
          - $ref: '#/components/schemas/SubResourceMeta'
          title: ' meta'
        scenario_types:
          type: array
          items:
            type: string
      required:
      - _meta
      - acronym
      - datasets
      - label
    NodeReference:
      type: object
      description: 'A contact, organisation or funder: referenced by IRI, or minted
        here.'
      properties:
        iri:
          type: string
          nullable: true
        label:
          type: string
      required:
      - label
    NullEnum:
      enum:
      - null
    PaginatedDatasetResourceList:
      type: object
      required:
      - count
      - results
      properties:
        count:
          type: integer
          example: 123
        next:
          type: string
          nullable: true
          format: uri
          example: http://api.example.org/accounts/?page=4
        previous:
          type: string
          nullable: true
          format: uri
          example: http://api.example.org/accounts/?page=2
        results:
          type: array
          items:
            $ref: '#/components/schemas/DatasetResource'
    PaginatedDatasetSummaryList:
      type: object
      required:
      - count
      - results
      properties:
        count:
          type: integer
          example: 123
        next:
          type: string
          nullable: true
          format: uri
          example: http://api.example.org/accounts/?page=4
        previous:
          type: string
          nullable: true
          format: uri
          example: http://api.example.org/accounts/?page=2
        results:
          type: array
          items:
            $ref: '#/components/schemas/DatasetSummary'
    Part:
      type: object
      description: 'A framework or model factsheet: bundle-local, with a link out.'
      properties:
        label:
          type: string
        iri:
          type: string
          nullable: true
      required:
      - label
    PatchedDatasetPatch:
      type: object
      description: |-
        `PATCH /datasets/<name>/`: every key optional, and a key left out is
        left as it is. `name` is refused even when equal, so a client learns the
        name is fixed instead of seeing it ignored.
      properties:
        title:
          type: string
        description:
          type: string
        at_id:
          type: string
          format: uri
          description: Left out, the stored identifier is kept.
        topics:
          type: array
          items:
            type: string
          description: Names of existing topics, the dataset's own set. An unknown
            name, or the draft pseudo-topic, is refused naming it. Replaces the whole
            set; `[]` empties it.
    PatchedHolderChange:
      type: object
      properties:
        level:
          type: integer
          description: 'Required: one of the Holder''s `roles`.'
        confirm:
          type: boolean
          description: '`true` after a 409 with `code: confirmation_needed`.'
    PatchedScenario:
      type: object
      description: |-
        One scenario factsheet -- a sub-resource, not a field of its bundle.

        What makes it one is the shape: it carries its own has-uuid. That uuid is
        **not** a field here, because the server mints it; a client supplies no
        identifier anywhere in this API.
      properties:
        label:
          type: string
        acronym:
          type: string
        abstract:
          type: string
          nullable: true
        study_regions:
          type: array
          items:
            $ref: '#/components/schemas/NodeReference'
        interacting_regions:
          type: array
          items:
            $ref: '#/components/schemas/NodeReference'
        years:
          type: array
          items:
            type: string
            format: date-time
        scenario_types:
          type: array
          items:
            type: string
    PatchedScenarioBundle:
      type: object
      description: The closed bundle field set -- these and nothing else.
      properties:
        label:
          type: string
        acronym:
          type: string
        abstract:
          type: string
          nullable: true
        contacts:
          type: array
          items:
            $ref: '#/components/schemas/NodeReference'
        organisations:
          type: array
          items:
            $ref: '#/components/schemas/NodeReference'
        funders:
          type: array
          items:
            $ref: '#/components/schemas/NodeReference'
        frameworks:
          type: array
          items:
            $ref: '#/components/schemas/Part'
        models:
          type: array
          items:
            $ref: '#/components/schemas/Part'
        descriptors:
          type: array
          items:
            type: string
        sector_divisions:
          type: array
          items:
            type: string
        sectors:
          type: array
          items:
            type: string
        technologies:
          type: array
          items:
            type: string
        energy_carriers:
          type: array
          items:
            type: string
    PatchedStudyReport:
      type: object
      description: |-
        One study report -- the publication a bundle is written up in.

        A sub-resource for the same reason a scenario is: the shape gives it its
        own has-uuid, which the server mints, so it is not a field here.

        What the shape requires of one, and therefore what is required here: a
        label, at least one author, and exactly one publication date. The doi and
        the reference are optional, and the reference is singular because the shape
        allows at most one.
      properties:
        label:
          type: string
        doi:
          type: string
          nullable: true
        publication_date:
          type: string
          format: date-time
        authors:
          type: array
          items:
            $ref: '#/components/schemas/NodeReference'
        reference:
          type: string
          format: uri
          nullable: true
    PeerReviewEnum:
      enum:
      - finished
      - in_progress
      type: string
      description: |-
        * `finished` - finished
        * `in_progress` - in_progress
    PublishGateRefusal:
      type: object
      description: 'A publish the dataset''s state refused: the request was fine.'
      properties:
        detail:
          type: string
          description: What was refused, and why.
        failed:
          type: array
          items:
            $ref: '#/components/schemas/FailedEnum'
          description: 'The publish gate''s checks the dataset failed, by name: `members`
            (it holds no table) and `topics` (it has no topic). The names are stable;
            a client may branch on them.'
      required:
      - detail
      - failed
    QueryWrapped:
      type: object
      description: A payload this endpoint reads out of a `query` key.
      properties:
        query: {}
      required:
      - query
    RefEnum:
      enum:
      - table
      - dataset
      - external
      type: string
      description: |-
        * `table` - table
        * `dataset` - dataset
        * `external` - external
    Refusal:
      type: object
      description: DRF's own refusal body, which every dataset refusal but a 400 is.
      properties:
        detail:
          type: string
          description: What was refused, and why.
      required:
      - detail
    Removal:
      type: object
      description: |-
        What a delete came to: two lists, because one status code cannot say.

        `unlinked` holds only the nodes the typed containment walk **downgraded** --
        ones something outside this bundle still cites, so they were detached
        rather than destroyed. The shared regions, authors and ontology terms every
        delete detaches are the rule that always applies, and listing them would
        bury the line that is news.
      properties:
        deleted:
          type: array
          items:
            $ref: '#/components/schemas/RemovedNode'
        unlinked:
          type: array
          items:
            $ref: '#/components/schemas/RemovedNode'
        _meta:
          allOf:
          - $ref: '#/components/schemas/RemovalMeta'
          title: ' meta'
      required:
      - _meta
      - deleted
      - unlinked
    RemovalMeta:
      type: object
      description: |-
        The two keys that appear only when something was lost after the commit.

        The graph and the relational database cannot share a transaction, and the
        graph commits first. A history entry or an ownership row that could not be
        written afterwards is named beside the success it qualifies rather than
        turned into an error for a write that did happen -- so these are absent on
        an ordinary response and `false` when they are there. Never `true`: a
        client should not have to check something on every response to learn that
        the ordinary thing happened.
      properties:
        history_recorded:
          type: boolean
        ownership_recorded:
          type: boolean
        ownership_forgotten:
          type: boolean
        bundle:
          type: string
        resource:
          $ref: '#/components/schemas/ResourceReference'
        scenario:
          type: string
      required:
      - bundle
      - resource
    RemovedNode:
      type: object
      description: 'A node as a delete reports it back: an address and a class.'
      properties:
        iri:
          type: string
          format: uri
        type:
          type: string
          format: uri
          nullable: true
          description: '`null` for a node whose class this API does not recognise,
            which a response listing a bare address would not have said.'
      required:
      - iri
      - type
    ResourceReference:
      type: object
      description: |-
        Which resource a line is about: its OEO class and its identifier.

        Both nullable, and for one reason: a row written before sub-resources
        existed names neither, and is read as a bundle write.
      properties:
        type:
          type: string
          format: uri
          nullable: true
        uid:
          type: string
          nullable: true
      required:
      - type
      - uid
    Role:
      type: object
      properties:
        level:
          type: integer
          description: The stored level, as sent in writes.
        label:
          type: string
        description:
          type: string
      required:
      - description
      - label
      - level
    Row:
      type: object
      description: |-
        One row, or the values to set on the rows a filter selects.

        Column names are the keys of `query`. On a `PUT` an `id` in the payload
        must match the one in the path if it is sent at all: an id never changes.
      properties:
        connection_id:
          type: string
          description: From `advanced/connection/open`.
        cursor_id:
          type: string
          description: From `advanced/cursor/open`.
        query: {}
      required:
      - query
    Scenario:
      type: object
      description: |-
        One scenario factsheet -- a sub-resource, not a field of its bundle.

        What makes it one is the shape: it carries its own has-uuid. That uuid is
        **not** a field here, because the server mints it; a client supplies no
        identifier anywhere in this API.
      properties:
        label:
          type: string
        acronym:
          type: string
        abstract:
          type: string
          nullable: true
        study_regions:
          type: array
          items:
            $ref: '#/components/schemas/NodeReference'
        interacting_regions:
          type: array
          items:
            $ref: '#/components/schemas/NodeReference'
        years:
          type: array
          items:
            type: string
            format: date-time
        scenario_types:
          type: array
          items:
            type: string
      required:
      - acronym
      - label
    ScenarioBundleCreate:
      type: object
      description: |-
        The bundle field set **plus** its nested sub-resources, for `POST` only.

        The asymmetry is the whole point and it is structural rather than a flag: a
        bundle `POST` builds its scenarios and study reports with it, and a bundle
        `PATCH` uses the class above, which has no such key and therefore refuses
        one. That is what lets a pipeline create a whole bundle in one call without
        giving any call the power to drop its parts by omitting them.

        Dataset links nest one level deeper, inside each scenario, because that is
        where the shape hangs them -- see `NestedScenarioSerializer`.
      properties:
        label:
          type: string
        acronym:
          type: string
        abstract:
          type: string
          nullable: true
        contacts:
          type: array
          items:
            $ref: '#/components/schemas/NodeReference'
        organisations:
          type: array
          items:
            $ref: '#/components/schemas/NodeReference'
        funders:
          type: array
          items:
            $ref: '#/components/schemas/NodeReference'
        frameworks:
          type: array
          items:
            $ref: '#/components/schemas/Part'
        models:
          type: array
          items:
            $ref: '#/components/schemas/Part'
        scenarios:
          type: array
          items:
            $ref: '#/components/schemas/NestedScenario'
        study_reports:
          type: array
          items:
            $ref: '#/components/schemas/StudyReport'
        descriptors:
          type: array
          items:
            type: string
        sector_divisions:
          type: array
          items:
            type: string
        sectors:
          type: array
          items:
            type: string
        technologies:
          type: array
          items:
            type: string
        energy_carriers:
          type: array
          items:
            type: string
      required:
      - acronym
      - label
    ScenarioBundleRead:
      type: object
      description: The bundle, its parts nested, exactly as a `POST` would take it
        back.
      properties:
        label:
          type: string
        acronym:
          type: string
        abstract:
          type: string
          nullable: true
        contacts:
          type: array
          items:
            $ref: '#/components/schemas/NodeReference'
        organisations:
          type: array
          items:
            $ref: '#/components/schemas/NodeReference'
        funders:
          type: array
          items:
            $ref: '#/components/schemas/NodeReference'
        frameworks:
          type: array
          items:
            $ref: '#/components/schemas/Part'
        models:
          type: array
          items:
            $ref: '#/components/schemas/Part'
        scenarios:
          type: array
          items:
            $ref: '#/components/schemas/NestedScenarioRead'
        study_reports:
          type: array
          items:
            $ref: '#/components/schemas/StudyReportRead'
        _meta:
          allOf:
          - $ref: '#/components/schemas/BundleMeta'
          title: ' meta'
        descriptors:
          type: array
          items:
            type: string
        sector_divisions:
          type: array
          items:
            type: string
        sectors:
          type: array
          items:
            type: string
        technologies:
          type: array
          items:
            type: string
        energy_carriers:
          type: array
          items:
            type: string
      required:
      - _meta
      - acronym
      - label
      - scenarios
      - study_reports
    ScenarioBundleReplace:
      type: object
      description: |-
        The whole desired bundle: the create's payload, with identities kept.

        Same shape as a create -- deliberately, because the point of the endpoint
        is that a pipeline declares one bundle and the server makes it so, whether
        or not the bundle is there yet. What it adds is that every nested part may
        say which existing part it is, in the `_meta.uid` a read gave it.
      properties:
        label:
          type: string
        acronym:
          type: string
        abstract:
          type: string
          nullable: true
        contacts:
          type: array
          items:
            $ref: '#/components/schemas/NodeReference'
        organisations:
          type: array
          items:
            $ref: '#/components/schemas/NodeReference'
        funders:
          type: array
          items:
            $ref: '#/components/schemas/NodeReference'
        frameworks:
          type: array
          items:
            $ref: '#/components/schemas/Part'
        models:
          type: array
          items:
            $ref: '#/components/schemas/Part'
        scenarios:
          type: array
          items:
            $ref: '#/components/schemas/IdentifiedScenario'
        study_reports:
          type: array
          items:
            $ref: '#/components/schemas/IdentifiedStudyReport'
        descriptors:
          type: array
          items:
            type: string
        sector_divisions:
          type: array
          items:
            type: string
        sectors:
          type: array
          items:
            type: string
        technologies:
          type: array
          items:
            type: string
        energy_carriers:
          type: array
          items:
            type: string
      required:
      - acronym
      - label
    ScenarioBundleReplaceRead:
      type: object
      description: 'What a replace answers with: the bundle it made, and what it took
        out.'
      properties:
        label:
          type: string
        acronym:
          type: string
        abstract:
          type: string
          nullable: true
        contacts:
          type: array
          items:
            $ref: '#/components/schemas/NodeReference'
        organisations:
          type: array
          items:
            $ref: '#/components/schemas/NodeReference'
        funders:
          type: array
          items:
            $ref: '#/components/schemas/NodeReference'
        frameworks:
          type: array
          items:
            $ref: '#/components/schemas/Part'
        models:
          type: array
          items:
            $ref: '#/components/schemas/Part'
        scenarios:
          type: array
          items:
            $ref: '#/components/schemas/NestedScenarioRead'
        study_reports:
          type: array
          items:
            $ref: '#/components/schemas/StudyReportRead'
        _meta:
          allOf:
          - $ref: '#/components/schemas/BundleReplaceMeta'
          title: ' meta'
        descriptors:
          type: array
          items:
            type: string
        sector_divisions:
          type: array
          items:
            type: string
        sectors:
          type: array
          items:
            type: string
        technologies:
          type: array
          items:
            type: string
        energy_carriers:
          type: array
          items:
            type: string
      required:
      - _meta
      - acronym
      - label
      - scenarios
      - study_reports
    ScenarioBundleScenarioDataset:
      type: object
      properties:
        scenario_bundle:
          type: string
          format: uuid
        scenario:
          type: string
          format: uuid
        datasets:
          type: array
          items:
            $ref: '#/components/schemas/Dataset'
      required:
      - datasets
      - scenario
      - scenario_bundle
    ScenarioBundleSummary:
      type: object
      description: |-
        Enough to find a bundle and decide which one, and nothing else.

        Not a bundle with fields left out: the two a human recognises a bundle by
        stay at the top level, where a bundle read has them too, and everything a
        client cannot write is in `_meta`. The version is there because it is what
        a pipeline's next write must send.
      properties:
        label:
          type: string
          nullable: true
        acronym:
          type: string
          nullable: true
        _meta:
          allOf:
          - $ref: '#/components/schemas/SummaryMeta'
          title: ' meta'
      required:
      - _meta
      - acronym
      - label
    ScenarioBundleSummaryPage:
      type: object
      properties:
        count:
          type: integer
        next:
          type: string
          format: uri
          nullable: true
        previous:
          type: string
          format: uri
          nullable: true
        results:
          type: array
          items:
            $ref: '#/components/schemas/ScenarioBundleSummary'
      required:
      - count
      - next
      - previous
      - results
    ScenarioDataTables:
      type: object
      properties:
        id:
          type: integer
          readOnly: true
        name:
          type: string
          maxLength: 1000
        human_readable_name:
          type: string
          nullable: true
          maxLength: 1000
        url:
          type: string
          readOnly: true
      required:
      - id
      - name
      - url
    ScenarioRead:
      type: object
      description: A scenario at its own endpoints, where a dataset link has its own
        URL.
      properties:
        label:
          type: string
        acronym:
          type: string
        abstract:
          type: string
          nullable: true
        study_regions:
          type: array
          items:
            $ref: '#/components/schemas/NodeReference'
        interacting_regions:
          type: array
          items:
            $ref: '#/components/schemas/NodeReference'
        years:
          type: array
          items:
            type: string
            format: date-time
        _meta:
          allOf:
          - $ref: '#/components/schemas/SubResourceMeta'
          title: ' meta'
        scenario_types:
          type: array
          items:
            type: string
      required:
      - _meta
      - acronym
      - label
    ScenarioReadPage:
      type: object
      properties:
        count:
          type: integer
        next:
          type: string
          format: uri
          nullable: true
        previous:
          type: string
          format: uri
          nullable: true
        results:
          type: array
          items:
            $ref: '#/components/schemas/ScenarioRead'
      required:
      - count
      - next
      - previous
      - results
    Sparql:
      type: object
      description: A read-only SPARQL query against the OEKG.
      properties:
        query:
          type: string
          description: The query. **Reads only** -- anything that would update or
            delete is refused, whatever the caller's permissions.
        format:
          type: string
          description: The result format the graph store should use. Defaults to `json`;
            anything else is returned with the store's own content type rather than
            parsed.
      required:
      - query
    StudyReport:
      type: object
      description: |-
        One study report -- the publication a bundle is written up in.

        A sub-resource for the same reason a scenario is: the shape gives it its
        own has-uuid, which the server mints, so it is not a field here.

        What the shape requires of one, and therefore what is required here: a
        label, at least one author, and exactly one publication date. The doi and
        the reference are optional, and the reference is singular because the shape
        allows at most one.
      properties:
        label:
          type: string
        doi:
          type: string
          nullable: true
        publication_date:
          type: string
          format: date-time
        authors:
          type: array
          items:
            $ref: '#/components/schemas/NodeReference'
        reference:
          type: string
          format: uri
          nullable: true
      required:
      - authors
      - label
      - publication_date
    StudyReportRead:
      type: object
      description: |-
        One study report -- the publication a bundle is written up in.

        A sub-resource for the same reason a scenario is: the shape gives it its
        own has-uuid, which the server mints, so it is not a field here.

        What the shape requires of one, and therefore what is required here: a
        label, at least one author, and exactly one publication date. The doi and
        the reference are optional, and the reference is singular because the shape
        allows at most one.
      properties:
        label:
          type: string
        doi:
          type: string
          nullable: true
        publication_date:
          type: string
          format: date-time
        authors:
          type: array
          items:
            $ref: '#/components/schemas/NodeReference'
        reference:
          type: string
          format: uri
          nullable: true
        _meta:
          allOf:
          - $ref: '#/components/schemas/SubResourceMeta'
          title: ' meta'
      required:
      - _meta
      - authors
      - label
      - publication_date
    StudyReportReadPage:
      type: object
      properties:
        count:
          type: integer
        next:
          type: string
          format: uri
          nullable: true
        previous:
          type: string
          format: uri
          nullable: true
        results:
          type: array
          items:
            $ref: '#/components/schemas/StudyReportRead'
      required:
      - count
      - next
      - previous
      - results
    SubResourceMeta:
      type: object
      description: |-
        The two keys that appear only when something was lost after the commit.

        The graph and the relational database cannot share a transaction, and the
        graph commits first. A history entry or an ownership row that could not be
        written afterwards is named beside the success it qualifies rather than
        turned into an error for a write that did happen -- so these are absent on
        an ordinary response and `false` when they are there. Never `true`: a
        client should not have to check something on every response to learn that
        the ordinary thing happened.
      properties:
        history_recorded:
          type: boolean
        ownership_recorded:
          type: boolean
        ownership_forgotten:
          type: boolean
        labels:
          type: object
          additionalProperties:
            type: string
            nullable: true
        uid:
          type: string
        iri:
          type: string
          format: uri
        type:
          type: string
          format: uri
          description: The OEO class of this resource.
        bundle:
          type: string
      required:
      - bundle
      - iri
      - type
      - uid
    SummaryCounts:
      type: object
      properties:
        scenarios:
          type: integer
        study_reports:
          type: integer
      required:
      - scenarios
      - study_reports
    SummaryMeta:
      type: object
      properties:
        uid:
          type: string
        iri:
          type: string
          format: uri
        version:
          type: integer
        counts:
          $ref: '#/components/schemas/SummaryCounts'
      required:
      - counts
      - iri
      - uid
      - version
    TableAlter:
      type: object
      description: |-
        The body of a change to an existing table's columns or constraints.

        Top level, not under `query` -- unlike the create on the same URL, which
        is the kind of thing only a description can warn about.
      properties:
        type:
          type: string
          description: '`column` or `constraint`: which kind of change this is.'
        action:
          type: string
          description: '`ADD` or `DROP`, for a constraint change.'
        name:
          type: string
          description: For a column change.
        constraint_type:
          type: string
          description: '`FOREIGN KEY`, `PRIMARY KEY`, `UNIQUE` or `CHECK`.'
        constraint_name:
          type: string
        constraint_parameter:
          type: string
          description: What the constraint applies to -- a column name.
        reference_table:
          type: string
        reference_column:
          type: string
      required:
      - type
    TableCreate:
      type: object
      description: |-
        The body of a table create: columns, constraints and metadata.

        Under `query`, and the reason is historical rather than principled -- the
        same wrapper the `advanced/` endpoints use, kept here because clients send
        it.
      properties:
        query:
          description: '`columns` (required) is a list of `{name, data_type, is_nullable,
            ...}`; `constraints` is a list of constraint definitions; `metadata` is
            an OEMetadata document. Without `metadata` a minimal one is generated
            from the columns.'
        embargo:
          description: An embargo to apply once the table exists. Also accepted inside
            `query`.
      required:
      - query
    TableEntry:
      type: object
      description: One table a dataset link resolves to, as it stands today.
      properties:
        name:
          type: string
        peer_review:
          nullable: true
          description: |-
            Three-valued, and `null` rather than `false` where there is no review: the peer review process postdates most of the data on this platform, so a boolean would read as a quality judgement on links that predate it. A table with several reviews reads `finished` if any of them finished.

            * `finished` - finished
            * `in_progress` - in_progress
          oneOf:
          - $ref: '#/components/schemas/PeerReviewEnum'
          - $ref: '#/components/schemas/NullEnum'
      required:
      - name
      - peer_review
    TypeEnum:
      enum:
      - input
      - output
      type: string
      description: |-
        * `input` - input
        * `output` - output
  securitySchemes:
    basicAuth:
      type: http
      scheme: basic
    cookieAuth:
      type: apiKey
      in: cookie
      name: sessionid
    tokenAuth:
      type: apiKey
      in: header
      name: Authorization
      description: Token-based authentication with required prefix "Token"
tags:
- name: Tables
  description: 'Create a table, alter its columns and constraints, write and read
    its rows, publish it to a topic, and list the tables a topic holds. **Table names
    are global**: a table is addressed by name alone and no two tables share one,
    whichever topic they are published under. One listing here is addressed under
    `datasets/` and belongs to this group rather than to **Datasets**, because what
    it returns is tables: `datasets/list_all/scenario/`.'
- name: 'Tables: metadata'
  description: The OEMetadata document a table carries. Writing it never changes a
    row, and a table created without one is given a minimal document generated from
    its columns.
- name: 'Tables: permissions'
  description: 'Who holds which role on a table: users and organizations at Data editor,
    Data maintainer or Admin. A Table admin adds, changes and removes them under the
    same rules as the table''s access drawer and permission page -- Admin goes to
    users only, by name; an organization stops at Data maintainer and is shared only
    by its members; and a table always keeps a user with direct Admin.'
- name: Datasets
  description: The catalogue entries that group tables. A dataset's `resources` are
    assembled from its member tables when it is read rather than stored, so a dataset
    never reports a resource it no longer holds. A new dataset is a draft, visible
    only to its creator, until the creator publishes it; publishing needs at least
    one member table and at least one topic, and unpublishing makes it a draft again.
- name: Scenario Bundles
  description: 'The OEKG scenario bundles as a REST API: a bundle, the scenarios and
    study reports below it, the datasets a scenario cites, and the record of every
    change. Reads are public; a write needs a token, and every write to a bundle that
    already exists carries `If-Match` -- there is no opt-out.'
- name: Advanced
  description: A thin authenticated passthrough to the database, meant to be driven
    by a client library rather than by hand. A call carrying no session identifiers
    runs and commits on its own.
- name: 'Advanced: Connection'
  description: Opening, committing, rolling back and closing the database session
    that the other `advanced/` calls are threaded onto.
- name: 'Advanced: Cursor'
  description: Cursors inside such a session, and fetching rows from them one at a
    time or all at once.
- name: 'Advanced: Two phase'
  description: 'Two-phase commit across a session: begin, prepare, commit, roll back,
    and recover the transactions left prepared.'
- name: OEKG SPARQL
  description: One read-only SPARQL endpoint against the Open Energy Knowledge Graph.
    Anything that would update or delete is refused, whatever the caller's permissions.
- name: Factsheets
  description: 'The model and framework factsheets held in this platform''s own database.
    Not the OEKG scenario bundles: the two share the word *factsheet* and a URL prefix
    in the web interface, and nothing else.'
- name: API description
  description: 'The machine-readable description of `api/v0`: one endpoint, and the
    source this page is rendered from.'
- name: Scenario Bundles (legacy)
  description: '**Superseded by Scenario Bundles.** One RPC route that attaches datasets
    to a scenario, kept because clients call it. It writes predicates the canonical
    shape does not validate, and it is the singular `scenario-bundle/` address --
    one letter from the plural that replaces it. New clients want `POST /api/v0/scenario-bundles/{uid}/scenarios/{sid}/datasets/`.'
- name: Tables (legacy addresses)
  description: '**Superseded by Tables.** The older schema-qualified spelling of every
    endpoint under **Tables**, reaching the same views. The `{schema}` segment is
    not captured by the route and therefore selects nothing: table names are global,
    so the table is found by name alone whatever is sent here.'
