openapi: 3.1.0
info:
  title: Adverity Connect API
  version: 1.0.0
  description: |-
    Manage your Adverity instance programmatically: workspaces, connections, datastreams, destinations, users and more.

    ## Authentication

    Every request needs a Connect API key, sent as `Authorization: Bearer <key>`.

    1. In Adverity, open your user menu and choose **Connect API Keys**. Administrators can also manage keys under [Administration](/administration/management-api-keys/).
    2. Click **Create key**, pick the workspace and what the key may do, and copy it. It is shown only once.
    3. Here, click **Authorize**, paste the key and run any endpoint.

    If you do not see **Connect API Keys** or **Create key**, ask your Adverity administrator for a key.
externalDocs:
  description: Connect API guides
  url: https://docs.adverity.com/guides/management-api/introduction-management-api.htm
paths:
  /api/billing-objects/export/:
    get:
      operationId: billing_objects_export_retrieve
      parameters:
      - in: query
        name: format
        schema:
          type: string
          enum:
          - csv
          - json
      tags:
      - Billing
      security:
      - adverityApiTokenAuth:
        - authorization:read
      responses:
        '200':
          description: No response body
      x-required-scopes:
      - authorization:read
      description: Requires the `authorization:read` scope.
  /api/billings/{id}/:
    get:
      operationId: billings_detail_retrieve
      parameters:
      - in: path
        name: id
        schema:
          type: string
        required: true
      tags:
      - Billing
      security:
      - adverityApiTokenAuth:
        - authorization:read
      responses:
        '200':
          description: No response body
      x-required-scopes:
      - authorization:read
      description: Requires the `authorization:read` scope.
    patch:
      operationId: billings_detail_partial_update
      parameters:
      - in: path
        name: id
        schema:
          type: string
        required: true
      tags:
      - Billing
      security:
      - adverityApiTokenAuth:
        - authorization:write
      responses:
        '200':
          description: No response body
      x-required-scopes:
      - authorization:write
      description: Requires the `authorization:write` scope.
  /api/columns/:
    get:
      operationId: columns_list
      parameters:
      - in: query
        name: datastream_id
        schema:
          type: integer
      - name: ordering
        required: false
        in: query
        description: Which field to use when ordering the results.
        schema:
          type: string
      - 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: Number of results to return per page.
        schema:
          type: integer
      - in: query
        name: removed
        schema:
          type: boolean
      tags:
      - Datastreams
      security:
      - adverityApiTokenAuth:
        - datastream:read
      responses:
        '200':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/PaginatedDatastreamColumnInfoList'
          description: ''
      x-required-scopes:
      - datastream:read
      description: Requires the `datastream:read` scope.
    patch:
      operationId: columns_partial_update
      tags:
      - Datastreams
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/PatchedDatastreamColumnInfo'
          application/x-www-form-urlencoded:
            schema:
              $ref: '#/components/schemas/PatchedDatastreamColumnInfo'
          multipart/form-data:
            schema:
              $ref: '#/components/schemas/PatchedDatastreamColumnInfo'
      security:
      - adverityApiTokenAuth:
        - datastream:write
      responses:
        '200':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/DatastreamColumnInfo'
          description: ''
      x-required-scopes:
      - datastream:write
      description: Requires the `datastream:write` scope.
  /api/columns/{id}/:
    get:
      operationId: columns_detail_retrieve
      parameters:
      - in: path
        name: id
        schema:
          type: integer
        description: A unique integer value identifying this datastream column info.
        required: true
      tags:
      - Datastreams
      security:
      - adverityApiTokenAuth:
        - datastream:read
      responses:
        '200':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/DatastreamColumnInfo'
          description: ''
      x-required-scopes:
      - datastream:read
      description: Requires the `datastream:read` scope.
    patch:
      operationId: columns_detail_partial_update
      parameters:
      - in: path
        name: id
        schema:
          type: integer
        description: A unique integer value identifying this datastream column info.
        required: true
      tags:
      - Datastreams
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/PatchedDatastreamColumnInfo'
          application/x-www-form-urlencoded:
            schema:
              $ref: '#/components/schemas/PatchedDatastreamColumnInfo'
          multipart/form-data:
            schema:
              $ref: '#/components/schemas/PatchedDatastreamColumnInfo'
      security:
      - adverityApiTokenAuth:
        - datastream:write
      responses:
        '200':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/DatastreamColumnInfo'
          description: ''
      x-required-scopes:
      - datastream:write
      description: Requires the `datastream:write` scope.
  /api/connection-invite/:
    post:
      operationId: connection_invite_create
      tags:
      - Authorizations
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/ConnectionInviteMAPI'
          application/x-www-form-urlencoded:
            schema:
              $ref: '#/components/schemas/ConnectionInviteMAPI'
          multipart/form-data:
            schema:
              $ref: '#/components/schemas/ConnectionInviteMAPI'
        required: true
      security:
      - adverityApiTokenAuth:
        - authorization:write
      responses:
        '201':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ConnectionInviteMAPI'
          description: ''
      x-required-scopes:
      - authorization:write
      description: Requires the `authorization:write` scope.
  /api/connection-types/:
    get:
      operationId: connection_types_list
      parameters:
      - 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: Number of results to return per page.
        schema:
          type: integer
      - name: search
        required: false
        in: query
        description: A search term.
        schema:
          type: string
      tags:
      - Authorizations
      security:
      - adverityApiTokenAuth:
        - authorization:read
      responses:
        '200':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/PaginatedConnectionTypeList'
          description: ''
      x-required-scopes:
      - authorization:read
      description: Requires the `authorization:read` scope.
  /api/connection-types/{id}/:
    get:
      operationId: connection_types_detail_retrieve
      parameters:
      - in: path
        name: id
        schema:
          type: integer
        description: A unique integer value identifying this content type.
        required: true
      tags:
      - Authorizations
      security:
      - adverityApiTokenAuth:
        - authorization:read
      responses:
        '200':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ConnectionType'
          description: ''
      x-required-scopes:
      - authorization:read
      description: Requires the `authorization:read` scope.
  /api/connection-types/{parent_lookup_type_id}/connections/:
    get:
      operationId: connection_types_connections_retrieve
      parameters:
      - in: path
        name: parent_lookup_type_id
        schema:
          type: string
        required: true
      tags:
      - Authorizations
      security:
      - adverityApiTokenAuth:
        - authorization:read
      responses:
        '200':
          description: No response body
      x-required-scopes:
      - authorization:read
      description: Requires the `authorization:read` scope.
    post:
      operationId: connection_types_connections_create
      parameters:
      - in: path
        name: parent_lookup_type_id
        schema:
          type: string
        required: true
      tags:
      - Authorizations
      security:
      - adverityApiTokenAuth:
        - authorization:write
      responses:
        '201':
          description: No response body
      x-required-scopes:
      - authorization:write
      description: Requires the `authorization:write` scope.
  /api/connection-types/{parent_lookup_type_id}/connections/{id}/:
    get:
      operationId: connection_types_connections_detail_retrieve
      parameters:
      - in: path
        name: id
        schema:
          type: string
        required: true
      - in: path
        name: parent_lookup_type_id
        schema:
          type: string
        required: true
      tags:
      - Authorizations
      security:
      - adverityApiTokenAuth:
        - authorization:read
      responses:
        '200':
          description: No response body
      x-required-scopes:
      - authorization:read
      description: Requires the `authorization:read` scope.
    put:
      operationId: connection_types_connections_detail_update
      parameters:
      - in: path
        name: id
        schema:
          type: string
        required: true
      - in: path
        name: parent_lookup_type_id
        schema:
          type: string
        required: true
      tags:
      - Authorizations
      security:
      - adverityApiTokenAuth:
        - authorization:write
      responses:
        '200':
          description: No response body
      x-required-scopes:
      - authorization:write
      description: Requires the `authorization:write` scope.
    patch:
      operationId: connection_types_connections_detail_partial_update
      parameters:
      - in: path
        name: id
        schema:
          type: string
        required: true
      - in: path
        name: parent_lookup_type_id
        schema:
          type: string
        required: true
      tags:
      - Authorizations
      security:
      - adverityApiTokenAuth:
        - authorization:write
      responses:
        '200':
          description: No response body
      x-required-scopes:
      - authorization:write
      description: Requires the `authorization:write` scope.
    delete:
      operationId: connection_types_connections_detail_destroy
      parameters:
      - in: path
        name: id
        schema:
          type: string
        required: true
      - in: path
        name: parent_lookup_type_id
        schema:
          type: string
        required: true
      tags:
      - Authorizations
      security:
      - adverityApiTokenAuth:
        - authorization:write
      responses:
        '204':
          description: No response body
      x-required-scopes:
      - authorization:write
      description: Requires the `authorization:write` scope.
  /api/connection-types/{parent_lookup_type_id}/connections/{id}/authorize/:
    get:
      operationId: connection_types_connections_authorize_retrieve
      parameters:
      - in: path
        name: id
        schema:
          type: string
        required: true
      - in: path
        name: parent_lookup_type_id
        schema:
          type: string
        required: true
      tags:
      - Authorizations
      security:
      - adverityApiTokenAuth:
        - authorization:read
      responses:
        '200':
          description: No response body
      x-required-scopes:
      - authorization:read
      description: Requires the `authorization:read` scope.
  /api/connection-types/{parent_lookup_type_id}/connections/{id}/token/:
    patch:
      operationId: connection_types_connections_token_partial_update
      parameters:
      - in: path
        name: id
        schema:
          type: string
        required: true
      - in: path
        name: parent_lookup_type_id
        schema:
          type: string
        required: true
      tags:
      - Authorizations
      security:
      - adverityApiTokenAuth:
        - authorization:write
      responses:
        '200':
          description: No response body
      x-required-scopes:
      - authorization:write
      description: Requires the `authorization:write` scope.
  /api/connection-types/{parent_lookup_type_id}/connections/{id}/update/:
    post:
      operationId: connection_types_connections_update_create
      parameters:
      - in: path
        name: id
        schema:
          type: string
        required: true
      - in: path
        name: parent_lookup_type_id
        schema:
          type: string
        required: true
      tags:
      - Authorizations
      security:
      - adverityApiTokenAuth:
        - authorization:write
      responses:
        '200':
          description: No response body
      x-required-scopes:
      - authorization:write
      description: Requires the `authorization:write` scope.
  /api/connections/:
    get:
      operationId: connections_list
      parameters:
      - in: query
        name: creator
        schema:
          type: string
      - in: query
        name: name
        schema:
          type: string
      - name: ordering
        required: false
        in: query
        description: Which field to use when ordering the results.
        schema:
          type: string
      - 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: Number of results to return per page.
        schema:
          type: integer
      - in: query
        name: stack_id
        schema:
          type:
          - integer
          - 'null'
          title: Workspace
      tags:
      - Authorizations
      security:
      - adverityApiTokenAuth:
        - authorization:read
      responses:
        '200':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/PaginatedAuthorizationListList'
          description: ''
      x-required-scopes:
      - authorization:read
      description: Requires the `authorization:read` scope.
  /api/datastream-types/:
    get:
      operationId: datastream_types_list
      parameters:
      - 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: Number of results to return per page.
        schema:
          type: integer
      - name: search
        required: false
        in: query
        description: A search term.
        schema:
          type: string
      tags:
      - Datastreams
      security:
      - adverityApiTokenAuth:
        - datastream:read
      responses:
        '200':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/PaginatedDatastreamTypeList'
          description: ''
      x-required-scopes:
      - datastream:read
      description: Requires the `datastream:read` scope.
  /api/datastream-types/{id}/:
    get:
      operationId: datastream_types_detail_retrieve
      parameters:
      - in: path
        name: id
        schema:
          type: integer
        description: A unique integer value identifying this content type.
        required: true
      tags:
      - Datastreams
      security:
      - adverityApiTokenAuth:
        - datastream:read
      responses:
        '200':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/DatastreamType'
          description: ''
      x-required-scopes:
      - datastream:read
      description: Requires the `datastream:read` scope.
  /api/datastream-types/{parent_lookup_type_id}/datastreams/:
    get:
      operationId: datastream_types_datastreams_retrieve
      parameters:
      - in: query
        name: auth
        schema:
          type: array
          items:
            type: integer
        description: Return only datastreams using the given authorization(s). Accepts
          a comma-separated list of IDs.
        explode: false
        style: form
      - in: query
        name: creator
        schema:
          type: string
      - in: query
        name: ids
        schema:
          type: array
          items:
            type: integer
        description: Multiple values may be separated by commas.
        explode: false
        style: form
      - in: query
        name: name
        schema:
          type: string
      - in: path
        name: parent_lookup_type_id
        schema:
          type: string
        required: true
      - in: query
        name: scheduled_deletion
        schema:
          type: boolean
        description: true returns only datastreams scheduled for deletion; false returns
          only those that are not. Omit to return both.
      - in: query
        name: stack_id
        schema:
          type: integer
          title: Workspace
        description: Which workspace the datastream belongs to.
      - in: query
        name: transformer
        schema:
          type: integer
        description: Return only datastreams that have the given TransformerConfig
          assigned.
      tags:
      - Datastreams
      security:
      - adverityApiTokenAuth:
        - datastream:read
      responses:
        '200':
          description: No response body
      x-required-scopes:
      - datastream:read
      description: Requires the `datastream:read` scope.
    post:
      operationId: datastream_types_datastreams_create
      parameters:
      - in: path
        name: parent_lookup_type_id
        schema:
          type: string
        required: true
      tags:
      - Datastreams
      security:
      - adverityApiTokenAuth:
        - datastream:write
      responses:
        '201':
          description: No response body
      x-required-scopes:
      - datastream:write
      description: Requires the `datastream:write` scope.
  /api/datastream-types/{parent_lookup_type_id}/datastreams/{id}/:
    get:
      operationId: datastream_types_datastreams_detail_retrieve
      parameters:
      - in: query
        name: expand
        schema:
          type: string
          enum:
          - destinations
        description: Comma-separated related resources to inline in the response.
          Currently supports 'destinations', which adds the assigned_destinations
          array.
      - in: path
        name: id
        schema:
          type: string
        required: true
      - in: path
        name: parent_lookup_type_id
        schema:
          type: string
        required: true
      tags:
      - Datastreams
      security:
      - adverityApiTokenAuth:
        - datastream:read
      responses:
        '200':
          description: No response body
      x-required-scopes:
      - datastream:read
      description: Requires the `datastream:read` scope.
    put:
      operationId: datastream_types_datastreams_detail_update
      parameters:
      - in: path
        name: id
        schema:
          type: string
        required: true
      - in: path
        name: parent_lookup_type_id
        schema:
          type: string
        required: true
      tags:
      - Datastreams
      security:
      - adverityApiTokenAuth:
        - datastream:write
      responses:
        '200':
          description: No response body
      x-required-scopes:
      - datastream:write
      description: Requires the `datastream:write` scope.
    patch:
      operationId: datastream_types_datastreams_detail_partial_update
      parameters:
      - in: path
        name: id
        schema:
          type: string
        required: true
      - in: path
        name: parent_lookup_type_id
        schema:
          type: string
        required: true
      tags:
      - Datastreams
      security:
      - adverityApiTokenAuth:
        - datastream:write
      responses:
        '200':
          description: No response body
      x-required-scopes:
      - datastream:write
      description: Requires the `datastream:write` scope.
    delete:
      operationId: datastream_types_datastreams_detail_destroy
      parameters:
      - in: path
        name: id
        schema:
          type: string
        required: true
      - in: path
        name: parent_lookup_type_id
        schema:
          type: string
        required: true
      tags:
      - Datastreams
      security:
      - adverityApiTokenAuth:
        - datastream:write
      responses:
        '204':
          description: No response body
      x-required-scopes:
      - datastream:write
      description: Requires the `datastream:write` scope.
  /api/datastream-types/{parent_lookup_type_id}/datastreams/{parent_lookup_datastream_id}/columns/:
    get:
      operationId: datastream_types_datastreams_columns_list
      parameters:
      - in: query
        name: datastream_id
        schema:
          type: integer
      - name: ordering
        required: false
        in: query
        description: Which field to use when ordering the results.
        schema:
          type: string
      - 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: Number of results to return per page.
        schema:
          type: integer
      - in: path
        name: parent_lookup_datastream_id
        schema:
          type: string
        required: true
      - in: path
        name: parent_lookup_type_id
        schema:
          type: string
        required: true
      - in: query
        name: removed
        schema:
          type: boolean
      tags:
      - Datastreams
      security:
      - adverityApiTokenAuth:
        - datastream:read
      responses:
        '200':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/PaginatedDatastreamColumnInfoList'
          description: ''
      x-required-scopes:
      - datastream:read
      description: Requires the `datastream:read` scope.
  /api/datastream-types/{parent_lookup_type_id}/datastreams/{parent_lookup_datastream_id}/columns/{id}/:
    get:
      operationId: datastream_types_datastreams_columns_detail_retrieve
      parameters:
      - in: path
        name: id
        schema:
          type: integer
        description: A unique integer value identifying this datastream column info.
        required: true
      - in: path
        name: parent_lookup_datastream_id
        schema:
          type: string
        required: true
      - in: path
        name: parent_lookup_type_id
        schema:
          type: string
        required: true
      tags:
      - Datastreams
      security:
      - adverityApiTokenAuth:
        - datastream:read
      responses:
        '200':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/DatastreamColumnInfo'
          description: ''
      x-required-scopes:
      - datastream:read
      description: Requires the `datastream:read` scope.
    patch:
      operationId: datastream_types_datastreams_columns_detail_partial_update
      parameters:
      - in: path
        name: id
        schema:
          type: integer
        description: A unique integer value identifying this datastream column info.
        required: true
      - in: path
        name: parent_lookup_datastream_id
        schema:
          type: string
        required: true
      - in: path
        name: parent_lookup_type_id
        schema:
          type: string
        required: true
      tags:
      - Datastreams
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/PatchedDatastreamColumnInfo'
          application/x-www-form-urlencoded:
            schema:
              $ref: '#/components/schemas/PatchedDatastreamColumnInfo'
          multipart/form-data:
            schema:
              $ref: '#/components/schemas/PatchedDatastreamColumnInfo'
      security:
      - adverityApiTokenAuth:
        - datastream:write
      responses:
        '200':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/DatastreamColumnInfo'
          description: ''
      x-required-scopes:
      - datastream:write
      description: Requires the `datastream:write` scope.
  /api/datastreams/:
    get:
      operationId: datastreams_list
      parameters:
      - in: query
        name: auth
        schema:
          type: array
          items:
            type: integer
        description: Return only datastreams using the given authorization(s). Accepts
          a comma-separated list of IDs.
        explode: false
        style: form
      - in: query
        name: creator
        schema:
          type: string
      - in: query
        name: ids
        schema:
          type: array
          items:
            type: integer
        description: Multiple values may be separated by commas.
        explode: false
        style: form
      - in: query
        name: name
        schema:
          type: string
      - name: ordering
        required: false
        in: query
        description: Which field to use when ordering the results.
        schema:
          type: string
      - 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: Number of results to return per page.
        schema:
          type: integer
      - in: query
        name: scheduled_deletion
        schema:
          type: boolean
        description: true returns only datastreams scheduled for deletion; false returns
          only those that are not. Omit to return both.
      - in: query
        name: stack_id
        schema:
          type: integer
          title: Workspace
        description: Which workspace the datastream belongs to.
      - in: query
        name: transformer
        schema:
          type: integer
        description: Return only datastreams that have the given TransformerConfig
          assigned.
      tags:
      - Datastreams
      security:
      - adverityApiTokenAuth:
        - datastream:read
      responses:
        '200':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/PaginatedAPIDatastreamBasicList'
          description: ''
      x-required-scopes:
      - datastream:read
      description: Requires the `datastream:read` scope.
  /api/datastreams/{id}/:
    get:
      operationId: datastreams_detail_retrieve
      parameters:
      - in: query
        name: expand
        schema:
          type: string
          enum:
          - destinations
        description: Comma-separated related resources to inline in the response.
          Currently supports 'destinations', which adds the assigned_destinations
          array.
      - in: path
        name: id
        schema:
          type: integer
        description: A unique integer value identifying this Datastream.
        required: true
      tags:
      - Datastreams
      security:
      - adverityApiTokenAuth:
        - datastream:read
      responses:
        '200':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/APIDatastreamFull'
          description: ''
      x-required-scopes:
      - datastream:read
      description: Requires the `datastream:read` scope.
    put:
      operationId: datastreams_detail_update
      parameters:
      - in: path
        name: id
        schema:
          type: integer
        description: A unique integer value identifying this Datastream.
        required: true
      tags:
      - Datastreams
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/APIDatastreamFull'
          application/x-www-form-urlencoded:
            schema:
              $ref: '#/components/schemas/APIDatastreamFull'
          multipart/form-data:
            schema:
              $ref: '#/components/schemas/APIDatastreamFull'
        required: true
      security:
      - adverityApiTokenAuth:
        - datastream:write
      responses:
        '200':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/APIDatastreamFull'
          description: ''
      x-required-scopes:
      - datastream:write
      description: Requires the `datastream:write` scope.
    patch:
      operationId: datastreams_detail_partial_update
      parameters:
      - in: path
        name: id
        schema:
          type: integer
        description: A unique integer value identifying this Datastream.
        required: true
      tags:
      - Datastreams
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/PatchedAPIDatastreamFull'
          application/x-www-form-urlencoded:
            schema:
              $ref: '#/components/schemas/PatchedAPIDatastreamFull'
          multipart/form-data:
            schema:
              $ref: '#/components/schemas/PatchedAPIDatastreamFull'
      security:
      - adverityApiTokenAuth:
        - datastream:write
      responses:
        '200':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/APIDatastreamFull'
          description: ''
      x-required-scopes:
      - datastream:write
      description: Requires the `datastream:write` scope.
  /api/datastreams/{id}/columns/:
    get:
      operationId: datastreams_columns_retrieve
      parameters:
      - in: path
        name: id
        schema:
          type: integer
        description: A unique integer value identifying this Datastream.
        required: true
      tags:
      - Datastreams
      security:
      - adverityApiTokenAuth:
        - datastream:read
      responses:
        '200':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/DatastreamColumnInfo'
          description: ''
      x-required-scopes:
      - datastream:read
      description: Requires the `datastream:read` scope.
    post:
      operationId: datastreams_columns_create
      parameters:
      - in: path
        name: id
        schema:
          type: integer
        description: A unique integer value identifying this Datastream.
        required: true
      tags:
      - Datastreams
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/DatastreamColumnInfo'
          application/x-www-form-urlencoded:
            schema:
              $ref: '#/components/schemas/DatastreamColumnInfo'
          multipart/form-data:
            schema:
              $ref: '#/components/schemas/DatastreamColumnInfo'
        required: true
      security:
      - adverityApiTokenAuth:
        - datastream:write
      responses:
        '200':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/DatastreamColumnInfo'
          description: ''
      x-required-scopes:
      - datastream:write
      description: Requires the `datastream:write` scope.
  /api/datastreams/{id}/columns/map/:
    put:
      operationId: datastreams_columns_map_update
      parameters:
      - in: path
        name: id
        schema:
          type: integer
        description: A unique integer value identifying this Datastream.
        required: true
      tags:
      - Datastreams
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/DatastreamMapping'
          application/x-www-form-urlencoded:
            schema:
              $ref: '#/components/schemas/DatastreamMapping'
          multipart/form-data:
            schema:
              $ref: '#/components/schemas/DatastreamMapping'
        required: true
      security:
      - adverityApiTokenAuth:
        - datastream:write
      responses:
        '200':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/DatastreamMapping'
          description: ''
      x-required-scopes:
      - datastream:write
      description: Requires the `datastream:write` scope.
  /api/datastreams/{id}/columns/{cid}/:
    get:
      operationId: datastreams_columns_detail_retrieve
      parameters:
      - in: path
        name: cid
        schema:
          type: string
          pattern: ^[0-9]+$
        required: true
      - in: path
        name: id
        schema:
          type: integer
        description: A unique integer value identifying this Datastream.
        required: true
      tags:
      - Datastreams
      security:
      - adverityApiTokenAuth:
        - datastream:read
      responses:
        '200':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/DatastreamColumnInfo'
          description: ''
      x-required-scopes:
      - datastream:read
      description: Requires the `datastream:read` scope.
    patch:
      operationId: datastreams_columns_detail_partial_update
      parameters:
      - in: path
        name: cid
        schema:
          type: string
          pattern: ^[0-9]+$
        required: true
      - in: path
        name: id
        schema:
          type: integer
        description: A unique integer value identifying this Datastream.
        required: true
      tags:
      - Datastreams
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/PatchedDatastreamColumnInfo'
          application/x-www-form-urlencoded:
            schema:
              $ref: '#/components/schemas/PatchedDatastreamColumnInfo'
          multipart/form-data:
            schema:
              $ref: '#/components/schemas/PatchedDatastreamColumnInfo'
      security:
      - adverityApiTokenAuth:
        - datastream:write
      responses:
        '200':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/DatastreamColumnInfo'
          description: ''
      x-required-scopes:
      - datastream:write
      description: Requires the `datastream:write` scope.
  /api/datastreams/{id}/copy-mapping/:
    post:
      operationId: datastreams_copy_mapping_create
      parameters:
      - in: path
        name: id
        schema:
          type: integer
        description: A unique integer value identifying this Datastream.
        required: true
      tags:
      - Datastreams
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/APIDatastreamFull'
          application/x-www-form-urlencoded:
            schema:
              $ref: '#/components/schemas/APIDatastreamFull'
          multipart/form-data:
            schema:
              $ref: '#/components/schemas/APIDatastreamFull'
        required: true
      security:
      - adverityApiTokenAuth:
        - datastream:write
      responses:
        '200':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/APIDatastreamFull'
          description: ''
      x-required-scopes:
      - datastream:write
      description: Requires the `datastream:write` scope.
  /api/datastreams/{id}/copy/:
    post:
      operationId: datastreams_copy_create
      description: |-
        Copy a datastream. Without `stack`, or with `stack` equal to the source workspace, the copy is a same-workspace duplicate (disabled, destination bindings copied disabled, mapping copied).

        With a different `stack` (HI-304) the copy follows the UI Clone wizard: fetch configuration, schedules and column mappings are carried over, the authorization is reused when the target workspace can see it and cloned otherwise, and the source's destination bindings, enrichments and monitors are NOT carried. Optional `destinations` (ids usable from the target workspace; bindings created disabled), `enrichments` (ids usable from the target workspace) and `authorization_id` attach what the copy should use. The response then carries a `report` with `reused`, `cloned`, `attached` and `dropped` lists. Ids not usable from the target workspace return 400.

        Requires the `datastream:write` scope.
      parameters:
      - in: path
        name: id
        schema:
          type: integer
        description: A unique integer value identifying this Datastream.
        required: true
      tags:
      - Datastreams
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/CopyDatastreamRequest'
          application/x-www-form-urlencoded:
            schema:
              $ref: '#/components/schemas/CopyDatastreamRequest'
          multipart/form-data:
            schema:
              $ref: '#/components/schemas/CopyDatastreamRequest'
      security:
      - adverityApiTokenAuth:
        - datastream:write
      responses:
        '200':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/CopyDatastreamResponse'
          description: ''
      x-required-scopes:
      - datastream:write
  /api/datastreams/{id}/default-mapping/:
    get:
      operationId: datastreams_default_mapping_retrieve
      parameters:
      - in: path
        name: id
        schema:
          type: integer
        description: A unique integer value identifying this Datastream.
        required: true
      tags:
      - Datastreams
      security:
      - adverityApiTokenAuth:
        - datastream:read
      responses:
        '200':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/APIDatastreamFull'
          description: ''
      x-required-scopes:
      - datastream:read
      description: Requires the `datastream:read` scope.
  /api/datastreams/{id}/extracts/most-recent/download/:
    get:
      operationId: datastreams_extracts_most_recent_download_retrieve
      parameters:
      - in: path
        name: id
        schema:
          type: integer
        description: A unique integer value identifying this Datastream.
        required: true
      tags:
      - Datastreams
      security:
      - adverityApiTokenAuth:
        - datastream:read
      responses:
        '200':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/APIDatastreamFull'
          description: ''
      x-required-scopes:
      - datastream:read
      description: Requires the `datastream:read` scope.
  /api/datastreams/{id}/extracts/streaming/download/:
    get:
      operationId: datastreams_extracts_streaming_download_retrieve
      parameters:
      - in: path
        name: id
        schema:
          type: integer
        description: A unique integer value identifying this Datastream.
        required: true
      tags:
      - Datastreams
      security:
      - adverityApiTokenAuth:
        - datastream:read
      responses:
        '200':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/APIDatastreamFull'
          description: ''
      x-required-scopes:
      - datastream:read
      description: Requires the `datastream:read` scope.
  /api/datastreams/{id}/fetch/:
    get:
      operationId: datastreams_fetch_retrieve
      parameters:
      - in: path
        name: id
        schema:
          type: integer
        description: A unique integer value identifying this Datastream.
        required: true
      tags:
      - Datastreams
      security:
      - adverityApiTokenAuth:
        - datastream:read
      responses:
        '200':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/APIDatastreamFull'
          description: ''
      x-required-scopes:
      - datastream:read
      description: Requires the `datastream:read` scope.
    post:
      operationId: datastreams_fetch_create
      parameters:
      - in: path
        name: id
        schema:
          type: integer
        description: A unique integer value identifying this Datastream.
        required: true
      tags:
      - Datastreams
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/APIDatastreamFull'
          application/x-www-form-urlencoded:
            schema:
              $ref: '#/components/schemas/APIDatastreamFull'
          multipart/form-data:
            schema:
              $ref: '#/components/schemas/APIDatastreamFull'
        required: true
      security:
      - adverityApiTokenAuth:
        - datastream:write
      responses:
        '200':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/APIDatastreamFull'
          description: ''
      x-required-scopes:
      - datastream:write
      description: Requires the `datastream:write` scope.
  /api/datastreams/{id}/fetch_fixed/:
    post:
      operationId: datastreams_fetch_fixed_create
      parameters:
      - in: path
        name: id
        schema:
          type: integer
        description: A unique integer value identifying this Datastream.
        required: true
      tags:
      - Datastreams
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/APIDatastreamFull'
          application/x-www-form-urlencoded:
            schema:
              $ref: '#/components/schemas/APIDatastreamFull'
          multipart/form-data:
            schema:
              $ref: '#/components/schemas/APIDatastreamFull'
        required: true
      security:
      - adverityApiTokenAuth:
        - datastream:write
      responses:
        '200':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/APIDatastreamFull'
          description: ''
      x-required-scopes:
      - datastream:write
      description: Requires the `datastream:write` scope.
  /api/datastreams/{id}/jobs/:
    get:
      operationId: datastreams_jobs_list
      parameters:
      - in: path
        name: id
        schema:
          type: integer
        description: A unique integer value identifying this Datastream.
        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: Number of results to return per page.
        schema:
          type: integer
      tags:
      - Datastreams
      security:
      - adverityApiTokenAuth:
        - datastream:read
      responses:
        '200':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/PaginatedFetchJobList'
          description: ''
      x-required-scopes:
      - datastream:read
      description: Requires the `datastream:read` scope.
  /api/datastreams/{id}/passive-destinations/:
    get:
      operationId: datastreams_passive_destinations_retrieve
      parameters:
      - in: path
        name: id
        schema:
          type: integer
        description: A unique integer value identifying this Datastream.
        required: true
      tags:
      - Datastreams
      security:
      - adverityApiTokenAuth:
        - datastream:read
      responses:
        '200':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/PassiveTokenUpdate'
          description: ''
      x-required-scopes:
      - datastream:read
      description: Requires the `datastream:read` scope.
    post:
      operationId: datastreams_passive_destinations_create
      parameters:
      - in: path
        name: id
        schema:
          type: integer
        description: A unique integer value identifying this Datastream.
        required: true
      tags:
      - Datastreams
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/PassiveTokenUpdate'
          application/x-www-form-urlencoded:
            schema:
              $ref: '#/components/schemas/PassiveTokenUpdate'
          multipart/form-data:
            schema:
              $ref: '#/components/schemas/PassiveTokenUpdate'
        required: true
      security:
      - adverityApiTokenAuth:
        - datastream:write
      responses:
        '200':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/PassiveTokenUpdate'
          description: ''
      x-required-scopes:
      - datastream:write
      description: Requires the `datastream:write` scope.
  /api/datastreams/{id}/stats/:
    get:
      operationId: datastreams_stats_retrieve
      parameters:
      - in: path
        name: id
        schema:
          type: integer
        description: A unique integer value identifying this Datastream.
        required: true
      tags:
      - Datastreams
      security:
      - adverityApiTokenAuth:
        - datastream:read
      responses:
        '200':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/APIDatastreamFull'
          description: ''
      x-required-scopes:
      - datastream:read
      description: Requires the `datastream:read` scope.
  /api/datastreams/{id}/transformer/:
    get:
      operationId: datastreams_transformer_retrieve
      parameters:
      - in: path
        name: id
        schema:
          type: integer
        description: A unique integer value identifying this Datastream.
        required: true
      tags:
      - Datastreams
      security:
      - adverityApiTokenAuth:
        - datastream:read
      responses:
        '200':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/APIDatastreamFull'
          description: ''
      x-required-scopes:
      - datastream:read
      description: Requires the `datastream:read` scope.
  /api/datastreams/{parent_lookup_datastream_id}/schedules/:
    get:
      operationId: datastreams_schedules_list
      parameters:
      - name: ordering
        required: false
        in: query
        description: Which field to use when ordering the results.
        schema:
          type: string
      - name: page
        required: false
        in: query
        description: A page number within the paginated result set.
        schema:
          type: integer
      - in: path
        name: parent_lookup_datastream_id
        schema:
          type: string
        required: true
      tags:
      - Datastreams
      security:
      - adverityApiTokenAuth:
        - datastream:read
      responses:
        '200':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/PaginatedFetchScheduleList'
          description: ''
      x-required-scopes:
      - datastream:read
      description: Requires the `datastream:read` scope.
    post:
      operationId: datastreams_schedules_create
      parameters:
      - in: path
        name: parent_lookup_datastream_id
        schema:
          type: string
        required: true
      tags:
      - Datastreams
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/FetchSchedule'
          application/x-www-form-urlencoded:
            schema:
              $ref: '#/components/schemas/FetchSchedule'
          multipart/form-data:
            schema:
              $ref: '#/components/schemas/FetchSchedule'
      security:
      - adverityApiTokenAuth:
        - datastream:write
      responses:
        '201':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/FetchSchedule'
          description: ''
      x-required-scopes:
      - datastream:write
      description: Requires the `datastream:write` scope.
  /api/datastreams/{parent_lookup_datastream_id}/schedules/{id}/:
    get:
      operationId: datastreams_schedules_detail_retrieve
      parameters:
      - in: path
        name: id
        schema:
          type: integer
        description: A unique integer value identifying this fetch schedule.
        required: true
      - in: path
        name: parent_lookup_datastream_id
        schema:
          type: string
        required: true
      tags:
      - Datastreams
      security:
      - adverityApiTokenAuth:
        - datastream:read
      responses:
        '200':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/FetchSchedule'
          description: ''
      x-required-scopes:
      - datastream:read
      description: Requires the `datastream:read` scope.
    put:
      operationId: datastreams_schedules_detail_update
      parameters:
      - in: path
        name: id
        schema:
          type: integer
        description: A unique integer value identifying this fetch schedule.
        required: true
      - in: path
        name: parent_lookup_datastream_id
        schema:
          type: string
        required: true
      tags:
      - Datastreams
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/FetchSchedule'
          application/x-www-form-urlencoded:
            schema:
              $ref: '#/components/schemas/FetchSchedule'
          multipart/form-data:
            schema:
              $ref: '#/components/schemas/FetchSchedule'
      security:
      - adverityApiTokenAuth:
        - datastream:write
      responses:
        '200':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/FetchSchedule'
          description: ''
      x-required-scopes:
      - datastream:write
      description: Requires the `datastream:write` scope.
    patch:
      operationId: datastreams_schedules_detail_partial_update
      parameters:
      - in: path
        name: id
        schema:
          type: integer
        description: A unique integer value identifying this fetch schedule.
        required: true
      - in: path
        name: parent_lookup_datastream_id
        schema:
          type: string
        required: true
      tags:
      - Datastreams
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/PatchedFetchSchedule'
          application/x-www-form-urlencoded:
            schema:
              $ref: '#/components/schemas/PatchedFetchSchedule'
          multipart/form-data:
            schema:
              $ref: '#/components/schemas/PatchedFetchSchedule'
      security:
      - adverityApiTokenAuth:
        - datastream:write
      responses:
        '200':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/FetchSchedule'
          description: ''
      x-required-scopes:
      - datastream:write
      description: Requires the `datastream:write` scope.
    delete:
      operationId: datastreams_schedules_detail_destroy
      parameters:
      - in: path
        name: id
        schema:
          type: integer
        description: A unique integer value identifying this fetch schedule.
        required: true
      - in: path
        name: parent_lookup_datastream_id
        schema:
          type: string
        required: true
      tags:
      - Datastreams
      security:
      - adverityApiTokenAuth:
        - datastream:write
      responses:
        '204':
          description: No response body
      x-required-scopes:
      - datastream:write
      description: Requires the `datastream:write` scope.
  /api/errors/:
    get:
      operationId: errors_list
      parameters:
      - in: query
        name: ack
        schema:
          type: string
          enum:
          - any
          - 'false'
          - 'true'
      - in: query
        name: datastream_id
        schema:
          type: number
      - in: query
        name: job_id
        schema:
          type: number
      - name: ordering
        required: false
        in: query
        description: Which field to use when ordering the results.
        schema:
          type: string
      - 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: Number of results to return per page.
        schema:
          type: integer
      - in: query
        name: stack_id
        schema:
          type: number
      - in: query
        name: start_from
        schema:
          type: string
          format: date-time
      - in: query
        name: start_to
        schema:
          type: string
          format: date-time
      tags:
      - Errors
      security:
      - adverityApiTokenAuth:
        - datastream:read
      responses:
        '200':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/PaginatedDatastreamExtractionLogList'
          description: ''
      x-required-scopes:
      - datastream:read
      description: Requires the `datastream:read` scope.
  /api/errors/{id}/:
    get:
      operationId: errors_detail_retrieve
      parameters:
      - in: path
        name: id
        schema:
          type: integer
        description: A unique integer value identifying this Issues.
        required: true
      tags:
      - Errors
      security:
      - adverityApiTokenAuth:
        - datastream:read
      responses:
        '200':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/DatastreamExtractionLog'
          description: ''
      x-required-scopes:
      - datastream:read
      description: Requires the `datastream:read` scope.
  /api/errors/{id}/confirm/:
    post:
      operationId: errors_confirm_create
      parameters:
      - in: path
        name: id
        schema:
          type: integer
        description: A unique integer value identifying this Issues.
        required: true
      tags:
      - Errors
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/DatastreamExtractionLog'
          application/x-www-form-urlencoded:
            schema:
              $ref: '#/components/schemas/DatastreamExtractionLog'
          multipart/form-data:
            schema:
              $ref: '#/components/schemas/DatastreamExtractionLog'
        required: true
      security:
      - adverityApiTokenAuth:
        - datastream:write
      responses:
        '200':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/DatastreamExtractionLog'
          description: ''
      x-required-scopes:
      - datastream:write
      description: Requires the `datastream:write` scope.
  /api/errors/{id}/confirm_group/:
    post:
      operationId: errors_confirm_group_create
      parameters:
      - in: path
        name: id
        schema:
          type: integer
        description: A unique integer value identifying this Issues.
        required: true
      tags:
      - Errors
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/DatastreamExtractionLog'
          application/x-www-form-urlencoded:
            schema:
              $ref: '#/components/schemas/DatastreamExtractionLog'
          multipart/form-data:
            schema:
              $ref: '#/components/schemas/DatastreamExtractionLog'
        required: true
      security:
      - adverityApiTokenAuth:
        - datastream:write
      responses:
        '200':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/DatastreamExtractionLog'
          description: ''
      x-required-scopes:
      - datastream:write
      description: Requires the `datastream:write` scope.
  /api/errors/{id}/retry/:
    post:
      operationId: errors_retry_create
      parameters:
      - in: path
        name: id
        schema:
          type: integer
        description: A unique integer value identifying this Issues.
        required: true
      tags:
      - Errors
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/DatastreamExtractionLog'
          application/x-www-form-urlencoded:
            schema:
              $ref: '#/components/schemas/DatastreamExtractionLog'
          multipart/form-data:
            schema:
              $ref: '#/components/schemas/DatastreamExtractionLog'
        required: true
      security:
      - adverityApiTokenAuth:
        - datastream:write
      responses:
        '200':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/DatastreamExtractionLog'
          description: ''
      x-required-scopes:
      - datastream:write
      description: Requires the `datastream:write` scope.
  /api/errors/{id}/retry_group/:
    post:
      operationId: errors_retry_group_create
      parameters:
      - in: path
        name: id
        schema:
          type: integer
        description: A unique integer value identifying this Issues.
        required: true
      tags:
      - Errors
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/DatastreamExtractionLog'
          application/x-www-form-urlencoded:
            schema:
              $ref: '#/components/schemas/DatastreamExtractionLog'
          multipart/form-data:
            schema:
              $ref: '#/components/schemas/DatastreamExtractionLog'
        required: true
      security:
      - adverityApiTokenAuth:
        - datastream:write
      responses:
        '200':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/DatastreamExtractionLog'
          description: ''
      x-required-scopes:
      - datastream:write
      description: Requires the `datastream:write` scope.
  /api/extracts/:
    get:
      operationId: extracts_list
      parameters:
      - in: query
        name: created_from
        schema:
          type: string
          format: date-time
      - in: query
        name: created_to
        schema:
          type: string
          format: date-time
      - in: query
        name: datastream_id
        schema:
          type: number
      - in: query
        name: job_group_id
        schema:
          type:
          - integer
          - 'null'
      - in: query
        name: job_id
        schema:
          type: integer
      - in: query
        name: name
        schema:
          type: string
      - name: ordering
        required: false
        in: query
        description: Which field to use when ordering the results.
        schema:
          type: string
      - 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: Number of results to return per page.
        schema:
          type: integer
      - in: query
        name: scheduled_from
        schema:
          type:
          - string
          - 'null'
          format: date-time
      - in: query
        name: scheduled_to
        schema:
          type:
          - string
          - 'null'
          format: date-time
      - in: query
        name: stack_id
        schema:
          type: number
      - in: query
        name: state
        schema:
          type: array
          items:
            type: integer
            enum:
            - 1
            - 10
            - 11
            - 12
            - 13
            - 14
            - 15
            - 16
            - 17
            - 2
            - 3
            - 4
            - 5
            - 6
            - 7
            - 8
            - 9
        description: |-
          * `3` - Processing
          * `1` - Collected
          * `5` - Notified
          * `7` - Pending
          * `2` - Transferred
          * `4` - Load error
          * `16` - Processing error
          * `8` - Deleted
          * `9` - No data collected
          * `10` - Deferred
          * `11` - Parked
          * `12` - Loaded
          * `13` - Failed
          * `14` - Raw
          * `15` - Overwritten
          * `6` - Transformation error
          * `17` - Removed - Personally Identifiable Information
        explode: true
        style: form
      - in: query
        name: tags
        schema:
          type: string
      tags:
      - Datastreams
      security:
      - adverityApiTokenAuth:
        - datastream:read
      responses:
        '200':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/PaginatedDatastreamExtractList'
          description: ''
      x-required-scopes:
      - datastream:read
      description: Requires the `datastream:read` scope.
  /api/extracts/{id}/:
    get:
      operationId: extracts_detail_retrieve
      parameters:
      - in: path
        name: id
        schema:
          type: integer
        description: A unique integer value identifying this Datastream extract.
        required: true
      tags:
      - Datastreams
      security:
      - adverityApiTokenAuth:
        - datastream:read
      responses:
        '200':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/DatastreamExtract'
          description: ''
      x-required-scopes:
      - datastream:read
      description: Requires the `datastream:read` scope.
  /api/extracts/{id}/columns/:
    get:
      operationId: extracts_columns_retrieve
      parameters:
      - in: path
        name: id
        schema:
          type: integer
        description: A unique integer value identifying this Datastream extract.
        required: true
      tags:
      - Datastreams
      security:
      - adverityApiTokenAuth:
        - datastream:read
      responses:
        '200':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/DatastreamExtract'
          description: ''
      x-required-scopes:
      - datastream:read
      description: Requires the `datastream:read` scope.
  /api/extracts/{id}/data/:
    get:
      operationId: extracts_data_retrieve
      parameters:
      - in: path
        name: id
        schema:
          type: integer
        description: A unique integer value identifying this Datastream extract.
        required: true
      tags:
      - Datastreams
      security:
      - adverityApiTokenAuth:
        - datastream:read
      responses:
        '200':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/DatastreamExtract'
          description: ''
      x-required-scopes:
      - datastream:read
      description: Requires the `datastream:read` scope.
  /api/extracts/{id}/download/:
    get:
      operationId: extracts_download_retrieve
      parameters:
      - in: path
        name: id
        schema:
          type: integer
        description: A unique integer value identifying this Datastream extract.
        required: true
      tags:
      - Datastreams
      security:
      - adverityApiTokenAuth:
        - datastream:read
      responses:
        '200':
          content:
            application/json:
              schema:
                type: string
                format: binary
          description: Raw extract streamed inline (text extracts, or binary on a
            non-presigned backend).
        '202':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ExtractDownloadDispatch'
          description: ''
        '302':
          description: Redirect to a presigned URL for raw binary extracts on S3/GCS
            backends.
        '400':
          description: Invalid query parameters (e.g. unknown fileformat).
        '403':
          description: Connector policy forbids extract download for API callers.
        '404':
          description: Extract not found or no longer accessible.
        '406':
          description: Extract too large to export to the requested format.
      x-required-scopes:
      - datastream:read
      description: Requires the `datastream:read` scope.
  /api/extracts/{id}/download/ready/{task_id}/:
    get:
      operationId: extracts_download_ready_detail_retrieve
      parameters:
      - in: path
        name: id
        schema:
          type: integer
        description: A unique integer value identifying this Datastream extract.
        required: true
      - in: path
        name: task_id
        schema:
          type: string
        required: true
      tags:
      - Datastreams
      security:
      - adverityApiTokenAuth:
        - datastream:read
      responses:
        '200':
          content:
            application/json:
              schema:
                type: string
                format: binary
          description: Staged converted file streamed as an attachment.
        '403':
          description: Connector policy forbids extract download for API callers.
        '404':
          description: Download is not ready, the staged file has expired, or the
            task belongs to another extract.
      x-required-scopes:
      - datastream:read
      description: Requires the `datastream:read` scope.
  /api/extracts/{id}/download/status/{task_id}/:
    get:
      operationId: extracts_download_status_detail_retrieve
      parameters:
      - in: path
        name: id
        schema:
          type: integer
        description: A unique integer value identifying this Datastream extract.
        required: true
      - in: path
        name: task_id
        schema:
          type: string
        required: true
      tags:
      - Datastreams
      security:
      - adverityApiTokenAuth:
        - datastream:read
      responses:
        '200':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ExtractDownloadStatus'
          description: ''
        '403':
          description: Connector policy forbids extract download for API callers.
        '404':
          description: Extract no longer accessible, or the task belongs to another
            extract.
      x-required-scopes:
      - datastream:read
      description: Requires the `datastream:read` scope.
  /api/extracts/{id}/metadata/:
    get:
      operationId: extracts_metadata_retrieve
      parameters:
      - in: path
        name: id
        schema:
          type: integer
        description: A unique integer value identifying this Datastream extract.
        required: true
      tags:
      - Datastreams
      security:
      - adverityApiTokenAuth:
        - datastream:read
      responses:
        '200':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/DatastreamExtract'
          description: ''
      x-required-scopes:
      - datastream:read
      description: Requires the `datastream:read` scope.
  /api/extracts/{id}/tags/:
    put:
      operationId: extracts_tags_update
      parameters:
      - in: path
        name: id
        schema:
          type: integer
        description: A unique integer value identifying this Datastream extract.
        required: true
      tags:
      - Datastreams
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/DatastreamExtract'
          application/x-www-form-urlencoded:
            schema:
              $ref: '#/components/schemas/DatastreamExtract'
          multipart/form-data:
            schema:
              $ref: '#/components/schemas/DatastreamExtract'
        required: true
      security:
      - adverityApiTokenAuth:
        - datastream:write
      responses:
        '200':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/DatastreamExtract'
          description: ''
      x-required-scopes:
      - datastream:write
      description: Requires the `datastream:write` scope.
  /api/extracts/{id}/transform/apply/:
    post:
      operationId: extracts_transform_apply_create
      parameters:
      - in: path
        name: id
        schema:
          type: integer
        description: A unique integer value identifying this Datastream extract.
        required: true
      tags:
      - Datastreams
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/DatastreamExtract'
          application/x-www-form-urlencoded:
            schema:
              $ref: '#/components/schemas/DatastreamExtract'
          multipart/form-data:
            schema:
              $ref: '#/components/schemas/DatastreamExtract'
        required: true
      security:
      - adverityApiTokenAuth:
        - datastream:write
      responses:
        '200':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/DatastreamExtract'
          description: ''
      x-required-scopes:
      - datastream:write
      description: Requires the `datastream:write` scope.
  /api/extracts/{id}/transform/preview/:
    post:
      operationId: extracts_transform_preview_create
      parameters:
      - in: path
        name: id
        schema:
          type: integer
        description: A unique integer value identifying this Datastream extract.
        required: true
      tags:
      - Datastreams
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/DatastreamExtract'
          application/x-www-form-urlencoded:
            schema:
              $ref: '#/components/schemas/DatastreamExtract'
          multipart/form-data:
            schema:
              $ref: '#/components/schemas/DatastreamExtract'
        required: true
      security:
      - adverityApiTokenAuth:
        - datastream:write
      responses:
        '200':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/DatastreamExtract'
          description: ''
      x-required-scopes:
      - datastream:write
      description: Requires the `datastream:write` scope.
  /api/jobs/:
    get:
      operationId: jobs_list
      parameters:
      - in: query
        name: datastream_id
        schema:
          type: number
      - in: query
        name: end
        schema:
          type:
          - string
          - 'null'
          format: date-time
      - in: query
        name: job_group_id
        schema:
          type: number
      - in: query
        name: job_uuid
        schema:
          type: string
          format: uuid
      - name: ordering
        required: false
        in: query
        description: Which field to use when ordering the results.
        schema:
          type: string
      - 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: Number of results to return per page.
        schema:
          type: integer
      - in: query
        name: stack_id
        schema:
          type: number
      - in: query
        name: start
        schema:
          type:
          - string
          - 'null'
          format: date-time
      - in: query
        name: state
        schema:
          type: integer
          enum:
          - 10
          - 20
          - 30
          - 50
          - 60
          - 70
        description: |-
          * `20` - Scheduled
          * `10` - Running
          * `50` - Success
          * `70` - Cancelled
          * `30` - Failed
          * `60` - Discarded
      - in: query
        name: triggered_by_user
        schema:
          type: boolean
        description: 'true: only human-triggered fetches; false: only system-triggered.'
      - in: query
        name: type
        schema:
          type: string
          enum:
          - Enrich
          - Fetch
          - Transfer
        description: |-
          * `Fetch` - Fetch
          * `Enrich` - Enrich
          * `Transfer` - Transfer
      - in: query
        name: user
        schema:
          type: string
        description: Filter by the email of the user who triggered the fetch.
      tags:
      - Jobs
      security:
      - adverityApiTokenAuth:
        - datastream:read
      responses:
        '200':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/PaginatedJobPolymorphicList'
          description: ''
      x-required-scopes:
      - datastream:read
      description: Requires the `datastream:read` scope.
  /api/jobs/{id}/:
    get:
      operationId: jobs_detail_retrieve
      parameters:
      - in: path
        name: id
        schema:
          type: integer
        description: A unique integer value identifying this job.
        required: true
      tags:
      - Jobs
      security:
      - adverityApiTokenAuth:
        - datastream:read
      responses:
        '200':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/JobPolymorphic'
          description: ''
      x-required-scopes:
      - datastream:read
      description: Requires the `datastream:read` scope.
  /api/jobs/{id}/imported/:
    get:
      operationId: jobs_imported_retrieve
      parameters:
      - in: path
        name: id
        schema:
          type: integer
        description: A unique integer value identifying this job.
        required: true
      tags:
      - Jobs
      security:
      - adverityApiTokenAuth:
        - datastream:read
      responses:
        '200':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/JobPolymorphic'
          description: ''
      x-required-scopes:
      - datastream:read
      description: Requires the `datastream:read` scope.
  /api/jobs/{id}/retry/:
    post:
      operationId: jobs_retry_create
      parameters:
      - in: path
        name: id
        schema:
          type: integer
        description: A unique integer value identifying this job.
        required: true
      tags:
      - Jobs
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/JobPolymorphic'
          application/x-www-form-urlencoded:
            schema:
              $ref: '#/components/schemas/JobPolymorphic'
          multipart/form-data:
            schema:
              $ref: '#/components/schemas/JobPolymorphic'
      security:
      - adverityApiTokenAuth:
        - datastream:write
      responses:
        '200':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/JobPolymorphic'
          description: ''
      x-required-scopes:
      - datastream:write
      description: Requires the `datastream:write` scope.
  /api/jobs/{id}/stop/:
    post:
      operationId: jobs_stop_create
      parameters:
      - in: path
        name: id
        schema:
          type: integer
        description: A unique integer value identifying this job.
        required: true
      tags:
      - Jobs
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/JobPolymorphic'
          application/x-www-form-urlencoded:
            schema:
              $ref: '#/components/schemas/JobPolymorphic'
          multipart/form-data:
            schema:
              $ref: '#/components/schemas/JobPolymorphic'
      security:
      - adverityApiTokenAuth:
        - datastream:write
      responses:
        '200':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/JobPolymorphic'
          description: ''
      x-required-scopes:
      - datastream:write
      description: Requires the `datastream:write` scope.
  /api/mapping-tables/:
    get:
      operationId: mapping_tables_list
      parameters:
      - in: query
        name: name
        schema:
          type: string
      - name: ordering
        required: false
        in: query
        description: Which field to use when ordering the results.
        schema:
          type: string
      - 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: Number of results to return per page.
        schema:
          type: integer
      tags:
      - Configuration
      security:
      - adverityApiTokenAuth:
        - workspace:read
      responses:
        '200':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/PaginatedMappingTableList'
          description: ''
      x-required-scopes:
      - workspace:read
      description: Requires the `workspace:read` scope.
  /api/mapping-tables/{id}/:
    get:
      operationId: mapping_tables_detail_retrieve
      parameters:
      - in: path
        name: id
        schema:
          type: integer
        description: A unique integer value identifying this Mapping Table.
        required: true
      tags:
      - Configuration
      security:
      - adverityApiTokenAuth:
        - workspace:read
      responses:
        '200':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/MappingTable'
          description: ''
      x-required-scopes:
      - workspace:read
      description: Requires the `workspace:read` scope.
    put:
      operationId: mapping_tables_detail_update
      parameters:
      - in: path
        name: id
        schema:
          type: integer
        description: A unique integer value identifying this Mapping Table.
        required: true
      tags:
      - Configuration
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/MappingTable'
          application/x-www-form-urlencoded:
            schema:
              $ref: '#/components/schemas/MappingTable'
          multipart/form-data:
            schema:
              $ref: '#/components/schemas/MappingTable'
        required: true
      security:
      - adverityApiTokenAuth:
        - workspace:write
      responses:
        '200':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/MappingTable'
          description: ''
      x-required-scopes:
      - workspace:write
      description: Requires the `workspace:write` scope.
    patch:
      operationId: mapping_tables_detail_partial_update
      parameters:
      - in: path
        name: id
        schema:
          type: integer
        description: A unique integer value identifying this Mapping Table.
        required: true
      tags:
      - Configuration
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/PatchedMappingTablePartialUpdate'
          application/x-www-form-urlencoded:
            schema:
              $ref: '#/components/schemas/PatchedMappingTablePartialUpdate'
          multipart/form-data:
            schema:
              $ref: '#/components/schemas/PatchedMappingTablePartialUpdate'
      security:
      - adverityApiTokenAuth:
        - workspace:write
      responses:
        '200':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/MappingTablePartialUpdate'
          description: ''
      x-required-scopes:
      - workspace:write
      description: Requires the `workspace:write` scope.
  /api/mapping-tables/{parent_lookup_table_id}/entries/:
    get:
      operationId: mapping_tables_entries_list
      parameters:
      - name: ordering
        required: false
        in: query
        description: Which field to use when ordering the results.
        schema:
          type: string
      - 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: Number of results to return per page.
        schema:
          type: integer
      - in: path
        name: parent_lookup_table_id
        schema:
          type: string
        required: true
      tags:
      - Configuration
      security:
      - adverityApiTokenAuth:
        - workspace:read
      responses:
        '200':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/PaginatedMappingEntryList'
          description: ''
      x-required-scopes:
      - workspace:read
      description: Requires the `workspace:read` scope.
    post:
      operationId: mapping_tables_entries_create
      parameters:
      - in: path
        name: parent_lookup_table_id
        schema:
          type: string
        required: true
      tags:
      - Configuration
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/MappingEntry'
          application/x-www-form-urlencoded:
            schema:
              $ref: '#/components/schemas/MappingEntry'
          multipart/form-data:
            schema:
              $ref: '#/components/schemas/MappingEntry'
        required: true
      security:
      - adverityApiTokenAuth:
        - workspace:write
      responses:
        '201':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/MappingEntry'
          description: ''
      x-required-scopes:
      - workspace:write
      description: Requires the `workspace:write` scope.
  /api/mapping-tables/{parent_lookup_table_id}/entries/{id}/:
    get:
      operationId: mapping_tables_entries_detail_retrieve
      parameters:
      - in: path
        name: id
        schema:
          type: integer
        description: A unique integer value identifying this Mapping Entry.
        required: true
      - in: path
        name: parent_lookup_table_id
        schema:
          type: string
        required: true
      tags:
      - Configuration
      security:
      - adverityApiTokenAuth:
        - workspace:read
      responses:
        '200':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/MappingEntry'
          description: ''
      x-required-scopes:
      - workspace:read
      description: Requires the `workspace:read` scope.
    put:
      operationId: mapping_tables_entries_detail_update
      parameters:
      - in: path
        name: id
        schema:
          type: integer
        description: A unique integer value identifying this Mapping Entry.
        required: true
      - in: path
        name: parent_lookup_table_id
        schema:
          type: string
        required: true
      tags:
      - Configuration
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/MappingEntry'
          application/x-www-form-urlencoded:
            schema:
              $ref: '#/components/schemas/MappingEntry'
          multipart/form-data:
            schema:
              $ref: '#/components/schemas/MappingEntry'
        required: true
      security:
      - adverityApiTokenAuth:
        - workspace:write
      responses:
        '200':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/MappingEntry'
          description: ''
      x-required-scopes:
      - workspace:write
      description: Requires the `workspace:write` scope.
    patch:
      operationId: mapping_tables_entries_detail_partial_update
      parameters:
      - in: path
        name: id
        schema:
          type: integer
        description: A unique integer value identifying this Mapping Entry.
        required: true
      - in: path
        name: parent_lookup_table_id
        schema:
          type: string
        required: true
      tags:
      - Configuration
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/PatchedMappingEntry'
          application/x-www-form-urlencoded:
            schema:
              $ref: '#/components/schemas/PatchedMappingEntry'
          multipart/form-data:
            schema:
              $ref: '#/components/schemas/PatchedMappingEntry'
      security:
      - adverityApiTokenAuth:
        - workspace:write
      responses:
        '200':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/MappingEntry'
          description: ''
      x-required-scopes:
      - workspace:write
      description: Requires the `workspace:write` scope.
    delete:
      operationId: mapping_tables_entries_detail_destroy
      parameters:
      - in: path
        name: id
        schema:
          type: integer
        description: A unique integer value identifying this Mapping Entry.
        required: true
      - in: path
        name: parent_lookup_table_id
        schema:
          type: string
        required: true
      tags:
      - Configuration
      security:
      - adverityApiTokenAuth:
        - workspace:write
      responses:
        '204':
          description: No response body
      x-required-scopes:
      - workspace:write
      description: Requires the `workspace:write` scope.
  /api/notifications/email/:
    get:
      operationId: notifications_email_list
      parameters:
      - name: ordering
        required: false
        in: query
        description: Which field to use when ordering the results.
        schema:
          type: string
      - name: page
        required: false
        in: query
        description: A page number within the paginated result set.
        schema:
          type: integer
      tags:
      - Notifications
      security:
      - adverityApiTokenAuth:
        - user:read
      responses:
        '200':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/PaginatedEmailSubscriptionList'
          description: ''
      x-required-scopes:
      - user:read
      description: Requires the `user:read` scope.
    post:
      operationId: notifications_email_create
      tags:
      - Notifications
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/EmailSubscription'
          application/x-www-form-urlencoded:
            schema:
              $ref: '#/components/schemas/EmailSubscription'
          multipart/form-data:
            schema:
              $ref: '#/components/schemas/EmailSubscription'
        required: true
      security:
      - adverityApiTokenAuth:
        - user:write
      responses:
        '201':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/EmailSubscription'
          description: ''
      x-required-scopes:
      - user:write
      description: Requires the `user:write` scope.
  /api/notifications/email/{id}/:
    get:
      operationId: notifications_email_detail_retrieve
      parameters:
      - in: path
        name: id
        schema:
          type: integer
        description: A unique integer value identifying this email subscription.
        required: true
      tags:
      - Notifications
      security:
      - adverityApiTokenAuth:
        - user:read
      responses:
        '200':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/EmailSubscription'
          description: ''
      x-required-scopes:
      - user:read
      description: Requires the `user:read` scope.
    put:
      operationId: notifications_email_detail_update
      parameters:
      - in: path
        name: id
        schema:
          type: integer
        description: A unique integer value identifying this email subscription.
        required: true
      tags:
      - Notifications
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/EmailSubscription'
          application/x-www-form-urlencoded:
            schema:
              $ref: '#/components/schemas/EmailSubscription'
          multipart/form-data:
            schema:
              $ref: '#/components/schemas/EmailSubscription'
        required: true
      security:
      - adverityApiTokenAuth:
        - user:write
      responses:
        '200':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/EmailSubscription'
          description: ''
      x-required-scopes:
      - user:write
      description: Requires the `user:write` scope.
    patch:
      operationId: notifications_email_detail_partial_update
      parameters:
      - in: path
        name: id
        schema:
          type: integer
        description: A unique integer value identifying this email subscription.
        required: true
      tags:
      - Notifications
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/PatchedEmailSubscription'
          application/x-www-form-urlencoded:
            schema:
              $ref: '#/components/schemas/PatchedEmailSubscription'
          multipart/form-data:
            schema:
              $ref: '#/components/schemas/PatchedEmailSubscription'
      security:
      - adverityApiTokenAuth:
        - user:write
      responses:
        '200':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/EmailSubscription'
          description: ''
      x-required-scopes:
      - user:write
      description: Requires the `user:write` scope.
    delete:
      operationId: notifications_email_detail_destroy
      parameters:
      - in: path
        name: id
        schema:
          type: integer
        description: A unique integer value identifying this email subscription.
        required: true
      tags:
      - Notifications
      security:
      - adverityApiTokenAuth:
        - user:write
      responses:
        '204':
          description: No response body
      x-required-scopes:
      - user:write
      description: Requires the `user:write` scope.
  /api/notifications/microsoftteams/:
    get:
      operationId: notifications_microsoftteams_list
      parameters:
      - name: ordering
        required: false
        in: query
        description: Which field to use when ordering the results.
        schema:
          type: string
      - name: page
        required: false
        in: query
        description: A page number within the paginated result set.
        schema:
          type: integer
      tags:
      - Notifications
      security:
      - adverityApiTokenAuth:
        - user:read
      responses:
        '200':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/PaginatedMicrosoftTeamsSubscriptionList'
          description: ''
      x-required-scopes:
      - user:read
      description: Requires the `user:read` scope.
    post:
      operationId: notifications_microsoftteams_create
      tags:
      - Notifications
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/MicrosoftTeamsSubscription'
          application/x-www-form-urlencoded:
            schema:
              $ref: '#/components/schemas/MicrosoftTeamsSubscription'
          multipart/form-data:
            schema:
              $ref: '#/components/schemas/MicrosoftTeamsSubscription'
        required: true
      security:
      - adverityApiTokenAuth:
        - user:write
      responses:
        '201':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/MicrosoftTeamsSubscription'
          description: ''
      x-required-scopes:
      - user:write
      description: Requires the `user:write` scope.
  /api/notifications/microsoftteams/{id}/:
    get:
      operationId: notifications_microsoftteams_detail_retrieve
      parameters:
      - in: path
        name: id
        schema:
          type: integer
        description: A unique integer value identifying this Microsoft Teams subscription.
        required: true
      tags:
      - Notifications
      security:
      - adverityApiTokenAuth:
        - user:read
      responses:
        '200':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/MicrosoftTeamsSubscription'
          description: ''
      x-required-scopes:
      - user:read
      description: Requires the `user:read` scope.
    put:
      operationId: notifications_microsoftteams_detail_update
      parameters:
      - in: path
        name: id
        schema:
          type: integer
        description: A unique integer value identifying this Microsoft Teams subscription.
        required: true
      tags:
      - Notifications
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/MicrosoftTeamsSubscription'
          application/x-www-form-urlencoded:
            schema:
              $ref: '#/components/schemas/MicrosoftTeamsSubscription'
          multipart/form-data:
            schema:
              $ref: '#/components/schemas/MicrosoftTeamsSubscription'
        required: true
      security:
      - adverityApiTokenAuth:
        - user:write
      responses:
        '200':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/MicrosoftTeamsSubscription'
          description: ''
      x-required-scopes:
      - user:write
      description: Requires the `user:write` scope.
    patch:
      operationId: notifications_microsoftteams_detail_partial_update
      parameters:
      - in: path
        name: id
        schema:
          type: integer
        description: A unique integer value identifying this Microsoft Teams subscription.
        required: true
      tags:
      - Notifications
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/PatchedMicrosoftTeamsSubscription'
          application/x-www-form-urlencoded:
            schema:
              $ref: '#/components/schemas/PatchedMicrosoftTeamsSubscription'
          multipart/form-data:
            schema:
              $ref: '#/components/schemas/PatchedMicrosoftTeamsSubscription'
      security:
      - adverityApiTokenAuth:
        - user:write
      responses:
        '200':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/MicrosoftTeamsSubscription'
          description: ''
      x-required-scopes:
      - user:write
      description: Requires the `user:write` scope.
    delete:
      operationId: notifications_microsoftteams_detail_destroy
      parameters:
      - in: path
        name: id
        schema:
          type: integer
        description: A unique integer value identifying this Microsoft Teams subscription.
        required: true
      tags:
      - Notifications
      security:
      - adverityApiTokenAuth:
        - user:write
      responses:
        '204':
          description: No response body
      x-required-scopes:
      - user:write
      description: Requires the `user:write` scope.
  /api/notifications/slack/:
    get:
      operationId: notifications_slack_list
      parameters:
      - name: ordering
        required: false
        in: query
        description: Which field to use when ordering the results.
        schema:
          type: string
      - name: page
        required: false
        in: query
        description: A page number within the paginated result set.
        schema:
          type: integer
      tags:
      - Notifications
      security:
      - adverityApiTokenAuth:
        - user:read
      responses:
        '200':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/PaginatedSlackSubscriptionList'
          description: ''
      x-required-scopes:
      - user:read
      description: Requires the `user:read` scope.
    post:
      operationId: notifications_slack_create
      tags:
      - Notifications
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/SlackSubscription'
          application/x-www-form-urlencoded:
            schema:
              $ref: '#/components/schemas/SlackSubscription'
          multipart/form-data:
            schema:
              $ref: '#/components/schemas/SlackSubscription'
        required: true
      security:
      - adverityApiTokenAuth:
        - user:write
      responses:
        '201':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/SlackSubscription'
          description: ''
      x-required-scopes:
      - user:write
      description: Requires the `user:write` scope.
  /api/notifications/slack/{id}/:
    get:
      operationId: notifications_slack_detail_retrieve
      parameters:
      - in: path
        name: id
        schema:
          type: integer
        description: A unique integer value identifying this Slack subscription.
        required: true
      tags:
      - Notifications
      security:
      - adverityApiTokenAuth:
        - user:read
      responses:
        '200':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/SlackSubscription'
          description: ''
      x-required-scopes:
      - user:read
      description: Requires the `user:read` scope.
    put:
      operationId: notifications_slack_detail_update
      parameters:
      - in: path
        name: id
        schema:
          type: integer
        description: A unique integer value identifying this Slack subscription.
        required: true
      tags:
      - Notifications
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/SlackSubscription'
          application/x-www-form-urlencoded:
            schema:
              $ref: '#/components/schemas/SlackSubscription'
          multipart/form-data:
            schema:
              $ref: '#/components/schemas/SlackSubscription'
        required: true
      security:
      - adverityApiTokenAuth:
        - user:write
      responses:
        '200':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/SlackSubscription'
          description: ''
      x-required-scopes:
      - user:write
      description: Requires the `user:write` scope.
    patch:
      operationId: notifications_slack_detail_partial_update
      parameters:
      - in: path
        name: id
        schema:
          type: integer
        description: A unique integer value identifying this Slack subscription.
        required: true
      tags:
      - Notifications
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/PatchedSlackSubscription'
          application/x-www-form-urlencoded:
            schema:
              $ref: '#/components/schemas/PatchedSlackSubscription'
          multipart/form-data:
            schema:
              $ref: '#/components/schemas/PatchedSlackSubscription'
      security:
      - adverityApiTokenAuth:
        - user:write
      responses:
        '200':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/SlackSubscription'
          description: ''
      x-required-scopes:
      - user:write
      description: Requires the `user:write` scope.
    delete:
      operationId: notifications_slack_detail_destroy
      parameters:
      - in: path
        name: id
        schema:
          type: integer
        description: A unique integer value identifying this Slack subscription.
        required: true
      tags:
      - Notifications
      security:
      - adverityApiTokenAuth:
        - user:write
      responses:
        '204':
          description: No response body
      x-required-scopes:
      - user:write
      description: Requires the `user:write` scope.
  /api/notifications/webhook/:
    get:
      operationId: notifications_webhook_list
      parameters:
      - name: ordering
        required: false
        in: query
        description: Which field to use when ordering the results.
        schema:
          type: string
      - name: page
        required: false
        in: query
        description: A page number within the paginated result set.
        schema:
          type: integer
      tags:
      - Notifications
      security:
      - adverityApiTokenAuth:
        - user:read
      responses:
        '200':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/PaginatedWebhookList'
          description: ''
      x-required-scopes:
      - user:read
      description: Requires the `user:read` scope.
    post:
      operationId: notifications_webhook_create
      tags:
      - Notifications
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/Webhook'
          application/x-www-form-urlencoded:
            schema:
              $ref: '#/components/schemas/Webhook'
          multipart/form-data:
            schema:
              $ref: '#/components/schemas/Webhook'
        required: true
      security:
      - adverityApiTokenAuth:
        - user:write
      responses:
        '201':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Webhook'
          description: ''
      x-required-scopes:
      - user:write
      description: Requires the `user:write` scope.
  /api/notifications/webhook/{id}/:
    get:
      operationId: notifications_webhook_detail_retrieve
      parameters:
      - in: path
        name: id
        schema:
          type: integer
        description: A unique integer value identifying this Webhook.
        required: true
      tags:
      - Notifications
      security:
      - adverityApiTokenAuth:
        - user:read
      responses:
        '200':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Webhook'
          description: ''
      x-required-scopes:
      - user:read
      description: Requires the `user:read` scope.
    put:
      operationId: notifications_webhook_detail_update
      parameters:
      - in: path
        name: id
        schema:
          type: integer
        description: A unique integer value identifying this Webhook.
        required: true
      tags:
      - Notifications
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/Webhook'
          application/x-www-form-urlencoded:
            schema:
              $ref: '#/components/schemas/Webhook'
          multipart/form-data:
            schema:
              $ref: '#/components/schemas/Webhook'
        required: true
      security:
      - adverityApiTokenAuth:
        - user:write
      responses:
        '200':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Webhook'
          description: ''
      x-required-scopes:
      - user:write
      description: Requires the `user:write` scope.
    patch:
      operationId: notifications_webhook_detail_partial_update
      parameters:
      - in: path
        name: id
        schema:
          type: integer
        description: A unique integer value identifying this Webhook.
        required: true
      tags:
      - Notifications
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/PatchedWebhook'
          application/x-www-form-urlencoded:
            schema:
              $ref: '#/components/schemas/PatchedWebhook'
          multipart/form-data:
            schema:
              $ref: '#/components/schemas/PatchedWebhook'
      security:
      - adverityApiTokenAuth:
        - user:write
      responses:
        '200':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Webhook'
          description: ''
      x-required-scopes:
      - user:write
      description: Requires the `user:write` scope.
    delete:
      operationId: notifications_webhook_detail_destroy
      parameters:
      - in: path
        name: id
        schema:
          type: integer
        description: A unique integer value identifying this Webhook.
        required: true
      tags:
      - Notifications
      security:
      - adverityApiTokenAuth:
        - user:write
      responses:
        '204':
          description: No response body
      x-required-scopes:
      - user:write
      description: Requires the `user:write` scope.
  /api/stacks/:
    get:
      operationId: stacks_list
      parameters:
      - in: query
        name: name
        schema:
          type: string
      - name: ordering
        required: false
        in: query
        description: Which field to use when ordering the results.
        schema:
          type: string
      - 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: Number of results to return per page.
        schema:
          type: integer
      - in: query
        name: uuid
        schema:
          type: string
          format: uuid
      tags:
      - Workspaces
      security:
      - adverityApiTokenAuth:
        - workspace:read
      responses:
        '200':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/PaginatedStackList'
          description: ''
      x-required-scopes:
      - workspace:read
      description: Requires the `workspace:read` scope.
    post:
      operationId: stacks_create
      tags:
      - Workspaces
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/Stack'
          application/x-www-form-urlencoded:
            schema:
              $ref: '#/components/schemas/Stack'
          multipart/form-data:
            schema:
              $ref: '#/components/schemas/Stack'
        required: true
      security:
      - adverityApiTokenAuth:
        - workspace:write
      responses:
        '201':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Stack'
          description: ''
      x-required-scopes:
      - workspace:write
      description: Requires the `workspace:write` scope.
  /api/stacks/{slug}/:
    get:
      operationId: stacks_detail_retrieve
      parameters:
      - in: path
        name: slug
        schema:
          type: string
        required: true
      tags:
      - Workspaces
      security:
      - adverityApiTokenAuth:
        - workspace:read
      responses:
        '200':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Stack'
          description: ''
      x-required-scopes:
      - workspace:read
      description: Requires the `workspace:read` scope.
    put:
      operationId: stacks_detail_update
      parameters:
      - in: path
        name: slug
        schema:
          type: string
        required: true
      tags:
      - Workspaces
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/Stack'
          application/x-www-form-urlencoded:
            schema:
              $ref: '#/components/schemas/Stack'
          multipart/form-data:
            schema:
              $ref: '#/components/schemas/Stack'
        required: true
      security:
      - adverityApiTokenAuth:
        - workspace:write
      responses:
        '200':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Stack'
          description: ''
      x-required-scopes:
      - workspace:write
      description: Requires the `workspace:write` scope.
    patch:
      operationId: stacks_detail_partial_update
      parameters:
      - in: path
        name: slug
        schema:
          type: string
        required: true
      tags:
      - Workspaces
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/PatchedStack'
          application/x-www-form-urlencoded:
            schema:
              $ref: '#/components/schemas/PatchedStack'
          multipart/form-data:
            schema:
              $ref: '#/components/schemas/PatchedStack'
      security:
      - adverityApiTokenAuth:
        - workspace:write
      responses:
        '200':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Stack'
          description: ''
      x-required-scopes:
      - workspace:write
      description: Requires the `workspace:write` scope.
    delete:
      operationId: stacks_detail_destroy
      parameters:
      - in: path
        name: slug
        schema:
          type: string
        required: true
      tags:
      - Workspaces
      security:
      - adverityApiTokenAuth: []
      responses:
        '204':
          description: No response body
      x-api-key-allowed: false
      description: 'Not available to Connect API keys: use Adverity instead.'
  /api/stacks/{slug}/schema/:
    get:
      operationId: stacks_schema_retrieve
      description: |-
        Export the target field schema configured for this workspace.

        Requires the `workspace:read` scope.
      parameters:
      - in: path
        name: slug
        schema:
          type: string
        required: true
      tags:
      - Workspaces
      security:
      - adverityApiTokenAuth:
        - workspace:read
      responses:
        '200':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/StackSchema'
          description: ''
      x-required-scopes:
      - workspace:read
    post:
      operationId: stacks_schema_create
      description: |-
        Import a target field schema. Existing target fields are updated in place and fields absent from the payload are left untouched.

        Requires the `workspace:write` scope.
      parameters:
      - in: query
        name: reset
        schema:
          type: boolean
        description: Re-point existing per-datastream column mappings in this workspace
          to the imported target fields. Defaults to false.
      - in: path
        name: slug
        schema:
          type: string
        required: true
      tags:
      - Workspaces
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/StackSchema'
        required: true
      security:
      - adverityApiTokenAuth:
        - workspace:write
      responses:
        '200':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/StackSchemaImportResult'
          description: ''
        '400':
          description: Malformed schema payload or invalid reset value.
        '415':
          description: Content-Type other than application/json.
      x-required-scopes:
      - workspace:write
  /api/stacks/{slug}/stats/:
    get:
      operationId: stacks_stats_retrieve
      parameters:
      - in: path
        name: slug
        schema:
          type: string
        required: true
      tags:
      - Workspaces
      security:
      - adverityApiTokenAuth:
        - workspace:read
      responses:
        '200':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Stack'
          description: ''
      x-required-scopes:
      - workspace:read
      description: Requires the `workspace:read` scope.
  /api/storage/:
    get:
      operationId: storage_list
      parameters:
      - name: ordering
        required: false
        in: query
        description: Which field to use when ordering the results.
        schema:
          type: string
      - name: page
        required: false
        in: query
        description: A page number within the paginated result set.
        schema:
          type: integer
      tags:
      - Configuration
      security:
      - adverityApiTokenAuth:
        - workspace:read
      responses:
        '200':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/PaginatedDatalakeList'
          description: ''
      x-required-scopes:
      - workspace:read
      description: Requires the `workspace:read` scope.
    post:
      operationId: storage_create
      tags:
      - Configuration
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/Datalake'
          application/x-www-form-urlencoded:
            schema:
              $ref: '#/components/schemas/Datalake'
          multipart/form-data:
            schema:
              $ref: '#/components/schemas/Datalake'
        required: true
      security:
      - adverityApiTokenAuth: []
      responses:
        '201':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Datalake'
          description: ''
      x-api-key-allowed: false
      description: 'Not available to Connect API keys: use Adverity instead.'
  /api/storage/{id}/:
    get:
      operationId: storage_detail_retrieve
      parameters:
      - in: path
        name: id
        schema:
          type: integer
        description: A unique integer value identifying this Storage.
        required: true
      tags:
      - Configuration
      security:
      - adverityApiTokenAuth:
        - workspace:read
      responses:
        '200':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Datalake'
          description: ''
      x-required-scopes:
      - workspace:read
      description: Requires the `workspace:read` scope.
    put:
      operationId: storage_detail_update
      parameters:
      - in: path
        name: id
        schema:
          type: integer
        description: A unique integer value identifying this Storage.
        required: true
      tags:
      - Configuration
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/Datalake'
          application/x-www-form-urlencoded:
            schema:
              $ref: '#/components/schemas/Datalake'
          multipart/form-data:
            schema:
              $ref: '#/components/schemas/Datalake'
        required: true
      security:
      - adverityApiTokenAuth: []
      responses:
        '200':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Datalake'
          description: ''
      x-api-key-allowed: false
      description: 'Not available to Connect API keys: use Adverity instead.'
    patch:
      operationId: storage_detail_partial_update
      parameters:
      - in: path
        name: id
        schema:
          type: integer
        description: A unique integer value identifying this Storage.
        required: true
      tags:
      - Configuration
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/PatchedDatalake'
          application/x-www-form-urlencoded:
            schema:
              $ref: '#/components/schemas/PatchedDatalake'
          multipart/form-data:
            schema:
              $ref: '#/components/schemas/PatchedDatalake'
      security:
      - adverityApiTokenAuth: []
      responses:
        '200':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Datalake'
          description: ''
      x-api-key-allowed: false
      description: 'Not available to Connect API keys: use Adverity instead.'
    delete:
      operationId: storage_detail_destroy
      parameters:
      - in: path
        name: id
        schema:
          type: integer
        description: A unique integer value identifying this Storage.
        required: true
      tags:
      - Configuration
      security:
      - adverityApiTokenAuth: []
      responses:
        '204':
          description: No response body
      x-api-key-allowed: false
      description: 'Not available to Connect API keys: use Adverity instead.'
  /api/target-columns/:
    get:
      operationId: target_columns_list
      parameters:
      - in: query
        name: name
        schema:
          type: string
      - name: ordering
        required: false
        in: query
        description: Which field to use when ordering the results.
        schema:
          type: string
      - 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: Number of results to return per page.
        schema:
          type: integer
      tags:
      - Targets
      security:
      - adverityApiTokenAuth:
        - destination:read
      responses:
        '200':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/PaginatedSchemaColumnCompatibilityList'
          description: ''
      x-required-scopes:
      - destination:read
      description: Requires the `destination:read` scope.
    post:
      operationId: target_columns_create
      tags:
      - Targets
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/SchemaColumnCompatibility'
          application/x-www-form-urlencoded:
            schema:
              $ref: '#/components/schemas/SchemaColumnCompatibility'
          multipart/form-data:
            schema:
              $ref: '#/components/schemas/SchemaColumnCompatibility'
        required: true
      security:
      - adverityApiTokenAuth:
        - destination:write
      responses:
        '201':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/SchemaColumnCompatibility'
          description: ''
      x-required-scopes:
      - destination:write
      description: Requires the `destination:write` scope.
  /api/target-columns/{id}/:
    get:
      operationId: target_columns_detail_retrieve
      parameters:
      - in: path
        name: id
        schema:
          type: integer
        description: A unique integer value identifying this Target Field.
        required: true
      tags:
      - Targets
      security:
      - adverityApiTokenAuth:
        - destination:read
      responses:
        '200':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/SchemaColumnCompatibility'
          description: ''
      x-required-scopes:
      - destination:read
      description: Requires the `destination:read` scope.
    put:
      operationId: target_columns_detail_update
      parameters:
      - in: path
        name: id
        schema:
          type: integer
        description: A unique integer value identifying this Target Field.
        required: true
      tags:
      - Targets
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/SchemaColumnCompatibility'
          application/x-www-form-urlencoded:
            schema:
              $ref: '#/components/schemas/SchemaColumnCompatibility'
          multipart/form-data:
            schema:
              $ref: '#/components/schemas/SchemaColumnCompatibility'
        required: true
      security:
      - adverityApiTokenAuth:
        - destination:write
      responses:
        '200':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/SchemaColumnCompatibility'
          description: ''
      x-required-scopes:
      - destination:write
      description: Requires the `destination:write` scope.
    patch:
      operationId: target_columns_detail_partial_update
      parameters:
      - in: path
        name: id
        schema:
          type: integer
        description: A unique integer value identifying this Target Field.
        required: true
      tags:
      - Targets
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/PatchedSchemaColumnCompatibility'
          application/x-www-form-urlencoded:
            schema:
              $ref: '#/components/schemas/PatchedSchemaColumnCompatibility'
          multipart/form-data:
            schema:
              $ref: '#/components/schemas/PatchedSchemaColumnCompatibility'
      security:
      - adverityApiTokenAuth:
        - destination:write
      responses:
        '200':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/SchemaColumnCompatibility'
          description: ''
      x-required-scopes:
      - destination:write
      description: Requires the `destination:write` scope.
    delete:
      operationId: target_columns_detail_destroy
      parameters:
      - in: path
        name: id
        schema:
          type: integer
        description: A unique integer value identifying this Target Field.
        required: true
      tags:
      - Targets
      security:
      - adverityApiTokenAuth:
        - destination:write
      responses:
        '204':
          description: No response body
      x-required-scopes:
      - destination:write
      description: Requires the `destination:write` scope.
  /api/target-columns/{parent_lookup_schema_column_id}/mappings/:
    get:
      operationId: target_columns_mappings_list
      parameters:
      - in: query
        name: is_key_column
        schema:
          type: boolean
      - name: ordering
        required: false
        in: query
        description: Which field to use when ordering the results.
        schema:
          type: string
      - name: page
        required: false
        in: query
        description: A page number within the paginated result set.
        schema:
          type: integer
      - in: path
        name: parent_lookup_schema_column_id
        schema:
          type: string
        required: true
      - in: query
        name: source_column_name
        schema:
          type: string
      - in: query
        name: source_content_type
        schema:
          type: integer
      tags:
      - Targets
      security:
      - adverityApiTokenAuth:
        - destination:read
      responses:
        '200':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/PaginatedDefaultSchemaMappingList'
          description: ''
      x-required-scopes:
      - destination:read
      description: Requires the `destination:read` scope.
    post:
      operationId: target_columns_mappings_create
      parameters:
      - in: path
        name: parent_lookup_schema_column_id
        schema:
          type: string
        required: true
      tags:
      - Targets
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/DefaultSchemaMapping'
          application/x-www-form-urlencoded:
            schema:
              $ref: '#/components/schemas/DefaultSchemaMapping'
          multipart/form-data:
            schema:
              $ref: '#/components/schemas/DefaultSchemaMapping'
        required: true
      security:
      - adverityApiTokenAuth:
        - destination:write
      responses:
        '201':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/DefaultSchemaMapping'
          description: ''
        '400':
          description: The request body failed validation. Beyond the usual missing
            or malformed fields, this covers a target column id that does not resolve,
            and a source field or target column that is already mapped for this source
            type. On create it also covers a target column id that disagrees with
            the target column in the URL; an update may still move a mapping to another
            column.
        '409':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/DuplicateDefaultSchemaMapping'
          description: The mapping was not written. Usually a concurrent write claimed
            this source field or target column between validation and the write; a
            referenced target column or source type deleted in the same window is
            reported the same way. Re-read the mappings for this source type before
            retrying.
      x-required-scopes:
      - destination:write
      description: Requires the `destination:write` scope.
  /api/target-columns/{parent_lookup_schema_column_id}/mappings/{id}/:
    get:
      operationId: target_columns_mappings_detail_retrieve
      parameters:
      - in: path
        name: id
        schema:
          type: integer
        description: A unique integer value identifying this Default Data Mapping.
        required: true
      - in: path
        name: parent_lookup_schema_column_id
        schema:
          type: string
        required: true
      tags:
      - Targets
      security:
      - adverityApiTokenAuth:
        - destination:read
      responses:
        '200':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/DefaultSchemaMapping'
          description: ''
      x-required-scopes:
      - destination:read
      description: Requires the `destination:read` scope.
    put:
      operationId: target_columns_mappings_detail_update
      parameters:
      - in: path
        name: id
        schema:
          type: integer
        description: A unique integer value identifying this Default Data Mapping.
        required: true
      - in: path
        name: parent_lookup_schema_column_id
        schema:
          type: string
        required: true
      tags:
      - Targets
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/DefaultSchemaMapping'
          application/x-www-form-urlencoded:
            schema:
              $ref: '#/components/schemas/DefaultSchemaMapping'
          multipart/form-data:
            schema:
              $ref: '#/components/schemas/DefaultSchemaMapping'
        required: true
      security:
      - adverityApiTokenAuth:
        - destination:write
      responses:
        '200':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/DefaultSchemaMapping'
          description: ''
        '400':
          description: The request body failed validation. Beyond the usual missing
            or malformed fields, this covers a target column id that does not resolve,
            and a source field or target column that is already mapped for this source
            type.
        '409':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/DuplicateDefaultSchemaMapping'
          description: The mapping was not written. Usually a concurrent write claimed
            this source field or target column between validation and the write; a
            referenced target column or source type deleted in the same window is
            reported the same way. Re-read the mappings for this source type before
            retrying.
      x-required-scopes:
      - destination:write
      description: Requires the `destination:write` scope.
    patch:
      operationId: target_columns_mappings_detail_partial_update
      parameters:
      - in: path
        name: id
        schema:
          type: integer
        description: A unique integer value identifying this Default Data Mapping.
        required: true
      - in: path
        name: parent_lookup_schema_column_id
        schema:
          type: string
        required: true
      tags:
      - Targets
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/PatchedDefaultSchemaMapping'
          application/x-www-form-urlencoded:
            schema:
              $ref: '#/components/schemas/PatchedDefaultSchemaMapping'
          multipart/form-data:
            schema:
              $ref: '#/components/schemas/PatchedDefaultSchemaMapping'
      security:
      - adverityApiTokenAuth:
        - destination:write
      responses:
        '200':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/DefaultSchemaMapping'
          description: ''
        '400':
          description: The request body failed validation. Beyond the usual missing
            or malformed fields, this covers a target column id that does not resolve,
            and a source field or target column that is already mapped for this source
            type.
        '409':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/DuplicateDefaultSchemaMapping'
          description: The mapping was not written. Usually a concurrent write claimed
            this source field or target column between validation and the write; a
            referenced target column or source type deleted in the same window is
            reported the same way. Re-read the mappings for this source type before
            retrying.
      x-required-scopes:
      - destination:write
      description: Requires the `destination:write` scope.
    delete:
      operationId: target_columns_mappings_detail_destroy
      parameters:
      - in: path
        name: id
        schema:
          type: integer
        description: A unique integer value identifying this Default Data Mapping.
        required: true
      - in: path
        name: parent_lookup_schema_column_id
        schema:
          type: string
        required: true
      tags:
      - Targets
      security:
      - adverityApiTokenAuth:
        - destination:write
      responses:
        '204':
          description: No response body
      x-required-scopes:
      - destination:write
      description: Requires the `destination:write` scope.
  /api/target-types/:
    get:
      operationId: target_types_list
      parameters:
      - 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: Number of results to return per page.
        schema:
          type: integer
      - name: search
        required: false
        in: query
        description: A search term.
        schema:
          type: string
      tags:
      - Targets
      security:
      - adverityApiTokenAuth:
        - destination:read
      responses:
        '200':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/PaginatedBaseTargetTypeList'
          description: ''
      x-required-scopes:
      - destination:read
      description: Requires the `destination:read` scope.
  /api/target-types/{id}/:
    get:
      operationId: target_types_detail_retrieve
      parameters:
      - in: path
        name: id
        schema:
          type: integer
        description: A unique integer value identifying this content type.
        required: true
      tags:
      - Targets
      security:
      - adverityApiTokenAuth:
        - destination:read
      responses:
        '200':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/BaseTargetType'
          description: ''
      x-required-scopes:
      - destination:read
      description: Requires the `destination:read` scope.
  /api/target-types/{parent_lookup_type_id}/targets/:
    get:
      operationId: target_types_targets_retrieve
      parameters:
      - in: path
        name: parent_lookup_type_id
        schema:
          type: string
        required: true
      tags:
      - Targets
      security:
      - adverityApiTokenAuth:
        - destination:read
      responses:
        '200':
          description: No response body
      x-required-scopes:
      - destination:read
      description: Requires the `destination:read` scope.
    post:
      operationId: target_types_targets_create
      parameters:
      - in: path
        name: parent_lookup_type_id
        schema:
          type: string
        required: true
      tags:
      - Targets
      security:
      - adverityApiTokenAuth:
        - destination:write
      responses:
        '201':
          description: No response body
      x-required-scopes:
      - destination:write
      description: Requires the `destination:write` scope.
  /api/target-types/{parent_lookup_type_id}/targets/{id}/:
    get:
      operationId: target_types_targets_detail_retrieve
      parameters:
      - in: path
        name: id
        schema:
          type: string
        required: true
      - in: path
        name: parent_lookup_type_id
        schema:
          type: string
        required: true
      tags:
      - Targets
      security:
      - adverityApiTokenAuth:
        - destination:read
      responses:
        '200':
          description: No response body
      x-required-scopes:
      - destination:read
      description: Requires the `destination:read` scope.
    put:
      operationId: target_types_targets_detail_update
      parameters:
      - in: path
        name: id
        schema:
          type: string
        required: true
      - in: path
        name: parent_lookup_type_id
        schema:
          type: string
        required: true
      tags:
      - Targets
      security:
      - adverityApiTokenAuth:
        - destination:write
      responses:
        '200':
          description: No response body
      x-required-scopes:
      - destination:write
      description: Requires the `destination:write` scope.
    patch:
      operationId: target_types_targets_detail_partial_update
      parameters:
      - in: path
        name: id
        schema:
          type: string
        required: true
      - in: path
        name: parent_lookup_type_id
        schema:
          type: string
        required: true
      tags:
      - Targets
      security:
      - adverityApiTokenAuth:
        - destination:write
      responses:
        '200':
          description: No response body
      x-required-scopes:
      - destination:write
      description: Requires the `destination:write` scope.
    delete:
      operationId: target_types_targets_detail_destroy
      parameters:
      - in: path
        name: id
        schema:
          type: string
        required: true
      - in: path
        name: parent_lookup_type_id
        schema:
          type: string
        required: true
      tags:
      - Targets
      security:
      - adverityApiTokenAuth:
        - destination:write
      responses:
        '204':
          description: No response body
      x-required-scopes:
      - destination:write
      description: Requires the `destination:write` scope.
  /api/target-types/{parent_lookup_type_id}/targets/{parent_lookup_target_id}/mappings/:
    get:
      operationId: target_types_targets_mappings_retrieve
      parameters:
      - in: path
        name: parent_lookup_target_id
        schema:
          type: string
        required: true
      - in: path
        name: parent_lookup_type_id
        schema:
          type: string
        required: true
      tags:
      - Targets
      security:
      - adverityApiTokenAuth:
        - destination:read
      responses:
        '200':
          description: No response body
      x-required-scopes:
      - destination:read
      description: Requires the `destination:read` scope.
    post:
      operationId: target_types_targets_mappings_create
      parameters:
      - in: path
        name: parent_lookup_target_id
        schema:
          type: string
        required: true
      - in: path
        name: parent_lookup_type_id
        schema:
          type: string
        required: true
      tags:
      - Targets
      security:
      - adverityApiTokenAuth:
        - destination:write
      responses:
        '201':
          description: No response body
      x-required-scopes:
      - destination:write
      description: Requires the `destination:write` scope.
  /api/target-types/{parent_lookup_type_id}/targets/{parent_lookup_target_id}/mappings/{id}/:
    get:
      operationId: target_types_targets_mappings_detail_retrieve
      parameters:
      - in: path
        name: id
        schema:
          type: string
        required: true
      - in: path
        name: parent_lookup_target_id
        schema:
          type: string
        required: true
      - in: path
        name: parent_lookup_type_id
        schema:
          type: string
        required: true
      tags:
      - Targets
      security:
      - adverityApiTokenAuth:
        - destination:read
      responses:
        '200':
          description: No response body
      x-required-scopes:
      - destination:read
      description: Requires the `destination:read` scope.
    put:
      operationId: target_types_targets_mappings_detail_update
      parameters:
      - in: path
        name: id
        schema:
          type: string
        required: true
      - in: path
        name: parent_lookup_target_id
        schema:
          type: string
        required: true
      - in: path
        name: parent_lookup_type_id
        schema:
          type: string
        required: true
      tags:
      - Targets
      security:
      - adverityApiTokenAuth:
        - destination:write
      responses:
        '200':
          description: No response body
      x-required-scopes:
      - destination:write
      description: Requires the `destination:write` scope.
    patch:
      operationId: target_types_targets_mappings_detail_partial_update
      parameters:
      - in: path
        name: id
        schema:
          type: string
        required: true
      - in: path
        name: parent_lookup_target_id
        schema:
          type: string
        required: true
      - in: path
        name: parent_lookup_type_id
        schema:
          type: string
        required: true
      tags:
      - Targets
      security:
      - adverityApiTokenAuth:
        - destination:write
      responses:
        '200':
          description: No response body
      x-required-scopes:
      - destination:write
      description: Requires the `destination:write` scope.
    delete:
      operationId: target_types_targets_mappings_detail_destroy
      parameters:
      - in: path
        name: id
        schema:
          type: string
        required: true
      - in: path
        name: parent_lookup_target_id
        schema:
          type: string
        required: true
      - in: path
        name: parent_lookup_type_id
        schema:
          type: string
        required: true
      tags:
      - Targets
      security:
      - adverityApiTokenAuth:
        - destination:write
      responses:
        '204':
          description: No response body
      x-required-scopes:
      - destination:write
      description: Requires the `destination:write` scope.
  /api/transformer/:
    get:
      operationId: transformer_list
      parameters:
      - name: ordering
        required: false
        in: query
        description: Which field to use when ordering the results.
        schema:
          type: string
      - 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: Number of results to return per page.
        schema:
          type: integer
      - in: query
        name: stack_id
        schema:
          type: integer
        description: Scope the result to this workspace's family. When omitted, every
          accessible workspace is returned. A non-numeric value is rejected with a
          400.
      tags:
      - Enrichments
      security:
      - adverityApiTokenAuth:
        - transformation:read
      responses:
        '200':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/PaginatedTransformerBasicList'
          description: ''
      x-required-scopes:
      - transformation:read
      description: Requires the `transformation:read` scope.
    post:
      operationId: transformer_create
      tags:
      - Enrichments
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/TransformerFull'
          application/x-www-form-urlencoded:
            schema:
              $ref: '#/components/schemas/TransformerFull'
          multipart/form-data:
            schema:
              $ref: '#/components/schemas/TransformerFull'
        required: true
      security:
      - adverityApiTokenAuth:
        - transformation:write
      responses:
        '201':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/TransformerFull'
          description: ''
      x-required-scopes:
      - transformation:write
      description: Requires the `transformation:write` scope.
  /api/transformer/{id}/:
    get:
      operationId: transformer_detail_retrieve
      parameters:
      - in: path
        name: id
        schema:
          type: integer
        description: A unique integer value identifying this Transformer Configuration.
        required: true
      tags:
      - Enrichments
      security:
      - adverityApiTokenAuth:
        - transformation:read
      responses:
        '200':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/TransformerFull'
          description: ''
      x-required-scopes:
      - transformation:read
      description: Requires the `transformation:read` scope.
    put:
      operationId: transformer_detail_update
      parameters:
      - in: path
        name: id
        schema:
          type: integer
        description: A unique integer value identifying this Transformer Configuration.
        required: true
      tags:
      - Enrichments
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/TransformerFull'
          application/x-www-form-urlencoded:
            schema:
              $ref: '#/components/schemas/TransformerFull'
          multipart/form-data:
            schema:
              $ref: '#/components/schemas/TransformerFull'
        required: true
      security:
      - adverityApiTokenAuth:
        - transformation:write
      responses:
        '200':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/TransformerFull'
          description: ''
      x-required-scopes:
      - transformation:write
      description: Requires the `transformation:write` scope.
    patch:
      operationId: transformer_detail_partial_update
      parameters:
      - in: path
        name: id
        schema:
          type: integer
        description: A unique integer value identifying this Transformer Configuration.
        required: true
      tags:
      - Enrichments
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/PatchedTransformerPartialUpdate'
          application/x-www-form-urlencoded:
            schema:
              $ref: '#/components/schemas/PatchedTransformerPartialUpdate'
          multipart/form-data:
            schema:
              $ref: '#/components/schemas/PatchedTransformerPartialUpdate'
      security:
      - adverityApiTokenAuth:
        - transformation:write
      responses:
        '200':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/TransformerPartialUpdate'
          description: ''
      x-required-scopes:
      - transformation:write
      description: Requires the `transformation:write` scope.
    delete:
      operationId: transformer_detail_destroy
      parameters:
      - in: path
        name: id
        schema:
          type: integer
        description: A unique integer value identifying this Transformer Configuration.
        required: true
      tags:
      - Enrichments
      security:
      - adverityApiTokenAuth:
        - transformation:write
      responses:
        '204':
          description: No response body
      x-required-scopes:
      - transformation:write
      description: Requires the `transformation:write` scope.
  /api/v1/auth/keys/current/rotate/:
    post:
      operationId: webapi_mapi_auth_rotate_current_api_key
      summary: Rotate current Management API key.
      parameters: []
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ManagementKeyRefreshResponseSchema'
        '416':
          description: Requested Range Not Satisfiable
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorSchema'
        '418':
          description: I'm a Teapot
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorSchema'
        '451':
          description: Unavailable For Legal Reasons
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorSchema'
        '425':
          description: Too Early
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorSchema'
        '429':
          description: Too Many Requests
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorSchema'
        '400':
          description: Bad Request
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorSchema'
        '401':
          description: Unauthorized
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorSchema'
        '402':
          description: Payment Required
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorSchema'
        '403':
          description: Forbidden
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorSchema'
        '404':
          description: Not Found
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorSchema'
        '405':
          description: Method Not Allowed
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorSchema'
        '406':
          description: Not Acceptable
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorSchema'
        '407':
          description: Proxy Authentication Required
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorSchema'
        '408':
          description: Request Timeout
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorSchema'
        '409':
          description: Conflict
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorSchema'
        '410':
          description: Gone
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorSchema'
        '411':
          description: Length Required
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorSchema'
        '412':
          description: Precondition Failed
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorSchema'
        '500':
          description: Internal Server Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorSchema'
        '501':
          description: Not Implemented
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorSchema'
        '502':
          description: Bad Gateway
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorSchema'
        '503':
          description: Service Unavailable
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorSchema'
        '504':
          description: Gateway Timeout
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorSchema'
      tags:
      - Authorizations
      security:
      - adverityApiTokenAuth: []
  /api/v1/auth/keys/introspect/:
    get:
      operationId: webapi_mapi_auth_introspect_key
      summary: Introspect the current API key.
      parameters: []
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/KeyIntrospectionSchema'
        '429':
          description: Too Many Requests
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorSchema'
      tags:
      - Authorizations
      security:
      - adverityApiTokenAuth: []
  /api/v1/bindings/:
    get:
      operationId: webapi_mapi_bindings_list_bindings
      summary: List all target bindings
      parameters:
      - in: query
        name: datastream_id
        schema:
          anyOf:
          - type: integer
          - type: 'null'
          title: Datastream Id
        required: false
      - in: query
        name: target_id
        schema:
          anyOf:
          - type: integer
          - type: 'null'
          title: Target Id
        required: false
      - in: query
        name: page
        schema:
          default: 1
          minimum: 1
          title: Page
          type: integer
        required: false
      - in: query
        name: page_size
        schema:
          default: 50
          minimum: 1
          title: Page Size
          type: integer
        required: false
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/PagedBindingResponseSchema'
      description: |-
        Retrieve all target bindings (datastream-to-destination mappings) accessible within the workspace hierarchy. Filter by datastream_id or target_id to find specific bindings.

        Requires the `destination:read` scope.
      tags:
      - Bindings
      security:
      - adverityApiTokenAuth:
        - destination:read
      x-required-scopes:
      - destination:read
  /api/v1/bindings/{binding_id}/:
    patch:
      operationId: webapi_mapi_bindings_patch_binding
      summary: Update a target binding
      parameters:
      - in: path
        name: binding_id
        schema:
          title: Binding Id
          type: integer
        required: true
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/BindingResponseSchema'
        '400':
          description: Bad Request
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorSchema'
        '404':
          description: Not Found
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorSchema'
      description: |-
        Partially update a target binding's configuration (currently only the `enabled` flag). The binding must be accessible within the API key's workspace hierarchy. Enabling a binding runs the same validation as the web UI: a schema mapping must exist when required, and enabling an Insights binding alongside incompatible destinations is rejected.

        Requires the `destination:write` scope.
      tags:
      - Bindings
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/BindingPatchSchema'
        required: true
      security:
      - adverityApiTokenAuth:
        - destination:write
      x-required-scopes:
      - destination:write
  /api/v1/connectors/field-hierarchies/:
    get:
      operationId: webapi_mapi_connectors_routes_list_field_hierarchies
      summary: List field hierarchies for all connectors
      parameters:
      - in: query
        name: page
        schema:
          default: 1
          minimum: 1
          title: Page
          type: integer
        required: false
      - in: query
        name: page_size
        schema:
          default: 50
          minimum: 1
          title: Page Size
          type: integer
        required: false
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/PagedConnectorFieldHierarchySchema'
      description: |-
        Returns the field dependency graph for every connector that has configuration fields with dependencies. Data is static and changes only with connector releases.

        Requires the `datastream:read` scope.
      tags:
      - Connectors
      security:
      - adverityApiTokenAuth:
        - datastream:read
      x-required-scopes:
      - datastream:read
  /api/v1/connectors/{path}/field-hierarchy/:
    get:
      operationId: webapi_mapi_connectors_routes_get_connector_field_hierarchy
      summary: Get field hierarchy for a connector
      parameters:
      - in: path
        name: path
        schema:
          title: Path
          type: string
        required: true
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ConnectorFieldHierarchySchema'
      description: |-
        Returns the field dependency graph for a single connector, showing which configuration fields depend on which. Use the content type identifier (app_label/model_name) or nocode/slug from the list endpoint.

        Requires the `datastream:read` scope.
      tags:
      - Connectors
      security:
      - adverityApiTokenAuth:
        - datastream:read
      x-required-scopes:
      - datastream:read
  /api/v1/custom-monitors/:
    get:
      operationId: webapi_mapi_monitors_routes_list_custom_monitors
      summary: List custom monitors
      parameters:
      - in: query
        name: workspace_scope
        schema:
          anyOf:
          - $ref: '#/components/schemas/WorkspaceScope'
          - type: 'null'
        required: false
      - in: query
        name: scope_from_workspace_id
        schema:
          anyOf:
          - format: uuid
            type: string
          - type: 'null'
          description: Required only for `workspace_scope` when multiple roots exist.
          title: Scope From Workspace Id
        required: false
        description: Required only for `workspace_scope` when multiple roots exist.
      - in: query
        name: name__icontains
        schema:
          anyOf:
          - type: string
          - type: 'null'
          title: Name  Icontains
        required: false
      - in: query
        name: severity
        schema:
          anyOf:
          - $ref: '#/components/schemas/SeverityLabel'
          - type: 'null'
        required: false
      - in: query
        name: workspace_id
        schema:
          anyOf:
          - items:
              format: uuid
              type: string
            maxItems: 50
            type: array
          - type: 'null'
          title: Workspace Id
        required: false
      - in: query
        name: page
        schema:
          default: 1
          minimum: 1
          title: Page
          type: integer
        required: false
      - in: query
        name: page_size
        schema:
          default: 50
          minimum: 1
          title: Page Size
          type: integer
        required: false
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/PagedMonitorSummarySchema'
      description: |-
        Returns all custom monitors accessible from the API key's workspace family tree.

        Requires the `monitor:read` scope.
      tags:
      - Custom Monitors
      deprecated: true
      security:
      - adverityApiTokenAuth:
        - monitor:read
      x-successor-version: /api/v1/monitors/
      x-deprecated-since: '2026-10-19'
      x-required-scopes:
      - monitor:read
  /api/v1/custom-monitors/{monitor_id}/datastreams/:
    get:
      operationId: webapi_mapi_monitors_routes_list_monitor_datastreams
      summary: List datastreams assigned to a monitor
      parameters:
      - in: path
        name: monitor_id
        schema:
          format: uuid
          title: Monitor Id
          type: string
        required: true
      - in: query
        name: page
        schema:
          default: 1
          minimum: 1
          title: Page
          type: integer
        required: false
      - in: query
        name: page_size
        schema:
          default: 50
          minimum: 1
          title: Page Size
          type: integer
        required: false
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/PagedDatastreamSummarySchema'
      tags:
      - Custom Monitors
      deprecated: true
      security:
      - adverityApiTokenAuth:
        - monitor:read
      x-successor-version: /api/v1/monitors/{monitor_id}/datastreams/
      x-deprecated-since: '2026-10-19'
      x-required-scopes:
      - monitor:read
      description: Requires the `monitor:read` scope.
    options:
      operationId: webapi_mapi_monitors_routes_discover_assignable_datastreams
      summary: Discover datastreams assignable to a monitor
      parameters:
      - in: path
        name: monitor_id
        schema:
          format: uuid
          title: Monitor Id
          type: string
        required: true
      - in: query
        name: page
        schema:
          default: 1
          minimum: 1
          title: Page
          type: integer
        required: false
      - in: query
        name: page_size
        schema:
          default: 50
          minimum: 1
          title: Page Size
          type: integer
        required: false
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/PagedDatastreamSummarySchema'
      tags:
      - Custom Monitors
      deprecated: true
      security:
      - adverityApiTokenAuth:
        - monitor:read
      x-successor-version: /api/v1/monitors/{monitor_id}/datastreams/
      x-deprecated-since: '2026-10-19'
      x-required-scopes:
      - monitor:read
      description: Requires the `monitor:read` scope.
    post:
      operationId: webapi_mapi_monitors_routes_assign_datastreams_to_monitor
      summary: Extend current list of assignments with the given datastreams
      parameters:
      - in: path
        name: monitor_id
        schema:
          format: uuid
          title: Monitor Id
          type: string
        required: true
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/UUIDListSchema'
      tags:
      - Custom Monitors
      deprecated: true
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/UUIDListSchema'
        required: true
      security:
      - adverityApiTokenAuth:
        - monitor:write
      x-successor-version: /api/v1/monitors/{monitor_id}/datastreams/
      x-deprecated-since: '2026-10-19'
      x-required-scopes:
      - monitor:write
      description: Requires the `monitor:write` scope.
    delete:
      operationId: webapi_mapi_monitors_routes_unassign_datastreams_from_monitor
      summary: Unassign datastreams from a monitor
      parameters:
      - in: path
        name: monitor_id
        schema:
          format: uuid
          title: Monitor Id
          type: string
        required: true
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/UUIDListSchema'
      tags:
      - Custom Monitors
      deprecated: true
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/UUIDListSchema'
        required: true
      security:
      - adverityApiTokenAuth:
        - monitor:write
      x-successor-version: /api/v1/monitors/{monitor_id}/datastreams/
      x-deprecated-since: '2026-10-19'
      x-required-scopes:
      - monitor:write
      description: Requires the `monitor:write` scope.
  /api/v1/datastream-tags/:
    get:
      operationId: webapi_mapi_datastream_tags_routes_list_datastream_tags
      summary: List datastream tags
      parameters:
      - in: query
        name: workspace_scope
        schema:
          anyOf:
          - $ref: '#/components/schemas/WorkspaceScope'
          - type: 'null'
        required: false
      - in: query
        name: scope_from_workspace_id
        schema:
          anyOf:
          - format: uuid
            type: string
          - type: 'null'
          description: Required only for `workspace_scope` when multiple roots exist.
          title: Scope From Workspace Id
        required: false
        description: Required only for `workspace_scope` when multiple roots exist.
      - in: query
        name: workspace_id
        schema:
          anyOf:
          - items:
              format: uuid
              type: string
            maxItems: 50
            type: array
          - type: 'null'
          title: Workspace Id
        required: false
      - in: query
        name: name
        schema:
          anyOf:
          - type: string
          - type: 'null'
          description: Exact tag name, ignoring case. Not a search.
          title: Name
        required: false
        description: Exact tag name, ignoring case. Not a search.
      - in: query
        name: page
        schema:
          default: 1
          minimum: 1
          title: Page
          type: integer
        required: false
      - in: query
        name: page_size
        schema:
          default: 50
          minimum: 1
          title: Page Size
          type: integer
        required: false
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/PagedDatastreamTagSchema'
      description: |-
        Tags of the workspaces the API key can see, sorted by name. A tag belongs to one workspace, and its name is unique there ignoring case. The same name in another workspace, parent and child included, is a separate tag. Attach tags to datastreams with `POST /api/v1/datastreams/tags/`.

        Requires the `datastream:read` scope.
      tags:
      - Datastream Tags
      security:
      - adverityApiTokenAuth:
        - datastream:read
      x-required-scopes:
      - datastream:read
    post:
      operationId: webapi_mapi_datastream_tags_routes_create_datastream_tag
      summary: Create a datastream tag
      parameters: []
      responses:
        '201':
          description: Created
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/DatastreamTagCreatedSchema'
        '400':
          description: Bad Request
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorSchema'
        '409':
          description: Conflict
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/DatastreamTagConflictSchema'
      description: |-
        Create a tag in one workspace. A tag belongs to one workspace, and its name is unique there ignoring case. The same name in another workspace, parent and child included, is a separate tag. Attach tags to datastreams with `POST /api/v1/datastreams/tags/`. A name the workspace already has returns 409 with the existing tag.

        Requires the `datastream:write` scope.
      tags:
      - Datastream Tags
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/DatastreamTagCreateSchema'
        required: true
      security:
      - adverityApiTokenAuth:
        - datastream:write
      x-required-scopes:
      - datastream:write
  /api/v1/datastream-tags/{tag_id}/:
    get:
      operationId: webapi_mapi_datastream_tags_routes_get_datastream_tag
      summary: Get a datastream tag
      parameters:
      - in: path
        name: tag_id
        schema:
          format: uuid
          title: Tag Id
          type: string
        required: true
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/DatastreamTagSchema'
      tags:
      - Datastream Tags
      security:
      - adverityApiTokenAuth:
        - datastream:read
      x-required-scopes:
      - datastream:read
      description: Requires the `datastream:read` scope.
    patch:
      operationId: webapi_mapi_datastream_tags_routes_update_datastream_tag
      summary: Rename a datastream tag
      parameters:
      - in: path
        name: tag_id
        schema:
          format: uuid
          title: Tag Id
          type: string
        required: true
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/DatastreamTagSchema'
        '400':
          description: Bad Request
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorSchema'
        '409':
          description: Conflict
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/DatastreamTagConflictSchema'
      description: |-
        Every datastream carrying the tag shows the new name. Their history keeps the old one. A name another tag of the workspace has returns 409 with that tag. The workspace of a tag cannot change.

        Requires the `datastream:write` scope.
      tags:
      - Datastream Tags
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/DatastreamTagUpdateSchema'
        required: true
      security:
      - adverityApiTokenAuth:
        - datastream:write
      x-required-scopes:
      - datastream:write
    delete:
      operationId: webapi_mapi_datastream_tags_routes_delete_datastream_tag
      summary: Delete a datastream tag
      parameters:
      - in: path
        name: tag_id
        schema:
          format: uuid
          title: Tag Id
          type: string
        required: true
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/DatastreamTagDeletedSchema'
      description: |-
        Deletes the tag and removes it from every datastream, each of which gets a history entry.

        Requires the `datastream:write` scope.
      tags:
      - Datastream Tags
      security:
      - adverityApiTokenAuth:
        - datastream:write
      x-required-scopes:
      - datastream:write
  /api/v1/datastreams/:
    get:
      operationId: webapi_mapi_datastreams_routes_list_datastreams
      summary: List datastreams
      parameters:
      - in: query
        name: workspace_scope
        schema:
          anyOf:
          - $ref: '#/components/schemas/WorkspaceScope'
          - type: 'null'
        required: false
      - in: query
        name: scope_from_workspace_id
        schema:
          anyOf:
          - format: uuid
            type: string
          - type: 'null'
          description: Required only for `workspace_scope` when multiple roots exist.
          title: Scope From Workspace Id
        required: false
        description: Required only for `workspace_scope` when multiple roots exist.
      - in: query
        name: datastream_id
        schema:
          anyOf:
          - items:
              format: uuid
              type: string
            maxItems: 50
            type: array
          - type: 'null'
          title: Datastream Id
        required: false
      - in: query
        name: workspace_id
        schema:
          anyOf:
          - items:
              format: uuid
              type: string
            maxItems: 50
            type: array
          - type: 'null'
          title: Workspace Id
        required: false
      - in: query
        name: enabled
        schema:
          anyOf:
          - type: boolean
          - type: 'null'
          title: Enabled
        required: false
      - in: query
        name: active_pulling_mode
        schema:
          anyOf:
          - $ref: '#/components/schemas/ActivePullingMode'
          - type: 'null'
        required: false
      - in: query
        name: scheduled_deletion
        schema:
          anyOf:
          - type: boolean
          - type: 'null'
          title: Scheduled Deletion
        required: false
      - in: query
        name: tag
        schema:
          anyOf:
          - items:
              type: string
            maxItems: 50
            type: array
          - type: 'null'
          description: 'Tag name, ignoring case, matched in every workspace the key
            can see: the same name in two workspaces is two tags, and this matches
            both. Combine with `workspace_id` to match the tag of one workspace. Repeatable.'
          title: Tag
        required: false
        description: 'Tag name, ignoring case, matched in every workspace the key
          can see: the same name in two workspaces is two tags, and this matches both.
          Combine with `workspace_id` to match the tag of one workspace. Repeatable.'
      - in: query
        name: tag_match
        schema:
          default: any
          description: '`any`: carries at least one of the given tags. `all`: carries
            every one.'
          enum:
          - any
          - all
          title: Tag Match
          type: string
        required: false
        description: '`any`: carries at least one of the given tags. `all`: carries
          every one.'
      - in: query
        name: page
        schema:
          default: 1
          minimum: 1
          title: Page
          type: integer
        required: false
      - in: query
        name: page_size
        schema:
          default: 50
          minimum: 1
          title: Page Size
          type: integer
        required: false
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/PagedDatastreamListItemSchema'
      description: |-
        Retrieve datastreams with their common configuration options.

        Requires the `datastream:read` scope.
      tags:
      - Datastreams
      security:
      - adverityApiTokenAuth:
        - datastream:read
      x-required-scopes:
      - datastream:read
    patch:
      operationId: webapi_mapi_datastreams_routes_patch_datastreams
      summary: Partially update common configuration options
      parameters:
      - in: query
        name: workspace_scope
        schema:
          anyOf:
          - $ref: '#/components/schemas/WorkspaceScope'
          - type: 'null'
        required: false
      - in: query
        name: scope_from_workspace_id
        schema:
          anyOf:
          - format: uuid
            type: string
          - type: 'null'
          description: Required only for `workspace_scope` when multiple roots exist.
          title: Scope From Workspace Id
        required: false
        description: Required only for `workspace_scope` when multiple roots exist.
      - in: query
        name: datastream_id
        schema:
          anyOf:
          - items:
              format: uuid
              type: string
            maxItems: 50
            type: array
          - type: 'null'
          title: Datastream Id
        required: false
      - in: query
        name: workspace_id
        schema:
          anyOf:
          - items:
              format: uuid
              type: string
            maxItems: 50
            type: array
          - type: 'null'
          title: Workspace Id
        required: false
      - in: query
        name: enabled
        schema:
          anyOf:
          - type: boolean
          - type: 'null'
          title: Enabled
        required: false
      - in: query
        name: active_pulling_mode
        schema:
          anyOf:
          - $ref: '#/components/schemas/ActivePullingMode'
          - type: 'null'
        required: false
      - in: query
        name: scheduled_deletion
        schema:
          anyOf:
          - type: boolean
          - type: 'null'
          title: Scheduled Deletion
        required: false
      - in: query
        name: tag
        schema:
          anyOf:
          - items:
              type: string
            maxItems: 50
            type: array
          - type: 'null'
          description: 'Tag name, ignoring case, matched in every workspace the key
            can see: the same name in two workspaces is two tags, and this matches
            both. Combine with `workspace_id` to match the tag of one workspace. Repeatable.'
          title: Tag
        required: false
        description: 'Tag name, ignoring case, matched in every workspace the key
          can see: the same name in two workspaces is two tags, and this matches both.
          Combine with `workspace_id` to match the tag of one workspace. Repeatable.'
      - in: query
        name: tag_match
        schema:
          default: any
          description: '`any`: carries at least one of the given tags. `all`: carries
            every one.'
          enum:
          - any
          - all
          title: Tag Match
          type: string
        required: false
        description: '`any`: carries at least one of the given tags. `all`: carries
          every one.'
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/BulkActionResponseSchema'
      tags:
      - Datastreams
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/DatastreamListItemPatchSchema'
        required: true
      security:
      - adverityApiTokenAuth:
        - datastream:write
      x-required-scopes:
      - datastream:write
      description: Requires the `datastream:write` scope.
  /api/v1/datastreams/custom-monitors/:
    options:
      operationId: webapi_mapi_datastreams_routes_discover_available_monitors
      summary: Discover monitors available for bulk datastream assignment
      parameters:
      - in: query
        name: workspace_scope
        schema:
          anyOf:
          - $ref: '#/components/schemas/WorkspaceScope'
          - type: 'null'
        required: false
      - in: query
        name: scope_from_workspace_id
        schema:
          anyOf:
          - format: uuid
            type: string
          - type: 'null'
          description: Required only for `workspace_scope` when multiple roots exist.
          title: Scope From Workspace Id
        required: false
        description: Required only for `workspace_scope` when multiple roots exist.
      - in: query
        name: datastream_id
        schema:
          anyOf:
          - items:
              format: uuid
              type: string
            maxItems: 50
            type: array
          - type: 'null'
          title: Datastream Id
        required: false
      - in: query
        name: workspace_id
        schema:
          anyOf:
          - items:
              format: uuid
              type: string
            maxItems: 50
            type: array
          - type: 'null'
          title: Workspace Id
        required: false
      - in: query
        name: enabled
        schema:
          anyOf:
          - type: boolean
          - type: 'null'
          title: Enabled
        required: false
      - in: query
        name: active_pulling_mode
        schema:
          anyOf:
          - $ref: '#/components/schemas/ActivePullingMode'
          - type: 'null'
        required: false
      - in: query
        name: scheduled_deletion
        schema:
          anyOf:
          - type: boolean
          - type: 'null'
          title: Scheduled Deletion
        required: false
      - in: query
        name: tag
        schema:
          anyOf:
          - items:
              type: string
            maxItems: 50
            type: array
          - type: 'null'
          description: 'Tag name, ignoring case, matched in every workspace the key
            can see: the same name in two workspaces is two tags, and this matches
            both. Combine with `workspace_id` to match the tag of one workspace. Repeatable.'
          title: Tag
        required: false
        description: 'Tag name, ignoring case, matched in every workspace the key
          can see: the same name in two workspaces is two tags, and this matches both.
          Combine with `workspace_id` to match the tag of one workspace. Repeatable.'
      - in: query
        name: tag_match
        schema:
          default: any
          description: '`any`: carries at least one of the given tags. `all`: carries
            every one.'
          enum:
          - any
          - all
          title: Tag Match
          type: string
        required: false
        description: '`any`: carries at least one of the given tags. `all`: carries
          every one.'
      - in: query
        name: page
        schema:
          default: 1
          minimum: 1
          title: Page
          type: integer
        required: false
      - in: query
        name: page_size
        schema:
          default: 50
          minimum: 1
          title: Page Size
          type: integer
        required: false
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/PagedMonitorSummarySchema'
      description: |-
        Without filters, returns all accessible monitors. With datastream filters (e.g. ?datastream_id=), returns only monitors whose workspace family covers all matched datastreams.

        Requires the `monitor:read` scope.
      tags:
      - Datastreams
      deprecated: true
      security:
      - adverityApiTokenAuth:
        - monitor:read
      x-successor-version: /api/v1/monitors/datastreams/
      x-deprecated-since: '2026-10-19'
      x-required-scopes:
      - monitor:read
    post:
      operationId: webapi_mapi_datastreams_routes_bulk_assign_monitors
      summary: Bulk assign monitors to datastreams
      parameters:
      - in: query
        name: workspace_scope
        schema:
          anyOf:
          - $ref: '#/components/schemas/WorkspaceScope'
          - type: 'null'
        required: false
      - in: query
        name: scope_from_workspace_id
        schema:
          anyOf:
          - format: uuid
            type: string
          - type: 'null'
          description: Required only for `workspace_scope` when multiple roots exist.
          title: Scope From Workspace Id
        required: false
        description: Required only for `workspace_scope` when multiple roots exist.
      - in: query
        name: datastream_id
        schema:
          anyOf:
          - items:
              format: uuid
              type: string
            maxItems: 50
            type: array
          - type: 'null'
          title: Datastream Id
        required: false
      - in: query
        name: workspace_id
        schema:
          anyOf:
          - items:
              format: uuid
              type: string
            maxItems: 50
            type: array
          - type: 'null'
          title: Workspace Id
        required: false
      - in: query
        name: enabled
        schema:
          anyOf:
          - type: boolean
          - type: 'null'
          title: Enabled
        required: false
      - in: query
        name: active_pulling_mode
        schema:
          anyOf:
          - $ref: '#/components/schemas/ActivePullingMode'
          - type: 'null'
        required: false
      - in: query
        name: scheduled_deletion
        schema:
          anyOf:
          - type: boolean
          - type: 'null'
          title: Scheduled Deletion
        required: false
      - in: query
        name: tag
        schema:
          anyOf:
          - items:
              type: string
            maxItems: 50
            type: array
          - type: 'null'
          description: 'Tag name, ignoring case, matched in every workspace the key
            can see: the same name in two workspaces is two tags, and this matches
            both. Combine with `workspace_id` to match the tag of one workspace. Repeatable.'
          title: Tag
        required: false
        description: 'Tag name, ignoring case, matched in every workspace the key
          can see: the same name in two workspaces is two tags, and this matches both.
          Combine with `workspace_id` to match the tag of one workspace. Repeatable.'
      - in: query
        name: tag_match
        schema:
          default: any
          description: '`any`: carries at least one of the given tags. `all`: carries
            every one.'
          enum:
          - any
          - all
          title: Tag Match
          type: string
        required: false
        description: '`any`: carries at least one of the given tags. `all`: carries
          every one.'
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/BulkMonitorAssignmentResponseSchema'
      tags:
      - Datastreams
      deprecated: true
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/UUIDListSchema'
        required: true
      security:
      - adverityApiTokenAuth:
        - monitor:write
      x-successor-version: /api/v1/monitors/datastreams/
      x-deprecated-since: '2026-10-19'
      x-required-scopes:
      - monitor:write
      description: Requires the `monitor:write` scope.
    delete:
      operationId: webapi_mapi_datastreams_routes_bulk_unassign_monitors
      summary: Bulk unassign monitors from datastreams
      parameters:
      - in: query
        name: workspace_scope
        schema:
          anyOf:
          - $ref: '#/components/schemas/WorkspaceScope'
          - type: 'null'
        required: false
      - in: query
        name: scope_from_workspace_id
        schema:
          anyOf:
          - format: uuid
            type: string
          - type: 'null'
          description: Required only for `workspace_scope` when multiple roots exist.
          title: Scope From Workspace Id
        required: false
        description: Required only for `workspace_scope` when multiple roots exist.
      - in: query
        name: datastream_id
        schema:
          anyOf:
          - items:
              format: uuid
              type: string
            maxItems: 50
            type: array
          - type: 'null'
          title: Datastream Id
        required: false
      - in: query
        name: workspace_id
        schema:
          anyOf:
          - items:
              format: uuid
              type: string
            maxItems: 50
            type: array
          - type: 'null'
          title: Workspace Id
        required: false
      - in: query
        name: enabled
        schema:
          anyOf:
          - type: boolean
          - type: 'null'
          title: Enabled
        required: false
      - in: query
        name: active_pulling_mode
        schema:
          anyOf:
          - $ref: '#/components/schemas/ActivePullingMode'
          - type: 'null'
        required: false
      - in: query
        name: scheduled_deletion
        schema:
          anyOf:
          - type: boolean
          - type: 'null'
          title: Scheduled Deletion
        required: false
      - in: query
        name: tag
        schema:
          anyOf:
          - items:
              type: string
            maxItems: 50
            type: array
          - type: 'null'
          description: 'Tag name, ignoring case, matched in every workspace the key
            can see: the same name in two workspaces is two tags, and this matches
            both. Combine with `workspace_id` to match the tag of one workspace. Repeatable.'
          title: Tag
        required: false
        description: 'Tag name, ignoring case, matched in every workspace the key
          can see: the same name in two workspaces is two tags, and this matches both.
          Combine with `workspace_id` to match the tag of one workspace. Repeatable.'
      - in: query
        name: tag_match
        schema:
          default: any
          description: '`any`: carries at least one of the given tags. `all`: carries
            every one.'
          enum:
          - any
          - all
          title: Tag Match
          type: string
        required: false
        description: '`any`: carries at least one of the given tags. `all`: carries
          every one.'
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/UUIDListSchema'
      tags:
      - Datastreams
      deprecated: true
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/UUIDListSchema'
        required: true
      security:
      - adverityApiTokenAuth:
        - monitor:write
      x-successor-version: /api/v1/monitors/datastreams/
      x-deprecated-since: '2026-10-19'
      x-required-scopes:
      - monitor:write
      description: Requires the `monitor:write` scope.
  /api/v1/datastreams/pulling/smart/:
    put:
      operationId: webapi_mapi_datastreams_routes_replace_smart_pulling_configuration
      summary: Replace smart-pulling configuration
      parameters:
      - in: query
        name: workspace_scope
        schema:
          anyOf:
          - $ref: '#/components/schemas/WorkspaceScope'
          - type: 'null'
        required: false
      - in: query
        name: scope_from_workspace_id
        schema:
          anyOf:
          - format: uuid
            type: string
          - type: 'null'
          description: Required only for `workspace_scope` when multiple roots exist.
          title: Scope From Workspace Id
        required: false
        description: Required only for `workspace_scope` when multiple roots exist.
      - in: query
        name: datastream_id
        schema:
          anyOf:
          - items:
              format: uuid
              type: string
            maxItems: 50
            type: array
          - type: 'null'
          title: Datastream Id
        required: false
      - in: query
        name: workspace_id
        schema:
          anyOf:
          - items:
              format: uuid
              type: string
            maxItems: 50
            type: array
          - type: 'null'
          title: Workspace Id
        required: false
      - in: query
        name: enabled
        schema:
          anyOf:
          - type: boolean
          - type: 'null'
          title: Enabled
        required: false
      - in: query
        name: active_pulling_mode
        schema:
          anyOf:
          - $ref: '#/components/schemas/ActivePullingMode'
          - type: 'null'
        required: false
      - in: query
        name: scheduled_deletion
        schema:
          anyOf:
          - type: boolean
          - type: 'null'
          title: Scheduled Deletion
        required: false
      - in: query
        name: tag
        schema:
          anyOf:
          - items:
              type: string
            maxItems: 50
            type: array
          - type: 'null'
          description: 'Tag name, ignoring case, matched in every workspace the key
            can see: the same name in two workspaces is two tags, and this matches
            both. Combine with `workspace_id` to match the tag of one workspace. Repeatable.'
          title: Tag
        required: false
        description: 'Tag name, ignoring case, matched in every workspace the key
          can see: the same name in two workspaces is two tags, and this matches both.
          Combine with `workspace_id` to match the tag of one workspace. Repeatable.'
      - in: query
        name: tag_match
        schema:
          default: any
          description: '`any`: carries at least one of the given tags. `all`: carries
            every one.'
          enum:
          - any
          - all
          title: Tag Match
          type: string
        required: false
        description: '`any`: carries at least one of the given tags. `all`: carries
          every one.'
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/BulkActionResponseSchema'
      description: |-
        Upsert smart-pulling configuration for multiple datastreams. Applies the same settings to all targeted datastreams. The request carries the full range specification, so it replaces every rule the datastream had.

        Requires the `datastream:write` scope.
      tags:
      - Datastreams
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/SmartPullingSchema'
        required: true
      security:
      - adverityApiTokenAuth:
        - datastream:write
      x-required-scopes:
      - datastream:write
  /api/v1/datastreams/tags/:
    post:
      operationId: webapi_mapi_datastreams_routes_bulk_assign_tags
      summary: Bulk assign tags to datastreams
      parameters:
      - in: query
        name: workspace_scope
        schema:
          anyOf:
          - $ref: '#/components/schemas/WorkspaceScope'
          - type: 'null'
        required: false
      - in: query
        name: scope_from_workspace_id
        schema:
          anyOf:
          - format: uuid
            type: string
          - type: 'null'
          description: Required only for `workspace_scope` when multiple roots exist.
          title: Scope From Workspace Id
        required: false
        description: Required only for `workspace_scope` when multiple roots exist.
      - in: query
        name: datastream_id
        schema:
          anyOf:
          - items:
              format: uuid
              type: string
            maxItems: 50
            type: array
          - type: 'null'
          title: Datastream Id
        required: false
      - in: query
        name: workspace_id
        schema:
          anyOf:
          - items:
              format: uuid
              type: string
            maxItems: 50
            type: array
          - type: 'null'
          title: Workspace Id
        required: false
      - in: query
        name: enabled
        schema:
          anyOf:
          - type: boolean
          - type: 'null'
          title: Enabled
        required: false
      - in: query
        name: active_pulling_mode
        schema:
          anyOf:
          - $ref: '#/components/schemas/ActivePullingMode'
          - type: 'null'
        required: false
      - in: query
        name: scheduled_deletion
        schema:
          anyOf:
          - type: boolean
          - type: 'null'
          title: Scheduled Deletion
        required: false
      - in: query
        name: tag
        schema:
          anyOf:
          - items:
              type: string
            maxItems: 50
            type: array
          - type: 'null'
          description: 'Tag name, ignoring case, matched in every workspace the key
            can see: the same name in two workspaces is two tags, and this matches
            both. Combine with `workspace_id` to match the tag of one workspace. Repeatable.'
          title: Tag
        required: false
        description: 'Tag name, ignoring case, matched in every workspace the key
          can see: the same name in two workspaces is two tags, and this matches both.
          Combine with `workspace_id` to match the tag of one workspace. Repeatable.'
      - in: query
        name: tag_match
        schema:
          default: any
          description: '`any`: carries at least one of the given tags. `all`: carries
            every one.'
          enum:
          - any
          - all
          title: Tag Match
          type: string
        required: false
        description: '`any`: carries at least one of the given tags. `all`: carries
          every one.'
      - in: query
        name: create_missing
        schema:
          default: false
          title: Create Missing
          type: boolean
        required: false
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/BulkTagAssignmentResponseSchema'
      description: |-
        Adds the tags in `tags` to each targeted datastream: every name, looked up in the datastream's own workspace, and every tag id of that workspace (ids of other workspaces are ignored for it; an id the key cannot see rejects the whole request with 400). A datastream gets all of these or none, and is skipped with the reason when none applies, when its workspace lacks a name, or when it would carry more than 50 tags. With `create_missing=true`, a missing name is created in that datastream's workspace and listed in `created_tags`. Targets the datastreams in `datastream_ids` (up to 500) AND-ed with the datastream filters in the query string. A request with neither is refused with 400, and so is one that targets more than 500 datastreams. A workspace of up to 500 datastreams can be targeted with `workspace_id` alone; for a larger one, list its datastreams with `GET /api/v1/datastreams/?workspace_id=` and send their ids in batches of 500. One transaction: request-level errors change nothing, and per-datastream problems are reported in `skipped` while the rest is applied. Sending the same request again changes nothing.

        Requires the `datastream:write` scope.
      tags:
      - Datastreams
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/DatastreamTagsWriteSchema'
        required: true
      security:
      - adverityApiTokenAuth:
        - datastream:write
      x-required-scopes:
      - datastream:write
    delete:
      operationId: webapi_mapi_datastreams_routes_bulk_unassign_tags
      summary: Bulk unassign tags from datastreams
      parameters:
      - in: query
        name: workspace_scope
        schema:
          anyOf:
          - $ref: '#/components/schemas/WorkspaceScope'
          - type: 'null'
        required: false
      - in: query
        name: scope_from_workspace_id
        schema:
          anyOf:
          - format: uuid
            type: string
          - type: 'null'
          description: Required only for `workspace_scope` when multiple roots exist.
          title: Scope From Workspace Id
        required: false
        description: Required only for `workspace_scope` when multiple roots exist.
      - in: query
        name: datastream_id
        schema:
          anyOf:
          - items:
              format: uuid
              type: string
            maxItems: 50
            type: array
          - type: 'null'
          title: Datastream Id
        required: false
      - in: query
        name: workspace_id
        schema:
          anyOf:
          - items:
              format: uuid
              type: string
            maxItems: 50
            type: array
          - type: 'null'
          title: Workspace Id
        required: false
      - in: query
        name: enabled
        schema:
          anyOf:
          - type: boolean
          - type: 'null'
          title: Enabled
        required: false
      - in: query
        name: active_pulling_mode
        schema:
          anyOf:
          - $ref: '#/components/schemas/ActivePullingMode'
          - type: 'null'
        required: false
      - in: query
        name: scheduled_deletion
        schema:
          anyOf:
          - type: boolean
          - type: 'null'
          title: Scheduled Deletion
        required: false
      - in: query
        name: tag
        schema:
          anyOf:
          - items:
              type: string
            maxItems: 50
            type: array
          - type: 'null'
          description: 'Tag name, ignoring case, matched in every workspace the key
            can see: the same name in two workspaces is two tags, and this matches
            both. Combine with `workspace_id` to match the tag of one workspace. Repeatable.'
          title: Tag
        required: false
        description: 'Tag name, ignoring case, matched in every workspace the key
          can see: the same name in two workspaces is two tags, and this matches both.
          Combine with `workspace_id` to match the tag of one workspace. Repeatable.'
      - in: query
        name: tag_match
        schema:
          default: any
          description: '`any`: carries at least one of the given tags. `all`: carries
            every one.'
          enum:
          - any
          - all
          title: Tag Match
          type: string
        required: false
        description: '`any`: carries at least one of the given tags. `all`: carries
          every one.'
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/BulkTagUnassignmentResponseSchema'
      description: |-
        Removes the given tags, by name or id, from each targeted datastream that carries them. Never creates tags. Targets the datastreams in `datastream_ids` (up to 500) AND-ed with the datastream filters in the query string. A request with neither is refused with 400, and so is one that targets more than 500 datastreams. A workspace of up to 500 datastreams can be targeted with `workspace_id` alone; for a larger one, list its datastreams with `GET /api/v1/datastreams/?workspace_id=` and send their ids in batches of 500. One transaction: request-level errors change nothing, and per-datastream problems are reported in `skipped` while the rest is applied.

        Requires the `datastream:write` scope.
      tags:
      - Datastreams
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/DatastreamTagsWriteSchema'
        required: true
      security:
      - adverityApiTokenAuth:
        - datastream:write
      x-required-scopes:
      - datastream:write
  /api/v1/datastreams/tags/query/:
    post:
      operationId: webapi_mapi_datastreams_routes_query_datastream_tags
      summary: Read the tags of many datastreams
      parameters: []
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/DatastreamTagsQueryResponseSchema'
      description: |-
        Returns one item per id in `datastream_ids` (up to 500) the key can see, with its tags; unknown ids are left out. Not paginated. A POST only because the ids do not fit a URL; it changes nothing. To read tags by filter, list datastreams instead: every item carries its `tags`.

        Requires the `datastream:read` scope.
      tags:
      - Datastreams
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/DatastreamTagsQuerySchema'
        required: true
      security:
      - adverityApiTokenAuth:
        - datastream:read
      x-required-scopes:
      - datastream:read
  /api/v1/extracts/requeue/:
    post:
      operationId: webapi_mapi_extracts_requeue_extracts_endpoint
      summary: Requeue extracts for re-import to destinations
      parameters: []
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/RequeueExtractsResponseSchema'
      description: |-
        Triggers a requeue of the specified extracts, re-importing them to their destination tables. By default extracts are processed sequentially (in chronological order), which is appropriate for historical data loads. Set sequential=false for parallel processing.

        Requires the `destination:write` scope.
      tags:
      - Extracts
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/RequeueExtractsRequestSchema'
        required: true
      security:
      - adverityApiTokenAuth:
        - destination:write
      x-required-scopes:
      - destination:write
  /api/v1/monitors/:
    get:
      operationId: webapi_mapi_monitors_namespace_routes_list_monitors
      summary: List custom monitors
      parameters:
      - in: query
        name: workspace_scope
        schema:
          anyOf:
          - $ref: '#/components/schemas/WorkspaceScope'
          - type: 'null'
        required: false
      - in: query
        name: scope_from_workspace_id
        schema:
          anyOf:
          - format: uuid
            type: string
          - type: 'null'
          description: Required only for `workspace_scope` when multiple roots exist.
          title: Scope From Workspace Id
        required: false
        description: Required only for `workspace_scope` when multiple roots exist.
      - in: query
        name: name__icontains
        schema:
          anyOf:
          - type: string
          - type: 'null'
          title: Name  Icontains
        required: false
      - in: query
        name: severity
        schema:
          anyOf:
          - $ref: '#/components/schemas/SeverityLabel'
          - type: 'null'
        required: false
      - in: query
        name: workspace_id
        schema:
          anyOf:
          - items:
              format: uuid
              type: string
            maxItems: 50
            type: array
          - type: 'null'
          title: Workspace Id
        required: false
      - in: query
        name: page
        schema:
          default: 1
          minimum: 1
          title: Page
          type: integer
        required: false
      - in: query
        name: page_size
        schema:
          default: 50
          minimum: 1
          title: Page Size
          type: integer
        required: false
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/PagedMonitorSummarySchema'
      description: |-
        Returns the custom monitors in the API key's workspace family tree.

        Requires the `monitor:read` scope.
      tags:
      - Monitors
      security:
      - adverityApiTokenAuth:
        - monitor:read
      x-required-scopes:
      - monitor:read
    post:
      operationId: webapi_mapi_monitors_namespace_routes_create_custom_monitor
      summary: Create a custom monitor
      parameters: []
      responses:
        '201':
          description: Created
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/MonitorDetailSchema'
      description: |-
        Creates the monitor in `workspace_id`, which must be the API key's workspace or one below it. A datastream id the key cannot see, or one outside the monitor's workspace family, fails the request with 400 and nothing is created. A name already in use returns 409.

        Requires the `monitor:write` scope.
      tags:
      - Monitors
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/MonitorCreateSchema'
            examples:
              rule_on_a_date_column:
                summary: A monitor with one rule, assigned to one datastream
                value:
                  name: Campaign dates before 2022
                  workspace_id: 3f1b2c0e-5d7a-4c1e-9a58-6b0c4f2e7d11
                  severity: error
                  datastream_ids:
                  - a6c1d3b4-2e5f-4a79-8b10-9d3e7c5f2a46
                  has_target_columns: false
                  blocks:
                  - key: 54cdeeb5-1db4-494b-97ee-a48c5af66874
                    representation: date-format
                    condition:
                      key: 091610f9-52e1-44c1-92c0-514b453cdac2
                      operation: and
                      conditions:
                      - key: 9493426c-08da-413b-b449-00a0e32f6447
                        operation: or
                        conditions:
                        - key: 67122737-e878-4f2f-8479-222bf91417d2
                          column: Date
                          columnType: 4
                          operation: 16
                          value: '2022-06-01'
        required: true
      security:
      - adverityApiTokenAuth:
        - monitor:write
      x-required-scopes:
      - monitor:write
    delete:
      operationId: webapi_mapi_monitors_namespace_routes_bulk_delete_custom_monitors
      summary: Delete custom monitors
      parameters: []
      responses:
        '204':
          description: No Content
      description: |-
        Deletes the monitors listed in the body. The request is all-or-nothing: if one id is unknown or not visible to the API key, it fails with 400 and nothing is deleted.

        Requires the `monitor:write` scope.
      tags:
      - Monitors
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/UUIDListSchema'
        required: true
      security:
      - adverityApiTokenAuth:
        - monitor:write
      x-required-scopes:
      - monitor:write
  /api/v1/monitors/columns/:
    get:
      operationId: webapi_mapi_monitors_namespace_routes_list_rule_source_columns
      summary: List columns common to the given datastreams
      parameters:
      - in: query
        name: datastream_id
        schema:
          items:
            format: uuid
            type: string
          maxItems: 50
          minItems: 1
          title: Datastream Id
          type: array
        required: true
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                items:
                  $ref: '#/components/schemas/MonitorSourceColumnSchema'
                title: Response
                type: array
      description: |-
        Returns the name and effective type of every column present in all the given datastreams that the API key can see. The effective type of a column mapped to a schema column is the schema column's type. A rule's `column_type` must be the effective type returned here, because validation checks the operator only against the declared `column_type`. A datastream id that is unknown or not visible to the API key has no columns, so the list is empty.

        Requires the `monitor:read` scope.
      tags:
      - Monitors
      security:
      - adverityApiTokenAuth:
        - monitor:read
      x-required-scopes:
      - monitor:read
  /api/v1/monitors/datastreams/:
    options:
      operationId: webapi_mapi_monitors_namespace_routes_discover_monitors_for_datastreams
      summary: Discover monitors available for bulk datastream assignment
      parameters:
      - in: query
        name: workspace_scope
        schema:
          anyOf:
          - $ref: '#/components/schemas/WorkspaceScope'
          - type: 'null'
        required: false
      - in: query
        name: scope_from_workspace_id
        schema:
          anyOf:
          - format: uuid
            type: string
          - type: 'null'
          description: Required only for `workspace_scope` when multiple roots exist.
          title: Scope From Workspace Id
        required: false
        description: Required only for `workspace_scope` when multiple roots exist.
      - in: query
        name: datastream_id
        schema:
          anyOf:
          - items:
              format: uuid
              type: string
            maxItems: 50
            type: array
          - type: 'null'
          title: Datastream Id
        required: false
      - in: query
        name: workspace_id
        schema:
          anyOf:
          - items:
              format: uuid
              type: string
            maxItems: 50
            type: array
          - type: 'null'
          title: Workspace Id
        required: false
      - in: query
        name: enabled
        schema:
          anyOf:
          - type: boolean
          - type: 'null'
          title: Enabled
        required: false
      - in: query
        name: active_pulling_mode
        schema:
          anyOf:
          - $ref: '#/components/schemas/ActivePullingMode'
          - type: 'null'
        required: false
      - in: query
        name: scheduled_deletion
        schema:
          anyOf:
          - type: boolean
          - type: 'null'
          title: Scheduled Deletion
        required: false
      - in: query
        name: tag
        schema:
          anyOf:
          - items:
              type: string
            maxItems: 50
            type: array
          - type: 'null'
          description: 'Tag name, ignoring case, matched in every workspace the key
            can see: the same name in two workspaces is two tags, and this matches
            both. Combine with `workspace_id` to match the tag of one workspace. Repeatable.'
          title: Tag
        required: false
        description: 'Tag name, ignoring case, matched in every workspace the key
          can see: the same name in two workspaces is two tags, and this matches both.
          Combine with `workspace_id` to match the tag of one workspace. Repeatable.'
      - in: query
        name: tag_match
        schema:
          default: any
          description: '`any`: carries at least one of the given tags. `all`: carries
            every one.'
          enum:
          - any
          - all
          title: Tag Match
          type: string
        required: false
        description: '`any`: carries at least one of the given tags. `all`: carries
          every one.'
      - in: query
        name: page
        schema:
          default: 1
          minimum: 1
          title: Page
          type: integer
        required: false
      - in: query
        name: page_size
        schema:
          default: 50
          minimum: 1
          title: Page Size
          type: integer
        required: false
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/PagedMonitorSummarySchema'
      description: |-
        Without filters, returns all accessible monitors. With datastream filters (e.g. ?datastream_id=), returns only monitors whose workspace family covers all matched datastreams.

        Requires the `monitor:read` scope.
      tags:
      - Monitors
      security:
      - adverityApiTokenAuth:
        - monitor:read
      x-required-scopes:
      - monitor:read
    post:
      operationId: webapi_mapi_monitors_namespace_routes_bulk_assign_monitors_to_datastreams
      summary: Bulk assign monitors to datastreams
      parameters:
      - in: query
        name: workspace_scope
        schema:
          anyOf:
          - $ref: '#/components/schemas/WorkspaceScope'
          - type: 'null'
        required: false
      - in: query
        name: scope_from_workspace_id
        schema:
          anyOf:
          - format: uuid
            type: string
          - type: 'null'
          description: Required only for `workspace_scope` when multiple roots exist.
          title: Scope From Workspace Id
        required: false
        description: Required only for `workspace_scope` when multiple roots exist.
      - in: query
        name: datastream_id
        schema:
          anyOf:
          - items:
              format: uuid
              type: string
            maxItems: 50
            type: array
          - type: 'null'
          title: Datastream Id
        required: false
      - in: query
        name: workspace_id
        schema:
          anyOf:
          - items:
              format: uuid
              type: string
            maxItems: 50
            type: array
          - type: 'null'
          title: Workspace Id
        required: false
      - in: query
        name: enabled
        schema:
          anyOf:
          - type: boolean
          - type: 'null'
          title: Enabled
        required: false
      - in: query
        name: active_pulling_mode
        schema:
          anyOf:
          - $ref: '#/components/schemas/ActivePullingMode'
          - type: 'null'
        required: false
      - in: query
        name: scheduled_deletion
        schema:
          anyOf:
          - type: boolean
          - type: 'null'
          title: Scheduled Deletion
        required: false
      - in: query
        name: tag
        schema:
          anyOf:
          - items:
              type: string
            maxItems: 50
            type: array
          - type: 'null'
          description: 'Tag name, ignoring case, matched in every workspace the key
            can see: the same name in two workspaces is two tags, and this matches
            both. Combine with `workspace_id` to match the tag of one workspace. Repeatable.'
          title: Tag
        required: false
        description: 'Tag name, ignoring case, matched in every workspace the key
          can see: the same name in two workspaces is two tags, and this matches both.
          Combine with `workspace_id` to match the tag of one workspace. Repeatable.'
      - in: query
        name: tag_match
        schema:
          default: any
          description: '`any`: carries at least one of the given tags. `all`: carries
            every one.'
          enum:
          - any
          - all
          title: Tag Match
          type: string
        required: false
        description: '`any`: carries at least one of the given tags. `all`: carries
          every one.'
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/BulkMonitorAssignmentResponseSchema'
      description: |-
        Assigns the monitors in the body to the datastreams the filters select, where the datastream is in the monitor's workspace family. Without a datastream filter, every datastream the API key can see is selected. The response lists the datastreams that were assigned and those that were skipped.

        Requires the `monitor:write` scope.
      tags:
      - Monitors
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/UUIDListSchema'
        required: true
      security:
      - adverityApiTokenAuth:
        - monitor:write
      x-required-scopes:
      - monitor:write
    delete:
      operationId: webapi_mapi_monitors_namespace_routes_bulk_unassign_monitors_from_datastreams
      summary: Bulk unassign monitors from datastreams
      parameters:
      - in: query
        name: workspace_scope
        schema:
          anyOf:
          - $ref: '#/components/schemas/WorkspaceScope'
          - type: 'null'
        required: false
      - in: query
        name: scope_from_workspace_id
        schema:
          anyOf:
          - format: uuid
            type: string
          - type: 'null'
          description: Required only for `workspace_scope` when multiple roots exist.
          title: Scope From Workspace Id
        required: false
        description: Required only for `workspace_scope` when multiple roots exist.
      - in: query
        name: datastream_id
        schema:
          anyOf:
          - items:
              format: uuid
              type: string
            maxItems: 50
            type: array
          - type: 'null'
          title: Datastream Id
        required: false
      - in: query
        name: workspace_id
        schema:
          anyOf:
          - items:
              format: uuid
              type: string
            maxItems: 50
            type: array
          - type: 'null'
          title: Workspace Id
        required: false
      - in: query
        name: enabled
        schema:
          anyOf:
          - type: boolean
          - type: 'null'
          title: Enabled
        required: false
      - in: query
        name: active_pulling_mode
        schema:
          anyOf:
          - $ref: '#/components/schemas/ActivePullingMode'
          - type: 'null'
        required: false
      - in: query
        name: scheduled_deletion
        schema:
          anyOf:
          - type: boolean
          - type: 'null'
          title: Scheduled Deletion
        required: false
      - in: query
        name: tag
        schema:
          anyOf:
          - items:
              type: string
            maxItems: 50
            type: array
          - type: 'null'
          description: 'Tag name, ignoring case, matched in every workspace the key
            can see: the same name in two workspaces is two tags, and this matches
            both. Combine with `workspace_id` to match the tag of one workspace. Repeatable.'
          title: Tag
        required: false
        description: 'Tag name, ignoring case, matched in every workspace the key
          can see: the same name in two workspaces is two tags, and this matches both.
          Combine with `workspace_id` to match the tag of one workspace. Repeatable.'
      - in: query
        name: tag_match
        schema:
          default: any
          description: '`any`: carries at least one of the given tags. `all`: carries
            every one.'
          enum:
          - any
          - all
          title: Tag Match
          type: string
        required: false
        description: '`any`: carries at least one of the given tags. `all`: carries
          every one.'
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/UUIDListSchema'
      description: |-
        Removes the given monitors from the datastreams the filters select.

        Requires the `monitor:write` scope.
      tags:
      - Monitors
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/UUIDListSchema'
        required: true
      security:
      - adverityApiTokenAuth:
        - monitor:write
      x-required-scopes:
      - monitor:write
  /api/v1/monitors/operators/:
    get:
      operationId: webapi_mapi_monitors_namespace_routes_list_rule_operators
      summary: List rule operators per column type
      parameters: []
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                items:
                  $ref: '#/components/schemas/ColumnTypeOperatorsSchema'
                title: Response
                type: array
      description: |-
        Returns the operators a rule may use for each column type. A rule's `operation` must be one of the operators listed for its `column_type`.

        Requires the `monitor:read` scope.
      tags:
      - Monitors
      security:
      - adverityApiTokenAuth:
        - monitor:read
      x-required-scopes:
      - monitor:read
  /api/v1/monitors/target-columns/:
    get:
      operationId: webapi_mapi_monitors_namespace_routes_list_rule_target_columns
      summary: List schema columns mapped by all the given datastreams
      parameters:
      - in: query
        name: datastream_id
        schema:
          items:
            format: uuid
            type: string
          maxItems: 50
          minItems: 1
          title: Datastream Id
          type: array
        required: true
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                items:
                  $ref: '#/components/schemas/MonitorTargetColumnSchema'
                title: Response
                type: array
      description: |-
        Returns the schema columns that every given datastream, as visible to the API key, maps. A rule's `column_type` must be the effective type returned here, because validation checks the operator only against the declared `column_type`. A datastream id that is unknown or not visible to the API key maps no columns, so the list is empty.

        Requires the `monitor:read` scope.
      tags:
      - Monitors
      security:
      - adverityApiTokenAuth:
        - monitor:read
      x-required-scopes:
      - monitor:read
  /api/v1/monitors/universal/datastreams/{datastream_id}/:
    get:
      operationId: webapi_mapi_monitors_universal_routes_get_datastream_universal_monitors
      summary: List the universal monitors of a datastream
      parameters:
      - in: path
        name: datastream_id
        schema:
          format: uuid
          title: Datastream Id
          type: string
        required: true
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                items:
                  discriminator:
                    mapping:
                      row-duplicates: '#/components/schemas/RowDuplicatesMonitorSchema'
                      schema_consistency: '#/components/schemas/SchemaConsistencyMonitorSchema'
                      timeliness: '#/components/schemas/TimelinessMonitorSchema'
                      volumes: '#/components/schemas/VolumesMonitorSchema'
                    propertyName: type
                  oneOf:
                  - $ref: '#/components/schemas/RowDuplicatesMonitorSchema'
                  - $ref: '#/components/schemas/VolumesMonitorSchema'
                  - $ref: '#/components/schemas/TimelinessMonitorSchema'
                  - $ref: '#/components/schemas/SchemaConsistencyMonitorSchema'
                title: Response
                type: array
      description: |-
        Returns the four universal monitors of the datastream in a fixed order: `row-duplicates`, `volumes`, `timeliness`, `schema_consistency`. Monitors missing for the datastream are created from the workspace defaults first. Responds with 404 when the datastream is unknown, not visible to the API key, or pending deletion.

        Requires the `monitor:read` scope.
      tags:
      - Monitors
      security:
      - adverityApiTokenAuth:
        - monitor:read
      x-required-scopes:
      - monitor:read
    patch:
      operationId: webapi_mapi_monitors_universal_routes_update_datastream_universal_monitor
      summary: Update one universal monitor of a datastream
      parameters:
      - in: path
        name: datastream_id
        schema:
          format: uuid
          title: Datastream Id
          type: string
        required: true
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                discriminator:
                  mapping:
                    row-duplicates: '#/components/schemas/RowDuplicatesMonitorSchema'
                    schema_consistency: '#/components/schemas/SchemaConsistencyMonitorSchema'
                    timeliness: '#/components/schemas/TimelinessMonitorSchema'
                    volumes: '#/components/schemas/VolumesMonitorSchema'
                  propertyName: type
                oneOf:
                - $ref: '#/components/schemas/RowDuplicatesMonitorSchema'
                - $ref: '#/components/schemas/VolumesMonitorSchema'
                - $ref: '#/components/schemas/TimelinessMonitorSchema'
                - $ref: '#/components/schemas/SchemaConsistencyMonitorSchema'
                title: Response
      description: |-
        The body's `type` selects the monitor. Omitted fields stay unchanged and an explicit `null` returns 422. A given `type_config` replaces the stored configuration as a whole. A timeliness `type_config` requires `expected_delivery`, and the severity of a timeliness monitor can only be `warning`. Monitors missing for the datastream are created first. Responds with 404 when the datastream is unknown, not visible to the API key, or pending deletion.

        Requires the `monitor:write` scope.
      tags:
      - Monitors
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/UniversalMonitorPatchSchema'
            examples:
              disable_volumes:
                summary: Switch a monitor off
                value:
                  type: volumes
                  enabled: false
              row_duplicates_exclude:
                summary: Replace the row duplicates configuration
                value:
                  type: row-duplicates
                  severity: error
                  type_config:
                    mode: exclude
                    columns:
                    - Impressions
              timeliness_expected_delivery:
                summary: Set the expected delivery of the timeliness monitor
                value:
                  type: timeliness
                  enabled: true
                  severity: warning
                  type_config:
                    expected_delivery:
                      time: 08:00:00
                      offset: 0
              schema_consistency_checks:
                summary: Configure the schema consistency monitor
                value:
                  type: schema_consistency
                  type_config:
                    auto_restore_enabled: false
                    column_order_check_enabled: true
        required: true
      security:
      - adverityApiTokenAuth:
        - monitor:write
      x-required-scopes:
      - monitor:write
  /api/v1/monitors/universal/datastreams/{datastream_id}/baseline-schema/:
    get:
      operationId: webapi_mapi_monitors_universal_routes_get_datastream_baseline_schema
      summary: Get the baseline schema of a datastream
      parameters:
      - in: path
        name: datastream_id
        schema:
          format: uuid
          title: Datastream Id
          type: string
        required: true
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/BaselineSchemaSchema'
      description: |-
        Responds with 404 when the datastream has no baseline schema, is unknown, not visible to the API key, or pending deletion. `extract_id` is null when the baseline was saved without an extract (through the API or the web app), when that extract was deleted, or when it has no uuid.

        Requires the `monitor:read` scope.
      tags:
      - Monitors
      security:
      - adverityApiTokenAuth:
        - monitor:read
      x-required-scopes:
      - monitor:read
    put:
      operationId: webapi_mapi_monitors_universal_routes_replace_datastream_baseline_schema
      summary: Create or replace the baseline schema of a datastream
      parameters:
      - in: path
        name: datastream_id
        schema:
          format: uuid
          title: Datastream Id
          type: string
        required: true
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/BaselineSchemaSchema'
      description: |-
        The body is the list of column names, at most 5000; a longer list returns 422. A baseline saved through the API is not linked to an extract, so `extract_id` is null. Responds with 404 when the datastream is unknown, not visible to the API key, or pending deletion.

        Requires the `monitor:write` scope.
      tags:
      - Monitors
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/BaselineColumnsSchema'
        required: true
      security:
      - adverityApiTokenAuth:
        - monitor:write
      x-required-scopes:
      - monitor:write
  /api/v1/monitors/universal/datastreams/{datastream_id}/baseline-schema/preview/:
    post:
      operationId: webapi_mapi_monitors_universal_routes_preview_datastream_baseline_schema_diff
      summary: Preview the difference between the baseline schema and a list of columns
      parameters:
      - in: path
        name: datastream_id
        schema:
          format: uuid
          title: Datastream Id
          type: string
        required: true
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                items:
                  $ref: '#/components/schemas/DiffOperation'
                title: Response
                type: array
      description: |-
        Nothing is saved. The body holds at most 5000 column names, as many as a baseline schema may hold; a longer list returns 422. Responds with 404 when the datastream has no baseline schema, is unknown, not visible to the API key, or pending deletion.

        Requires the `monitor:read` scope.
      tags:
      - Monitors
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/BaselineColumnsPreviewSchema'
        required: true
      security:
      - adverityApiTokenAuth:
        - monitor:read
      x-required-scopes:
      - monitor:read
  /api/v1/monitors/universal/{monitor_type}/:
    get:
      operationId: webapi_mapi_monitors_universal_routes_list_universal_monitors
      summary: List the universal monitors of one type across workspaces
      parameters:
      - in: path
        name: monitor_type
        schema:
          enum:
          - row-duplicates
          - volumes
          - timeliness
          - schema_consistency
          title: UniversalMonitorType
          type: string
        required: true
      - in: query
        name: workspace_scope
        schema:
          anyOf:
          - $ref: '#/components/schemas/WorkspaceScope'
          - type: 'null'
        required: false
      - in: query
        name: scope_from_workspace_id
        schema:
          anyOf:
          - format: uuid
            type: string
          - type: 'null'
          description: Required only for `workspace_scope` when multiple roots exist.
          title: Scope From Workspace Id
        required: false
        description: Required only for `workspace_scope` when multiple roots exist.
      - in: query
        name: datastream_id
        schema:
          anyOf:
          - items:
              format: uuid
              type: string
            maxItems: 50
            type: array
          - type: 'null'
          title: Datastream Id
        required: false
      - in: query
        name: workspace_id
        schema:
          anyOf:
          - items:
              format: uuid
              type: string
            maxItems: 50
            type: array
          - type: 'null'
          title: Workspace Id
        required: false
      - in: query
        name: enabled
        schema:
          anyOf:
          - type: boolean
          - type: 'null'
          title: Enabled
        required: false
      - in: query
        name: active_pulling_mode
        schema:
          anyOf:
          - $ref: '#/components/schemas/ActivePullingMode'
          - type: 'null'
        required: false
      - in: query
        name: scheduled_deletion
        schema:
          anyOf:
          - type: boolean
          - type: 'null'
          title: Scheduled Deletion
        required: false
      - in: query
        name: tag
        schema:
          anyOf:
          - items:
              type: string
            maxItems: 50
            type: array
          - type: 'null'
          description: 'Tag name, ignoring case, matched in every workspace the key
            can see: the same name in two workspaces is two tags, and this matches
            both. Combine with `workspace_id` to match the tag of one workspace. Repeatable.'
          title: Tag
        required: false
        description: 'Tag name, ignoring case, matched in every workspace the key
          can see: the same name in two workspaces is two tags, and this matches both.
          Combine with `workspace_id` to match the tag of one workspace. Repeatable.'
      - in: query
        name: tag_match
        schema:
          default: any
          description: '`any`: carries at least one of the given tags. `all`: carries
            every one.'
          enum:
          - any
          - all
          title: Tag Match
          type: string
        required: false
        description: '`any`: carries at least one of the given tags. `all`: carries
          every one.'
      - in: query
        name: monitor_enabled
        schema:
          anyOf:
          - type: boolean
          - type: 'null'
          title: Monitor Enabled
        required: false
      - in: query
        name: severity
        schema:
          anyOf:
          - $ref: '#/components/schemas/SeverityLabel'
          - type: 'null'
        required: false
      - in: query
        name: page
        schema:
          default: 1
          minimum: 1
          title: Page
          type: integer
        required: false
      - in: query
        name: page_size
        schema:
          default: 50
          minimum: 1
          title: Page Size
          type: integer
        required: false
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/PagedUniversalMonitorListItemSchema'
      description: |-
        Returns the monitors of the given type for the datastreams the filters select, in a stable order by datastream creation. Datastreams pending deletion are left out. `monitor_enabled` and `severity` filter the monitors; `enabled` and the other filters select datastreams. A datastream without a row of this type is not listed: reading creates nothing.

        Requires the `monitor:read` scope.
      tags:
      - Monitors
      security:
      - adverityApiTokenAuth:
        - monitor:read
      x-required-scopes:
      - monitor:read
    patch:
      operationId: webapi_mapi_monitors_universal_routes_bulk_update_universal_monitors
      summary: Bulk update the universal monitors of one type
      parameters:
      - in: path
        name: monitor_type
        schema:
          enum:
          - row-duplicates
          - volumes
          - timeliness
          - schema_consistency
          title: UniversalMonitorType
          type: string
        required: true
      - in: query
        name: workspace_scope
        schema:
          anyOf:
          - $ref: '#/components/schemas/WorkspaceScope'
          - type: 'null'
        required: false
      - in: query
        name: scope_from_workspace_id
        schema:
          anyOf:
          - format: uuid
            type: string
          - type: 'null'
          description: Required only for `workspace_scope` when multiple roots exist.
          title: Scope From Workspace Id
        required: false
        description: Required only for `workspace_scope` when multiple roots exist.
      - in: query
        name: datastream_id
        schema:
          anyOf:
          - items:
              format: uuid
              type: string
            maxItems: 50
            type: array
          - type: 'null'
          title: Datastream Id
        required: false
      - in: query
        name: workspace_id
        schema:
          anyOf:
          - items:
              format: uuid
              type: string
            maxItems: 50
            type: array
          - type: 'null'
          title: Workspace Id
        required: false
      - in: query
        name: enabled
        schema:
          anyOf:
          - type: boolean
          - type: 'null'
          title: Enabled
        required: false
      - in: query
        name: active_pulling_mode
        schema:
          anyOf:
          - $ref: '#/components/schemas/ActivePullingMode'
          - type: 'null'
        required: false
      - in: query
        name: scheduled_deletion
        schema:
          anyOf:
          - type: boolean
          - type: 'null'
          title: Scheduled Deletion
        required: false
      - in: query
        name: tag
        schema:
          anyOf:
          - items:
              type: string
            maxItems: 50
            type: array
          - type: 'null'
          description: 'Tag name, ignoring case, matched in every workspace the key
            can see: the same name in two workspaces is two tags, and this matches
            both. Combine with `workspace_id` to match the tag of one workspace. Repeatable.'
          title: Tag
        required: false
        description: 'Tag name, ignoring case, matched in every workspace the key
          can see: the same name in two workspaces is two tags, and this matches both.
          Combine with `workspace_id` to match the tag of one workspace. Repeatable.'
      - in: query
        name: tag_match
        schema:
          default: any
          description: '`any`: carries at least one of the given tags. `all`: carries
            every one.'
          enum:
          - any
          - all
          title: Tag Match
          type: string
        required: false
        description: '`any`: carries at least one of the given tags. `all`: carries
          every one.'
      - in: query
        name: monitor_enabled
        schema:
          anyOf:
          - type: boolean
          - type: 'null'
          title: Monitor Enabled
        required: false
      - in: query
        name: severity
        schema:
          anyOf:
          - $ref: '#/components/schemas/SeverityLabel'
          - type: 'null'
        required: false
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/BulkActionResponseSchema'
      description: |-
        Sets `enabled` and/or `severity` on the monitors that `GET` on the same path returns for the same query. At least one datastream filter such as `workspace_id` is required. The body accepts `enabled` and `severity` only, stricter than the web app: any `type_config` returns 422. A timeliness monitor's severity is always `warning`. Responds with the datastreams whose monitor changed, so a repeat changes nothing and returns an empty list.

        Requires the `monitor:write` scope.
      tags:
      - Monitors
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/UniversalMonitorBulkPatchSchema'
            examples:
              disable:
                summary: Switch the monitors off
                value:
                  enabled: false
              enable_as_warning:
                summary: Switch the monitors on as warnings
                value:
                  enabled: true
                  severity: warning
        required: true
      security:
      - adverityApiTokenAuth:
        - monitor:write
      x-required-scopes:
      - monitor:write
  /api/v1/monitors/{monitor_id}/:
    get:
      operationId: webapi_mapi_monitors_namespace_routes_get_custom_monitor
      summary: Get a custom monitor
      parameters:
      - in: path
        name: monitor_id
        schema:
          format: uuid
          title: Monitor Id
          type: string
        required: true
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/MonitorDetailSchema'
      description: |-
        Returns the monitor with its rule blocks. `datastream_ids` lists only the assigned datastreams the API key can see. An unknown monitor, or one the API key cannot see, returns 404.

        Requires the `monitor:read` scope.
      tags:
      - Monitors
      security:
      - adverityApiTokenAuth:
        - monitor:read
      x-required-scopes:
      - monitor:read
    patch:
      operationId: webapi_mapi_monitors_namespace_routes_update_custom_monitor
      summary: Update a custom monitor
      parameters:
      - in: path
        name: monitor_id
        schema:
          format: uuid
          title: Monitor Id
          type: string
        required: true
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/MonitorDetailSchema'
      description: |-
        Changes only the fields in the body: an omitted field stays unchanged and an explicit `null` returns 422. `datastream_ids` replaces the assignments the API key can see; assignments it cannot see stay. Changing `workspace_id` without `datastream_ids` keeps the existing assignments, and returns 400 when one the API key can see lies outside the new workspace's family. A datastream id the key cannot see, or one outside the monitor's workspace family, fails the request with 400 and nothing changes. A name already in use returns 409. An unknown monitor, or one the API key cannot see, returns 404.

        Requires the `monitor:write` scope.
      tags:
      - Monitors
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/MonitorPatchSchema'
            examples:
              rename_and_reassign:
                summary: Rename a monitor and replace its visible assignments
                value:
                  name: Campaign dates before 2022 (renamed)
                  severity: warning
                  datastream_ids:
                  - a6c1d3b4-2e5f-4a79-8b10-9d3e7c5f2a46
        required: true
      security:
      - adverityApiTokenAuth:
        - monitor:write
      x-required-scopes:
      - monitor:write
    delete:
      operationId: webapi_mapi_monitors_namespace_routes_delete_custom_monitor
      summary: Delete a custom monitor
      parameters:
      - in: path
        name: monitor_id
        schema:
          format: uuid
          title: Monitor Id
          type: string
        required: true
      responses:
        '204':
          description: No Content
      description: |-
        Deletes the monitor. Returns 404 when it is unknown or not visible to the API key.

        Requires the `monitor:write` scope.
      tags:
      - Monitors
      security:
      - adverityApiTokenAuth:
        - monitor:write
      x-required-scopes:
      - monitor:write
  /api/v1/monitors/{monitor_id}/datastreams/:
    get:
      operationId: webapi_mapi_monitors_namespace_routes_list_assigned_datastreams
      summary: List datastreams assigned to a monitor
      parameters:
      - in: path
        name: monitor_id
        schema:
          format: uuid
          title: Monitor Id
          type: string
        required: true
      - in: query
        name: page
        schema:
          default: 1
          minimum: 1
          title: Page
          type: integer
        required: false
      - in: query
        name: page_size
        schema:
          default: 50
          minimum: 1
          title: Page Size
          type: integer
        required: false
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/PagedDatastreamSummarySchema'
      description: |-
        Returns the datastreams assigned to the monitor that the API key can see. An unknown monitor, or one the API key cannot see, returns 404.

        Requires the `monitor:read` scope.
      tags:
      - Monitors
      security:
      - adverityApiTokenAuth:
        - monitor:read
      x-required-scopes:
      - monitor:read
    options:
      operationId: webapi_mapi_monitors_namespace_routes_discover_assignable_datastreams_for_monitor
      summary: Discover datastreams assignable to a monitor
      parameters:
      - in: path
        name: monitor_id
        schema:
          format: uuid
          title: Monitor Id
          type: string
        required: true
      - in: query
        name: page
        schema:
          default: 1
          minimum: 1
          title: Page
          type: integer
        required: false
      - in: query
        name: page_size
        schema:
          default: 50
          minimum: 1
          title: Page Size
          type: integer
        required: false
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/PagedDatastreamSummarySchema'
      description: |-
        Returns the datastreams in the monitor's workspace family that the API key can see and that are not assigned yet. An unknown monitor, or one the API key cannot see, returns 404.

        Requires the `monitor:read` scope.
      tags:
      - Monitors
      security:
      - adverityApiTokenAuth:
        - monitor:read
      x-required-scopes:
      - monitor:read
    post:
      operationId: webapi_mapi_monitors_namespace_routes_assign_datastreams
      summary: Extend current list of assignments with the given datastreams
      parameters:
      - in: path
        name: monitor_id
        schema:
          format: uuid
          title: Monitor Id
          type: string
        required: true
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/UUIDListSchema'
      description: |-
        Adds the datastreams to the monitor's assignments. A datastream id the key cannot see, or one outside the monitor's workspace family, fails the request with 400 and nothing is assigned. An unknown monitor, or one the API key cannot see, returns 404.

        Requires the `monitor:write` scope.
      tags:
      - Monitors
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/UUIDListSchema'
        required: true
      security:
      - adverityApiTokenAuth:
        - monitor:write
      x-required-scopes:
      - monitor:write
    delete:
      operationId: webapi_mapi_monitors_namespace_routes_unassign_datastreams
      summary: Unassign datastreams from a monitor
      parameters:
      - in: path
        name: monitor_id
        schema:
          format: uuid
          title: Monitor Id
          type: string
        required: true
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/UUIDListSchema'
      description: |-
        Removes the datastreams from the monitor's assignments. A datastream id the key cannot see fails the request with 400 and nothing is removed. An unknown monitor, or one the API key cannot see, returns 404.

        Requires the `monitor:write` scope.
      tags:
      - Monitors
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/UUIDListSchema'
        required: true
      security:
      - adverityApiTokenAuth:
        - monitor:write
      x-required-scopes:
      - monitor:write
  /api/v1/usage/:
    get:
      operationId: webapi_mapi_usage_list_usage
      summary: List row usage per workspace
      parameters:
      - in: query
        name: granularity
        schema:
          allOf:
          - enum:
            - daily
            - monthly
            title: Granularity
            type: string
          default: daily
        required: false
      - in: query
        name: date_from
        schema:
          anyOf:
          - format: date
            type: string
          - type: 'null'
          title: Date From
        required: false
      - in: query
        name: date_to
        schema:
          anyOf:
          - format: date
            type: string
          - type: 'null'
          title: Date To
        required: false
      - in: query
        name: workspace_id
        schema:
          anyOf:
          - items:
              format: uuid
              type: string
            type: array
          - type: 'null'
          title: Workspace Id
        required: false
      - in: query
        name: datastream_id
        schema:
          anyOf:
          - items:
              format: uuid
              type: string
            type: array
          - type: 'null'
          title: Datastream Id
        required: false
      - in: query
        name: page
        schema:
          default: 1
          minimum: 1
          title: Page
          type: integer
        required: false
      - in: query
        name: page_size
        schema:
          default: 50
          minimum: 1
          title: Page Size
          type: integer
        required: false
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/PagedUsageItemSchema'
      description: |-
        Retrieve finalized row usage (unique and total rows) grouped by date, workspace, and datastream, scoped to the API key's workspace hierarchy. Supports daily and monthly granularity. Only finalized data (through yesterday) is returned; the current day is excluded until daily aggregation completes. If date_from is omitted it defaults to the first of the anchor month (date_to's month when date_to is given, otherwise the current month, or the previous month on the 1st when the current month has no finalized days yet), so the window is always bounded; set date_from explicitly to query a wider range. Use workspace_id / datastream_id to narrow within the accessible hierarchy: workspace_id matches the given workspace(s) exactly and does NOT roll up descendants (the API key's full subtree is always the outer bound). Both workspace_id and datastream_id accept multiple values; repeat the parameter to filter on a set (e.g. ?workspace_id=<uuid>&workspace_id=<uuid>).

        Requires the `usage:read` scope.
      tags:
      - Usage
      security:
      - adverityApiTokenAuth:
        - usage:read
      x-required-scopes:
      - usage:read
  /api/v1/users/:
    get:
      operationId: webapi_mapi_users_list_users
      summary: List Users
      parameters:
      - in: query
        name: page
        schema:
          default: 1
          minimum: 1
          title: Page
          type: integer
        required: false
      - in: query
        name: page_size
        schema:
          default: 50
          minimum: 1
          title: Page Size
          type: integer
        required: false
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/PagedUserResponseSchema'
      tags:
      - Users
      security:
      - adverityApiTokenAuth:
        - user:read
      x-required-scopes:
      - user:read
      description: Requires the `user:read` scope.
    post:
      operationId: webapi_mapi_users_create_user
      summary: Create User
      parameters: []
      responses:
        '201':
          description: Created
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/UserResponseSchema'
      tags:
      - Users
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/UserCreateSchema'
        required: true
      security:
      - adverityApiTokenAuth:
        - user:write
      x-required-scopes:
      - user:write
      description: Requires the `user:write` scope.
  /api/v1/users/{user_id}/:
    get:
      operationId: webapi_mapi_users_get_user
      summary: Get User
      parameters:
      - in: path
        name: user_id
        schema:
          format: uuid
          title: User Id
          type: string
        required: true
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/UserResponseSchema'
      tags:
      - Users
      security:
      - adverityApiTokenAuth:
        - user:read
      x-required-scopes:
      - user:read
      description: Requires the `user:read` scope.
    patch:
      operationId: webapi_mapi_users_update_user
      summary: Update User
      parameters:
      - in: path
        name: user_id
        schema:
          format: uuid
          title: User Id
          type: string
        required: true
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/UserResponseSchema'
      tags:
      - Users
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/UserUpdateSchema'
        required: true
      security:
      - adverityApiTokenAuth:
        - user:write
      x-required-scopes:
      - user:write
      description: Requires the `user:write` scope.
    delete:
      operationId: webapi_mapi_users_delete_user
      summary: Delete User
      parameters:
      - in: path
        name: user_id
        schema:
          format: uuid
          title: User Id
          type: string
        required: true
      responses:
        '200':
          description: OK
      tags:
      - Users
      security:
      - adverityApiTokenAuth:
        - user:write
      x-required-scopes:
      - user:write
      description: Requires the `user:write` scope.
  /api/v1/workspaces/:
    get:
      operationId: webapi_mapi_workspaces_list_workspaces
      summary: List Workspaces
      parameters:
      - in: query
        name: page
        schema:
          default: 1
          minimum: 1
          title: Page
          type: integer
        required: false
      - in: query
        name: page_size
        schema:
          default: 50
          minimum: 1
          title: Page Size
          type: integer
        required: false
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/PagedWorkspaceResponseSchema'
      tags:
      - Workspaces
      security:
      - adverityApiTokenAuth:
        - workspace:read
      x-required-scopes:
      - workspace:read
      description: Requires the `workspace:read` scope.
  /api/v1/workspaces/{workspace_id}/warehouse/query/:
    post:
      operationId: webapi_mapi_warehouse_routes_query_warehouse
      summary: Run a bounded read-only query against the workspace's warehouse
      parameters:
      - in: path
        name: workspace_id
        schema:
          format: uuid
          title: Workspace Id
          type: string
        required: true
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/WarehouseQueryResultSchema'
        '400':
          description: Bad Request
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/WarehouseQueryRejectedSchema'
      description: |-
        Executes a single SELECT or WITH statement against the workspace's warehouse and returns rows. The result is always wrapped in an enforced LIMIT server-side (row_limit is a soft request, capped at 100). Times out after 45s regardless of row count -- narrow the query rather than retrying. A query on facts that uses SELECT * or filters no date column is rejected with 400 before it runs; `violations` lists each failed rule with a fix.

        Requires the `warehouse:read` scope.
      tags:
      - Warehouse
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/WarehouseQuerySchema'
        required: true
      security:
      - adverityApiTokenAuth:
        - warehouse:read
      x-required-scopes:
      - warehouse:read
  /api/v1/workspaces/{workspace_id}/warehouse/schema/:
    get:
      operationId: webapi_mapi_warehouse_routes_get_warehouse_schema
      summary: List Adverity-tracked columns available for this workspace's warehouse
        data
      parameters:
      - in: path
        name: workspace_id
        schema:
          format: uuid
          title: Workspace Id
          type: string
        required: true
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/WarehouseSchemaResponseSchema'
      description: |-
        Returns the columns Adverity has actually loaded data for on this workspace's branch -- not a raw introspection of the underlying Snowflake/BigQuery connection, which can be shared across other workspaces.

        Requires the `warehouse:read` scope.
      tags:
      - Warehouse
      security:
      - adverityApiTokenAuth:
        - warehouse:read
      x-required-scopes:
      - warehouse:read
  /api/value-tables/:
    get:
      operationId: value_tables_list
      parameters:
      - name: ordering
        required: false
        in: query
        description: Which field to use when ordering the results.
        schema:
          type: string
      - 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: Number of results to return per page.
        schema:
          type: integer
      - in: query
        name: stack
        schema:
          type: integer
      tags:
      - Configuration
      security:
      - adverityApiTokenAuth:
        - workspace:read
      responses:
        '200':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/PaginatedValueTableList'
          description: ''
      x-required-scopes:
      - workspace:read
      description: Requires the `workspace:read` scope.
    post:
      operationId: value_tables_create
      tags:
      - Configuration
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/ValueTable'
          application/x-www-form-urlencoded:
            schema:
              $ref: '#/components/schemas/ValueTable'
          multipart/form-data:
            schema:
              $ref: '#/components/schemas/ValueTable'
        required: true
      security:
      - adverityApiTokenAuth:
        - workspace:write
      responses:
        '201':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ValueTable'
          description: ''
      x-required-scopes:
      - workspace:write
      description: Requires the `workspace:write` scope.
  /api/value-tables/{id}/:
    get:
      operationId: value_tables_detail_retrieve
      parameters:
      - in: path
        name: id
        schema:
          type: integer
        description: A unique integer value identifying this Value Table.
        required: true
      tags:
      - Configuration
      security:
      - adverityApiTokenAuth:
        - workspace:read
      responses:
        '200':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ValueTable'
          description: ''
      x-required-scopes:
      - workspace:read
      description: Requires the `workspace:read` scope.
    put:
      operationId: value_tables_detail_update
      parameters:
      - in: path
        name: id
        schema:
          type: integer
        description: A unique integer value identifying this Value Table.
        required: true
      tags:
      - Configuration
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/ValueTable'
          application/x-www-form-urlencoded:
            schema:
              $ref: '#/components/schemas/ValueTable'
          multipart/form-data:
            schema:
              $ref: '#/components/schemas/ValueTable'
        required: true
      security:
      - adverityApiTokenAuth:
        - workspace:write
      responses:
        '200':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ValueTable'
          description: ''
      x-required-scopes:
      - workspace:write
      description: Requires the `workspace:write` scope.
    patch:
      operationId: value_tables_detail_partial_update
      parameters:
      - in: path
        name: id
        schema:
          type: integer
        description: A unique integer value identifying this Value Table.
        required: true
      tags:
      - Configuration
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/PatchedValueTable'
          application/x-www-form-urlencoded:
            schema:
              $ref: '#/components/schemas/PatchedValueTable'
          multipart/form-data:
            schema:
              $ref: '#/components/schemas/PatchedValueTable'
      security:
      - adverityApiTokenAuth:
        - workspace:write
      responses:
        '200':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ValueTable'
          description: ''
      x-required-scopes:
      - workspace:write
      description: Requires the `workspace:write` scope.
    delete:
      operationId: value_tables_detail_destroy
      parameters:
      - in: path
        name: id
        schema:
          type: integer
        description: A unique integer value identifying this Value Table.
        required: true
      tags:
      - Configuration
      security:
      - adverityApiTokenAuth:
        - workspace:write
      responses:
        '204':
          description: No response body
      x-required-scopes:
      - workspace:write
      description: Requires the `workspace:write` scope.
components:
  schemas:
    APIDatastreamBasic:
      type: object
      properties:
        id:
          type: integer
          readOnly: true
        uuid:
          type: string
          format: uuid
          readOnly: true
        stack:
          allOf:
          - $ref: '#/components/schemas/StackBasic'
          readOnly: true
        stack_id:
          type: integer
          title: Workspace
          description: Which workspace the datastream belongs to.
          readOnly: true
        auth:
          type:
          - integer
          - 'null'
          title: Authorization
          description: Which authorization the datastream uses.
        name:
          type: string
          description: A human readable name. Numbers and special characters are supported.
          maxLength: 150
        slug:
          type: string
          readOnly: true
        app_label:
          type: string
          readOnly: true
        absolute_url:
          type: string
          readOnly: true
        change_url:
          type: string
          readOnly: true
        extracts_url:
          type: string
          readOnly: true
        fetch_url:
          type: string
          readOnly: true
        overview_url:
          type: string
          readOnly: true
        schema_mapping_url:
          type: string
          readOnly: true
        enabled:
          type: boolean
          title: Scheduled
          description: Streams that are not scheduled will not be fetched automatically.
        next_run:
          type: string
          format: date-time
          readOnly: true
        url:
          type: string
          format: uri
          readOnly: true
        datastream_type_id:
          type: integer
          readOnly: true
        logo_url:
          type: string
          readOnly: true
        extracts_stream_url:
          type: string
          readOnly: true
        supports_extended_intervals:
          type: string
          readOnly: true
        updated:
          type: string
          format: date-time
          readOnly: true
        created:
          type: string
          format: date-time
          readOnly: true
        creator:
          type:
          - string
          - 'null'
          readOnly: true
        can_be_fetched:
          type: boolean
          readOnly: true
      required:
      - absolute_url
      - app_label
      - can_be_fetched
      - change_url
      - created
      - creator
      - datastream_type_id
      - extracts_stream_url
      - extracts_url
      - fetch_url
      - id
      - logo_url
      - name
      - next_run
      - overview_url
      - schema_mapping_url
      - slug
      - stack
      - stack_id
      - supports_extended_intervals
      - updated
      - url
      - uuid
    APIDatastreamFull:
      type: object
      description: |-
        Enforce the cross-field retention rule shared by every datastream write surface.

        `retention_number` is mandatory whenever `retention_type` is not RETAIN_ALL.

        Same rule as `core.forms.DatastreamRetentionForm.clean()` (admin/UI form), but
        applied on both create AND update. The form only enforces it on update; via
        MAPI we apply it unconditionally so we never persist an inconsistent
        (retention_type, retention_number) pair.

        Missing values are resolved from `self.instance` so partial (PATCH) updates are
        validated against the persisted state. When neither retention field is in the
        payload we skip the rule entirely, so an unrelated PATCH on a legacy datastream
        with a pre-existing inconsistent (retention_type, retention_number) pair does
        not 400 on a field the client never touched.
      properties:
        id:
          type: integer
          readOnly: true
        uuid:
          type: string
          format: uuid
          readOnly: true
        url:
          type: string
          format: uri
          readOnly: true
        stack:
          allOf:
          - $ref: '#/components/schemas/StackBasic'
          readOnly: true
        stack_id:
          type: integer
          writeOnly: true
        auth:
          type:
          - integer
          - 'null'
          title: Authorization
          description: Which authorization the datastream uses.
        auth_change_url:
          type: string
          readOnly: true
        app_label:
          type: string
          readOnly: true
        name:
          type: string
          description: A human readable name. Numbers and special characters are supported.
          maxLength: 150
        slug:
          type: string
          readOnly: true
        description:
          type: string
          maxLength: 1000
        enabled:
          type: boolean
          title: Scheduled
          description: Streams that are not scheduled will not be fetched automatically.
        frequency:
          type: string
          readOnly: true
        next_run:
          type: string
          format: date-time
          readOnly: true
        last_fetch:
          type: string
          format: date-time
          readOnly: true
        absolute_url:
          type: string
          readOnly: true
        change_url:
          type: string
          readOnly: true
        extracts_url:
          type: string
          readOnly: true
        fetch_url:
          type: string
          readOnly: true
        overview_url:
          type: string
          readOnly: true
        schema_mapping_url:
          type: string
          readOnly: true
        issues_url:
          type: string
          readOnly: true
        transformers:
          type: array
          items:
            $ref: '#/components/schemas/TransformerBasic'
          readOnly: true
        schedules:
          type: array
          items:
            $ref: '#/components/schemas/FetchSchedule'
          readOnly: true
        transformer_ids:
          type: array
          items:
            type: integer
            writeOnly: true
          writeOnly: true
        datastream_type_id:
          type: integer
          readOnly: true
        datastream_type_name:
          type: string
          readOnly: true
        datastream_type_slug:
          type: string
          readOnly: true
        datatype:
          allOf:
          - $ref: '#/components/schemas/DatatypeEnum'
          description: |-
            Projection of destination state: reads Live if any destination is enabled, otherwise Staging. Writing 'Live' enables all destinations and 'Staging' disables them.

            * `Live` - Live
            * `Staging` - Staging
        actions:
          type: string
          readOnly: true
        overwrite_key_columns:
          type: boolean
          title: Key Columns
          description: Overwrite rows according to Key defined in Data Mapping.
        manage_extract_names:
          type: boolean
          title: Extract Filenames
          description: Split by selected date column and name extracts with pre-defined
            pattern to consolidate data.
        extract_name_keys:
          type:
          - string
          - 'null'
          title: Key Date Column
          maxLength: 128
        retention_type:
          allOf:
          - $ref: '#/components/schemas/RetentionTypeEnum'
          minimum: 0
          maximum: 32767
        retention_number:
          type:
          - integer
          - 'null'
          maximum: 32767
          minimum: 0
          title: Retention Number (N)
          description: The amount (N) of fetches/extracts/days to retain (raw extracts
            are not counted). Must be an integer greater than or equal to zero.
        remove_if_empty:
          type: boolean
          description: When enabled, fetches resulting in only empty rows ("empty
            extracts") will be silently discarded.
        skip_empty_rows:
          type: boolean
          description: When enabled, empty data rows in fetches will be silently ignored.
        prune_instantly:
          type: boolean
          description: When enabled, deleted files will not be kept for the configured
            grace period.
        overwrite_datastream:
          type: boolean
          title: Datastream
          description: Delete/Drop all existing rows (created by this datastream)
            in the destination before inserting a new import.
        overwrite_filename:
          type: boolean
          title: Filename
          description: Overwrite rows from same extract file.
        logo_url:
          type: string
          readOnly: true
        extracts_stream_url:
          type: string
          readOnly: true
        active_destination:
          type: string
          readOnly: true
        supports_passive_destinations:
          type: boolean
          readOnly: true
        passive_destinations:
          type: string
          readOnly: true
        columns:
          type: string
          format: uri
          readOnly: true
        supports_extended_intervals:
          type: string
          readOnly: true
        updated:
          type: string
          format: date-time
          readOnly: true
        created:
          type: string
          format: date-time
          readOnly: true
        creator:
          type:
          - string
          - 'null'
          readOnly: true
        has_schema_mapping:
          type: boolean
          readOnly: true
        is_insights_mediaplan:
          type: boolean
          title: Mediaplan
          description: If checked, generated extracts will be treated as Insights
            mediaplans.
        cron_type:
          type: string
        cron_interval:
          type: integer
          minimum: 0
        cron_start_of_day:
          type: string
          format: time
        cron_interval_start:
          type: integer
          minimum: 0
        time_range_preset:
          $ref: '#/components/schemas/FetchScheduleTimeRangePresetEnum'
        delta_interval:
          type: integer
          minimum: 0
        delta_interval_start:
          type: integer
          minimum: 0
        delta_start_of_day:
          type: string
          format: time
        delta_type:
          $ref: '#/components/schemas/DeltaTypeEnum'
        time_range_max:
          type: string
          readOnly: true
        time_range_available:
          type: string
          readOnly: true
        has_schema_mapping_dimension:
          type: boolean
          readOnly: true
        feature_smart_naming_convention:
          type: string
          readOnly: true
        auto_fetch:
          type: string
          readOnly: true
        assigned_destinations:
          type: array
          items:
            $ref: '#/components/schemas/AssignedDestination'
          readOnly: true
        can_be_fetched:
          type: boolean
          readOnly: true
      required:
      - absolute_url
      - actions
      - active_destination
      - app_label
      - assigned_destinations
      - auth_change_url
      - auto_fetch
      - can_be_fetched
      - change_url
      - columns
      - created
      - creator
      - datastream_type_id
      - datastream_type_name
      - datastream_type_slug
      - extracts_stream_url
      - extracts_url
      - feature_smart_naming_convention
      - fetch_url
      - frequency
      - has_schema_mapping
      - has_schema_mapping_dimension
      - id
      - issues_url
      - last_fetch
      - logo_url
      - name
      - next_run
      - overview_url
      - passive_destinations
      - schedules
      - schema_mapping_url
      - slug
      - stack
      - stack_id
      - supports_extended_intervals
      - supports_passive_destinations
      - time_range_available
      - time_range_max
      - transformer_ids
      - transformers
      - updated
      - url
      - uuid
    ActivePullingMode:
      enum:
      - smart
      - smart-bundle
      - schedule
      title: ActivePullingMode
      type: string
    ActivePullingSetMode:
      enum:
      - smart
      - schedule
      title: ActivePullingSetMode
      type: string
    AffectedDatastreamsSchema:
      properties:
        datastream_ids:
          items:
            format: uuid
            type: string
          title: Datastream Ids
          type: array
      required:
      - datastream_ids
      title: AffectedDatastreamsSchema
      type: object
    AllGroupEnum:
      enum:
      - Administrator
      - Datastream Manager
      - Notifications Administrator
      - Mapping Table Manager
      - Creator
      - Viewer
      - Dashboard Manager
      - Conversations Manager
      - Dashboard Conversations
      - Workspace Manager
      title: AllGroupEnum
      type: string
    AssignedDestination:
      type: object
      description: One destination binding as seen from the datastream (read-only).
      properties:
        target_id:
          type: integer
          readOnly: true
        destination_name:
          type: string
          readOnly: true
        destination_type:
          type: string
          readOnly: true
        enabled:
          type: boolean
          readOnly: true
        destination_settings:
          type: object
          additionalProperties: {}
          readOnly: true
      required:
      - destination_name
      - destination_settings
      - destination_type
      - enabled
      - target_id
    AuthorizationList:
      type: object
      description: Serializer for common authorization fields across all connection
        types.
      properties:
        id:
          type: integer
          readOnly: true
        name:
          type: string
          maxLength: 100
        stack:
          type: string
          readOnly: true
        polymorphic_ctype_id:
          type:
          - integer
          - 'null'
          readOnly: true
          title: Datasource
        connection_type:
          type: string
          readOnly: true
        credentials_validated:
          type: boolean
          readOnly: true
        is_authorized:
          type: string
          readOnly: true
        created:
          type: string
          format: date-time
          readOnly: true
        updated:
          type: string
          format: date-time
          readOnly: true
        creator_username:
          type: string
          readOnly: true
        datastream_count:
          type: integer
          readOnly: true
        detail_url:
          type: string
          readOnly: true
        connection_invite_uuid:
          type: string
          readOnly: true
      required:
      - connection_invite_uuid
      - connection_type
      - created
      - creator_username
      - credentials_validated
      - datastream_count
      - detail_url
      - id
      - is_authorized
      - name
      - polymorphic_ctype_id
      - stack
      - updated
    BaseJob:
      type: object
      properties:
        id:
          type: integer
          readOnly: true
        uuid:
          type: string
          format: uuid
          readOnly: true
        url:
          type: string
          format: uri
          readOnly: true
        job_start:
          type: string
          format: date-time
          readOnly: true
        job_end:
          type: string
          format: date-time
          readOnly: true
        progress:
          type: string
          readOnly: true
        state:
          type: string
          readOnly: true
        state_label:
          type: string
          readOnly: true
          description: Display label for the job state. "Retrying" while the job is
            waiting out a retry/backoff; otherwise the label matching `state`. `state`
            itself is unchanged while "Retrying". The signal is derived per job group,
            so while a group waits out a backoff every running job in it reports the
            label, regardless of which stage's task is being retried.
        state_color:
          type: string
          readOnly: true
        datastream:
          readOnly: true
          oneOf:
          - allOf:
            - $ref: '#/components/schemas/APIDatastreamBasic'
          - type: 'null'
        issues:
          type: array
          items:
            $ref: '#/components/schemas/CompactDatastreamExtractionLog'
          readOnly: true
        last_executed:
          type:
          - string
          - 'null'
          format: date-time
          readOnly: true
          description: 'When a job in this job group last started executing. Job-group
            level: it reflects any job in the group, not this job alone. Null until
            the first job in the group starts - fall back to `scheduled` to age a
            group that has not started yet. The write is debounced by 5 minutes, so
            the value may lag real activity by up to that much - do not build staleness
            alarms with a tighter threshold.'
        user:
          type:
          - string
          - 'null'
          readOnly: true
      required:
      - datastream
      - id
      - issues
      - job_end
      - job_start
      - last_executed
      - progress
      - state
      - state_color
      - state_label
      - url
      - user
      - uuid
    BaseJobTyped:
      allOf:
      - type: object
        properties:
          type:
            type: string
        required:
        - type
      - $ref: '#/components/schemas/BaseJob'
    BaseTargetType:
      type: object
      properties:
        id:
          type: integer
          readOnly: true
        name:
          type: string
          readOnly: true
        slug:
          type: string
          readOnly: true
        canonical_name:
          type: string
          readOnly: true
        url:
          type: string
          format: uri
          readOnly: true
        targets:
          type: string
          format: uri
          readOnly: true
      required:
      - canonical_name
      - id
      - name
      - slug
      - targets
      - url
    BaselineColumnsPreviewSchema:
      description: The columns to compare with the baseline schema, at most as many
        as a baseline may hold.
      items:
        type: string
      maxItems: 5000
      title: BaselineColumnsPreviewSchema
      type: array
    BaselineColumnsSchema:
      description: The baseline columns, at most as many as a baseline may hold.
      items:
        type: string
      maxItems: 5000
      title: BaselineColumnsSchema
      type: array
    BaselineSchemaSchema:
      description: The baseline schema of a datastream.
      properties:
        schema_columns:
          items:
            type: string
          title: Schema Columns
          type: array
        extract_id:
          anyOf:
          - format: uuid
            type: string
          - type: 'null'
          description: The uuid of the extract the baseline was taken from. It is
            null when the baseline was saved without an extract (through the API or
            the web app), when that extract was deleted, or when it has no uuid.
          title: Extract Id
        updated:
          format: date-time
          title: Updated
          type: string
        updated_by:
          anyOf:
          - type: string
          - type: 'null'
          title: Updated By
      required:
      - schema_columns
      - extract_id
      - updated
      - updated_by
      title: BaselineSchemaSchema
      type: object
    BindingPatchSchema:
      properties:
        enabled:
          title: Enabled
          type: boolean
      required:
      - enabled
      title: BindingPatchSchema
      type: object
    BindingResponseSchema:
      properties:
        id:
          title: Id
          type: integer
        datastream_id:
          title: Datastream Id
          type: integer
        target_id:
          title: Target Id
          type: integer
        target_name:
          title: Target Name
          type: string
        target_type:
          title: Target Type
          type: string
        enabled:
          title: Enabled
          type: boolean
        created:
          title: Created
          type: string
        updated:
          title: Updated
          type: string
      required:
      - id
      - datastream_id
      - target_id
      - target_name
      - target_type
      - enabled
      - created
      - updated
      title: BindingResponseSchema
      type: object
    BlankEnum:
      enum:
      - ''
    BlocksSchema:
      items:
        $ref: '#/components/schemas/RuleBlockSchema'
      minItems: 1
      title: BlocksSchema
      type: array
    BulkActionResponseSchema:
      properties:
        affected:
          $ref: '#/components/schemas/AffectedDatastreamsSchema'
      required:
      - affected
      title: BulkActionResponseSchema
      type: object
    BulkMonitorAssignmentResponseSchema:
      properties:
        assigned_datastream_ids:
          items:
            format: uuid
            type: string
          title: Assigned Datastream Ids
          type: array
        skipped_datastream_ids:
          items:
            format: uuid
            type: string
          title: Skipped Datastream Ids
          type: array
      required:
      - assigned_datastream_ids
      - skipped_datastream_ids
      title: BulkMonitorAssignmentResponseSchema
      type: object
    BulkTagAssignmentResponseSchema:
      properties:
        assigned_datastream_ids:
          description: Datastreams that now carry every requested tag that applies
            to them.
          items:
            format: uuid
            type: string
          title: Assigned Datastream Ids
          type: array
        skipped:
          description: Datastreams left unchanged, and why. A datastream gets every
            tag that applies to it, or none.
          items:
            $ref: '#/components/schemas/SkippedDatastreamSchema'
          title: Skipped
          type: array
        created_tags:
          description: Tags created because of `create_missing=true`.
          items:
            $ref: '#/components/schemas/DatastreamTagSchema'
          title: Created Tags
          type: array
      required:
      - assigned_datastream_ids
      - skipped
      - created_tags
      title: BulkTagAssignmentResponseSchema
      type: object
    BulkTagUnassignmentResponseSchema:
      properties:
        unassigned_datastream_ids:
          description: Datastreams that now carry none of the given tags.
          items:
            format: uuid
            type: string
          title: Unassigned Datastream Ids
          type: array
        skipped:
          items:
            $ref: '#/components/schemas/SkippedDatastreamSchema'
          title: Skipped
          type: array
      required:
      - unassigned_datastream_ids
      - skipped
      title: BulkTagUnassignmentResponseSchema
      type: object
    ColumnDataTypeEnum:
      enum:
      - 1
      - 2
      - 3
      - 4
      - 5
      - 6
      - 7
      - 9
      - 8
      - 10
      - 11
      - 13
      type: integer
      description: |-
        * `1` - String
        * `2` - Long
        * `3` - Float
        * `4` - Date
        * `5` - DateTime
        * `6` - Boolean
        * `7` - Percentage
        * `9` - Currency
        * `8` - JSON
        * `10` - Formula
        * `11` - Duration
        * `13` - Timestamp
    ColumnType:
      enum:
      - 6
      - 9
      - 4
      - 5
      - 13
      - 3
      - 2
      - 7
      - 1
      title: ColumnType
      type: integer
    ColumnTypeOperatorsSchema:
      properties:
        column_type:
          $ref: '#/components/schemas/DataTypeId'
        column_type_name:
          $ref: '#/components/schemas/DataType'
        operators:
          items:
            $ref: '#/components/schemas/OperatorSchema'
          title: Operators
          type: array
      required:
      - column_type
      - column_type_name
      - operators
      title: ColumnTypeOperatorsSchema
      type: object
    CompactDatastreamExtractionLog:
      type: object
      properties:
        message:
          type:
          - string
          - 'null'
        type_label:
          type: string
          readOnly: true
        extraction_stage_label:
          type: string
          readOnly: true
        url:
          type: string
          format: uri
          readOnly: true
      required:
      - extraction_stage_label
      - type_label
      - url
    ConditionalExpressionSchema:
      additionalProperties: false
      properties:
        key:
          format: uuid
          title: Key
          type: string
        column:
          title: Column
          type: string
        columnType:
          $ref: '#/components/schemas/ColumnType'
        operation:
          $ref: '#/components/schemas/OperatorType'
        value:
          anyOf:
          - type: integer
          - type: number
          - type: string
          - format: date
            type: string
          - format: date-time
            type: string
          title: Value
        caseSensitive:
          default: false
          title: Casesensitive
          type: boolean
      required:
      - key
      - column
      - columnType
      - operation
      - value
      title: ConditionalExpressionSchema
      type: object
    ConnectionInviteMAPI:
      type: object
      description: Class used to serialize Connection Invite payload for MAPI.
      properties:
        content_types:
          type: array
          items:
            $ref: '#/components/schemas/PendingAuthorization'
        email:
          type: string
          format: email
        email_body:
          type: string
          default: |-
            Hello,

            You are receiving this email because {{user}} has requested access to the following data source(s) in Adverity:

            {{links}}

            Kind regards,
            Adverity Support
        notification_emails:
          type: array
          items:
            type: string
        stack:
          type: integer
        send_invite_email:
          type: boolean
          default: true
      required:
      - content_types
      - email
      - notification_emails
      - stack
    ConnectionType:
      type: object
      properties:
        id:
          type: integer
          readOnly: true
        name:
          type: string
          readOnly: true
        slug:
          type: string
          readOnly: true
        canonical_name:
          type: string
          readOnly: true
        url:
          type: string
          format: uri
          readOnly: true
        categories:
          type: array
          items:
            type: string
          readOnly: true
        keywords:
          type: array
          items:
            type: string
          readOnly: true
        is_deprecated:
          type: boolean
          readOnly: true
        logo_url:
          type: string
          readOnly: true
        create_url:
          type: string
          readOnly: true
        connections:
          type: string
          format: uri
          readOnly: true
      required:
      - canonical_name
      - categories
      - connections
      - create_url
      - id
      - is_deprecated
      - keywords
      - logo_url
      - name
      - slug
      - url
    ConnectorFieldHierarchySchema:
      properties:
        connector:
          title: Connector
          type: string
        fields:
          additionalProperties:
            $ref: '#/components/schemas/FieldInfoSchema'
          title: Fields
          type: object
      required:
      - connector
      - fields
      title: ConnectorFieldHierarchySchema
      type: object
    CopyDatastreamReport:
      type: object
      properties:
        reused:
          type: array
          items:
            type: string
        cloned:
          type: array
          items:
            type: string
        attached:
          type: array
          items:
            type: string
        dropped:
          type: array
          items:
            type: string
      required:
      - attached
      - cloned
      - dropped
      - reused
    CopyDatastreamRequest:
      type: object
      description: |-
        OpenAPI shape of the copy body. Any other writable datastream field (for
        example ``schedules``) is applied to the copy as well, as it always was.
      properties:
        destinations:
          type: array
          items:
            type: integer
          description: Destinations in the target workspace (or a parent) to bind,
            disabled.
        enrichments:
          type: array
          items:
            type: integer
          description: Enrichments usable from the target workspace to assign to the
            copy.
        authorization_id:
          type:
          - integer
          - 'null'
          description: Authorization usable from the target workspace, replacing the
            source's.
        auth:
          type:
          - integer
          - 'null'
          description: Alias of authorization_id (the datastream serializer's field
            name).
        name:
          type: string
          description: Name of the copy.
        stack:
          type: integer
          description: Workspace of the copy. Omit or pass the source workspace for
            a plain duplicate; a different workspace switches to clone semantics.
    CopyDatastreamResponse:
      type: object
      properties:
        status:
          type: string
        id:
          type: integer
        url:
          type: string
        report:
          allOf:
          - $ref: '#/components/schemas/CopyDatastreamReport'
          description: Only present on a copy into a different workspace.
      required:
      - id
      - status
      - url
    CronPresetEnum:
      enum:
      - ONCE
      - CRON_EVERY_DAY
      - CRON_EVERY_WEEK
      - CRON_EVERY_MONTH
      - CRON_EVERY_QUARTER
      - CRON_EVERY_15_MINUTES
      - CRON_EVERY_30_MINUTES
      - CRON_EVERY_HOUR
      - CRON_EVERY_2_HOURS
      - CRON_EVERY_3_HOURS
      - CRON_EVERY_4_HOURS
      - CRON_EVERY_5_HOURS
      - CRON_EVERY_6_HOURS
      - CRON_EVERY_8_HOURS
      - CRON_EVERY_12_HOURS
      - CRON_EVERY_2_DAYS
      - CRON_EVERY_30_DAYS
      - CRON_EVERY_40_DAYS
      - CRON_EVERY_2_WEEKS
      - CRON_EVERY_4_WEEKS
      - CRON_EVERY_6_MONTHS
      - CRON_EVERY_YEAR
      type: string
      description: |-
        * `ONCE` - Once
        * `CRON_EVERY_DAY` - Every day
        * `CRON_EVERY_WEEK` - Every week
        * `CRON_EVERY_MONTH` - Every month
        * `CRON_EVERY_QUARTER` - Every quarter
        * `CRON_EVERY_15_MINUTES` - Every 15 minutes
        * `CRON_EVERY_30_MINUTES` - Every 30 minutes
        * `CRON_EVERY_HOUR` - Every hour
        * `CRON_EVERY_2_HOURS` - Every 2 hours
        * `CRON_EVERY_3_HOURS` - Every 3 hours
        * `CRON_EVERY_4_HOURS` - Every 4 hours
        * `CRON_EVERY_5_HOURS` - Every 5 hours
        * `CRON_EVERY_6_HOURS` - Every 6 hours
        * `CRON_EVERY_8_HOURS` - Every 8 hours
        * `CRON_EVERY_12_HOURS` - Every 12 hours
        * `CRON_EVERY_2_DAYS` - Every 2 days
        * `CRON_EVERY_30_DAYS` - Every 30 days
        * `CRON_EVERY_40_DAYS` - Every 40 days
        * `CRON_EVERY_2_WEEKS` - Every 2 weeks
        * `CRON_EVERY_4_WEEKS` - Every 4 weeks
        * `CRON_EVERY_6_MONTHS` - Every 6 months
        * `CRON_EVERY_YEAR` - Every year
    CronTypeLabel:
      description: A ``FetchSchedule`` cron/delta unit as the label the API speaks,
        not the stored integer.
      enum:
      - minute
      - hour
      - day
      - week
      - month
      - quarter
      - year
      - once
      title: CronTypeLabel
      type: string
    DataType:
      enum:
      - boolean
      - currency
      - date
      - datetime
      - duration
      - float
      - formula
      - json
      - long
      - percentage
      - string
      - timestamp
      title: DataType
      type: string
    DataTypeId:
      enum:
      - 6
      - 9
      - 4
      - 5
      - 11
      - 3
      - 10
      - 8
      - 2
      - 7
      - 1
      - 13
      title: DataTypeId
      type: integer
    Datalake:
      type: object
      properties:
        id:
          type: integer
          readOnly: true
        name:
          type: string
          description: A human readable name.
          maxLength: 200
        stack:
          type: integer
        url:
          type: string
          description: The full URL for the storage engine.
          maxLength: 200
        parameters: {}
        backup_existing:
          type: boolean
          title: Backup Existing Files
          description: Enable this option to create backups of existing files. Otherwise
            existing files will be silently overwritten.
        auth:
          type:
          - integer
          - 'null'
          title: Authorization
      required:
      - id
      - name
      - url
    DatastreamColumnInfo:
      type: object
      properties:
        datatype:
          type: string
        id:
          type: integer
          readOnly: true
        change_url:
          type: string
          readOnly: true
        created:
          type: string
          format: date-time
          readOnly: true
        is_key_column:
          type: boolean
          description: If checked, this column will be used to consolidate multiple
            files.
        confirmed_type:
          type: boolean
          description: If checked the type will not be changed by the tracking service.
        name:
          type: string
          maxLength: 200
        type:
          allOf:
          - $ref: '#/components/schemas/ColumnDataTypeEnum'
          minimum: 0
          maximum: 32767
        removed:
          type: boolean
        target_column:
          oneOf:
          - allOf:
            - $ref: '#/components/schemas/ReadOnlySchemaColumn'
          - type: 'null'
        updated:
          type: string
          format: date-time
          readOnly: true
        set_default:
          type: boolean
          writeOnly: true
          default: false
        reset_default:
          type: boolean
          writeOnly: true
          default: false
        unlock_type:
          type: boolean
          writeOnly: true
          default: false
        has_smart_naming_convention:
          type: string
          readOnly: true
      required:
      - change_url
      - created
      - datatype
      - has_smart_naming_convention
      - id
      - name
      - updated
    DatastreamExtract:
      type: object
      properties:
        id:
          type: integer
          readOnly: true
        created:
          type: string
          format: date-time
        datastream:
          $ref: '#/components/schemas/APIDatastreamBasic'
        name:
          type: string
          maxLength: 255
        scheduled:
          type:
          - string
          - 'null'
          format: date-time
        nrows:
          type:
          - integer
          - 'null'
          maximum: 9223372036854775807
          minimum: -9223372036854775808
          format: int64
          title: Rows
        ncols:
          type:
          - integer
          - 'null'
          maximum: 32767
          minimum: 0
          title: Columns
        filesize:
          type:
          - integer
          - 'null'
          maximum: 9223372036854775807
          minimum: -9223372036854775808
          format: int64
        state_label:
          type: string
          readOnly: true
        state_color:
          type: string
          readOnly: true
        preview_url:
          type: string
          readOnly: true
        refetch_url:
          type: string
          readOnly: true
        requeue_url:
          type: string
          readOnly: true
        download_url:
          type: string
          readOnly: true
        metadata: {}
        tags:
          type: array
          items:
            type: string
        explore_url:
          type: string
          readOnly: true
        dashboard_url:
          type: string
          readOnly: true
      required:
      - created
      - dashboard_url
      - datastream
      - download_url
      - explore_url
      - id
      - name
      - preview_url
      - refetch_url
      - requeue_url
      - state_color
      - state_label
      - tags
    DatastreamExtractNested:
      type: object
      properties:
        id:
          type: integer
          readOnly: true
        name:
          type: string
          maxLength: 255
        preview_url:
          type: string
          readOnly: true
        refetch_url:
          type: string
          readOnly: true
        requeue_url:
          type: string
          readOnly: true
        metadata: {}
        datastream_id:
          type: integer
          readOnly: true
      required:
      - datastream_id
      - id
      - name
      - preview_url
      - refetch_url
      - requeue_url
    DatastreamExtractionLog:
      type: object
      properties:
        id:
          type: integer
          readOnly: true
        job_id:
          type:
          - integer
          - 'null'
          readOnly: true
        job:
          type: object
          additionalProperties: {}
          readOnly: true
        start:
          type: string
          format: date-time
        end:
          type: string
          format: date-time
        message:
          type:
          - string
          - 'null'
        display_message:
          type:
          - string
          - 'null'
          readOnly: true
        type_label:
          type: string
          readOnly: true
        datastream:
          $ref: '#/components/schemas/APIDatastreamBasic'
        extract:
          $ref: '#/components/schemas/DatastreamExtractNested'
        ack:
          type: boolean
        ack_url:
          type: string
          readOnly: true
        ack_group_url:
          type: string
          readOnly: true
        retry_url:
          type: string
          readOnly: true
        retry_group_url:
          type: string
          readOnly: true
        url:
          type: string
          format: uri
          readOnly: true
        mapping_table_change_url:
          type:
          - string
          - 'null'
          readOnly: true
        mapping_entries_change_url:
          type:
          - string
          - 'null'
          readOnly: true
        unmapped_workspace_mappings_url:
          type:
          - string
          - 'null'
          readOnly: true
        target_column_change_url:
          type: string
        transformation_config_url:
          type: string
        extraction_stage_label:
          type: string
          readOnly: true
        error_cause_label:
          type: string
          readOnly: true
        error_resolution_label:
          type: string
          readOnly: true
        occurrences:
          type: integer
          readOnly: true
      required:
      - ack_group_url
      - ack_url
      - datastream
      - display_message
      - end
      - error_cause_label
      - error_resolution_label
      - extract
      - extraction_stage_label
      - id
      - job
      - job_id
      - mapping_entries_change_url
      - mapping_table_change_url
      - occurrences
      - retry_group_url
      - retry_url
      - start
      - target_column_change_url
      - transformation_config_url
      - type_label
      - unmapped_workspace_mappings_url
      - url
    DatastreamListItemPatchSchema:
      properties:
        enabled:
          anyOf:
          - type: boolean
          - type: 'null'
          title: Enabled
        pulling:
          anyOf:
          - $ref: '#/components/schemas/PullingPatchSchema'
          - type: 'null'
      title: DatastreamListItemPatchSchema
      type: object
    DatastreamListItemSchema:
      properties:
        id:
          format: uuid
          title: Id
          type: string
        name:
          title: Name
          type: string
        enabled:
          title: Enabled
          type: boolean
        pulling:
          $ref: '#/components/schemas/PullingSchema'
        workspace:
          $ref: '#/components/schemas/WorkspaceMinimalSchema'
        tags:
          items:
            $ref: '#/components/schemas/DatastreamTagMinimalSchema'
          title: Tags
          type: array
      required:
      - id
      - name
      - enabled
      - pulling
      - workspace
      - tags
      title: DatastreamListItemSchema
      type: object
    DatastreamMapping:
      type: object
      properties:
        schema_column:
          type: string
          maxLength: 200
        source_column:
          type: string
          maxLength: 200
        is_key_column:
          type: boolean
      required:
      - schema_column
      - source_column
    DatastreamSummarySchema:
      properties:
        id:
          format: uuid
          title: Id
          type: string
        name:
          title: Name
          type: string
        workspace:
          $ref: '#/components/schemas/WorkspaceMinimalSchema'
      required:
      - id
      - name
      - workspace
      title: DatastreamSummarySchema
      type: object
    DatastreamTagConflictSchema:
      properties:
        detail:
          title: Detail
          type: string
        tag:
          $ref: '#/components/schemas/DatastreamTagSchema'
          description: The tag that already has this name.
      required:
      - detail
      - tag
      title: DatastreamTagConflictSchema
      type: object
    DatastreamTagCreateSchema:
      properties:
        workspace_id:
          format: uuid
          title: Workspace Id
          type: string
        name:
          description: Up to 25 characters, unique within the workspace ignoring case.
            Leading and trailing spaces are dropped.
          title: Name
          type: string
      required:
      - workspace_id
      - name
      title: DatastreamTagCreateSchema
      type: object
    DatastreamTagCreatedSchema:
      properties:
        id:
          format: uuid
          title: Id
          type: string
        name:
          title: Name
          type: string
        workspace:
          $ref: '#/components/schemas/WorkspaceMinimalSchema'
        created:
          format: date-time
          title: Created
          type: string
        same_name_in_ancestor_workspaces:
          description: 'Workspaces above this one, among those the key can see, that
            already have a tag with this name. Those are separate tags: a datastream
            only carries tags of its own workspace.'
          items:
            $ref: '#/components/schemas/WorkspaceMinimalSchema'
          title: Same Name In Ancestor Workspaces
          type: array
      required:
      - id
      - name
      - workspace
      - created
      title: DatastreamTagCreatedSchema
      type: object
    DatastreamTagDeletedSchema:
      properties:
        id:
          format: uuid
          title: Id
          type: string
        removed_from_datastreams:
          description: How many datastreams carried the tag and no longer do.
          title: Removed From Datastreams
          type: integer
      required:
      - id
      - removed_from_datastreams
      title: DatastreamTagDeletedSchema
      type: object
    DatastreamTagMinimalSchema:
      properties:
        id:
          format: uuid
          title: Id
          type: string
        name:
          title: Name
          type: string
      required:
      - id
      - name
      title: DatastreamTagMinimalSchema
      type: object
    DatastreamTagSchema:
      properties:
        id:
          format: uuid
          title: Id
          type: string
        name:
          title: Name
          type: string
        workspace:
          $ref: '#/components/schemas/WorkspaceMinimalSchema'
        created:
          format: date-time
          title: Created
          type: string
      required:
      - id
      - name
      - workspace
      - created
      title: DatastreamTagSchema
      type: object
    DatastreamTagUpdateSchema:
      properties:
        name:
          description: The new name. Every datastream carrying the tag shows it. A
            change of case only is allowed.
          title: Name
          type: string
      required:
      - name
      title: DatastreamTagUpdateSchema
      type: object
    DatastreamTagsQueryResponseSchema:
      properties:
        items:
          items:
            $ref: '#/components/schemas/DatastreamTagsSchema'
          title: Items
          type: array
        count:
          title: Count
          type: integer
      required:
      - items
      - count
      title: DatastreamTagsQueryResponseSchema
      type: object
    DatastreamTagsQuerySchema:
      properties:
        datastream_ids:
          items:
            format: uuid
            type: string
          maxItems: 500
          minItems: 1
          title: Datastream Ids
          type: array
      required:
      - datastream_ids
      title: DatastreamTagsQuerySchema
      type: object
    DatastreamTagsSchema:
      properties:
        datastream_id:
          format: uuid
          title: Datastream Id
          type: string
        tags:
          items:
            $ref: '#/components/schemas/DatastreamTagMinimalSchema'
          title: Tags
          type: array
      required:
      - datastream_id
      - tags
      title: DatastreamTagsSchema
      type: object
    DatastreamTagsWriteSchema:
      properties:
        tags:
          description: Tag names or tag ids. A name is looked up in each datastream's
            own workspace, ignoring case. An id applies to the datastreams of the
            tag's own workspace and is ignored for the others. An id the key cannot
            see rejects the whole request with 400.
          items:
            type: string
          maxItems: 50
          minItems: 1
          title: Tags
          type: array
        datastream_ids:
          description: Datastreams to change. AND-ed with any filter in the query
            string.
          items:
            format: uuid
            type: string
          maxItems: 500
          title: Datastream Ids
          type: array
      required:
      - tags
      title: DatastreamTagsWriteSchema
      type: object
    DatastreamType:
      type: object
      properties:
        id:
          type: integer
          readOnly: true
        name:
          type: string
          readOnly: true
        slug:
          type: string
          readOnly: true
        canonical_name:
          type: string
          readOnly: true
        api_details:
          type: object
          additionalProperties: {}
          readOnly: true
        url:
          type: string
          format: uri
          readOnly: true
        categories:
          type: array
          items:
            type: string
          readOnly: true
        keywords:
          type: array
          items:
            type: string
          readOnly: true
        is_deprecated:
          type: boolean
          readOnly: true
        logo_url:
          type: string
          readOnly: true
        create_url:
          type: string
          readOnly: true
        datastreams:
          type: string
          format: uri
          readOnly: true
        connection_types:
          type: array
          items:
            type: string
          readOnly: true
        presets:
          type: string
          readOnly: true
      required:
      - api_details
      - canonical_name
      - categories
      - connection_types
      - create_url
      - datastreams
      - id
      - is_deprecated
      - keywords
      - logo_url
      - name
      - presets
      - slug
      - url
    DatatypeEnum:
      enum:
      - Live
      - Staging
      type: string
      description: |-
        * `Live` - Live
        * `Staging` - Staging
    DayType:
      enum:
      - week
      - month
      title: DayType
      type: string
    DeadlineSchema:
      properties:
        time:
          anyOf:
          - format: time
            type: string
          - type: 'null'
          description: 'Time of day the data should be delivered by, on the half hour
            (e.g. 17:00:00). UTC only: an offset is rejected rather than converted.
            Null means as soon as possible.'
          title: Time
      title: DeadlineSchema
      type: object
    DefaultSchemaMapping:
      type: object
      properties:
        id:
          type: integer
          readOnly: true
        source_column_name:
          type: string
          title: Source Field Name
          maxLength: 200
        source_content_type:
          type: integer
        target_column:
          allOf:
          - $ref: '#/components/schemas/SchemaColumnCompatibility'
          readOnly: true
        target_column_id:
          type: integer
          writeOnly: true
        is_key_column:
          type: boolean
      required:
      - id
      - source_column_name
      - source_content_type
      - target_column
      - target_column_id
    DeltaTypeEnum:
      enum:
      - 0
      - 1
      - 2
      - 3
      - 4
      - 6
      - 5
      - 7
      type: integer
      description: |-
        * `0` - minute(s)
        * `1` - hour(s)
        * `2` - day(s)
        * `3` - week(s)
        * `4` - month(s)
        * `6` - quarters(s)
        * `5` - year(s)
        * `7` - once
    DiffOperation:
      properties:
        op:
          enum:
          - equal
          - add
          - remove
          title: Op
          type: string
        value:
          title: Value
          type: string
      required:
      - op
      - value
      title: DiffOperation
      type: object
    DuplicateDefaultSchemaMapping:
      type: object
      properties:
        detail:
          type: string
      required:
      - detail
    EmailSubscription:
      type: object
      properties:
        id:
          type: integer
          readOnly: true
        user:
          type: integer
        enabled:
          type: boolean
        stacks:
          type: array
          items:
            type: integer
        datastreams:
          type: array
          items:
            type: integer
        notify_about_empty_extracts:
          type: boolean
        exclude_warnings:
          type: boolean
          description: Skips warning-level notifications for the "Datastream and Transformation
            Issues" and "Data Quality Issues" topics.
        topics:
          type: array
          items:
            $ref: '#/components/schemas/TopicsEnum'
        email:
          type: string
          format: email
          maxLength: 254
      required:
      - email
      - id
      - topics
    ErrorSchema:
      properties:
        detail:
          title: Detail
          type: string
      required:
      - detail
      title: ErrorSchema
      type: object
    EventsEnum:
      enum:
      - destination_sync.end
      - extract.no_data_collected
      - issue.created
      - integrations.dbt.DbtJobRun.end
      type: string
      description: |-
        * `destination_sync.end` - Destination Sync End
        * `extract.no_data_collected` - Extract No Data Collected
        * `issue.created` - Issue Created
        * `integrations.dbt.DbtJobRun.end` - Dbt Transformation End
    ExpectedDeliveryInput:
      additionalProperties: false
      properties:
        time:
          description: Expected delivery time of the day in UTC
          format: time
          title: Time
          type: string
        offset:
          description: Offset in days
          title: Offset
          type: integer
      required:
      - time
      - offset
      title: ExpectedDeliveryInput
      type: object
    ExpectedDeliverySchema:
      properties:
        time:
          description: Expected delivery time of the day in UTC
          format: time
          title: Time
          type: string
        offset:
          description: Offset in days
          title: Offset
          type: integer
      required:
      - time
      - offset
      title: ExpectedDeliverySchema
      type: object
    ExtractDownloadDispatch:
      type: object
      properties:
        task_id:
          type: string
        status_url:
          type: string
      required:
      - status_url
      - task_id
    ExtractDownloadStatus:
      type: object
      properties:
        state:
          type: string
        ready_url:
          type: string
        filename:
          type:
          - string
          - 'null'
        mimetype:
          type:
          - string
          - 'null'
        size_bytes:
          type:
          - integer
          - 'null'
        expires_at:
          type:
          - string
          - 'null'
        error:
          type: string
        error_message:
          type: string
      required:
      - state
    FetchJob:
      type: object
      properties:
        id:
          type: integer
          readOnly: true
        uuid:
          type: string
          format: uuid
          readOnly: true
        url:
          type: string
          format: uri
          readOnly: true
        job_start:
          type: string
          format: date-time
          readOnly: true
        job_end:
          type: string
          format: date-time
          readOnly: true
        progress:
          type: string
          readOnly: true
        state:
          type: string
          readOnly: true
        state_label:
          type: string
          readOnly: true
          description: Display label for the job state. "Retrying" while the job is
            waiting out a retry/backoff; otherwise the label matching `state`. `state`
            itself is unchanged while "Retrying". The signal is derived per job group,
            so while a group waits out a backoff every running job in it reports the
            label, regardless of which stage's task is being retried.
        state_color:
          type: string
          readOnly: true
        datastream:
          readOnly: true
          oneOf:
          - allOf:
            - $ref: '#/components/schemas/APIDatastreamBasic'
          - type: 'null'
        issues:
          type: array
          items:
            $ref: '#/components/schemas/CompactDatastreamExtractionLog'
          readOnly: true
        last_executed:
          type:
          - string
          - 'null'
          format: date-time
          readOnly: true
          description: 'When a job in this job group last started executing. Job-group
            level: it reflects any job in the group, not this job alone. Null until
            the first job in the group starts - fall back to `scheduled` to age a
            group that has not started yet. The write is debounced by 5 minutes, so
            the value may lag real activity by up to that much - do not build staleness
            alarms with a tighter threshold.'
        user:
          type:
          - string
          - 'null'
          readOnly: true
        range_start:
          type: string
          format: date-time
          readOnly: true
        range_end:
          type: string
          format: date-time
          readOnly: true
        scheduled:
          type: string
          format: date-time
          readOnly: true
        manual:
          type: string
          readOnly: true
      required:
      - datastream
      - id
      - issues
      - job_end
      - job_start
      - last_executed
      - manual
      - progress
      - range_end
      - range_start
      - scheduled
      - state
      - state_color
      - state_label
      - url
      - user
      - uuid
    FetchJobTyped:
      allOf:
      - type: object
        properties:
          type:
            type: string
        required:
        - type
      - $ref: '#/components/schemas/FetchJob'
    FetchSchedule:
      type: object
      properties:
        id:
          type: integer
          readOnly: true
        cron_preset:
          $ref: '#/components/schemas/CronPresetEnum'
        cron_type:
          type: string
          description: Defaults to 'day' when omitted on a schedule entry.
        cron_interval:
          type: integer
          maximum: 2147483647
          minimum: 0
          title: Run every
        cron_start_of_day:
          type: string
          format: time
          title: Time of day
          description: At what time the day starts.
        cron_interval_start:
          type: integer
          maximum: 32767
          minimum: 0
        time_range_preset:
          allOf:
          - $ref: '#/components/schemas/FetchScheduleTimeRangePresetEnum'
          description: |-
            Select one of the time range presets.

            * `0` - Custom Time Range
            * `13` - Yesterday
            * `10` - Today
            * `11` - Current Week
            * `6` - Current Month
            * `7` - Previous Month
            * `17` - Last Quarter
            * `18` - Last 2 Days
            * `16` - Last 3 Days
            * `23` - Last 4 Days
            * `19` - Last 5 Days
            * `24` - Last 6 Days
            * `4` - Last 7 Days
            * `25` - Last 8 Days
            * `26` - Last 9 Days
            * `22` - Last 10 Days
            * `14` - Last 14 Days
            * `15` - Last 28 Days
            * `2` - Last 30 Days
            * `20` - Last 40 Days
            * `21` - Last 60 Days
            * `5` - Last 90 Days
            * `31` - Last 120 Days
            * `28` - Last 180 Days
            * `3` - Last 365 Days
            * `27` - Last 730 Days
            * `8` - Previous Week
            * `9` - Previous Year
            * `29` - Current Quarter
            * `12` - Current Year
            * `30` - Last Hour
            * `1000` - Lifetime
            * `50` - Tomorrow
            * `51` - Next 2 Days
            * `52` - Next 7 Days
            * `53` - Next 30 Days
            * `54` - Current Week (incl Future Days)
            * `55` - Next Week
            * `56` - Current Month (incl Future Days)
            * `57` - Next Month
            * `58` - Current Year (incl Future Days)
            * `59` - Next Year
          minimum: 0
          maximum: 32767
        time_range_preset_label:
          type: string
          readOnly: true
        delta_type:
          allOf:
          - $ref: '#/components/schemas/DeltaTypeEnum'
          minimum: -32768
          maximum: 32767
        delta_interval:
          type: integer
          maximum: 2147483647
          minimum: 0
          title: Time
        delta_start_of_day:
          type: string
          format: time
          title: Start of day
          description: At what time the day starts.
        delta_interval_start:
          type: integer
          maximum: 32767
          minimum: 0
        fixed_start:
          type:
          - string
          - 'null'
          format: date
          title: Start
          description: First day to fetch.
        fixed_end:
          type:
          - string
          - 'null'
          format: date
          title: End
          description: Last day to fetch.
        offset_days:
          type: integer
          maximum: 32767
          minimum: -32768
          title: Offset (days)
          description: Number of days to shift the fetched date range into the past.
        not_before_date:
          type:
          - string
          - 'null'
          format: date
          title: Not before
          description: Do not fetch before this date.
        not_before_time:
          type:
          - string
          - 'null'
          format: time
          title: Not before
          description: Do not fetch before this time.
      required:
      - id
      - time_range_preset_label
    FetchScheduleTimeRangePresetEnum:
      enum:
      - 0
      - 13
      - 10
      - 11
      - 6
      - 7
      - 17
      - 18
      - 16
      - 23
      - 19
      - 24
      - 4
      - 25
      - 26
      - 22
      - 14
      - 15
      - 2
      - 20
      - 21
      - 5
      - 31
      - 28
      - 3
      - 27
      - 8
      - 9
      - 29
      - 12
      - 30
      - 1000
      - 50
      - 51
      - 52
      - 53
      - 54
      - 55
      - 56
      - 57
      - 58
      - 59
      type: integer
      description: |-
        * `0` - Custom Time Range
        * `13` - Yesterday
        * `10` - Today
        * `11` - Current Week
        * `6` - Current Month
        * `7` - Previous Month
        * `17` - Last Quarter
        * `18` - Last 2 Days
        * `16` - Last 3 Days
        * `23` - Last 4 Days
        * `19` - Last 5 Days
        * `24` - Last 6 Days
        * `4` - Last 7 Days
        * `25` - Last 8 Days
        * `26` - Last 9 Days
        * `22` - Last 10 Days
        * `14` - Last 14 Days
        * `15` - Last 28 Days
        * `2` - Last 30 Days
        * `20` - Last 40 Days
        * `21` - Last 60 Days
        * `5` - Last 90 Days
        * `31` - Last 120 Days
        * `28` - Last 180 Days
        * `3` - Last 365 Days
        * `27` - Last 730 Days
        * `8` - Previous Week
        * `9` - Previous Year
        * `29` - Current Quarter
        * `12` - Current Year
        * `30` - Last Hour
        * `1000` - Lifetime
        * `50` - Tomorrow
        * `51` - Next 2 Days
        * `52` - Next 7 Days
        * `53` - Next 30 Days
        * `54` - Current Week (incl Future Days)
        * `55` - Next Week
        * `56` - Current Month (incl Future Days)
        * `57` - Next Month
        * `58` - Current Year (incl Future Days)
        * `59` - Next Year
    FieldInfoSchema:
      properties:
        depends_on:
          items:
            type: string
          title: Depends On
          type: array
      required:
      - depends_on
      title: FieldInfoSchema
      type: object
    Frequency:
      additionalProperties: false
      description: 'How often a range is (re-)pulled, e.g. ``{value: 40, unit: day}``.'
      properties:
        value:
          minimum: 1
          title: Value
          type: integer
        unit:
          $ref: '#/components/schemas/TimeUnit'
      required:
      - value
      - unit
      title: Frequency
      type: object
    FrequencyLabel:
      enum:
      - daily
      - weekly
      - monthly
      title: FrequencyLabel
      type: string
    InnerLogicalConjunctionSchema:
      additionalProperties: false
      properties:
        key:
          format: uuid
          title: Key
          type: string
        operation:
          const: and
          title: Operation
          type: string
        conditions:
          items:
            $ref: '#/components/schemas/ConditionalExpressionSchema'
          minItems: 1
          title: Conditions
          type: array
      required:
      - key
      - operation
      - conditions
      title: InnerLogicalConjunctionSchema
      type: object
    InnerLogicalDisjunctionSchema:
      additionalProperties: false
      properties:
        key:
          format: uuid
          title: Key
          type: string
        operation:
          const: or
          title: Operation
          type: string
        conditions:
          items:
            $ref: '#/components/schemas/ConditionalExpressionSchema'
          minItems: 1
          title: Conditions
          type: array
      required:
      - key
      - operation
      - conditions
      title: InnerLogicalDisjunctionSchema
      type: object
    JobPolymorphic:
      oneOf:
      - $ref: '#/components/schemas/BaseJobTyped'
      - $ref: '#/components/schemas/FetchJobTyped'
      discriminator:
        propertyName: type
        mapping:
          Transfer: '#/components/schemas/FetchJobTyped'
    KeyIntrospectionSchema:
      properties:
        active:
          title: Active
          type: boolean
        scopes:
          anyOf:
          - items:
              type: string
            type: array
          - type: 'null'
          title: Scopes
        workspace_id:
          anyOf:
          - type: string
          - type: 'null'
          title: Workspace Id
        user_id:
          anyOf:
          - type: string
          - type: 'null'
          title: User Id
        expires_at:
          anyOf:
          - format: date-time
            type: string
          - type: 'null'
          title: Expires At
      required:
      - active
      title: KeyIntrospectionSchema
      type: object
    ManagementKeyRefreshResponseSchema:
      properties:
        api_key:
          title: Api Key
          type: string
      required:
      - api_key
      title: ManagementKeyRefreshResponseSchema
      type: object
    MappingEntry:
      type: object
      properties:
        id:
          type: integer
          readOnly: true
        table_id:
          type: integer
          writeOnly: true
        match:
          type: string
          maxLength: 750
        value:
          type: string
          maxLength: 1000
      required:
      - id
      - match
      - table_id
    MappingTable:
      type: object
      properties:
        id:
          type: integer
          readOnly: true
        name:
          type: string
          description: A human readable name.
          maxLength: 500
        created:
          type: string
          format: date-time
          readOnly: true
        entries:
          type: string
          format: uri
          readOnly: true
        url:
          type: string
          format: uri
          readOnly: true
      required:
      - created
      - entries
      - id
      - name
      - url
    MappingTablePartialUpdate:
      type: object
      properties:
        id:
          type: integer
          readOnly: true
        name:
          type: string
          description: A human readable name.
          maxLength: 500
        description:
          type: string
          maxLength: 1000
      required:
      - id
      - name
    MeasureEnum:
      enum:
      - SUM
      - AVG
      - COUNT
      - MIN
      - MAX
      - NONAGG
      description: |-
        * `SUM` - Sum
        * `AVG` - Average
        * `COUNT` - Count
        * `MIN` - Min
        * `MAX` - Max
        * `NONAGG` - None (Metric)
        * `None` - None (Dimension)
    MicrosoftTeamsSubscription:
      type: object
      properties:
        id:
          type: integer
          readOnly: true
        user:
          type: integer
        enabled:
          type: boolean
        stacks:
          type: array
          items:
            type: integer
        datastreams:
          type: array
          items:
            type: integer
        notify_about_empty_extracts:
          type: boolean
        exclude_warnings:
          type: boolean
          description: Skips warning-level notifications for the "Datastream and Transformation
            Issues" and "Data Quality Issues" topics.
        webhook_url:
          type: string
          format: uri
          maxLength: 400
      required:
      - id
      - webhook_url
    MonitorCreateSchema:
      additionalProperties: false
      properties:
        name:
          maxLength: 200
          title: Name
          type: string
        workspace_id:
          format: uuid
          title: Workspace Id
          type: string
        severity:
          $ref: '#/components/schemas/SeverityLabel'
        datastream_ids:
          items:
            format: uuid
            type: string
          maxItems: 50
          title: Datastream Ids
          type: array
        has_target_columns:
          default: false
          title: Has Target Columns
          type: boolean
        blocks:
          $ref: '#/components/schemas/BlocksSchema'
      required:
      - name
      - workspace_id
      - severity
      - blocks
      title: MonitorCreateSchema
      type: object
    MonitorDetailSchema:
      properties:
        id:
          format: uuid
          title: Id
          type: string
        name:
          title: Name
          type: string
        severity:
          $ref: '#/components/schemas/SeverityLabel'
        workspace:
          $ref: '#/components/schemas/WorkspaceMinimalSchema'
        datastream_ids:
          items:
            format: uuid
            type: string
          title: Datastream Ids
          type: array
        has_target_columns:
          title: Has Target Columns
          type: boolean
        blocks:
          $ref: '#/components/schemas/BlocksSchema'
      required:
      - id
      - name
      - severity
      - workspace
      - datastream_ids
      - has_target_columns
      - blocks
      title: MonitorDetailSchema
      type: object
    MonitorPatchSchema:
      additionalProperties: false
      description: Omitted fields stay unchanged; an explicit ``null`` is rejected.
      properties:
        name:
          maxLength: 200
          title: Name
          type: string
        workspace_id:
          format: uuid
          title: Workspace Id
          type: string
        severity:
          allOf:
          - $ref: '#/components/schemas/SeverityLabel'
        datastream_ids:
          items:
            format: uuid
            type: string
          maxItems: 50
          title: Datastream Ids
          type: array
        has_target_columns:
          title: Has Target Columns
          type: boolean
        blocks:
          allOf:
          - $ref: '#/components/schemas/BlocksSchema'
      title: MonitorPatchSchema
      type: object
    MonitorSourceColumnSchema:
      properties:
        name:
          title: Name
          type: string
        type:
          $ref: '#/components/schemas/DataType'
        type_id:
          $ref: '#/components/schemas/DataTypeId'
      required:
      - name
      - type
      - type_id
      title: MonitorSourceColumnSchema
      type: object
    MonitorSummarySchema:
      properties:
        id:
          format: uuid
          title: Id
          type: string
        name:
          title: Name
          type: string
        severity:
          $ref: '#/components/schemas/SeverityLabel'
        workspace:
          $ref: '#/components/schemas/WorkspaceMinimalSchema'
      required:
      - id
      - name
      - severity
      - workspace
      title: MonitorSummarySchema
      type: object
    MonitorTargetColumnSchema:
      properties:
        id:
          format: uuid
          title: Id
          type: string
        name:
          title: Name
          type: string
        type:
          $ref: '#/components/schemas/DataType'
        type_id:
          $ref: '#/components/schemas/DataTypeId'
        usage:
          $ref: '#/components/schemas/TargetColumnUsageLabel'
      required:
      - id
      - name
      - type
      - type_id
      - usage
      title: MonitorTargetColumnSchema
      type: object
    NullEnum:
      enum:
      - null
    'On':
      additionalProperties: false
      description: |-
        The day-of-week (ISO 1-7) or day-of-month (1-28) a weekly/monthly frequency aligns to.

        Day-of-month is capped at 28 — the highest day number present in every month — so a monthly
        alignment always fires (a day 29/30/31 would be skipped in shorter months).
      properties:
        day:
          maximum: 28
          minimum: 1
          title: Day
          type: integer
        day_type:
          $ref: '#/components/schemas/DayType'
      required:
      - day
      - day_type
      title: 'On'
      type: object
    OperatorSchema:
      properties:
        value:
          title: Value
          type: integer
        label:
          title: Label
          type: string
      required:
      - value
      - label
      title: OperatorSchema
      type: object
    OperatorType:
      enum:
      - 1
      - 2
      - 3
      - 4
      - 5
      - 6
      - 7
      - 8
      - 10
      - 11
      - 12
      - 13
      - 14
      - 15
      - 16
      - 17
      - 18
      - 19
      - 20
      - 21
      - 22
      title: OperatorType
      type: integer
    OuterLogicalConjunctionSchema:
      additionalProperties: false
      properties:
        key:
          format: uuid
          title: Key
          type: string
        operation:
          const: and
          title: Operation
          type: string
        conditions:
          items:
            $ref: '#/components/schemas/InnerLogicalDisjunctionSchema'
          minItems: 1
          title: Conditions
          type: array
      required:
      - key
      - operation
      - conditions
      title: OuterLogicalConjunctionSchema
      type: object
    OuterLogicalDisjunctionSchema:
      additionalProperties: false
      properties:
        key:
          format: uuid
          title: Key
          type: string
        operation:
          const: or
          title: Operation
          type: string
        conditions:
          items:
            $ref: '#/components/schemas/InnerLogicalConjunctionSchema'
          minItems: 1
          title: Conditions
          type: array
      required:
      - key
      - operation
      - conditions
      title: OuterLogicalDisjunctionSchema
      type: object
    PagedBindingResponseSchema:
      properties:
        items:
          items:
            $ref: '#/components/schemas/BindingResponseSchema'
          title: Items
          type: array
        count:
          title: Count
          type: integer
      required:
      - items
      - count
      title: PagedBindingResponseSchema
      type: object
    PagedConnectorFieldHierarchySchema:
      properties:
        items:
          items:
            $ref: '#/components/schemas/ConnectorFieldHierarchySchema'
          title: Items
          type: array
        count:
          title: Count
          type: integer
      required:
      - items
      - count
      title: PagedConnectorFieldHierarchySchema
      type: object
    PagedDatastreamListItemSchema:
      properties:
        items:
          items:
            $ref: '#/components/schemas/DatastreamListItemSchema'
          title: Items
          type: array
        count:
          title: Count
          type: integer
      required:
      - items
      - count
      title: PagedDatastreamListItemSchema
      type: object
    PagedDatastreamSummarySchema:
      properties:
        items:
          items:
            $ref: '#/components/schemas/DatastreamSummarySchema'
          title: Items
          type: array
        count:
          title: Count
          type: integer
      required:
      - items
      - count
      title: PagedDatastreamSummarySchema
      type: object
    PagedDatastreamTagSchema:
      properties:
        items:
          items:
            $ref: '#/components/schemas/DatastreamTagSchema'
          title: Items
          type: array
        count:
          title: Count
          type: integer
      required:
      - items
      - count
      title: PagedDatastreamTagSchema
      type: object
    PagedMonitorSummarySchema:
      properties:
        items:
          items:
            $ref: '#/components/schemas/MonitorSummarySchema'
          title: Items
          type: array
        count:
          title: Count
          type: integer
      required:
      - items
      - count
      title: PagedMonitorSummarySchema
      type: object
    PagedUniversalMonitorListItemSchema:
      properties:
        items:
          items:
            discriminator:
              mapping:
                row-duplicates: '#/components/schemas/RowDuplicatesMonitorListItemSchema'
                schema_consistency: '#/components/schemas/SchemaConsistencyMonitorListItemSchema'
                timeliness: '#/components/schemas/TimelinessMonitorListItemSchema'
                volumes: '#/components/schemas/VolumesMonitorListItemSchema'
              propertyName: type
            oneOf:
            - $ref: '#/components/schemas/RowDuplicatesMonitorListItemSchema'
            - $ref: '#/components/schemas/VolumesMonitorListItemSchema'
            - $ref: '#/components/schemas/TimelinessMonitorListItemSchema'
            - $ref: '#/components/schemas/SchemaConsistencyMonitorListItemSchema'
          title: Items
          type: array
        count:
          title: Count
          type: integer
      required:
      - items
      - count
      title: PagedUniversalMonitorListItemSchema
      type: object
    PagedUsageItemSchema:
      properties:
        items:
          items:
            $ref: '#/components/schemas/UsageItemSchema'
          title: Items
          type: array
        count:
          title: Count
          type: integer
      required:
      - items
      - count
      title: PagedUsageItemSchema
      type: object
    PagedUserResponseSchema:
      properties:
        items:
          items:
            $ref: '#/components/schemas/UserResponseSchema'
          title: Items
          type: array
        count:
          title: Count
          type: integer
      required:
      - items
      - count
      title: PagedUserResponseSchema
      type: object
    PagedWorkspaceResponseSchema:
      properties:
        items:
          items:
            $ref: '#/components/schemas/WorkspaceResponseSchema'
          title: Items
          type: array
        count:
          title: Count
          type: integer
      required:
      - items
      - count
      title: PagedWorkspaceResponseSchema
      type: object
    PaginatedAPIDatastreamBasicList:
      type: object
      required:
      - count
      - results
      properties:
        count:
          type: integer
          example: 123
        next:
          type:
          - string
          - 'null'
          format: uri
          example: http://api.example.org/accounts/?page=4
        previous:
          type:
          - string
          - 'null'
          format: uri
          example: http://api.example.org/accounts/?page=2
        results:
          type: array
          items:
            $ref: '#/components/schemas/APIDatastreamBasic'
    PaginatedAuthorizationListList:
      type: object
      required:
      - count
      - results
      properties:
        count:
          type: integer
          example: 123
        next:
          type:
          - string
          - 'null'
          format: uri
          example: http://api.example.org/accounts/?page=4
        previous:
          type:
          - string
          - 'null'
          format: uri
          example: http://api.example.org/accounts/?page=2
        results:
          type: array
          items:
            $ref: '#/components/schemas/AuthorizationList'
    PaginatedBaseTargetTypeList:
      type: object
      required:
      - count
      - results
      properties:
        count:
          type: integer
          example: 123
        next:
          type:
          - string
          - 'null'
          format: uri
          example: http://api.example.org/accounts/?page=4
        previous:
          type:
          - string
          - 'null'
          format: uri
          example: http://api.example.org/accounts/?page=2
        results:
          type: array
          items:
            $ref: '#/components/schemas/BaseTargetType'
    PaginatedConnectionTypeList:
      type: object
      required:
      - count
      - results
      properties:
        count:
          type: integer
          example: 123
        next:
          type:
          - string
          - 'null'
          format: uri
          example: http://api.example.org/accounts/?page=4
        previous:
          type:
          - string
          - 'null'
          format: uri
          example: http://api.example.org/accounts/?page=2
        results:
          type: array
          items:
            $ref: '#/components/schemas/ConnectionType'
    PaginatedDatalakeList:
      type: object
      required:
      - count
      - results
      properties:
        count:
          type: integer
          example: 123
        next:
          type:
          - string
          - 'null'
          format: uri
          example: http://api.example.org/accounts/?page=4
        previous:
          type:
          - string
          - 'null'
          format: uri
          example: http://api.example.org/accounts/?page=2
        results:
          type: array
          items:
            $ref: '#/components/schemas/Datalake'
    PaginatedDatastreamColumnInfoList:
      type: object
      required:
      - count
      - results
      properties:
        count:
          type: integer
          example: 123
        next:
          type:
          - string
          - 'null'
          format: uri
          example: http://api.example.org/accounts/?page=4
        previous:
          type:
          - string
          - 'null'
          format: uri
          example: http://api.example.org/accounts/?page=2
        results:
          type: array
          items:
            $ref: '#/components/schemas/DatastreamColumnInfo'
    PaginatedDatastreamExtractList:
      type: object
      required:
      - count
      - results
      properties:
        count:
          type: integer
          example: 123
        next:
          type:
          - string
          - 'null'
          format: uri
          example: http://api.example.org/accounts/?page=4
        previous:
          type:
          - string
          - 'null'
          format: uri
          example: http://api.example.org/accounts/?page=2
        results:
          type: array
          items:
            $ref: '#/components/schemas/DatastreamExtract'
    PaginatedDatastreamExtractionLogList:
      type: object
      required:
      - count
      - results
      properties:
        count:
          type: integer
          example: 123
        next:
          type:
          - string
          - 'null'
          format: uri
          example: http://api.example.org/accounts/?page=4
        previous:
          type:
          - string
          - 'null'
          format: uri
          example: http://api.example.org/accounts/?page=2
        results:
          type: array
          items:
            $ref: '#/components/schemas/DatastreamExtractionLog'
    PaginatedDatastreamTypeList:
      type: object
      required:
      - count
      - results
      properties:
        count:
          type: integer
          example: 123
        next:
          type:
          - string
          - 'null'
          format: uri
          example: http://api.example.org/accounts/?page=4
        previous:
          type:
          - string
          - 'null'
          format: uri
          example: http://api.example.org/accounts/?page=2
        results:
          type: array
          items:
            $ref: '#/components/schemas/DatastreamType'
    PaginatedDefaultSchemaMappingList:
      type: object
      required:
      - count
      - results
      properties:
        count:
          type: integer
          example: 123
        next:
          type:
          - string
          - 'null'
          format: uri
          example: http://api.example.org/accounts/?page=4
        previous:
          type:
          - string
          - 'null'
          format: uri
          example: http://api.example.org/accounts/?page=2
        results:
          type: array
          items:
            $ref: '#/components/schemas/DefaultSchemaMapping'
    PaginatedEmailSubscriptionList:
      type: object
      required:
      - count
      - results
      properties:
        count:
          type: integer
          example: 123
        next:
          type:
          - string
          - 'null'
          format: uri
          example: http://api.example.org/accounts/?page=4
        previous:
          type:
          - string
          - 'null'
          format: uri
          example: http://api.example.org/accounts/?page=2
        results:
          type: array
          items:
            $ref: '#/components/schemas/EmailSubscription'
    PaginatedFetchJobList:
      type: object
      required:
      - count
      - results
      properties:
        count:
          type: integer
          example: 123
        next:
          type:
          - string
          - 'null'
          format: uri
          example: http://api.example.org/accounts/?page=4
        previous:
          type:
          - string
          - 'null'
          format: uri
          example: http://api.example.org/accounts/?page=2
        results:
          type: array
          items:
            $ref: '#/components/schemas/FetchJob'
    PaginatedFetchScheduleList:
      type: object
      required:
      - count
      - results
      properties:
        count:
          type: integer
          example: 123
        next:
          type:
          - string
          - 'null'
          format: uri
          example: http://api.example.org/accounts/?page=4
        previous:
          type:
          - string
          - 'null'
          format: uri
          example: http://api.example.org/accounts/?page=2
        results:
          type: array
          items:
            $ref: '#/components/schemas/FetchSchedule'
    PaginatedJobPolymorphicList:
      type: object
      required:
      - count
      - results
      properties:
        count:
          type: integer
          example: 123
        next:
          type:
          - string
          - 'null'
          format: uri
          example: http://api.example.org/accounts/?page=4
        previous:
          type:
          - string
          - 'null'
          format: uri
          example: http://api.example.org/accounts/?page=2
        results:
          type: array
          items:
            $ref: '#/components/schemas/JobPolymorphic'
    PaginatedMappingEntryList:
      type: object
      required:
      - count
      - results
      properties:
        count:
          type: integer
          example: 123
        next:
          type:
          - string
          - 'null'
          format: uri
          example: http://api.example.org/accounts/?page=4
        previous:
          type:
          - string
          - 'null'
          format: uri
          example: http://api.example.org/accounts/?page=2
        results:
          type: array
          items:
            $ref: '#/components/schemas/MappingEntry'
    PaginatedMappingTableList:
      type: object
      required:
      - count
      - results
      properties:
        count:
          type: integer
          example: 123
        next:
          type:
          - string
          - 'null'
          format: uri
          example: http://api.example.org/accounts/?page=4
        previous:
          type:
          - string
          - 'null'
          format: uri
          example: http://api.example.org/accounts/?page=2
        results:
          type: array
          items:
            $ref: '#/components/schemas/MappingTable'
    PaginatedMicrosoftTeamsSubscriptionList:
      type: object
      required:
      - count
      - results
      properties:
        count:
          type: integer
          example: 123
        next:
          type:
          - string
          - 'null'
          format: uri
          example: http://api.example.org/accounts/?page=4
        previous:
          type:
          - string
          - 'null'
          format: uri
          example: http://api.example.org/accounts/?page=2
        results:
          type: array
          items:
            $ref: '#/components/schemas/MicrosoftTeamsSubscription'
    PaginatedSchemaColumnCompatibilityList:
      type: object
      required:
      - count
      - results
      properties:
        count:
          type: integer
          example: 123
        next:
          type:
          - string
          - 'null'
          format: uri
          example: http://api.example.org/accounts/?page=4
        previous:
          type:
          - string
          - 'null'
          format: uri
          example: http://api.example.org/accounts/?page=2
        results:
          type: array
          items:
            $ref: '#/components/schemas/SchemaColumnCompatibility'
    PaginatedSlackSubscriptionList:
      type: object
      required:
      - count
      - results
      properties:
        count:
          type: integer
          example: 123
        next:
          type:
          - string
          - 'null'
          format: uri
          example: http://api.example.org/accounts/?page=4
        previous:
          type:
          - string
          - 'null'
          format: uri
          example: http://api.example.org/accounts/?page=2
        results:
          type: array
          items:
            $ref: '#/components/schemas/SlackSubscription'
    PaginatedStackList:
      type: object
      required:
      - count
      - results
      properties:
        count:
          type: integer
          example: 123
        next:
          type:
          - string
          - 'null'
          format: uri
          example: http://api.example.org/accounts/?page=4
        previous:
          type:
          - string
          - 'null'
          format: uri
          example: http://api.example.org/accounts/?page=2
        results:
          type: array
          items:
            $ref: '#/components/schemas/Stack'
    PaginatedTransformerBasicList:
      type: object
      required:
      - count
      - results
      properties:
        count:
          type: integer
          example: 123
        next:
          type:
          - string
          - 'null'
          format: uri
          example: http://api.example.org/accounts/?page=4
        previous:
          type:
          - string
          - 'null'
          format: uri
          example: http://api.example.org/accounts/?page=2
        results:
          type: array
          items:
            $ref: '#/components/schemas/TransformerBasic'
    PaginatedValueTableList:
      type: object
      required:
      - count
      - results
      properties:
        count:
          type: integer
          example: 123
        next:
          type:
          - string
          - 'null'
          format: uri
          example: http://api.example.org/accounts/?page=4
        previous:
          type:
          - string
          - 'null'
          format: uri
          example: http://api.example.org/accounts/?page=2
        results:
          type: array
          items:
            $ref: '#/components/schemas/ValueTable'
    PaginatedWebhookList:
      type: object
      required:
      - count
      - results
      properties:
        count:
          type: integer
          example: 123
        next:
          type:
          - string
          - 'null'
          format: uri
          example: http://api.example.org/accounts/?page=4
        previous:
          type:
          - string
          - 'null'
          format: uri
          example: http://api.example.org/accounts/?page=2
        results:
          type: array
          items:
            $ref: '#/components/schemas/Webhook'
    PassiveTokenUpdate:
      type: object
      properties:
        time_range_preset:
          $ref: '#/components/schemas/PassiveTokenUpdateTimeRangePresetEnum'
        time_range_start:
          type:
          - string
          - 'null'
          format: date-time
        time_range_end:
          type:
          - string
          - 'null'
          format: date-time
      required:
      - time_range_preset
    PassiveTokenUpdateTimeRangePresetEnum:
      enum:
      - 0
      - 13
      - 10
      - 11
      - 6
      - 7
      - 17
      - 18
      - 16
      - 23
      - 19
      - 24
      - 4
      - 25
      - 26
      - 22
      - 14
      - 15
      - 2
      - 20
      - 21
      - 5
      - 31
      - 28
      - 3
      - 27
      - 8
      - 9
      - 29
      - 12
      - 30
      - 1000
      - 50
      - 51
      - 52
      - 53
      - 54
      - 55
      - 56
      - 57
      - 58
      - 59
      type: integer
      description: |-
        * `0` - 0
        * `13` - 13
        * `10` - 10
        * `11` - 11
        * `6` - 6
        * `7` - 7
        * `17` - 17
        * `18` - 18
        * `16` - 16
        * `23` - 23
        * `19` - 19
        * `24` - 24
        * `4` - 4
        * `25` - 25
        * `26` - 26
        * `22` - 22
        * `14` - 14
        * `15` - 15
        * `2` - 2
        * `20` - 20
        * `21` - 21
        * `5` - 5
        * `31` - 31
        * `28` - 28
        * `3` - 3
        * `27` - 27
        * `8` - 8
        * `9` - 9
        * `29` - 29
        * `12` - 12
        * `30` - 30
        * `1000` - 1000
        * `50` - 50
        * `51` - 51
        * `52` - 52
        * `53` - 53
        * `54` - 54
        * `55` - 55
        * `56` - 56
        * `57` - 57
        * `58` - 58
        * `59` - 59
    PatchedAPIDatastreamFull:
      type: object
      description: |-
        Enforce the cross-field retention rule shared by every datastream write surface.

        `retention_number` is mandatory whenever `retention_type` is not RETAIN_ALL.

        Same rule as `core.forms.DatastreamRetentionForm.clean()` (admin/UI form), but
        applied on both create AND update. The form only enforces it on update; via
        MAPI we apply it unconditionally so we never persist an inconsistent
        (retention_type, retention_number) pair.

        Missing values are resolved from `self.instance` so partial (PATCH) updates are
        validated against the persisted state. When neither retention field is in the
        payload we skip the rule entirely, so an unrelated PATCH on a legacy datastream
        with a pre-existing inconsistent (retention_type, retention_number) pair does
        not 400 on a field the client never touched.
      properties:
        id:
          type: integer
          readOnly: true
        uuid:
          type: string
          format: uuid
          readOnly: true
        url:
          type: string
          format: uri
          readOnly: true
        stack:
          allOf:
          - $ref: '#/components/schemas/StackBasic'
          readOnly: true
        stack_id:
          type: integer
          writeOnly: true
        auth:
          type:
          - integer
          - 'null'
          title: Authorization
          description: Which authorization the datastream uses.
        auth_change_url:
          type: string
          readOnly: true
        app_label:
          type: string
          readOnly: true
        name:
          type: string
          description: A human readable name. Numbers and special characters are supported.
          maxLength: 150
        slug:
          type: string
          readOnly: true
        description:
          type: string
          maxLength: 1000
        enabled:
          type: boolean
          title: Scheduled
          description: Streams that are not scheduled will not be fetched automatically.
        frequency:
          type: string
          readOnly: true
        next_run:
          type: string
          format: date-time
          readOnly: true
        last_fetch:
          type: string
          format: date-time
          readOnly: true
        absolute_url:
          type: string
          readOnly: true
        change_url:
          type: string
          readOnly: true
        extracts_url:
          type: string
          readOnly: true
        fetch_url:
          type: string
          readOnly: true
        overview_url:
          type: string
          readOnly: true
        schema_mapping_url:
          type: string
          readOnly: true
        issues_url:
          type: string
          readOnly: true
        transformers:
          type: array
          items:
            $ref: '#/components/schemas/TransformerBasic'
          readOnly: true
        schedules:
          type: array
          items:
            $ref: '#/components/schemas/FetchSchedule'
          readOnly: true
        transformer_ids:
          type: array
          items:
            type: integer
            writeOnly: true
          writeOnly: true
        datastream_type_id:
          type: integer
          readOnly: true
        datastream_type_name:
          type: string
          readOnly: true
        datastream_type_slug:
          type: string
          readOnly: true
        datatype:
          allOf:
          - $ref: '#/components/schemas/DatatypeEnum'
          description: |-
            Projection of destination state: reads Live if any destination is enabled, otherwise Staging. Writing 'Live' enables all destinations and 'Staging' disables them.

            * `Live` - Live
            * `Staging` - Staging
        actions:
          type: string
          readOnly: true
        overwrite_key_columns:
          type: boolean
          title: Key Columns
          description: Overwrite rows according to Key defined in Data Mapping.
        manage_extract_names:
          type: boolean
          title: Extract Filenames
          description: Split by selected date column and name extracts with pre-defined
            pattern to consolidate data.
        extract_name_keys:
          type:
          - string
          - 'null'
          title: Key Date Column
          maxLength: 128
        retention_type:
          allOf:
          - $ref: '#/components/schemas/RetentionTypeEnum'
          minimum: 0
          maximum: 32767
        retention_number:
          type:
          - integer
          - 'null'
          maximum: 32767
          minimum: 0
          title: Retention Number (N)
          description: The amount (N) of fetches/extracts/days to retain (raw extracts
            are not counted). Must be an integer greater than or equal to zero.
        remove_if_empty:
          type: boolean
          description: When enabled, fetches resulting in only empty rows ("empty
            extracts") will be silently discarded.
        skip_empty_rows:
          type: boolean
          description: When enabled, empty data rows in fetches will be silently ignored.
        prune_instantly:
          type: boolean
          description: When enabled, deleted files will not be kept for the configured
            grace period.
        overwrite_datastream:
          type: boolean
          title: Datastream
          description: Delete/Drop all existing rows (created by this datastream)
            in the destination before inserting a new import.
        overwrite_filename:
          type: boolean
          title: Filename
          description: Overwrite rows from same extract file.
        logo_url:
          type: string
          readOnly: true
        extracts_stream_url:
          type: string
          readOnly: true
        active_destination:
          type: string
          readOnly: true
        supports_passive_destinations:
          type: boolean
          readOnly: true
        passive_destinations:
          type: string
          readOnly: true
        columns:
          type: string
          format: uri
          readOnly: true
        supports_extended_intervals:
          type: string
          readOnly: true
        updated:
          type: string
          format: date-time
          readOnly: true
        created:
          type: string
          format: date-time
          readOnly: true
        creator:
          type:
          - string
          - 'null'
          readOnly: true
        has_schema_mapping:
          type: boolean
          readOnly: true
        is_insights_mediaplan:
          type: boolean
          title: Mediaplan
          description: If checked, generated extracts will be treated as Insights
            mediaplans.
        cron_type:
          type: string
        cron_interval:
          type: integer
          minimum: 0
        cron_start_of_day:
          type: string
          format: time
        cron_interval_start:
          type: integer
          minimum: 0
        time_range_preset:
          $ref: '#/components/schemas/FetchScheduleTimeRangePresetEnum'
        delta_interval:
          type: integer
          minimum: 0
        delta_interval_start:
          type: integer
          minimum: 0
        delta_start_of_day:
          type: string
          format: time
        delta_type:
          $ref: '#/components/schemas/DeltaTypeEnum'
        time_range_max:
          type: string
          readOnly: true
        time_range_available:
          type: string
          readOnly: true
        has_schema_mapping_dimension:
          type: boolean
          readOnly: true
        feature_smart_naming_convention:
          type: string
          readOnly: true
        auto_fetch:
          type: string
          readOnly: true
        assigned_destinations:
          type: array
          items:
            $ref: '#/components/schemas/AssignedDestination'
          readOnly: true
        can_be_fetched:
          type: boolean
          readOnly: true
    PatchedDatalake:
      type: object
      properties:
        id:
          type: integer
          readOnly: true
        name:
          type: string
          description: A human readable name.
          maxLength: 200
        stack:
          type: integer
        url:
          type: string
          description: The full URL for the storage engine.
          maxLength: 200
        parameters: {}
        backup_existing:
          type: boolean
          title: Backup Existing Files
          description: Enable this option to create backups of existing files. Otherwise
            existing files will be silently overwritten.
        auth:
          type:
          - integer
          - 'null'
          title: Authorization
    PatchedDatastreamColumnInfo:
      type: object
      properties:
        datatype:
          type: string
        id:
          type: integer
          readOnly: true
        change_url:
          type: string
          readOnly: true
        created:
          type: string
          format: date-time
          readOnly: true
        is_key_column:
          type: boolean
          description: If checked, this column will be used to consolidate multiple
            files.
        confirmed_type:
          type: boolean
          description: If checked the type will not be changed by the tracking service.
        name:
          type: string
          maxLength: 200
        type:
          allOf:
          - $ref: '#/components/schemas/ColumnDataTypeEnum'
          minimum: 0
          maximum: 32767
        removed:
          type: boolean
        target_column:
          oneOf:
          - allOf:
            - $ref: '#/components/schemas/ReadOnlySchemaColumn'
          - type: 'null'
        updated:
          type: string
          format: date-time
          readOnly: true
        set_default:
          type: boolean
          writeOnly: true
          default: false
        reset_default:
          type: boolean
          writeOnly: true
          default: false
        unlock_type:
          type: boolean
          writeOnly: true
          default: false
        has_smart_naming_convention:
          type: string
          readOnly: true
    PatchedDefaultSchemaMapping:
      type: object
      properties:
        id:
          type: integer
          readOnly: true
        source_column_name:
          type: string
          title: Source Field Name
          maxLength: 200
        source_content_type:
          type: integer
        target_column:
          allOf:
          - $ref: '#/components/schemas/SchemaColumnCompatibility'
          readOnly: true
        target_column_id:
          type: integer
          writeOnly: true
        is_key_column:
          type: boolean
    PatchedEmailSubscription:
      type: object
      properties:
        id:
          type: integer
          readOnly: true
        user:
          type: integer
        enabled:
          type: boolean
        stacks:
          type: array
          items:
            type: integer
        datastreams:
          type: array
          items:
            type: integer
        notify_about_empty_extracts:
          type: boolean
        exclude_warnings:
          type: boolean
          description: Skips warning-level notifications for the "Datastream and Transformation
            Issues" and "Data Quality Issues" topics.
        topics:
          type: array
          items:
            $ref: '#/components/schemas/TopicsEnum'
        email:
          type: string
          format: email
          maxLength: 254
    PatchedFetchSchedule:
      type: object
      properties:
        id:
          type: integer
          readOnly: true
        cron_preset:
          $ref: '#/components/schemas/CronPresetEnum'
        cron_type:
          type: string
          description: Defaults to 'day' when omitted on a schedule entry.
        cron_interval:
          type: integer
          maximum: 2147483647
          minimum: 0
          title: Run every
        cron_start_of_day:
          type: string
          format: time
          title: Time of day
          description: At what time the day starts.
        cron_interval_start:
          type: integer
          maximum: 32767
          minimum: 0
        time_range_preset:
          allOf:
          - $ref: '#/components/schemas/FetchScheduleTimeRangePresetEnum'
          description: |-
            Select one of the time range presets.

            * `0` - Custom Time Range
            * `13` - Yesterday
            * `10` - Today
            * `11` - Current Week
            * `6` - Current Month
            * `7` - Previous Month
            * `17` - Last Quarter
            * `18` - Last 2 Days
            * `16` - Last 3 Days
            * `23` - Last 4 Days
            * `19` - Last 5 Days
            * `24` - Last 6 Days
            * `4` - Last 7 Days
            * `25` - Last 8 Days
            * `26` - Last 9 Days
            * `22` - Last 10 Days
            * `14` - Last 14 Days
            * `15` - Last 28 Days
            * `2` - Last 30 Days
            * `20` - Last 40 Days
            * `21` - Last 60 Days
            * `5` - Last 90 Days
            * `31` - Last 120 Days
            * `28` - Last 180 Days
            * `3` - Last 365 Days
            * `27` - Last 730 Days
            * `8` - Previous Week
            * `9` - Previous Year
            * `29` - Current Quarter
            * `12` - Current Year
            * `30` - Last Hour
            * `1000` - Lifetime
            * `50` - Tomorrow
            * `51` - Next 2 Days
            * `52` - Next 7 Days
            * `53` - Next 30 Days
            * `54` - Current Week (incl Future Days)
            * `55` - Next Week
            * `56` - Current Month (incl Future Days)
            * `57` - Next Month
            * `58` - Current Year (incl Future Days)
            * `59` - Next Year
          minimum: 0
          maximum: 32767
        time_range_preset_label:
          type: string
          readOnly: true
        delta_type:
          allOf:
          - $ref: '#/components/schemas/DeltaTypeEnum'
          minimum: -32768
          maximum: 32767
        delta_interval:
          type: integer
          maximum: 2147483647
          minimum: 0
          title: Time
        delta_start_of_day:
          type: string
          format: time
          title: Start of day
          description: At what time the day starts.
        delta_interval_start:
          type: integer
          maximum: 32767
          minimum: 0
        fixed_start:
          type:
          - string
          - 'null'
          format: date
          title: Start
          description: First day to fetch.
        fixed_end:
          type:
          - string
          - 'null'
          format: date
          title: End
          description: Last day to fetch.
        offset_days:
          type: integer
          maximum: 32767
          minimum: -32768
          title: Offset (days)
          description: Number of days to shift the fetched date range into the past.
        not_before_date:
          type:
          - string
          - 'null'
          format: date
          title: Not before
          description: Do not fetch before this date.
        not_before_time:
          type:
          - string
          - 'null'
          format: time
          title: Not before
          description: Do not fetch before this time.
    PatchedMappingEntry:
      type: object
      properties:
        id:
          type: integer
          readOnly: true
        table_id:
          type: integer
          writeOnly: true
        match:
          type: string
          maxLength: 750
        value:
          type: string
          maxLength: 1000
    PatchedMappingTablePartialUpdate:
      type: object
      properties:
        id:
          type: integer
          readOnly: true
        name:
          type: string
          description: A human readable name.
          maxLength: 500
        description:
          type: string
          maxLength: 1000
    PatchedMicrosoftTeamsSubscription:
      type: object
      properties:
        id:
          type: integer
          readOnly: true
        user:
          type: integer
        enabled:
          type: boolean
        stacks:
          type: array
          items:
            type: integer
        datastreams:
          type: array
          items:
            type: integer
        notify_about_empty_extracts:
          type: boolean
        exclude_warnings:
          type: boolean
          description: Skips warning-level notifications for the "Datastream and Transformation
            Issues" and "Data Quality Issues" topics.
        webhook_url:
          type: string
          format: uri
          maxLength: 400
    PatchedSchemaColumnCompatibility:
      type: object
      properties:
        id:
          type: integer
        name:
          type: string
          maxLength: 200
        usage:
          type: string
        mappings:
          type: string
          format: uri
          readOnly: true
        type:
          type: string
        length:
          type:
          - integer
          - 'null'
          maximum: 2147483647
          minimum: -2147483648
        measure:
          oneOf:
          - $ref: '#/components/schemas/MeasureEnum'
          - $ref: '#/components/schemas/BlankEnum'
          - $ref: '#/components/schemas/NullEnum'
        description:
          type:
          - string
          - 'null'
          maxLength: 1000
        url:
          type: string
          format: uri
          readOnly: true
    PatchedSlackSubscription:
      type: object
      properties:
        id:
          type: integer
          readOnly: true
        user:
          type: integer
        enabled:
          type: boolean
        stacks:
          type: array
          items:
            type: integer
        datastreams:
          type: array
          items:
            type: integer
        notify_about_empty_extracts:
          type: boolean
        exclude_warnings:
          type: boolean
          description: Skips warning-level notifications for the "Datastream and Transformation
            Issues" and "Data Quality Issues" topics.
        topics:
          type: array
          items:
            $ref: '#/components/schemas/TopicsEnum'
        webhook_url:
          type: string
          format: uri
          maxLength: 200
        channel:
          type: string
          description: Overrides the default channel
          maxLength: 50
    PatchedStack:
      type: object
      properties:
        add_connection_url:
          type: string
          readOnly: true
        add_datastream_url:
          type: string
          readOnly: true
        change_url:
          type: string
          readOnly: true
        datalake:
          type: string
          format: uri
          readOnly: true
        datalake_id:
          type: integer
          writeOnly: true
        destination:
          type: integer
        extracts_url:
          type: string
          readOnly: true
        issues_url:
          type: string
          readOnly: true
        id:
          type: integer
          readOnly: true
        uuid:
          type: string
          format: uuid
          readOnly: true
        name:
          type: string
          maxLength: 60
        overview_url:
          type: string
          readOnly: true
        parent:
          type: string
          format: uri
          readOnly: true
        parent_id:
          type: integer
        slug:
          type: string
          readOnly: true
        url:
          type: string
          format: uri
          readOnly: true
        counts:
          type: string
          readOnly: true
        permissions:
          type: string
          readOnly: true
        default_manage_extract_names:
          type: boolean
          title: Default for Extracts per fetch
          description: 'This setting is used as the default for new datastreams. You
            can still change this setting for individual datastreams             in the <b>Local data retention</b> settings.'
        email_cobranding_enabled:
          type: boolean
          title: Enable co-branding
        email_cobranding_logo_url:
          type: string
          format: uri
          title: Brand logo URL
          description: Publicly-accessible HTTPS URLs only. Recommended at least 64
            px high PNG, transparent background.
          maxLength: 2000
        email_cobranding_display_name:
          type: string
          title: Brand name
          description: Displays if your brand logo isn't available.
          maxLength: 255
        updated:
          type: string
          format: date-time
          readOnly: true
        created:
          type: string
          format: date-time
          readOnly: true
    PatchedTransformerPartialUpdate:
      type: object
      properties:
        id:
          type: integer
          readOnly: true
        name:
          type: string
          maxLength: 200
        description:
          type: string
          maxLength: 1000
        instructions:
          description: ' '
    PatchedValueTable:
      type: object
      properties:
        id:
          type: integer
          readOnly: true
        stack:
          type: integer
        name:
          type: string
          description: A human readable name.
          maxLength: 100
        entries:
          type: string
          readOnly: true
    PatchedWebhook:
      type: object
      properties:
        id:
          type: integer
          readOnly: true
        payload_url:
          type: string
          format: uri
          maxLength: 1000
        events:
          type: array
          items:
            $ref: '#/components/schemas/EventsEnum'
        enabled:
          type: boolean
        secret:
          type:
          - string
          - 'null'
          writeOnly: true
          maxLength: 200
    PendingAuthorization:
      type: object
      description: Class used to serialize Pending Authorization - a pair of content_type
        and name.
      properties:
        name:
          type: string
        content_type:
          type: integer
        app_id:
          type:
          - integer
          - 'null'
      required:
      - content_type
      - name
    PullingPatchSchema:
      properties:
        active_mode:
          anyOf:
          - $ref: '#/components/schemas/ActivePullingSetMode'
          - type: 'null'
      title: PullingPatchSchema
      type: object
    PullingSchema:
      properties:
        active_mode:
          anyOf:
          - $ref: '#/components/schemas/ActivePullingMode'
          - type: 'null'
        smart:
          anyOf:
          - $ref: '#/components/schemas/SmartPullingReadSchema'
          - type: 'null'
        smart_bundle:
          anyOf:
          - items:
              $ref: '#/components/schemas/SmartBundleSchema'
            type: array
          - type: 'null'
          title: Smart Bundle
        schedule:
          anyOf:
          - items:
              $ref: '#/components/schemas/ScheduleSchema'
            type: array
          - type: 'null'
          title: Schedule
      title: PullingSchema
      type: object
    Range:
      additionalProperties: false
      description: |-
        How much history to pull each time, e.g. ``{value: 1, unit: month}``.

        Every range is pulled *to date*: it resolves to a window ending **yesterday**, never at a stale
        past boundary (``smart_fetch.utils.date.resolve_range``). ``{value: 7, unit: day}`` is the last 7
        days ending yesterday; a calendar unit snaps the window's start to a period boundary, so
        ``{value: 1, unit: month}`` runs from the 1st of *last* month through yesterday -- the "Last Month
        to date" window, growing as the current month progresses.

        Hence the smallest ``value`` is ``1`` (inherited from :class:`TimeBase`) and not ``0``: one period
        back is a to-date window's own base, and ``0`` -- which ``core.constants``' plain to-date presets
        use for the current period *including today* -- is not expressible here.
      properties:
        value:
          minimum: 1
          title: Value
          type: integer
        unit:
          $ref: '#/components/schemas/TimeUnit'
      required:
      - value
      - unit
      title: Range
      type: object
    ReadOnlySchemaColumn:
      type: object
      properties:
        id:
          type: integer
        name:
          type: string
          readOnly: true
          maxLength: 200
        type:
          type: string
          readOnly: true
        usage:
          type: string
        measure:
          oneOf:
          - $ref: '#/components/schemas/MeasureEnum'
          - $ref: '#/components/schemas/BlankEnum'
          - $ref: '#/components/schemas/NullEnum'
      required:
      - id
      - name
      - type
      - usage
    RefreshRangeSchema:
      properties:
        value:
          title: Value
          type: integer
        unit:
          $ref: '#/components/schemas/TimeUnitLabel'
      required:
      - value
      - unit
      title: RefreshRangeSchema
      type: object
    RequeueExtractsRequestSchema:
      properties:
        extract_ids:
          items:
            type: integer
          maxItems: 50
          title: Extract Ids
          type: array
        binding_ids:
          anyOf:
          - items:
              type: integer
            maxItems: 50
            type: array
          - type: 'null'
          title: Binding Ids
        sequential:
          default: true
          title: Sequential
          type: boolean
      required:
      - extract_ids
      title: RequeueExtractsRequestSchema
      type: object
    RequeueExtractsResponseSchema:
      properties:
        message:
          title: Message
          type: string
        extract_ids:
          items:
            type: integer
          title: Extract Ids
          type: array
        extract_count:
          title: Extract Count
          type: integer
      required:
      - message
      - extract_ids
      - extract_count
      title: RequeueExtractsResponseSchema
      type: object
    RetentionTypeEnum:
      enum:
      - 1
      - 2
      - 4
      - 3
      type: integer
      description: |-
        * `1` - Retain all
        * `2` - Retain N fetches
        * `4` - Retain N extracts
        * `3` - Retain N days
    RowDuplicatesConfig:
      properties:
        mode:
          default: include
          enum:
          - include
          - exclude
          - key_columns
          title: Mode
          type: string
        columns:
          anyOf:
          - items:
              type: string
            type: array
          - type: 'null'
          title: Columns
      title: RowDuplicatesConfig
      type: object
    RowDuplicatesConfigInput:
      additionalProperties: false
      properties:
        mode:
          default: include
          enum:
          - include
          - exclude
          - key_columns
          title: Mode
          type: string
        columns:
          anyOf:
          - items:
              minLength: 1
              type: string
            maxItems: 5000
            type: array
          - type: 'null'
          title: Columns
      title: RowDuplicatesConfigInput
      type: object
    RowDuplicatesMonitorListItemSchema:
      properties:
        enabled:
          title: Enabled
          type: boolean
        severity:
          $ref: '#/components/schemas/SeverityLabel'
        type:
          const: row-duplicates
          title: Type
          type: string
        type_config:
          $ref: '#/components/schemas/RowDuplicatesConfig'
        datastream:
          $ref: '#/components/schemas/DatastreamSummarySchema'
      required:
      - enabled
      - severity
      - type
      - type_config
      - datastream
      title: RowDuplicatesMonitorListItemSchema
      type: object
    RowDuplicatesMonitorPatch:
      additionalProperties: false
      description: A given ``type_config`` replaces the stored configuration as a
        whole.
      properties:
        enabled:
          title: Enabled
          type: boolean
        severity:
          allOf:
          - $ref: '#/components/schemas/SeverityLabel'
        type:
          const: row-duplicates
          title: Type
          type: string
        type_config:
          allOf:
          - $ref: '#/components/schemas/RowDuplicatesConfigInput'
      required:
      - type
      title: RowDuplicatesMonitorPatch
      type: object
    RowDuplicatesMonitorSchema:
      properties:
        enabled:
          title: Enabled
          type: boolean
        severity:
          $ref: '#/components/schemas/SeverityLabel'
        type:
          const: row-duplicates
          title: Type
          type: string
        type_config:
          $ref: '#/components/schemas/RowDuplicatesConfig'
      required:
      - enabled
      - severity
      - type
      - type_config
      title: RowDuplicatesMonitorSchema
      type: object
    RuleBlockSchema:
      additionalProperties: false
      properties:
        key:
          format: uuid
          title: Key
          type: string
        condition:
          anyOf:
          - $ref: '#/components/schemas/OuterLogicalConjunctionSchema'
          - $ref: '#/components/schemas/OuterLogicalDisjunctionSchema'
          title: Condition
        representation:
          anyOf:
          - $ref: '#/components/schemas/RuleRepresentationType'
          - type: 'null'
      required:
      - key
      - condition
      title: RuleBlockSchema
      type: object
    RuleRepresentationType:
      enum:
      - date-format
      - expected-values
      - mandatory-fields
      - allowed-combination
      title: RuleRepresentationType
      type: string
    ScheduleSchema:
      description: |-
        One ``FetchSchedule`` row: the cron that fires, and the time range it then fetches.

        Identified by its integer primary key. ``FetchSchedule`` carries no UUID, and a schedule is a
        sub-object of a datastream rather than a resource this API addresses on its own -- the same
        shape the bindings router uses. Without the id a caller can read the rows but never act on
        one, and deleting a schedule is what a caller reading them usually wants next.

        ``cron_type`` and ``delta_type`` are labels, not the stored integers: every other unit on this
        surface is a label, and the DRF datastream endpoints already render ``cron_type`` this way.

        ``cron_preset`` names the preset the ``cron_type``/``cron_interval`` pair matches, e.g.
        ``CRON_EVERY_DAY``, and is null for a pair no preset covers. It is derived, as on the DRF
        surface, and always agrees with the two fields it comes from.
      properties:
        id:
          title: Id
          type: integer
        cron_preset:
          anyOf:
          - type: string
          - type: 'null'
          title: Cron Preset
        cron_type:
          $ref: '#/components/schemas/CronTypeLabel'
        cron_interval:
          title: Cron Interval
          type: integer
        cron_start_of_day:
          format: time
          title: Cron Start Of Day
          type: string
        cron_interval_start:
          title: Cron Interval Start
          type: integer
        time_range_preset:
          title: Time Range Preset
          type: integer
        time_range_preset_label:
          title: Time Range Preset Label
          type: string
        delta_type:
          $ref: '#/components/schemas/CronTypeLabel'
        delta_interval:
          title: Delta Interval
          type: integer
        delta_start_of_day:
          format: time
          title: Delta Start Of Day
          type: string
        delta_interval_start:
          title: Delta Interval Start
          type: integer
        offset_days:
          title: Offset Days
          type: integer
        fixed_start:
          anyOf:
          - format: date
            type: string
          - type: 'null'
          title: Fixed Start
        fixed_end:
          anyOf:
          - format: date
            type: string
          - type: 'null'
          title: Fixed End
        not_before_date:
          anyOf:
          - format: date
            type: string
          - type: 'null'
          title: Not Before Date
        not_before_time:
          anyOf:
          - format: time
            type: string
          - type: 'null'
          title: Not Before Time
      required:
      - id
      - cron_type
      - cron_interval
      - cron_start_of_day
      - cron_interval_start
      - time_range_preset
      - time_range_preset_label
      - delta_type
      - delta_interval
      - delta_start_of_day
      - delta_interval_start
      - offset_days
      title: ScheduleSchema
      type: object
    SchemaColumnCompatibility:
      type: object
      properties:
        id:
          type: integer
        name:
          type: string
          maxLength: 200
        usage:
          type: string
        mappings:
          type: string
          format: uri
          readOnly: true
        type:
          type: string
        length:
          type:
          - integer
          - 'null'
          maximum: 2147483647
          minimum: -2147483648
        measure:
          oneOf:
          - $ref: '#/components/schemas/MeasureEnum'
          - $ref: '#/components/schemas/BlankEnum'
          - $ref: '#/components/schemas/NullEnum'
        description:
          type:
          - string
          - 'null'
          maxLength: 1000
        url:
          type: string
          format: uri
          readOnly: true
      required:
      - mappings
      - name
      - type
      - url
    SchemaConsistencyConfig:
      properties:
        auto_restore_enabled:
          default: false
          title: Auto Restore Enabled
          type: boolean
        column_order_check_enabled:
          default: false
          title: Column Order Check Enabled
          type: boolean
      title: SchemaConsistencyConfig
      type: object
    SchemaConsistencyConfigInput:
      additionalProperties: false
      properties:
        auto_restore_enabled:
          title: Auto Restore Enabled
          type: boolean
        column_order_check_enabled:
          title: Column Order Check Enabled
          type: boolean
      required:
      - auto_restore_enabled
      - column_order_check_enabled
      title: SchemaConsistencyConfigInput
      type: object
    SchemaConsistencyMonitorListItemSchema:
      properties:
        enabled:
          title: Enabled
          type: boolean
        severity:
          $ref: '#/components/schemas/SeverityLabel'
        type:
          const: schema_consistency
          title: Type
          type: string
        type_config:
          $ref: '#/components/schemas/SchemaConsistencyConfig'
        datastream:
          $ref: '#/components/schemas/DatastreamSummarySchema'
      required:
      - enabled
      - severity
      - type
      - type_config
      - datastream
      title: SchemaConsistencyMonitorListItemSchema
      type: object
    SchemaConsistencyMonitorPatch:
      additionalProperties: false
      description: A given ``type_config`` replaces the stored configuration as a
        whole.
      properties:
        enabled:
          title: Enabled
          type: boolean
        severity:
          allOf:
          - $ref: '#/components/schemas/SeverityLabel'
        type:
          const: schema_consistency
          title: Type
          type: string
        type_config:
          allOf:
          - $ref: '#/components/schemas/SchemaConsistencyConfigInput'
      required:
      - type
      title: SchemaConsistencyMonitorPatch
      type: object
    SchemaConsistencyMonitorSchema:
      properties:
        enabled:
          title: Enabled
          type: boolean
        severity:
          $ref: '#/components/schemas/SeverityLabel'
        type:
          const: schema_consistency
          title: Type
          type: string
        type_config:
          $ref: '#/components/schemas/SchemaConsistencyConfig'
      required:
      - enabled
      - severity
      - type
      - type_config
      title: SchemaConsistencyMonitorSchema
      type: object
    SeverityLabel:
      enum:
      - error
      - warning
      title: SeverityLabel
      type: string
    SkippedDatastreamSchema:
      properties:
        datastream_id:
          format: uuid
          title: Datastream Id
          type: string
        reason:
          enum:
          - not_found
          - tag_not_in_workspace
          - unknown_tag_name
          - tag_limit_exceeded
          title: Reason
          type: string
        detail:
          title: Detail
          type: string
      required:
      - datastream_id
      - reason
      - detail
      title: SkippedDatastreamSchema
      type: object
    SlackSubscription:
      type: object
      properties:
        id:
          type: integer
          readOnly: true
        user:
          type: integer
        enabled:
          type: boolean
        stacks:
          type: array
          items:
            type: integer
        datastreams:
          type: array
          items:
            type: integer
        notify_about_empty_extracts:
          type: boolean
        exclude_warnings:
          type: boolean
          description: Skips warning-level notifications for the "Datastream and Transformation
            Issues" and "Data Quality Issues" topics.
        topics:
          type: array
          items:
            $ref: '#/components/schemas/TopicsEnum'
        webhook_url:
          type: string
          format: uri
          maxLength: 200
        channel:
          type: string
          description: Overrides the default channel
          maxLength: 50
      required:
      - id
      - topics
      - webhook_url
    SmartBundleSchema:
      properties:
        time_range_preset:
          title: Time Range Preset
          type: integer
        time_range_preset_label:
          title: Time Range Preset Label
          type: string
        offset_days:
          title: Offset Days
          type: integer
        fixed_start:
          anyOf:
          - format: date
            type: string
          - type: 'null'
          title: Fixed Start
        fixed_end:
          anyOf:
          - format: date
            type: string
          - type: 'null'
          title: Fixed End
      required:
      - time_range_preset
      - time_range_preset_label
      - offset_days
      title: SmartBundleSchema
      type: object
    SmartNamingConventionSummary:
      type: object
      properties:
        id:
          type: integer
          readOnly: true
        column_name:
          type: string
          readOnly: true
        datastream_names:
          type: string
          readOnly: true
        delimiters_characters:
          type: string
          readOnly: true
        sorted_columns_names:
          type: string
          readOnly: true
        email_for_error:
          type: boolean
        email_for_warning:
          type: boolean
        raise_for_warning:
          type: boolean
        add_status_columns:
          type: boolean
        columns_rule_phrasing:
          type: string
          readOnly: true
      required:
      - add_status_columns
      - column_name
      - columns_rule_phrasing
      - datastream_names
      - delimiters_characters
      - email_for_error
      - email_for_warning
      - id
      - raise_for_warning
      - sorted_columns_names
    SmartPullingRangeRule:
      additionalProperties: false
      description: |-
        A ``PullingRangeRule`` plus the smart-fetch-only ``on`` day-of-week/month alignment.

        ``on`` is optional on the field only because a daily frequency has no day to align to; a
        weekly or monthly frequency requires it (see ``_on_matches_frequency_unit``).
      properties:
        frequency:
          $ref: '#/components/schemas/Frequency'
        range:
          $ref: '#/components/schemas/Range'
        'on':
          anyOf:
          - $ref: '#/components/schemas/On'
          - type: 'null'
      required:
      - frequency
      - range
      title: SmartPullingRangeRule
      type: object
    SmartPullingRangeSpec:
      description: |-
        A non-empty list of :class:`SmartPullingRangeRule` whose frequencies are unique.

        Two entries collide when their :meth:`SmartPullingRangeRule.frequency_key` values are equal
        (e.g. two ``frequency {1, day}`` entries, or two ``frequency {1, week}`` entries — regardless
        of their ``on`` day). Uniqueness is on the configured ``frequency`` alone, not on ``on`` or on
        evaluated trigger dates.

        The list must hold at least one entry: an empty spec on an *active* smart fetch fetches
        nothing and reports no reason why — ``get_missing_date_range`` simply finds no entry due
        today, which is indistinguishable from a non-trigger day.
      items:
        $ref: '#/components/schemas/SmartPullingRangeRule'
      minItems: 1
      title: SmartPullingRangeSpec
      type: array
    SmartPullingReadSchema:
      description: |-
        Smart-pulling configuration, plus the collapsed single-cadence view.

        ``range_spec`` is what the datastream actually runs. ``frequency`` and ``refresh_range`` are
        the pre-``range_spec`` view of it, kept for clients written before the field existed; they are
        derived, lossy, and never the authority (see :func:`range_spec_to_smart_pulling_v1`).
      properties:
        is_active:
          title: Is Active
          type: boolean
        range_spec:
          description: 'The fetch schedule the datastream runs: up to four rules,
            each pairing a frequency with the time range to re-fetch when it fires.
            The authoritative half of this object.'
          items:
            $ref: '#/components/schemas/SmartPullingRangeRule'
          minItems: 1
          title: SmartPullingRangeSpec
          type: array
        deadline:
          anyOf:
          - $ref: '#/components/schemas/DeadlineSchema'
          - type: 'null'
        start:
          anyOf:
          - $ref: '#/components/schemas/StartSchema'
          - type: 'null'
          description: Earliest fetch start. Omit the field to keep whatever is already
            stored; send null to inherit the workspace default; send an object to
            set a per-datastream value. Must be before the effective deadline once
            inheritance is resolved.
        frequency:
          $ref: '#/components/schemas/FrequencyLabel'
          description: 'The finest cadence in ``range_spec``, as the legacy single-frequency
            label. Derived and lossy: read ``range_spec`` for the configuration that
            actually runs.'
        refresh_range:
          anyOf:
          - $ref: '#/components/schemas/RefreshRangeSchema'
          - type: 'null'
          description: History re-fetched beyond one ``frequency`` period by the rule
            ``frequency`` was taken from, always expressed in days. Derived and lossy,
            like ``frequency``.
      required:
      - is_active
      - range_spec
      - frequency
      title: SmartPullingReadSchema
      type: object
    SmartPullingSchema:
      additionalProperties: false
      description: Smart-pulling configuration.
      properties:
        is_active:
          title: Is Active
          type: boolean
        range_spec:
          $ref: '#/components/schemas/SmartPullingRangeSpec'
          description: 'The fetch schedule: up to four rules, each pairing a frequency
            with the time range to re-fetch when it fires. Frequencies must be unique
            across the rules.'
        deadline:
          anyOf:
          - $ref: '#/components/schemas/DeadlineSchema'
          - type: 'null'
        start:
          anyOf:
          - $ref: '#/components/schemas/StartSchema'
          - type: 'null'
          description: Earliest fetch start. Omit the field to keep whatever is already
            stored; send null to inherit the workspace default; send an object to
            set a per-datastream value. Must be before the effective deadline once
            inheritance is resolved.
      required:
      - is_active
      - range_spec
      title: SmartPullingSchema
      type: object
    Stack:
      type: object
      properties:
        add_connection_url:
          type: string
          readOnly: true
        add_datastream_url:
          type: string
          readOnly: true
        change_url:
          type: string
          readOnly: true
        datalake:
          type: string
          format: uri
          readOnly: true
        datalake_id:
          type: integer
          writeOnly: true
        destination:
          type: integer
        extracts_url:
          type: string
          readOnly: true
        issues_url:
          type: string
          readOnly: true
        id:
          type: integer
          readOnly: true
        uuid:
          type: string
          format: uuid
          readOnly: true
        name:
          type: string
          maxLength: 60
        overview_url:
          type: string
          readOnly: true
        parent:
          type: string
          format: uri
          readOnly: true
        parent_id:
          type: integer
        slug:
          type: string
          readOnly: true
        url:
          type: string
          format: uri
          readOnly: true
        counts:
          type: string
          readOnly: true
        permissions:
          type: string
          readOnly: true
        default_manage_extract_names:
          type: boolean
          title: Default for Extracts per fetch
          description: 'This setting is used as the default for new datastreams. You
            can still change this setting for individual datastreams             in the <b>Local data retention</b> settings.'
        email_cobranding_enabled:
          type: boolean
          title: Enable co-branding
        email_cobranding_logo_url:
          type: string
          format: uri
          title: Brand logo URL
          description: Publicly-accessible HTTPS URLs only. Recommended at least 64
            px high PNG, transparent background.
          maxLength: 2000
        email_cobranding_display_name:
          type: string
          title: Brand name
          description: Displays if your brand logo isn't available.
          maxLength: 255
        updated:
          type: string
          format: date-time
          readOnly: true
        created:
          type: string
          format: date-time
          readOnly: true
      required:
      - add_connection_url
      - add_datastream_url
      - change_url
      - counts
      - created
      - datalake
      - datalake_id
      - extracts_url
      - id
      - issues_url
      - name
      - overview_url
      - parent
      - permissions
      - slug
      - updated
      - url
      - uuid
    StackBasic:
      type: object
      properties:
        id:
          type: integer
          readOnly: true
        uuid:
          type: string
          format: uuid
          readOnly: true
        name:
          type: string
          maxLength: 60
        slug:
          type: string
          readOnly: true
        url:
          type: string
          format: uri
          readOnly: true
        change_url:
          type: string
          readOnly: true
        extracts_url:
          type: string
          readOnly: true
        issues_url:
          type: string
          readOnly: true
        overview_url:
          type: string
          readOnly: true
        permissions:
          type: string
          readOnly: true
      required:
      - change_url
      - extracts_url
      - id
      - issues_url
      - name
      - overview_url
      - permissions
      - slug
      - url
      - uuid
    StackSchema:
      type: object
      description: Documents the schema export and import payload handled by target.helpers.
      properties:
        target_columns:
          type: array
          items:
            $ref: '#/components/schemas/StackSchemaTargetColumn'
      required:
      - target_columns
    StackSchemaDefaultMapping:
      type: object
      properties:
        source_column_type:
          type: string
          description: Natural key, e.g. 'core.apidatastream'.
          pattern: ^\w+\.\w+$
        source_column_name:
          type: string
        is_key_column:
          type: boolean
      required:
      - is_key_column
      - source_column_name
      - source_column_type
    StackSchemaImportResult:
      type: object
      properties:
        status:
          type: string
        message:
          type: string
      required:
      - message
      - status
    StackSchemaTargetColumn:
      type: object
      properties:
        name:
          type: string
          maxLength: 200
        type:
          $ref: '#/components/schemas/StackSchemaTargetColumnTypeEnum'
        length:
          type:
          - integer
          - 'null'
          maximum: 2147483647
          minimum: -2147483648
        measure:
          oneOf:
          - $ref: '#/components/schemas/MeasureEnum'
          - $ref: '#/components/schemas/NullEnum'
        description:
          type: string
          default: ''
        default_mapping:
          type: array
          items:
            $ref: '#/components/schemas/StackSchemaDefaultMapping'
      required:
      - default_mapping
      - name
      - type
    StackSchemaTargetColumnTypeEnum:
      enum:
      - 1
      - 2
      - 3
      - 4
      - 5
      - 6
      - 7
      - 9
      - 8
      - 10
      - 11
      - 13
      type: integer
      description: |-
        * `1` - String (dimension)
        * `2` - Long (metric, whole number)
        * `3` - Float (metric, decimal number)
        * `4` - Date (dimension, YYYY-MM-DD)
        * `5` - DateTime (dimension, YYYY-MM-DDTHH:MM:SS)
        * `6` - Boolean (dimension, usually "true" and "false")
        * `7` - Percentage (metric, fraction as %)
        * `9` - Currency (metric)
        * `8` - JSON (JSON-compatible format)
        * `10` - Formula (expression sent to Google Sheets Destination)
        * `11` - Duration (expression of time duration)
        * `13` - Timestamp (dimension, YYYY-MM-DDTHH:MM:SS±HH:MM, converted to UTC)
    StartSchema:
      properties:
        time:
          anyOf:
          - format: time
            type: string
          - type: 'null'
          description: 'Earliest time of day a fetch may start, on the half hour (e.g.
            09:00:00). UTC only: an offset is rejected rather than converted. Null
            lifts the restriction for this datastream, overriding any workspace default.'
          title: Time
      title: StartSchema
      type: object
    TargetColumnUsageLabel:
      enum:
      - dimension
      - metric
      title: TargetColumnUsageLabel
      type: string
    TimeUnit:
      enum:
      - day
      - week
      - month
      - quarter
      - year
      title: TimeUnit
      type: string
    TimeUnitLabel:
      enum:
      - day
      - week
      - month
      title: TimeUnitLabel
      type: string
    TimelinessConfig:
      properties:
        expected_delivery:
          anyOf:
          - $ref: '#/components/schemas/ExpectedDeliverySchema'
          - type: 'null'
      title: TimelinessConfig
      type: object
    TimelinessConfigInput:
      additionalProperties: false
      properties:
        expected_delivery:
          $ref: '#/components/schemas/ExpectedDeliveryInput'
      required:
      - expected_delivery
      title: TimelinessConfigInput
      type: object
    TimelinessMonitorListItemSchema:
      properties:
        enabled:
          title: Enabled
          type: boolean
        severity:
          $ref: '#/components/schemas/SeverityLabel'
        type:
          const: timeliness
          title: Type
          type: string
        type_config:
          $ref: '#/components/schemas/TimelinessConfig'
        datastream:
          $ref: '#/components/schemas/DatastreamSummarySchema'
      required:
      - enabled
      - severity
      - type
      - type_config
      - datastream
      title: TimelinessMonitorListItemSchema
      type: object
    TimelinessMonitorPatch:
      additionalProperties: false
      description: |-
        A given ``type_config`` replaces the stored configuration as a whole. The severity of a
        timeliness monitor is always ``warning``.
      properties:
        enabled:
          title: Enabled
          type: boolean
        severity:
          const: warning
          title: Severity
          type: string
        type:
          const: timeliness
          title: Type
          type: string
        type_config:
          allOf:
          - $ref: '#/components/schemas/TimelinessConfigInput'
      required:
      - type
      title: TimelinessMonitorPatch
      type: object
    TimelinessMonitorSchema:
      properties:
        enabled:
          title: Enabled
          type: boolean
        severity:
          $ref: '#/components/schemas/SeverityLabel'
        type:
          const: timeliness
          title: Type
          type: string
        type_config:
          $ref: '#/components/schemas/TimelinessConfig'
      required:
      - enabled
      - severity
      - type
      - type_config
      title: TimelinessMonitorSchema
      type: object
    TopicsEnum:
      enum:
      - oauth
      - mapping
      - map_enrichment
      - workspace_mapping
      - import
      - datastream
      - import_status
      - performance_outliers
      - smart_naming_convention
      - geo_enrichment
      - schema_mapping
      - data_quality
      - dbt
      type: string
      description: |-
        * `oauth` - Authentication
        * `mapping` - Custom script: 'map'
        * `map_enrichment` - Match & Map Transformation
        * `workspace_mapping` - Workspace Mapping
        * `import` - Import Errors
        * `datastream` - Datastream and Transformation Issues
        * `import_status` - Daily Import Status
        * `performance_outliers` - Performance Outliers
        * `smart_naming_convention` - Smart Naming Convention
        * `geo_enrichment` - Unify Location Data Transformation
        * `schema_mapping` - Data Mapping
        * `data_quality` - Data Quality Issues
        * `dbt` - dbt Transformation
    TransformerBasic:
      type: object
      properties:
        id:
          type: integer
          readOnly: true
        name:
          type: string
          maxLength: 200
        stack:
          type:
          - integer
          - 'null'
          title: Workspace
        change_url:
          type: string
          readOnly: true
        smart_naming_convention:
          allOf:
          - $ref: '#/components/schemas/SmartNamingConventionSummary'
          readOnly: true
      required:
      - change_url
      - id
      - name
      - smart_naming_convention
    TransformerFull:
      type: object
      properties:
        id:
          type: integer
          readOnly: true
        name:
          type: string
          maxLength: 200
        stack:
          type:
          - integer
          - 'null'
          title: Workspace
        change_url:
          type: string
          readOnly: true
        instructions:
          description: ' '
      required:
      - change_url
      - id
      - name
    TransformerPartialUpdate:
      type: object
      properties:
        id:
          type: integer
          readOnly: true
        name:
          type: string
          maxLength: 200
        description:
          type: string
          maxLength: 1000
        instructions:
          description: ' '
      required:
      - id
      - name
    UUIDListSchema:
      items:
        format: uuid
        type: string
      maxItems: 50
      title: UUIDListSchema
      type: array
    UniversalMonitorBulkPatchSchema:
      additionalProperties: false
      description: |-
        Sets ``enabled`` and/or ``severity`` on every selected monitor. Omitted fields stay
        unchanged; an explicit ``null`` is rejected.
      properties:
        enabled:
          title: Enabled
          type: boolean
        severity:
          allOf:
          - $ref: '#/components/schemas/SeverityLabel'
      title: UniversalMonitorBulkPatchSchema
      type: object
    UniversalMonitorPatchSchema:
      discriminator:
        mapping:
          row-duplicates: '#/components/schemas/RowDuplicatesMonitorPatch'
          schema_consistency: '#/components/schemas/SchemaConsistencyMonitorPatch'
          timeliness: '#/components/schemas/TimelinessMonitorPatch'
          volumes: '#/components/schemas/VolumesMonitorPatch'
        propertyName: type
      oneOf:
      - $ref: '#/components/schemas/RowDuplicatesMonitorPatch'
      - $ref: '#/components/schemas/VolumesMonitorPatch'
      - $ref: '#/components/schemas/TimelinessMonitorPatch'
      - $ref: '#/components/schemas/SchemaConsistencyMonitorPatch'
      title: UniversalMonitorPatchSchema
    UsageItemSchema:
      properties:
        date:
          format: date
          title: Date
          type: string
        workspace_id:
          format: uuid
          title: Workspace Id
          type: string
        workspace_name:
          title: Workspace Name
          type: string
        datastream_id:
          anyOf:
          - format: uuid
            type: string
          - type: 'null'
          title: Datastream Id
        unique_rows:
          title: Unique Rows
          type: integer
        total_rows:
          title: Total Rows
          type: integer
      required:
      - date
      - workspace_id
      - workspace_name
      - unique_rows
      - total_rows
      title: UsageItemSchema
      type: object
    UserCreateSchema:
      properties:
        email:
          format: email
          title: Email
          type: string
        first_name:
          anyOf:
          - type: string
          - type: 'null'
          title: First Name
        last_name:
          anyOf:
          - type: string
          - type: 'null'
          title: Last Name
        groups:
          default: []
          items:
            $ref: '#/components/schemas/AllGroupEnum'
          title: Groups
          type: array
        workspaces:
          default: []
          items:
            format: uuid
            type: string
          title: Workspaces
          type: array
        active:
          anyOf:
          - type: boolean
          - type: 'null'
          default: true
          title: Active
      required:
      - email
      title: UserCreateSchema
      type: object
    UserResponseSchema:
      properties:
        id:
          format: uuid
          title: Id
          type: string
        groups:
          items:
            $ref: '#/components/schemas/AllGroupEnum'
          title: Groups
          type: array
        workspaces:
          items:
            format: uuid
            type: string
          title: Workspaces
          type: array
        workspace_names:
          items:
            type: string
          title: Workspace Names
          type: array
        active:
          title: Active
          type: boolean
        created:
          format: date-time
          title: Created
          type: string
        last_login:
          anyOf:
          - format: date-time
            type: string
          - type: 'null'
          title: Last Login
        last_modified:
          anyOf:
          - format: date-time
            type: string
          - type: 'null'
          description: Timestamp of the most recent edit recorded in the Django admin
            audit log. Covers modifications made through the admin UI (the primary
            admin user-management surface). Does not reflect API-driven (`PATCH /api/v1/users/{id}/`),
            SSO/auto-provisioned, or self-service profile edits. Null if the user
            has never been edited in admin.
          title: Last Modified
        email:
          maxLength: 254
          title: Email Address
          type: string
        first_name:
          anyOf:
          - maxLength: 150
            type: string
          - type: 'null'
          title: First Name
        last_name:
          anyOf:
          - maxLength: 150
            type: string
          - type: 'null'
          title: Last Name
      required:
      - id
      - groups
      - workspaces
      - workspace_names
      - active
      - created
      - email
      title: UserResponseSchema
      type: object
    UserUpdateSchema:
      properties:
        email:
          anyOf:
          - format: email
            type: string
          - type: 'null'
          title: Email
        first_name:
          anyOf:
          - type: string
          - type: 'null'
          title: First Name
        last_name:
          anyOf:
          - type: string
          - type: 'null'
          title: Last Name
        groups:
          default: []
          items:
            $ref: '#/components/schemas/AllGroupEnum'
          title: Groups
          type: array
        workspaces:
          default: []
          items:
            format: uuid
            type: string
          title: Workspaces
          type: array
        active:
          anyOf:
          - type: boolean
          - type: 'null'
          title: Active
      title: UserUpdateSchema
      type: object
    ValueTable:
      type: object
      properties:
        id:
          type: integer
          readOnly: true
        stack:
          type: integer
        name:
          type: string
          description: A human readable name.
          maxLength: 100
        entries:
          type: string
          readOnly: true
      required:
      - entries
      - id
      - name
    VolumesConfig:
      properties: {}
      title: VolumesConfig
      type: object
    VolumesMonitorListItemSchema:
      properties:
        enabled:
          title: Enabled
          type: boolean
        severity:
          $ref: '#/components/schemas/SeverityLabel'
        type:
          const: volumes
          title: Type
          type: string
        type_config:
          $ref: '#/components/schemas/VolumesConfig'
        datastream:
          $ref: '#/components/schemas/DatastreamSummarySchema'
      required:
      - enabled
      - severity
      - type
      - type_config
      - datastream
      title: VolumesMonitorListItemSchema
      type: object
    VolumesMonitorPatch:
      additionalProperties: false
      properties:
        enabled:
          title: Enabled
          type: boolean
        severity:
          allOf:
          - $ref: '#/components/schemas/SeverityLabel'
        type:
          const: volumes
          title: Type
          type: string
      required:
      - type
      title: VolumesMonitorPatch
      type: object
    VolumesMonitorSchema:
      properties:
        enabled:
          title: Enabled
          type: boolean
        severity:
          $ref: '#/components/schemas/SeverityLabel'
        type:
          const: volumes
          title: Type
          type: string
        type_config:
          $ref: '#/components/schemas/VolumesConfig'
      required:
      - enabled
      - severity
      - type
      - type_config
      title: VolumesMonitorSchema
      type: object
    WarehouseColumnSchema:
      properties:
        name:
          title: Name
          type: string
        type:
          title: Type
          type: string
      required:
      - name
      - type
      title: WarehouseColumnSchema
      type: object
    WarehouseQueryRejectedSchema:
      description: |-
        400 body for the query endpoint.

        ``detail`` keeps the shape every other MAPI error has, so a generic client
        still reads a message. ``violations`` is filled only when query-shape rules
        refused the query before it ran, one entry per failed rule, so the caller
        can fix all of them in one retry. Other 400s carry ``detail`` only.
      properties:
        detail:
          title: Detail
          type: string
        violations:
          default: []
          items:
            $ref: '#/components/schemas/WarehouseQueryViolationSchema'
          title: Violations
          type: array
      required:
      - detail
      title: WarehouseQueryRejectedSchema
      type: object
    WarehouseQueryResultSchema:
      properties:
        columns:
          items:
            type: string
          title: Columns
          type: array
        rows:
          items:
            additionalProperties: true
            type: object
          title: Rows
          type: array
        row_count:
          title: Row Count
          type: integer
        warehouse_type:
          title: Warehouse Type
          type: string
        query_time_ms:
          title: Query Time Ms
          type: integer
        is_truncated:
          title: Is Truncated
          type: boolean
      required:
      - columns
      - rows
      - row_count
      - warehouse_type
      - query_time_ms
      - is_truncated
      title: WarehouseQueryResultSchema
      type: object
    WarehouseQuerySchema:
      properties:
        sql:
          title: Sql
          type: string
        row_limit:
          default: 100
          title: Row Limit
          type: integer
      required:
      - sql
      title: WarehouseQuerySchema
      type: object
    WarehouseQueryViolationSchema:
      properties:
        rule:
          enum:
          - select_star_on_facts
          - no_time_window
          title: Rule
          type: string
        reason:
          title: Reason
          type: string
        fix:
          title: Fix
          type: string
      required:
      - rule
      - reason
      - fix
      title: WarehouseQueryViolationSchema
      type: object
    WarehouseSchemaResponseSchema:
      properties:
        tables:
          items:
            $ref: '#/components/schemas/WarehouseTableSchema'
          title: Tables
          type: array
        hint:
          default: ''
          title: Hint
          type: string
      required:
      - tables
      title: WarehouseSchemaResponseSchema
      type: object
    WarehouseTableSchema:
      properties:
        name:
          title: Name
          type: string
        columns:
          items:
            $ref: '#/components/schemas/WarehouseColumnSchema'
          title: Columns
          type: array
      required:
      - name
      - columns
      title: WarehouseTableSchema
      type: object
    Webhook:
      type: object
      properties:
        id:
          type: integer
          readOnly: true
        payload_url:
          type: string
          format: uri
          maxLength: 1000
        events:
          type: array
          items:
            $ref: '#/components/schemas/EventsEnum'
        enabled:
          type: boolean
        secret:
          type:
          - string
          - 'null'
          writeOnly: true
          maxLength: 200
      required:
      - events
      - id
      - payload_url
    WorkspaceMinimalSchema:
      properties:
        id:
          format: uuid
          title: Id
          type: string
        name:
          title: Name
          type: string
      required:
      - id
      - name
      title: WorkspaceMinimalSchema
      type: object
    WorkspaceResponseSchema:
      properties:
        id:
          format: uuid
          title: Id
          type: string
        parent_id:
          anyOf:
          - format: uuid
            type: string
          - type: 'null'
          title: Parent Id
        name:
          maxLength: 60
          title: Name
          type: string
      required:
      - id
      - name
      title: WorkspaceResponseSchema
      type: object
    WorkspaceScope:
      enum:
      - ancestors
      - descendants
      - family
      title: WorkspaceScope
      type: string
  securitySchemes:
    adverityApiTokenAuth:
      type: http
      scheme: bearer
      description: 'Your Connect API key, from **Connect API Keys** in your user menu
        (administrators: [Administration](/administration/management-api-keys/)).
        Paste the key only, without `Bearer`.'
tags:
- name: Authorizations
- name: Billing
- name: Bindings
- name: Configuration
- name: Connectors
- name: Custom Monitors
- name: Datastream Tags
- name: Datastreams
- name: Enrichments
- name: Errors
- name: Extracts
- name: Jobs
- name: Monitors
- name: Notifications
- name: Targets
- name: Usage
- name: Users
- name: Warehouse
- name: Workspaces
