Cognite Annotations API

Annotations reflect contextual information in base CDF resource types, such as Files and Time series, that are not present on the object itself. The benefits of the annotations concept are threefold: - The annotations concept is a good fit for enriching the base resources themselves, so that the overall data quality is higher in a given project. - It is also a good fit for building reference datasets for data problems uniformly across customer projects. Product teams can then use those reference datasets to train machine learning models or validate the performance of their algorithms on actual customer data. - Given a uniform way of labelling similar concepts across projects, it becomes easy for apps to agree on a consistent visual representation of those concepts.

Operations 7

POST /annotations Create annotations #
POST /annotations/suggest Suggest annotations #
GET /annotations/{annotationId} Get an annotation #
POST /annotations/list Filter annotations #
POST /annotations/byids Retrieve annotations #
POST /annotations/delete Delete annotations #
POST /annotations/update Update annotations #

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-annotations-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-annotations-api-openapi.yml Raw ↑
openapi: 3.2.0
info:
  title: Cognite 3D Asset Mapping Annotations 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: Annotations
  description: "Annotations reflect contextual information in base CDF resource types, such as Files and Time series, that are not\npresent on the object itself. The benefits of the annotations concept are threefold:\n\n- The annotations concept is a good fit for enriching the base resources themselves, so that the overall data\n  quality is higher in a given project.\n- It is also a good fit for building reference datasets for data problems uniformly across customer projects.\n  Product teams can then use those reference datasets to train machine learning models or validate the\n  performance of their algorithms on actual customer data.\n- Given a uniform way of labelling similar concepts across projects, it becomes easy for apps to agree on a consistent\n  visual representation of those concepts."
