Cognite Data point subscriptions API

A data point subscription is a way to listen to changes to time series data points, in ingestion order. A single subscription can listen to many time series, and a time series can be part of many subscriptions. You listen to subscriptions by calling the “list subscription data“ endpoint. It will return a list of data point upserts and deleted ranges, together with a cursor to retrieve the next batch of updates. Updates written since the creation of the subscription, up to 7 days ago, can be retrieved through the subscription. Subscriptions can be defined explicitly through a list of time series external ids and instance ids, or implicitly through a filter. The filter is a subset of the advanced filter query in the regular “time series search“ endpoint. Partitions: Subscriptions can be further divided into a number of partitions, for the purpose of fetching subscription data in parallel. Each partition will return data in ingestion order, but the order between partitions is not guaranteed. Limitations: - Each subscription can have at most 10000 time series. - A time series can be part of at most 10 subscriptions. - A project can have at most 1000 subscriptions, of which 100 are filter subscriptions. - Time series with security categories can not be shown in filter subscriptions. - Time series with neither external id nor instance id cannot be added to non-filter subscriptions. - The number of partitions cannot be changed after creation. Access control: You need READ access to subscriptions ACL to read/list subscriptions or list data, and you need WRITE access to create/update/delete subscriptions. Furthermore, you need READ access to the time series you want to get updates from. For filter subscriptions, you either need READ access to all time series, or the filter must be restricted according to your access rights (e.g. by filtering on specific data set IDs). Subscriptions can have data sets that allow for more granular access control. The data set on a subscription does not influence the data stream, but allows you to restrict who can read/update the subscription. Name of ACL: `timeSeriesSubscriptionsAcl` Supported actions: - `READ` - `WRITE` Example capabilities: ``` [ {"timeSeriesAcl":{"actions":["READ"], "scope":{"all":{}}}}, {"timeSeriesSubscriptionsAcl":{"actions":["WRITE", "READ"], "scope":{"all":{}}}} ] ```

Operations 7

POST /timeseries/subscriptions Create subscriptions #
GET /timeseries/subscriptions List subscriptions #
GET /timeseries/subscriptions/members List subscription members #
POST /timeseries/subscriptions/byids Retrieve subscriptions #
POST /timeseries/subscriptions/update Update subscriptions #
POST /timeseries/subscriptions/delete Delete subscriptions #
POST /timeseries/subscriptions/data/list List subscription data #

Work with this as data

Every API here is available over the APIs.io API and to AI agents over MCP.

MCP server

One button, every client — Claude, Cursor, VS Code and the rest.

https://apis.io/mcp

Tools for apis

7 MCP tools reach this
  • find_apisBrowse and filter every API in the catalog.
  • get_api_artifactsOne API's artifacts, grouped by type.
  • get_openapiThe primary OpenAPI for this API.
  • find_similar_apisAPIs that look like this one.
  • apis_io_searchSTART HERE — APIs, providers and tags for one query, each with its total.
  • resolveTurn a domain, URL or GitHub org into the provider it belongs to.
  • find_cohortsEvery scored population of providers in the catalog.
All 92 tools →

Call it yourself

curl for this page
This API
curl "https://apis.io/api/v1/apis/cognite-data-point-subscriptions-api"
All apis
curl "https://apis.io/api/v1/apis?limit=25"

Discovery needs no key. Ratings and market analysis are Pro.

Get an API key

Free tier, no form to fill in. Signing in shares your email address with us — we store it to create your key and to recognise you if you sign in with another provider. See our Privacy Policy and Terms.

A second provider on the same verified email joins the account you already have.

OpenAPI Specification

