> ## Documentation Index
> Fetch the complete documentation index at: https://docs.cognite.com/llms.txt
> Use this file to discover all available pages before exploring further.

> ## Agent Instructions
> Cognite Data Fusion (CDF) is an industrial DataOps platform. Prefer English docs unless the user asks for another locale.
> Follow /_llms/ index links recursively until you reach page URLs ending in .md. Fetch those Markdown twins instead of HTML.
> For REST APIs, default to calendar version 20230101 (stable). Use 20230101-beta or 20230101-alpha only if the user is on a preview API. Cite paths under /api-reference/concepts/<version>/ and the Cdf-Version header. Prefer the Python SDK (cognite-sdk) unless the user is in JavaScript/TypeScript.
> Start here by task: platform overview /cdf/index.md; data modeling /cdf/dm/index.md; data integration /cdf/integration/index.md; access /cdf/access/index.md; CDF Toolkit /cdf/deploy/cdf_toolkit/index.md; REST quickstart /dev/quickstart.md; Python SDK https://cognite-sdk-python.readthedocs-hosted.com/en/stable/; Atlas AI /cdf/atlas_ai/concepts/index.md; Flows apps /cdf/flows/index.md; MCP and IDE setup /dev/guides/ide_ai_integration.md.
> For implementation work, also load /skill.md.

# Retrieve subscriptions

> 

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

Retrieve one or more subscriptions by external ID.



## OpenAPI

````yaml https://storage.googleapis.com/cognitedata-api-docs/dist/20230101.json post /timeseries/subscriptions/byids
openapi: 3.1.0
info:
  title: Cognite API
  description: >-
    Reference documentation for the Cognite Data Fusion (CDF) API. See the [API
    introduction](/api-reference/concepts/20230101/api-description) and [API
    changelog](/api-reference/changelog).
  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: Token
  - name: Assets
  - name: Data Modeling
    x-uri-format-fragments: []
  - name: Streams
  - name: Records
  - name: Events
  - name: Files
  - name: Functions
  - name: Function calls
  - name: Function schedules
  - name: Function Apps
  - name: Function App Calls
  - name: Function App MCP
  - name: 3D
  - name: Time series
  - name: Data point subscriptions
  - name: Synthetic Time Series
  - name: Raw
    x-uri-format-fragments: []
  - name: Groups
  - name: Projects
  - name: Security categories
  - name: Data sets
  - name: Sequences
  - name: Labels
  - name: Relationships
  - name: Entity matching
  - name: Vision
  - name: Cognite AI
  - name: Documents
  - name: Document preview
    x-displayName: Preview
  - name: Geospatial
  - name: SessionsInternal
  - name: Sessions
  - name: Extraction Pipelines
  - name: Extraction Pipelines Runs
  - name: Extraction Pipelines Config
  - name: Extractors
  - name: Transformations
  - name: Transformation Jobs
  - name: Transformation Schedules
  - name: Transformation Notifications
  - name: Query
  - name: Schema
  - name: Transformation External Data Sources
  - name: Annotations
  - name: User profiles
  - name: Workflows
  - name: Workflow versions
  - name: Workflow executions
  - name: Tasks
  - name: Workflow triggers
  - name: Sources
  - name: Jobs
  - name: Destinations
  - name: Mappings
  - name: Previews
  - name: Postgres Gateway Users
  - name: Postgres Gateway Tables
  - name: SAP Instances
  - name: SAP Endpoints
  - name: Schema Mappings
  - name: Writeback Requests
  - name: Simulators
  - name: Simulator Integrations
  - name: Simulator Routines
  - name: Simulator Models
  - name: Simulation Runs
  - name: Simulator Logs
  - name: Units
  - name: Unit Systems
  - name: Application Data Storage
  - name: Location Filters
  - name: User Preferences
  - name: User History
  - name: Search Config
  - name: Organizations
  - name: Applications
  - name: Integrations
  - name: Integration Tasks
  - name: Integration Actions
  - name: Integration Configuration
  - name: Integration Errors
  - name: Principals
  - name: Signals
  - name: Data products