paths:
  /annotations:
    post:
      tags:
      - Annotations
      summary: Create annotations
      description: '


        > **Required capabilities:** `annotationsAcl:WRITE`


        Creates the given annotations.


        ### Identifiers

        An annotation _must_ reference an **annotated resource**.


        The reference can be made by providing the internal ID of the annotated resource.


        ### Status

        The annotation _must_ have the `status` field set to either "suggested", "rejected", or "approved"


        ### Access control

        The caller _must_ have read-access on all the **annotated resources**, otherwise the call will fail.


        ### Annotation types and Data

        The annotation **type** property _must_ be set to one of the globally available annotation types.

        See the documentation of the `annotationType` and `data` attributes for details.


        The annotation **data** _must_ conform to the schema provided by the annotation type.


        ### Creating Application and User

        The creating application and its version _must_ be provided. The creating user _must_ be provided, but if the

        annotation is being created by a service, this _can_ be set to `null`.'
      operationId: annotationsCreate
      requestBody:
        $ref: '#/components/requestBodies/AnnotationsV2CreateRequestSchema'
      responses:
        '201':
          $ref: '#/components/responses/AnnotationsV2CreateResponseSchema'
        '400':
          $ref: '#/components/responses/ErrorResponse'
      x-capability:
      - annotationsAcl:WRITE
      x-code-samples:
      - lang: JavaScript
        label: JavaScript SDK
        source: "const data = {\n  pageNumber: 7,\n  textRegion: { xMin: 0, xMax: 0.1, yMin: 0, yMax: 0.2 },\n  extractedText: 'i am your father',\n};\nconst annotation = {\n  annotatedResourceType: 'file' as const,\n  annotatedResourceId: 1,\n  annotationType: 'documents.ExtractedText',\n  creatingApp: 'integration-tests',\n  creatingAppVersion: '0.0.1',\n  creatingUser: 'integration-tests',\n  status: 'suggested' as const,\n  data,\n};\nconst created = await client.annotations.create([annotation]);"
  /annotations/suggest:
    post:
      tags:
      - Annotations
      summary: Suggest annotations
      description: '


        > **Required capabilities:** `annotationsAcl:SUGGEST`


        Suggests the given annotations, i.e. creates them with `status` set to "suggested"


        ### Identifiers

        An annotation _must_ reference an **annotated resource**.


        The reference can be made by providing the internal ID of the annotated resource.


        ### Access control

        The caller _must_ have read-access on all the **annotated resources**, otherwise the call will fail.


        ### Annotation types and Data

        The annotation **type** property _must_ be set to one of the globally available annotation types.

        See the documentation of the `annotationType` and `data` attributes for details.


        The annotation **data** _must_ conform to the schema provided by the annotation type.


        ### Creating Application and User

        The creating application and its version _must_ be provided. The creating user _must_ be provided, but if the

        annotation is being created by a service, this _can_ be set to `null`.'
      operationId: annotationsSuggest
      requestBody:
        $ref: '#/components/requestBodies/AnnotationsV2SuggestRequestSchema'
      responses:
        '201':
          $ref: '#/components/responses/AnnotationsV2CreateResponseSchema'
        '400':
          $ref: '#/components/responses/ErrorResponse'
      x-capability:
      - annotationsAcl:SUGGEST
      x-code-samples:
      - lang: JavaScript
        label: JavaScript SDK
        source: "const data = {\n  pageNumber: 7,\n  textRegion: { xMin: 0, xMax: 0.1, yMin: 0, yMax: 0.2 },\n  extractedText: 'i am your father',\n};\nconst partial = {\n  annotatedResourceType: 'file' as const,\n  annotatedResourceId: 1,\n  annotationType: 'documents.ExtractedText',\n  creatingApp: 'integration-tests',\n  creatingAppVersion: '0.0.1',\n  creatingUser: 'integration-tests',\n  data,\n};\n\nconst created = await client.annotations.suggest([partial]);"
  /annotations/{annotationId}:
    get:
      tags:
      - Annotations
      summary: Get an annotation
      description: 'Retrieves the referenced annotation.


        The caller _must_ have read-access on the **annotated resource**, otherwise the call will fail.'
      operationId: annotationsGet
      parameters:
      - $ref: '#/components/parameters/AnnotationId'
      responses:
        '200':
          $ref: '#/components/responses/AnnotationsV2ResponseSchema'
        '400':
          $ref: '#/components/responses/ErrorResponse'
      x-code-samples:
      - lang: JavaScript
        label: JavaScript SDK
        source: 'const annotationIds = [{ id: 1 }, { id: 2 }];


          const response = await client.annotations.retrieve(annotationIds);'
  /annotations/list:
    post:
      tags:
      - Annotations
      summary: Filter annotations
      description: 'Lists the annotations the caller has access to, based on a filter.


        The caller _must_ have read-access on the **annotated resources** listed in the filter, otherwise the call will

        fail.'
      operationId: annotationsFilter
      requestBody:
        $ref: '#/components/requestBodies/AnnotationsV2ListRequestSchema'
      responses:
        '200':
          $ref: '#/components/responses/AnnotationsV2CursoredListResponseSchema'
        '400':
          $ref: '#/components/responses/ErrorResponse'
      x-code-samples:
      - lang: JavaScript
        label: JavaScript SDK
        source: "const annotatedFileId = 1;\nconst limitOne = await client.annotations.list({\n  limit: 1,\n  filter: {\n   annotatedResourceType: 'file',\n   annotatedResourceIds: [{ id: 1 }],\n },\n});"
      - lang: Python
        label: Python SDK
        source: 'from cognite.client.data_classes import AnnotationFilter

          flt = AnnotationFilter(annotated_resource_type="file", annotated_resource_ids=[{"id": 123}])

          res = client.annotations.list(flt, limit=None)

          '
  /annotations/byids:
    post:
      tags:
      - Annotations
      summary: Retrieve annotations
      description: 'Retrieves the referenced annotations.


        The caller _must_ have read-access on all the **annotated resources**, otherwise the call will fail.'
      operationId: annotationsByids
      requestBody:
        $ref: '#/components/requestBodies/AnnotationsV2ByIdsRequestSchema'
      responses:
        '200':
          $ref: '#/components/responses/AnnotationsV2ListResponseSchema'
        '400':
          $ref: '#/components/responses/ErrorResponse'
      x-code-samples:
      - lang: JavaScript
        label: JavaScript SDK
        source: 'const annotationIds = [{ id: 1 }, { id: 2 }];


          const response = await client.annotations.retrieve(annotationIds);'
  /annotations/delete:
    post:
      tags:
      - Annotations
      summary: Delete annotations
      description: '


        > **Required capabilities:** `annotationsAcl:WRITE`


        Deletes the referenced annotations completely.


        The caller _must_ have read-access on all the **annotated resources**, otherwise the call will fail.'
      operationId: annotationsDelete
      requestBody:
        $ref: '#/components/requestBodies/AnnotationsV2ByIdsRequestSchema'
      responses:
        '200':
          description: Successful deletion
        '400':
          $ref: '#/components/responses/ErrorResponse'
      x-capability:
      - annotationsAcl:WRITE
      x-code-samples:
      - lang: JavaScript
        label: JavaScript SDK
        source: 'const annotationIds = [{ id: 1 }, { id: 2 }];


          await client.annotations.delete(annotationIds);'
  /annotations/update:
    post:
      tags:
      - Annotations
      summary: Update annotations
      description: '


        > **Required capabilities:** `annotationsAcl:WRITE`


        Updates the referenced annotations.


        The caller _must_ have read-access on all the **annotated resources**, otherwise the call will fail.'
      operationId: annotationsUpdate
      requestBody:
        $ref: '#/components/requestBodies/AnnotationsV2UpdateRequestSchema'
      responses:
        '200':
          $ref: '#/components/responses/AnnotationsV2UpdateResponseSchema'
        '400':
          $ref: '#/components/responses/ErrorResponse'
      x-capability:
      - annotationsAcl:WRITE
      x-code-samples:
      - lang: JavaScript
        label: JavaScript SDK
        source: "const data = {\n  pageNumber: 8,\n  fileRef: { externalId: 'def_file_changed' },\n  textRegion: { xMin: 0, xMax: 0.1, yMin: 0, yMax: 0.2 },\n};\nconst changes = [\n  {\n    id: 1,\n    update: {\n      data: {\n        set: data,\n      },\n    },\n  },\n];\n\nconst updatedResp = await client.annotations.update(changes);"