cognite-data-point-subscriptions-api-openapi.yml Raw ↑
openapi: 3.2.0
info:
  title: Cognite 3D Asset Mapping Data point subscriptions API
  description: "# Introduction\nThis is the reference documentation for the Cognite API with\nan overview of all the available methods.\n\n# Postman\nSelect the **Download** button to download our OpenAPI specification to get started.\n\nTo import your data into Postman, select **Import**, and the Import modal opens.\nYou can import items by dragging or dropping files or folders. You can choose how to import your API and manage the import settings in **View Import Settings**.\n\nIn the Import Settings, set the **Folder organization** to **Tags**, select\n**Enable optional parameters** to turn off the settings, and select **Always inherit authentication** to turn on the settings. Select **Import**.\n\nSet the Authorization to **Oauth2.0**. By default, the settings are for Open Industrial Data. Navigate to [Cognite Hub](https://hub.cognite.com/open-industrial-data-211) to understand how to get the credentials for use in Postman.\n\nFor more information, see [Getting Started with Postman](https://developer.cognite.com/dev/guides/postman/).\n\n# Pagination\nMost resource types can be paginated, indicated by the field `nextCursor` in the response.\nBy passing the value of `nextCursor` as the cursor you will get the next page of `limit` results.\nNote that all parameters except `cursor` has to stay the same.\n\n# Parallel retrieval\nAs general guidance, Parallel Retrieval is a technique that should be used when due to query complexity, retrieval of data in a single request is significantly slower than it would otherwise be for a simple request.  Parallel retrieval does not act as a speed multiplier on optimally running queries.  By parallelizing such requests, data retrieval performance can be tuned to meet the client application needs. \n\nCDF supports parallel retrieval through the `partition` parameter, which has the format `m/n` where `n` is the amount of partitions you would like to split the entire data set into.\nIf you want to download the entire data set by splitting it into 10 partitions, do the following in parallel with `m` running from 1 to 10:\n  - Make a request to `/events` with `partition=m/10`.\n  - Paginate through the response by following the cursor as explained above. Note that the `partition` parameter needs to be passed to all subqueries.\n\nProcessing of parallel retrieval requests is subject to concurrency quota availability. The request returns the `429` response upon exceeding concurrency limits. See the Request throttling chapter below.\n\nTo prevent unexpected problems and to maximize read throughput, you should at most use 10 partitions. \nSome CDF resources will automatically enforce a maximum of 10 partitions.\nFor more specific and detailed information, please read the ```partition``` attribute documentation for the CDF resource you're using.  \n\n# Requests throttling\nCognite Data Fusion (CDF) returns the HTTP `429` (too many requests) response status code when project capacity exceeds the limit.\n\nThe throttling can happen:\n  - If a user or a project sends too many (more than allocated) concurrent requests.\n  - If a user or a project sends a too high (more than allocated) rate of requests in a given amount of time.\n\nCognite recommends using a retry strategy based on truncated exponential backoff to handle sessions with HTTP response codes 429.\n\nCognite recommends using a reasonable number (up to 10) of  `Parallel retrieval` partitions.\n\nFollowing these strategies lets you slow down the request frequency to maximize productivity without having to re-submit/retry failing requests.\n\nSee more [here](https://docs.cognite.com/dev/concepts/resource_throttling).\n\n# API versions\n## Version headers\nThis API uses calendar versioning, and version names follow the `YYYYMMDD` format.\nYou can find the versions currently available by using the version selector at the top of this page.\n\nTo use a specific API version, you can pass the `cdf-version: $version` header along with your requests to the API.\n\n## Beta versions\nThe beta versions provide a preview of what the stable version will look like in the future.\nBeta versions contain functionality that is reasonably mature, and highly likely to become a part of the stable API.\n\nBeta versions are indicated by a `-beta` suffix after the version name. For example, the beta version header for the\n2023-01-01 version is then `cdf-version: 20230101-beta`.\n\n## Alpha versions\nAlpha versions contain functionality that is new and experimental, and not guaranteed to ever become a part of the stable API.\nThis functionality presents no guarantee of service, so its use is subject to caution.\n\nAlpha versions are indicated by an `-alpha` suffix after the version name. For example, the alpha version header for\nthe 2023-01-01 version is then `cdf-version: 20230101-alpha`."
  version: v1
  contact:
    name: Cognite Support
    url: https://support.cognite.com
    email: support@cognite.com
servers:
- url: https://{cluster}.cognitedata.com/api/v1/projects/{project}
  description: The URL for the CDF cluster to connect to
  variables:
    cluster:
      enum:
      - api
      - az-tyo-gp-001
      - az-eastus-1
      - az-power-no-northeurope
      - westeurope-1
      - asia-northeast1-1
      - gc-dsm-gp-001
      default: api
      description: The CDF cluster to connect to
    project:
      default: publicdata
      description: The CDF project name.
security:
- oidc-token:
  - https://{cluster}.cognitedata.com/.default
- oauth2-client-credentials:
  - https://{cluster}.cognitedata.com/.default
- oauth2-open-industrial-data:
  - https://api.cognitedata.com/.default