paths:
  /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-code-samples:
        - lang: Python
          label: Python SDK
          source: |
            res = client.time_series.subscriptions.retrieve("my_subscription")
components:
  schemas:
    SubscriptionsByIdsRequest:
      type: object
      required:
        - items
      allOf:
        - properties:
            items:
              uniqueItems: true
              type: array
              maxItems: 1
              minItems: 1
              description: List of ID objects
              items:
                type: object
                title: QueryWithExternalId
                properties:
                  externalId:
                    $ref: '#/components/schemas/CogniteExternalId'
        - $ref: '#/components/schemas/IgnoreUnknownIdsField'
    ListSubscriptionDTO:
      description: List of subscriptions.
      type: object
      required:
        - items
      properties:
        items:
          type: array
          items:
            $ref: '#/components/schemas/SubscriptionDTO'
    CogniteExternalId:
      description: >-
        The external ID provided by the client. Must be unique for the resource
        type.
      type: string
      maxLength: 255
      example: my.known.id
    IgnoreUnknownIdsField:
      type: object
      properties:
        ignoreUnknownIds:
          description: Ignore IDs and external IDs that are not found
          type: boolean
          default: false
    SubscriptionDTO:
      type: object
      required:
        - externalId
        - partitionCount
        - createdTime
        - lastUpdatedTime
      properties:
        externalId:
          $ref: '#/components/schemas/CogniteExternalId'
        name:
          description: The display name of this subscription.
          type: string
        description:
          description: Description of this subscription.
          type: string
        dataSetId:
          $ref: '#/components/schemas/DataSetId'
          deprecated: true
        partitionCount:
          description: The number of partitions in this subscriptions
          minimum: 1
          maximum: 100
          type: integer
          format: int32
        timeSeriesCount:
          type: integer
          format: int32
          description: The number of time series in the subscription.
        filter:
          $ref: '#/components/schemas/SubscriptionFilterLanguage'
          deprecated: true
        createdTime:
          $ref: '#/components/schemas/EpochTimestamp'
        lastUpdatedTime:
          $ref: '#/components/schemas/EpochTimestamp'
    DataSetId:
      description: The dataSet Id for the item.
      type: integer
      minimum: 1
      maximum: 9007199254740991
      format: int64
    SubscriptionFilterLanguage:
      type: object
      description: >
        A filter DSL (Domain Specific Language) to define advanced filter
        queries.


        At the top level, a `filter` expression is either a single Boolean
        filter or a

        single leaf filter. Boolean filters contain other Boolean filters and/or
        leaf filters. The

        total number of filters may be at most 100, and the depth (the greatest
        number of times

        filters have been nested inside each other) may be at most 10.
      oneOf:
        - $ref: '#/components/schemas/TimeSeriesBoolFilter'
        - $ref: '#/components/schemas/SubscriptionLeafFilter'
      example:
        or:
          - not:
              and:
                - equals:
                    property:
                      - metadata
                      - manufacturer
                    value: acme
                - in:
                    property:
                      - name
                    values:
                      - pump-1-temperature
                      - motor-9-temperature
                - range:
                    property:
                      - dataSetId
                    gte: 1
                    lt: 10
          - and:
              - equals:
                  property:
                    - assetId
                  value: 1234
              - equals:
                  property:
                    - description
                  value: Temperature in Celsius
    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
    TimeSeriesBoolFilter:
      description: >
        A query that matches items matching boolean combinations of other
        queries.

        It is built by nesting one or more Boolean clauses, each of which is one
        of `and`, `or`, and `not`.

        Each such clause contains one or more child clauses (though `not` can
        only have one).

        Each child clause can be either another Boolean clause or a leaf filter.
      title: Boolean filter
      type: object
      oneOf:
        - type: object
          title: and
          required:
            - and
          properties:
            and:
              description: >-
                All of the sub-clauses in the query must appear in matching
                items.
              type: array
              minItems: 1
              maxItems: 99
              items:
                $ref: '#/components/schemas/TimeSeriesFilterLanguage'
        - type: object
          title: or
          required:
            - or
          properties:
            or:
              description: >-
                At least one of the sub-clauses in the query must appear in
                matching items.
              type: array
              minItems: 1
              maxItems: 99
              items:
                $ref: '#/components/schemas/TimeSeriesFilterLanguage'
        - type: object
          title: not
          required:
            - not
          properties:
            not:
              title: Filter DSL
              description: Sub-clauses in the query must not appear in matching items.
              type: object
              allOf:
                - $ref: '#/components/schemas/TimeSeriesFilterLanguage'
    SubscriptionLeafFilter:
      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'
    TimeSeriesFilterLanguage:
      type: object
      description: >
        A filter DSL (Domain Specific Language) to define advanced filter
        queries.


        At the top level, an `advancedFilter` expression is either a single
        Boolean filter or a

        single leaf filter. Boolean filters contain other Boolean filters and/or
        leaf filters. The

        total number of filters may be at most 100, and the depth (the greatest
        number of times

        filters have been nested inside each other) may be at most 10. The
        `search` leaf filter may

        at most be used twice within a single `advancedFilter`, but all other
        filters can be used

        as many times as you like as long as the other limits are respected.
      oneOf:
        - $ref: '#/components/schemas/TimeSeriesBoolFilter'
        - $ref: '#/components/schemas/TimeSeriesLeafFilter'
      example:
        or:
          - not:
              and:
                - equals:
                    property:
                      - metadata
                      - manufacturer
                    value: acme
                - in:
                    property:
                      - name
                    values:
                      - pump-1-temperature
                      - motor-9-temperature
                - range:
                    property:
                      - dataSetId
                    gte: 1
                    lt: 10
          - and:
              - equals:
                  property:
                    - assetId
                  value: 1234
              - equals:
                  property:
                    - description
                  value: Temperature in Celsius
    TimeSeriesEqualsFilter:
      type: object
      title: equals
      required:
        - equals
      properties:
        equals:
          required:
            - property
            - value
          description: >
            Matches items where the given property is **exactly** equal to the
            given value.
          type: object
          properties:
            property:
              $ref: '#/components/schemas/TimeSeriesFilterProperty'
            value:
              $ref: '#/components/schemas/TimeSeriesValue'
    TimeSeriesInFilter:
      type: object
      title: in
      required:
        - in
      properties:
        in:
          required:
            - property
            - values
          description: >
            Matches items where the given property is **exactly** equal to one
            of the given values.

            This filter can only be applied to single-valued properties.
          type: object
          properties:
            property:
              $ref: '#/components/schemas/TimeSeriesFilterProperty'
            values:
              $ref: '#/components/schemas/TimeSeriesValues'
    TimeSeriesRangeFilter:
      type: object
      title: range
      required:
        - range
      properties:
        range:
          required:
            - property
          description: >
            Matches items that contain terms within the provided range.


            One upper bound and/or one lower bound must be specified. It's not
            allowed to specify both inclusive and exclusive

            bounds "on the same side" together (at most one of `lte` and `lt`
            may be specified, and at most one of `gte` and `gt`).

            - `gte`: Greater than or equal to.

            - `gt`: Greater than.

            - `lte`: Less than or equal to.

            - `lt`: Less than.


            May only be applied to string properties and number properties.
          type: object
          properties:
            property:
              $ref: '#/components/schemas/TimeSeriesFilterProperty'
            gte:
              $ref: '#/components/schemas/TimeSeriesRangeValue'
            gt:
              $ref: '#/components/schemas/TimeSeriesRangeValue'
            lte:
              $ref: '#/components/schemas/TimeSeriesRangeValue'
            lt:
              $ref: '#/components/schemas/TimeSeriesRangeValue'
    TimeSeriesPrefixFilter:
      type: object
      title: prefix
      required:
        - prefix
      properties:
        prefix:
          required:
            - property
            - value
          description: >
            Matches items where the provided property begins with the given
            text.
          type: object
          properties:
            property:
              $ref: '#/components/schemas/TimeSeriesFilterProperty'
            value:
              $ref: '#/components/schemas/TimeSeriesStringValue'
    TimeSeriesExistsFilter:
      type: object
      title: exists
      required:
        - exists
      properties:
        exists:
          required:
            - property
          description: |
            Matches items that have a value for the specified property.
          type: object
          properties:
            property:
              $ref: '#/components/schemas/TimeSeriesFilterProperty'
    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'
    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'
    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'
    TimeSeriesFilterProperty:
      description: >
        The property on which you want to filter. May be either:

        - A single-element list that contains the name of one of the predefined
        top-level
          properties, in which case the filter will be applied to that top-level property.
        - A single-element list that contains `'metadata'`, in which case the
        filter will be applied
          to _all_ metadata properties.
        - A two-element list where the first element is `'metadata'` and the
        second one is any
          string, in which case the filter will be applied to metadata properties with that name.
        - A two-element list where the first element is `'instanceId'` and the
        second element is
          either `'space'` or `'externalId'`.
      type: array
      minItems: 1
      maxItems: 2
      items:
        type: string
        minLength: 1
        maxLength: 256
    TimeSeriesValue:
      description: |
        A value that you wish to find in the provided property.
      oneOf:
        - type: string
          maxLength: 256
        - type: number
        - type: integer
        - type: boolean
    TimeSeriesValues:
      description: |
        One or more values that you wish to find in the provided properties.
      type: array
      minItems: 1
      maxItems: 100
      items:
        $ref: '#/components/schemas/TimeSeriesValue'
    TimeSeriesRangeValue:
      description: An upper or lower bound in a `range` filter.
      oneOf:
        - type: string
          maxLength: 256
        - type: number
        - type: integer
    TimeSeriesStringValue:
      title: String
      description: |
        A value that you wish to find in the provided property.
      type: string
      maxLength: 256
    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'
  securitySchemes:
    oidc-token:
      type: http
      scheme: bearer
      bearerFormat: OpenID Connect or OAuth2 token
      description: >-
        Access token issued by the CDF project's configured identity provider.
        Access token must be an OpenID Connect token, and the project must be
        configured to accept OpenID Connect tokens. Use a header key of
        'Authorization' with a value of 'Bearer $accesstoken'. The token can be
        obtained through any flow supported by the identity provider.
    oauth2-client-credentials:
      type: oauth2
      description: >-
        Access token issued by the CDF project's configured identity provider.
        Access token must be an OpenID Connect token, and the project must be
        configured to accept OpenID Connect tokens. Use a header key of
        'Authorization' with a value of 'Bearer $accesstoken'. The token can be
        obtained through any flow supported by the identity provider.
      flows:
        clientCredentials:
          tokenUrl: https://your-idps.token.url/
          scopes:
            default: https://{cluster}.cognitedata.com/.default
    oauth2-open-industrial-data:
      type: oauth2
      description: >-
        Auth flow for Open Industrial Data. Get your client secret from
        https://hub.cognite.com/open-industrial-data-211.
      flows:
        clientCredentials:
          tokenUrl: >-
            https://login.microsoftonline.com/48d5043c-cf70-4c49-881c-c638f5796997/oauth2/v2.0/token
          scopes:
            default: https://api.cognitedata.com/.default
    oauth2-auth-code:
      type: oauth2
      description: >-
        Access token issued by the CDF project's configured identity provider.
        Access token must be an OpenID Connect token, and the project must be
        configured to accept OpenID Connect tokens. Use a header key of
        'Authorization' with a value of 'Bearer $accesstoken'. The token can be
        obtained through any flow supported by the identity provider.
      flows:
        authorizationCode:
          authorizationUrl: https://your-idps.authorization.url/
          tokenUrl: https://your-idps.token.url/
          scopes:
            default: https://{cluster}.cognitedata.com/.default

````