components:
  schemas:
    Annotations.Point:
      additionalProperties: false
      description: Point in a 2D-Cartesian coordinate system with origin at the top-left corner of the page
      properties:
        confidence:
          default: null
          description: The confidence score for the primitive. It should be between 0 and 1.
          maximum: 1
          minimum: 0
          type: number
        x:
          description: The abscissa of the point in a coordinate system with origin at the top-left corner of the page. Normalized in (0,1).
          maximum: 1
          minimum: 0
          type: number
        y:
          description: The ordinate of the point in a coordinate system with origin at the top-left corner of the page. Normalized in (0,1).
          maximum: 1
          minimum: 0
          type: number
      required:
      - x
      - y
      title: primitives.geometry2d.Point
      type: object
    AnnotationsV2SuggestSchema:
      type: object
      required:
      - annotatedResourceType
      - annotatedResourceId
      - annotationType
      - creatingApp
      - creatingAppVersion
      - creatingUser
      - data
      properties:
        annotatedResourceType:
          $ref: '#/components/schemas/AnnotatedResourceType'
        annotatedResourceId:
          $ref: '#/components/schemas/AnnotatedResourceId'
        annotationType:
          $ref: '#/components/schemas/AnnotationType'
        creatingApp:
          $ref: '#/components/schemas/Application'
        creatingAppVersion:
          $ref: '#/components/schemas/SemanticVersion'
        creatingUser:
          $ref: '#/components/schemas/User'
        data:
          $ref: '#/components/schemas/AnnotationData'
    Annotations.PolyLine:
      additionalProperties: false
      description: A polygonal chain consisting of _n_ vertices
      properties:
        confidence:
          default: null
          description: The confidence score for the primitive. It should be between 0 and 1.
          maximum: 1
          minimum: 0
          type: number
        vertices:
          items:
            $ref: '#/components/schemas/Annotations.Point'
          maxItems: 1000
          minItems: 2
          type: array
      required:
      - vertices
      title: primitives.geometry2d.PolyLine
      type: object
    Annotations.Line:
      additionalProperties: false
      description: Models a line in an engineering diagram
      properties:
        label:
          description: The label describing what type of object it is
          maxLength: 128
          minLength: 1
          type: string
        pageNumber:
          default: 1
          description: The number of the page on which this annotation is located. The first page has number 1.
          maximum: 100000
          minimum: 1
          type: integer
        polyline:
          $ref: '#/components/schemas/Annotations.PolyLine'
          description: The polyline representing the line
      required:
      - label
      - polyline
      title: diagrams.Line
      type: object
    AnnotationsV2ReferenceSchema:
      type: object
      description: A reference to an existing annotation
      required:
      - id
      properties:
        id:
          $ref: '#/components/schemas/AnnotationId'
    AnnotationType:
      type: string
      description: The type of the annotation. This uniquely decides what the structure of the `data` block will be.
      enum:
      - pointcloud.BoundingVolume
      - images.Classification
      - forms.Detection
      - documents.ExtractedText
      - diagrams.FileLink
      - isoplan.IsoPlanAnnotation
      - diagrams.Junction
      - images.KeypointCollection
      - diagrams.Line
      - images.ObjectDetection
      - images.TextRegion
      - diagrams.UnhandledSymbolObject
      - diagrams.UnhandledTextObject
      - diagrams.AssetLink
      - diagrams.InstanceLink
      - images.AssetLink
      - images.InstanceLink
      example: pointcloud.BoundingVolume
    Annotations.ExtractedText:
      additionalProperties: false
      description: Represents text extracted from a document. Annotations of this type are low-level and not specific to any domain.
      properties:
        pageNumber:
          default: 1
          description: The number of the page on which this annotation is located. The first page has number 1.
          maximum: 100000
          minimum: 1
          type: integer
        textRegion:
          $ref: '#/components/schemas/Annotations.BoundingBox'
          description: The location of the extracted text
        extractedText:
          description: The extracted text
          maxLength: 1024
          minLength: 1
          type: string
      required:
      - textRegion
      - extractedText
      title: documents.ExtractedText
      type: object
    Annotations.Junction:
      additionalProperties: false
      description: Models a junction between lines in an engineering diagram
      properties:
        pageNumber:
          default: 1
          description: The number of the page on which this annotation is located. The first page has number 1.
          maximum: 100000
          minimum: 1
          type: integer
        position:
          $ref: '#/components/schemas/Annotations.Point'
          description: The point representing the junction
      required:
      - position
      title: diagrams.Junction
      type: object
    Status:
      type: string
      description: The status of the annotation
      enum:
      - suggested
      - approved
      - rejected
      example: approved
    Annotations.cogmono__annotation_types__diagrams__InstanceLink:
      additionalProperties: false
      description: Models a link to an FDM instance referenced in an engineering diagram
      properties:
        description:
          default: null
          description: The description of a primitive
          maxLength: 500
          type: string
        pageNumber:
          default: 1
          description: The number of the page on which this annotation is located. The first page has number 1.
          maximum: 100000
          minimum: 1
          type: integer
        instanceRef:
          $ref: '#/components/schemas/Annotations.InstanceRef'
          description: The FDM instance this annotation is pointing to
        symbolRegion:
          $ref: '#/components/schemas/Annotations.BoundingBox'
          default: null
          description: Optional location of a symbol
        symbol:
          default: null
          description: The symbol found in the file
          maxLength: 128
          minLength: 1
          type: string
        text:
          description: The extracted text
          maxLength: 128
          minLength: 1
          type: string
        textRegion:
          $ref: '#/components/schemas/Annotations.BoundingBox'
          description: The location of the text mentioning the file
      required:
      - instanceRef
      - text
      - textRegion
      title: diagrams.InstanceLink
      type: object
    Annotations.AssetRef:
      additionalProperties: false
      description: A reference to an asset. Either the internal ID or the external ID must be provided (exactly one).
      oneOf:
      - required:
        - id
      - required:
        - externalId
      properties:
        id:
          default: null
          description: The internal ID of the referenced resource
          type: integer
        externalId:
          default: null
          description: The external ID of the referenced resource
          maxLength: 256
          type: string
      title: primitives.references.AssetRef
      type: object
    Annotations.cogmono__annotation_types__images__AssetLink:
      additionalProperties: false
      description: Models a link to a CDF Asset referenced in an image
      properties:
        confidence:
          default: null
          description: The confidence score for the primitive. It should be between 0 and 1.
          maximum: 1
          minimum: 0
          type: number
        assetRef:
          $ref: '#/components/schemas/Annotations.AssetRef'
          description: The asset this annotation is pointing to
        text:
          description: The extracted text
          maxLength: 128
          minLength: 1
          type: string
        textRegion:
          $ref: '#/components/schemas/Annotations.BoundingBox'
          description: The location of the text mentioning the asset
        objectRegion:
          $ref: '#/components/schemas/Annotations.cogmono__annotation_types__primitives__geometry2d__Geometry'
          default: null
          description: "\n    A geometry represented by exactly *one of* ` bounding_box`, `polygon` and\n    `polyline` which, respectively, represents a BoundingBox, Polygon and\n    PolyLine.\n    "
      required:
      - assetRef
      - text
      - textRegion
      title: images.AssetLink
      type: object
    AnnotationsV2ListResponseSchema:
      type: object
      required:
      - items
      properties:
        items:
          type: array
          description: A list of annotations
          items:
            $ref: '#/components/schemas/AnnotationsV2ResponseSchema'
    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
    User:
      type: string
      description: 'A username, or email, or name. This is not checked nor enforced. If the value is null, it means the

        annotation was created by a service.'
      nullable: true
      example: john.doe@cognite.com
      minLength: 1
      maxLength: 255
    AnnotationsV2UpdateDataSchema:
      type: object
      description: 'Each fields represent a "delta" that will be applied onto the corresponding field of the original

        annotation.



        ### Updating Annotation Type or Data

        Ensure that the new annotation data conforms to the new annotation type, otherwise the call will fail.'
      properties:
        annotationType:
          type: object
          required:
          - set
          properties:
            set:
              $ref: '#/components/schemas/AnnotationType'
        data:
          type: object
          required:
          - set
          properties:
            set:
              $ref: '#/components/schemas/AnnotationData'
        status:
          type: object
          required:
          - set
          properties:
            set:
              $ref: '#/components/schemas/Status'
      example:
        data:
          set:
            assetRef:
              externalId: abc
            symbolRegion:
              xMin: 0.1
              xMax: 0.2
              yMin: 0.1
              yMax: 0.2
            textRegion:
              xMin: 0.4
              xMax: 0.5
              yMin: 0.4
              yMax: 0.5
            pageNumber: 43
    Annotations.FileRef:
      additionalProperties: false
      description: A reference to a file. Either the internal ID or the external ID must be provided (exactly one).
      oneOf:
      - required:
        - id
      - required:
        - externalId
      properties:
        id:
          default: null
          description: The internal ID of the referenced resource
          type: integer
        externalId:
          default: null
          description: The external ID of the referenced resource
          maxLength: 256
          type: string
      title: primitives.references.FileRef
      type: object
    Annotations.SizeAndClassType:
      additionalProperties: false
      description: Store the dimension, units and class of a given annotation
      properties:
        size:
          default: null
          description: The size of the valve or spade
          type: number
        unit:
          default: null
          description: The units of the size (mm/inches)
          maxLength: 128
          minLength: 1
          type: string
        classType:
          default: null
          description: The class type of the valve or spade
          maxLength: 128
          minLength: 1
          type: string
      title: primitives.dimensions.SizeAndClassType
      type: object
    Annotations.FileLink:
      additionalProperties: false
      description: Models a link to a CDF File referenced in an engineering diagram
      properties:
        description:
          default: null
          description: The description of a primitive
          maxLength: 500
          type: string
        pageNumber:
          default: 1
          description: The number of the page on which this annotation is located. The first page has number 1.
          maximum: 100000
          minimum: 1
          type: integer
        fileRef:
          $ref: '#/components/schemas/Annotations.FileRef'
          description: The file this annotation is pointing to
        symbolRegion:
          $ref: '#/components/schemas/Annotations.BoundingBox'
          default: null
          description: The location of the symbol representing the file
        textRegion:
          $ref: '#/components/schemas/Annotations.BoundingBox'
          description: The location of the text mentioning the file
        text:
          default: null
          description: The extracted text
          maxLength: 128
          minLength: 1
          type: string
        symbol:
          default: null
          description: The symbol found in the file
          maxLength: 128
          minLength: 1
          type: string
      required:
      - fileRef
      - textRegion
      title: diagrams.FileLink
      type: object
    Annotations.Numerical:
      additionalProperties: false
      description: The numerical value of something
      properties:
        description:
          default: null
          description: The description of a primitive
          maxLength: 500
          type: string
        type:
          const: numerical
          type: string
        value:
          anyOf:
          - type: integer
          - type: number
          description: The numerical value
      required:
      - type
      - value
      title: primitives.attributes.Numerical
      type: object
    Annotations.ObjectDetection:
      additionalProperties: false
      description: 'Models an image object detection represented by a label, a geometry, and

        optionally a confidence value.'
      properties:
        attributes:
          additionalProperties:
            discriminator:
              mapping:
                boolean: '#/components/schemas/Annotations.Boolean'
                numerical: '#/components/schemas/Annotations.Numerical'
              propertyName: type
            oneOf:
            - $ref: '#/components/schemas/Annotations.Boolean'
            - $ref: '#/components/schemas/Annotations.Numerical'
          default: null
          description: Additional attributes data for a compound.
          type: object
        boundingBox:
          $ref: '#/components/schemas/Annotations.BoundingBox'
          default: null
        polygon:
          $ref: '#/components/schemas/Annotations.Polygon'
          default: null
        polyline:
          $ref: '#/components/schemas/Annotations.PolyLine'
          default: null
        label:
          description: The label describing what type of object it is
          maxLength: 128
          minLength: 1
          type: string
        confidence:
          default: null
          description: The confidence score for the primitive. It should be between 0 and 1.
          maximum: 1
          minimum: 0
          type: number
      required:
      - label
      title: images.ObjectDetection
      type: object
    AnnotationsV2FilterSchema:
      type: object
      description: A filter to apply on annotations
      required:
      - annotatedResourceType
      - annotatedResourceIds
      properties:
        annotatedResourceType:
          $ref: '#/components/schemas/AnnotatedResourceType'
        annotatedResourceIds:
          type: array
          items:
            $ref: '#/components/schemas/ResourceReference'
          minItems: 1
          maxItems: 1000
        annotationType:
          $ref: '#/components/schemas/AnnotationType'
        creatingApp:
          $ref: '#/components/schemas/Application'
        creatingAppVersion:
          $ref: '#/components/schemas/SemanticVersion'
        creatingUser:
          $ref: '#/components/schemas/User'
        status:
          $ref: '#/components/schemas/Status'
        data:
          description: 'Filter annotations by their data keys and values (case-sensitive). Concretely, by providing this field, we check for all annotations that contains the data filter as a subset.

            If `annotationType` is not specified, the data filter will applied across all annotation types.'
          example:
            label: cat
            fileRef:
              externalId: abc
        

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