- oauth2-auth-code:
  - https://{cluster}.cognitedata.com/.default
tags:
- name: Data point subscriptions
  description: "A data point subscription is a way to listen to changes to time series data points, in ingestion order.\n\nA single subscription can listen to many time series, and a time series can be part of many subscriptions.\n\nYou listen to subscriptions by calling the â\x80\x9Clist subscription dataâ\x80\x9C endpoint. It will return\na list of data point upserts and deleted ranges, together with a cursor to retrieve the next\nbatch of updates. Updates written since the creation of the subscription, up to 7 days ago, can be\nretrieved through the subscription.\n\nSubscriptions can be defined explicitly through a list of time series external ids and\ninstance ids, or implicitly through a filter. The filter is a subset of the advanced filter\nquery in the regular â\x80\x9Ctime series searchâ\x80\x9C endpoint.\n\nPartitions:\nSubscriptions can be further divided into a number of partitions, for the purpose of\nfetching subscription data in parallel. Each partition will return data in ingestion order,\nbut the order between partitions is not guaranteed.\n\nLimitations:\n- Each subscription can have at most 10000 time series.\n- A time series can be part of at most 10 subscriptions.\n- A project can have at most 1000 subscriptions, of which 100 are filter subscriptions.\n- Time series with security categories can not be shown in filter subscriptions.\n- Time series with neither external id nor instance id cannot be added to non-filter subscriptions.\n- The number of partitions cannot be changed after creation.\n\nAccess control:\nYou need READ access to subscriptions ACL to read/list\nsubscriptions or list data, and you need WRITE access to create/update/delete subscriptions.\nFurthermore, you need READ access to the time series you want to get updates from.\nFor filter subscriptions, you either need READ access to all time series, or the filter must\nbe restricted according to your access rights (e.g. by filtering on specific data set IDs).\n\nSubscriptions can have data sets that allow for more granular access\ncontrol. The data set on a subscription does not influence the data\nstream, but allows you to restrict who can read/update the subscription.\n\nName of ACL:\n  `timeSeriesSubscriptionsAcl`\n\nSupported actions:\n  - `READ`\n  - `WRITE`\n\nExample capabilities:\n```\n[\n    {\"timeSeriesAcl\":{\"actions\":[\"READ\"], \"scope\":{\"all\":{}}}},\n    {\"timeSeriesSubscriptionsAcl\":{\"actions\":[\"WRITE\", \"READ\"], \"scope\":{\"all\":{}}}}\n]\n```"
paths:
  /timeseries/subscriptions:
    post:
      tags:
      - Data point subscriptions
      summary: Create subscriptions
      description: '


        > **Required capabilities:** `timeSeriesSubscriptionsAcl:WRITE`


        Create one or more subscriptions that can be used to listen for changes in data points for a set of time series.'
      operationId: postSubscriptions
      requestBody:
        description: The subscriptions to create.
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/SubscriptionsCreateRequest'
        required: true
      responses:
        '201':
          description: A list of subscriptions that were created.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ListSubscriptionDTO'
      x-capability:
      - timeSeriesSubscriptionsAcl:WRITE
      x-code-samples:
      - lang: Python
        label: Python SDK
        source: "from cognite.client.data_classes import DataPointSubscriptionWrite\nsub = DataPointSubscriptionWrite(\n    external_id=\"my_subscription\",\n    name=\"My subscription\",\n    partition_count=1,\n    time_series_ids=[\"myFistTimeSeries\", \"mySecondTimeSeries\"])\ncreated = client.time_series.subscriptions.create(sub)\n\nfrom cognite.client.data_classes import DataPointSubscriptionWrite\nfrom cognite.client.data_classes.data_modeling import NodeId\nsub = DataPointSubscriptionWrite(\n    external_id=\"my_subscription\",\n    name=\"My subscription with Data Model Ids\",\n    partition_count=1,\n    instance_ids=[NodeId(\"my_space\", \"myFistTimeSeries\"), NodeId(\"my_space\", \"mySecondTimeSeries\")])\ncreated = client.time_series.subscriptions.create(sub)\n\nfrom cognite.client.data_classes import DataPointSubscriptionWrite\nfrom cognite.client.data_classes import filters as flt\nfrom cognite.client.data_classes.datapoints_subscriptions import DatapointSubscriptionProperty\nis_numeric_stepwise = flt.And(\n    flt.Equals(DatapointSubscriptionProperty.is_string, False),\n    flt.Equals(DatapointSubscriptionProperty.is_step, True))\nsub = DataPointSubscriptionWrite(\n    external_id=\"my_subscription\",\n    name=\"My subscription for numeric, stepwise time series\",\n    partition_count=1,\n    filter=is_numeric_stepwise)\ncreated = client.time_series.subscriptions.create(sub)\n"
    get:
      tags:
      - Data point subscriptions
      summary: List subscriptions
      description: '


        > **Required capabilities:** `timeSeriesSubscriptionsAcl:READ`


        List all subscriptions for the tenant. Use nextCursor to paginate through the results.'
      operationId: listSubscriptions
      parameters:
      - name: limit
        in: query
        description: Limit on the number of results to return.
        schema:
          maximum: 100
          minimum: 1
          type: integer
          format: int32
          default: 100
      - $ref: '#/components/parameters/Cursor'
      responses:
        '200':
          description: A complete list of subscriptions in the tenant.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ListSubscriptionDTOWithCursor'
      x-capability:
      - timeSeriesSubscriptionsAcl:READ
      x-code-samples:
      - lang: Python
        label: Python SDK
        source: 'subscriptions = client.time_series.subscriptions.list(limit=5)

          '
  /timeseries/subscriptions/members:
    get:
      tags:
      - Data point subscriptions
      summary: List subscription members
      description: '


        > **Required capabilities:** `timeSeriesSubscriptionsAcl:READ`


        List all member time series for a subscription.


        For non-filter subscriptions, either `externalId` or `instanceId` will be set. This is to be

        able to see if each time series was added by external id or instance id. If a time series

        has been added to a subscription both by external id and by instance id, it will be listed

        twice in the output. If a time series that belonged to the subscription has been deleted,

        `id` will not be set.


        Use `nextCursor` to paginate through the results.'
      operationId: listSubscriptionMembers
      parameters:
      - name: limit
        in: query
        description: Limit on the number of results to return.
        schema:
          maximum: 100
          minimum: 1
          type: integer
          format: int32
          default: 100
      - $ref: '#/components/parameters/Cursor'
      - name: externalId
        description: External id of the subscription.
        in: query
        schema:
          $ref: '#/components/schemas/CogniteExternalId'
      responses:
        '200':
          description: A complete list of member time series in the subscription.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ListSubscriptionMemberDTOWithCursor'
      x-capability:
      - timeSeriesSubscriptionsAcl:READ
      x-code-samples:
      - lang: Python
        label: Python SDK
        source: 'from cognite.client.data_classes import DataPointSubscriptionUpdate

          members = client.time_series.subscriptions.list_member_time_series("my_subscription")

          timeseries_external_ids = members.as_external_ids()

          '
  /timeseries/subscriptions/byids:
    post:
      tags:
      - Data point subscriptions
      summary: Retrieve subscriptions
      description: '


        > **Required capabilities:** `timeSeriesSubscriptionsAcl:READ`


        Retrieve one or more subscriptions by external ID.'
      operationId: getSubscriptionsByIds
      requestBody:
        description: Specify a list of the subscriptions to retrieve.
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/SubscriptionsByIdsRequest'
        required: true
      responses:
        '200':
          description: The retrieved subscriptions.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ListSubscriptionDTO'
      x-capability:
      - timeSeriesSubscriptionsAcl:READ
      x-code-samples:
      - lang: Python
        label: Python SDK
        source: 'res = client.time_series.subscriptions.retrieve("my_subscription")

          '
  /timeseries/subscriptions/update:
    post:
      tags:
      - Data point subscriptions
      summary: Update subscriptions
      description: '


        > **Required capabilities:** `timeSeriesSubscriptionsAcl:WRITE`


        Updates one or more subscriptions. Fields that are not included in the request, are not changed.


        If both `instanceIds` and `timeSeriesIds` are set, they must either both be add/remove or

        both be set operations.'
      operationId: updateSubscriptions
      requestBody:
        description: The subscriptions to update
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/SubscriptionsUpdateRequest'
        required: true
      responses:
        '200':
          description: A list of subscriptions updated
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ListSubscriptionDTO'
      x-capability:
      - timeSeriesSubscriptionsAcl:WRITE
      x-code-samples:
      - lang: Python
        label: Python SDK
        source: 'from cognite.client.data_classes import DataPointSubscriptionUpdate

          update = DataPointSubscriptionUpdate("my_subscription").name.set("My New Name")

          updated = client.time_series.subscriptions.update(update)


          from cognite.client.data_classes import DataPointSubscriptionUpdate

          update = DataPointSubscriptionUpdate("my_subscription").time_series_ids.add(["MyNewTimeSeriesExternalId"])

          updated = client.time_series.subscriptions.update(update)

          '
  /timeseries/subscriptions/delete:
    post:
      tags:
      - Data point subscriptions
      summary: Delete subscriptions
      description: '


        > **Required capabilities:** `timeSeriesSubscriptionsAcl:WRITE`


        Delete subscription(s). This operation cannot be undone'
      operationId: deleteSubscriptions
      requestBody:
        description: Specify a list of the subscriptions to delete.
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/SubscriptionsDeleteRequest'
        required: true
      responses:
        '200':
          $ref: '#/components/responses/EmptyResponse'
        '400':
          description: IDs not found.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/NotFoundResponse'
      x-capability:
      - timeSeriesSubscriptionsAcl:WRITE
      x-code-samples:
      - lang: Python
        label: Python SDK
        source: 'client.time_series.subscriptions.delete("my_subscription")

          '
  /timeseries/subscriptions/data/list:
    post:
      tags:
      - Data point subscriptions
      summary: List subscription data
      description: '


        > **Required capabilities:** `timeSeriesSubscriptionsAcl:READ`


        Fetch the next batch of data from a given subscription and partition(s).

        Data can be ingested datapoints and time ranges where data is deleted.

        This endpoint will also return changes to the subscription itself, that is, if time series

        are added or removed from the subscription.


        The data can be returned multiple times, there is no mechanism to acknowledge or delete data.

        Use cursors to paginate through the results.'
      operationId: listSubscriptionData
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/SubscriptionsListDataRequest'
      responses:
        '200':
          description: A batch of data from the subscription.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/SubscriptionsListDataResponse'
      x-capability:
      - timeSeriesSubscriptionsAcl:READ
      x-code-samples:
      - lang: Python
        label: Python SDK
        source: "for batch in client.time_series.subscriptions.iterate_data(\"my_subscription\"):\n    # Changes to the subscription itself:\n    print(f\"Added {len(batch.subscription_changes.added)} timeseries\")\n    print(f\"Removed {len(batch.subscription_changes.removed)} timeseries\")\n    print(f\"Changed timeseries data in {len(batch.updates)} updates\")\n    # Changes to datapoints for time series in the subscription:\n    for update in batch.updates:\n        upserts.time_series  # The time series the update belongs to\n        upserts.upserts  # The upserted datapoints, if any\n        upserts.deletes  # Ranges of deleted periods, if any\n    if not batch.has_next:\n        break\n\nfor batch in client.time_series.subscriptions.iterate_data(\"my_subscription\", \"3d-ago\"):\n    pass  # do something\n"
components:
  schemas:
    ListSubscriptionDTO:
      description: List of subscriptions.
      type: object
      required:
      - items
      properties:
        items:
          type: array
          items:
            $ref: '#/components/schemas/SubscriptionDTO'
    CogniteInstanceId:
      description: The ID of an [instance in Cognite Data Models](https://docs.cognite.com/cdf/dm/dm_concepts/dm_spaces_instances#instance).
      type: object
      required:
      - space
      - externalId
      properties:
        space:
          type: string
          minLength: 1
          maxLength: 43
        externalId:
          type: string
          minLength: 1
          maxLength: 255
    TimeSeriesContainsAnyFilter:
      type: object
      title: containsAny
      required:
      - containsAny
      properties:
        containsAny:
          required:
          - property
          - values
          description: 'Matches items where the property contains one or more of the given values.

            This filter can only be applied to multivalued properties.

            '
          type: object
          properties:
            property:
              $ref: '#/components/schemas/TimeSeriesFilterProperty'
            values:
              $ref: '#/components/schemas/TimeSeriesValues'
    SubscriptionsDataPartitionRequestDTO:
      type: object
      required:
      - index
      properties:
        index:
          type: integer
          description: Partition index to fetch data from. Between 0 and `partitions-1` inclusive.
        cursor:
          type: string
          description: Position in the partition stream to start fetching data from. Defaults to start of stream.
    TimeSeriesLeafFilter:
      description: 'Leaf filter.

        '
      title: Leaf filter
      type: object
      oneOf:
      - $ref: '#/components/schemas/TimeSeriesEqualsFilter'
      - $ref: '#/components/schemas/TimeSeriesInFilter'
      - $ref: '#/components/schemas/TimeSeriesRangeFilter'
      - $ref: '#/components/schemas/TimeSeriesPrefixFilter'
      - $ref: '#/components/schemas/TimeSeriesExistsFilter'
      - $ref: '#/components/schemas/TimeSeriesContainsAnyFilter'
      - $ref: '#/components/schemas/TimeSeriesContainsAllFilter'
      - $ref: '#/components/schemas/TimeSeriesSearchFilter'
    TimeSeriesSearchFilter:
      type: object
      title: search
      required:
      - search
      properties:
        search:
          required:
          - property
          - value
          description: 'Matches items where the provided string property contains the given value according to a fuzzy search.

            The value may exist anywhere in the string, even as a part of a word or with some grammatical

            variations (e.g., searching for "run" will also find "ran").


            The supported properties are `name` and `description`. It''s also possible to set `property`

            to `["query"]`, in which case both `name` and `description` will be searched.


            When the `search` filter is being used, and it''s not nested inside a `not` filter (directly or indirectly),

            and no `sort` is specified, the results will be ranked according to how good the match is.

            When the `query` ''property'' is specified, matches in `name` will rank higher than matches in `description`.

            The `search` filter may be used at most twice within the same `advancedFilter` expression.

            '
          type: object
          properties:
            property:
              $ref: '#/components/schemas/TimeSeriesFilterProperty'
            value:
              $ref: '#/components/schemas/TimeSeriesStringValue'
    SubscriptionsDataUpdateResponseDTO:
      type: object
      properties:
        timeSeries:
          $ref: '#/components/schemas/GetTimeSeriesForSubscription'
        upserts:
          $ref: '#/components/schemas/SubscriptionsDataUpsertsDTO'
        deletes:
          $ref: '#/components/schemas/SubscriptionsDataDeletesDTO'
    TimeSeriesContainsAllFilter:
      type: object
      title: containsAll
      required:
      - containsAll
      properties:
        containsAll:
          required:
          - property
          - values
          description: 'Matches items where the property contains all the given values.

            This filter can only be applied to multivalued properties.

            '
          type: object
          properties:
            property:
              $ref: '#/components/schemas/TimeSeriesFilterProperty'
            values:
              $ref: '#/components/schemas/TimeSeriesValues'
    ListSubscriptionMemberDTOWithCursor:
      type: object
      required:
      - items
      properties:
        items:
          type: array
          minItems: 0
          maxItems: 100
          items:
            $ref: '#/components/schemas/SubscriptionMemberDTO'
        nextCursor:
          type: string
          description: The cursor to get the next page of results (if available).
      description: A list of member time series along with possible cursors to get the next page of result
    EpochTimestamp:
      description: The number of milliseconds since 00:00:00 Thursday, 1 January 1970, Coordinated Universal Time (UTC), minus leap seconds.
      type: integer
      minimum: 0
      format: int64
      example: 1730204346000
    SubscriptionMemberDTO:
      type: object
      properties:
        externalId:
          $ref: '#/components/schemas/CogniteExternalId'
        id:
          $ref: '#/components/schemas/CogniteInternalId'
        instanceId:
          $ref: '#/components/schemas/CogniteInstanceId'
    NotFoundResponse:
      type: object
      required:
      - error
      properties:
        error:
          type: object
          description: Error details.
          required:
          - code
          - message
          - missing
          properties:
            code:
              type: integer
              description: HTTP status code
              format: int32
              example: 400
            message:
              type: string
              description: Error message.
            missing:
              uniqueItems: true
              type: array
              description: Items that are not found.
              items:
                description: Ids, ExternalIds or InstanceIds that are not found.
                oneOf:
                - type: object
                  title: id
                  required:
                  - id
                  properties:
                    id:
                      $ref: '#/components/schemas/CogniteInternalId'
                - type: object
                  title: externalId
                  required:
                  - externalId
                  properties:
                    externalId:
                      $ref: '#/components/schemas/CogniteExternalId'
                - type: object
                  title: instanceId
                  required:
                  - instanceId
                  properties:
                    instanceId:
                      $ref: '#/components/schemas/CogniteInstanceId'
    ListSubscriptionDTOWithCursor:
      type: object
      required:
      - items
      properties:
        items:
          type: array
          minItems: 0
          maxItems: 100
          items:
            $ref: '#/components/schemas/SubscriptionDTO'
        nextCursor:
          type: string
          description: The cursor to get the next page of results (if available).
      description: A list of subscriptions along with possible cursors to get the next page of result
    SubscriptionsUpdateRequest:
      type: object
      required:
      - items
      properties:
        items:
          type: array
          minItems: 1
          maxItems: 1
          items:
            type: object
            required:
            - externalId
            - update
            title: Select by externalId
            properties:
              externalId:
                $ref: '#/components/schemas/CogniteExternalId'
              update:
                type: object
                properties:
                  timeSeriesIds:
                    description: Update subscription definition (not applicable for filter subscriptions).
                    type: object
                    oneOf:
                    - properties:
                        add:
                          type: array
                          description: List of external ids of time series to add to the subscription. Repeat this operation to add more time series, up to the limit of 10,000.
                          minItems: 1
                          maxItems: 100
                          items:
                            $ref: '#/components/schemas/CogniteExternalId'
                        remove:
                          type: array
                          description: List of external ids of time series to remove from the subscription. Repeat this operation to remove more time series.
                          minItems: 1
                          maxItems: 100
                          items:
                            $ref: '#/components/schemas/CogniteExternalId'
                      title: Add or remove time series
                    - properties:
                        set:
                          type: array
                          description: Replace the subscription's current list of time series with this list of external ids. To have more than 100 time series, use the `add` operation in subsequent update calls.
                          minItems: 1
                          maxItems: 100
                          items:
                            $ref: '#/components/schemas/CogniteExternalId'
                      title: Replace the entire list of time series
                  instanceIds:
                    description: Update subscription definition (not applicable for filter subscriptions).
                    type: object
                    oneOf:
                    - properties:
                        add:
                          type: array
                          description: List of instance ids of time series to add to the subscription. Repeat this operation to add more time series, up to the limit of 10,000.
                          minItems: 1
                          maxItems: 100
                          items:
                            $ref: '#/components/schemas/CogniteInstanceId'
                        remove:
                          type: array
                          description: List of instance ids of time series to remove from the subscription. Repeat this operation to remove more time series.
                          minItems: 1
                          maxItems: 100
                          items:
                            $ref: '#/components/schemas/CogniteInstanceId'
                      title: Add or remove time series
                    - properties:
                        set:
                          type: array
                          description: Replace the subscription's current list of time series with this list of instance ids. To have more than 100 time series, use the `add` operation in subsequent update calls.
                          minItems: 1
                          maxItems: 100
                          items:
                            $ref: '#/components/schemas/CogniteInstanceId'
                      title: Replace the entire list of time series
                  name:
                    $ref: '#/components/schemas/NullableSinglePatchString'
                  description:
                    $ref: '#/components/schemas/NullableSinglePatchString'
                  dataSetId:
                    $ref: '#/components/schemas/NullableSinglePatchLong'
                  filter:
                    type: object
                    description: 'New filter definition of the subscription. This can only be used to

                      update a filter subscription. It is not possible to delete a filter,

                      you will have to delete the subscription.

                      This update is eventually consistent, there may be a period of time where

                      you get a mix of data, both from the old and the new filter.'
                    properties:
                      set:
                        $ref: '#/components/schemas/SubscriptionFilterLanguage'
    SubscriptionsDataDeletesDTO:
      type: array
      description: List of time ranges in which all data points were deleted.
      items:
        $ref: '#/components/schemas/DatapointsDeleteRange'
    TimeSeriesRangeValue:
      description: An upper or lower bound in a `range` filter.
      oneOf:
      - type: string
        maxLength: 256
      - type: number
      - type: integer
    NullableSinglePatchLong:
      oneOf:
      - type: object
        required:
        - set
        title: set
        properties:
          set:
            type: integer
            format: int64
      - type: object
        required:
        - setNull
        title: remove
        properties:
  

# --- truncated at 32 KB (67 KB total) ---
# Full source: https://raw.githubusercontent.com/api-evangelist/cognite/refs/heads/main/openapi/cognite-data-point-subscriptions-api-openapi.yml