Cognite Containers API

The Containers API from Cognite — 9 operation(s) for containers.

OpenAPI Specification

cognite-containers-api-openapi.yml Raw ↑
openapi: 3.1.0
info:
  title: Cognite 3D Asset Mapping Containers 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: Containers
paths:
  /models/containers:
    post:
      tags:
      - Containers
      summary: Create or update containers
      description: '


        > **Required capabilities:** `dataModelsAcl:WRITE`


        Add or update (upsert) containers. For unchanged container specifications, the operation completes without making any changes.  We will not update the ```lastUpdatedTime``` value for containers that remain unchanged.'
      operationId: ApplyContainers
      requestBody:
        description: Containers to add or update.
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/ContainerCreateCollection'
        required: true
      x-capability:
      - dataModelsAcl:WRITE
      responses:
        '200':
          $ref: '#/components/responses/ContainerCollectionResponse'
        '400':
          $ref: '#/components/responses/ErrorResponse'
        '409':
          description: View conflict
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/UpsertConflict'
      x-code-samples:
      - lang: Python
        label: Python SDK
        source: "from cognite.client.data_classes.data_modeling import ContainerApply, ContainerProperty, Text\ncontainer = [ContainerApply(space=\"mySpace\", external_id=\"myContainer\",\n    properties={\"name\": ContainerProperty(type=Text, name=\"name\")})]\nres = client.data_modeling.containers.apply(container)\n\nfrom cognite.client.data_classes.data_modeling import Float64\nfrom cognite.client.data_classes.data_modeling.data_types import UnitReference\ncontainer = ContainerApply(\n    space=\"mySpace\",\n    external_id=\"myContainer\",\n    properties={\n        \"maxPressure\": ContainerProperty(\n            nullable=True,\n            description=\"Maximum Pump Pressure\",\n            name=\"maxPressure\",\n            type=Float64(\n                unit=UnitReference(\n                    external_id=\"pressure:bar\",\n                    source_unit=\"BAR\"\n                )\n            )\n        ),\n        \"rotationConfigurations\": ContainerProperty(\n            nullable=True,\n            description=\"Rotation Configurations\",\n            name=\"rotationConfigurations\",\n            type=Float64(\n                is_list=True,\n                unit=UnitReference(\n                    external_id=\"angular_velocity:rev-per-min\"\n                )\n            )\n        )\n    }\n)\nres = client.data_modeling.containers.apply(container)\n\nfrom cognite.client.data_classes.data_modeling.data_types import UnitReference, EnumValue\nfrom cognite.client.data_classes.data_modeling.data_types import (\n    Boolean, Date, DirectRelation, Enum, FileReference, Float32, Float64,\n    Int32, Int64, Json, SequenceReference, Text, TimeSeriesReference, Timestamp\n)\ncontainer_properties = {\n    \"prop01\": ContainerProperty(Boolean),\n    \"prop02\": ContainerProperty(Boolean(is_list=True)),\n    \"prop03\": ContainerProperty(Date),\n    \"prop04\": ContainerProperty(Date(is_list=True)),\n    \"prop05\": ContainerProperty(Timestamp),\n    \"prop06\": ContainerProperty(Timestamp(is_list=True)),\n    \"prop07\": ContainerProperty(Text),\n    \"prop08\": ContainerProperty(Text(is_list=True)),\n    # Note: DirectRelation(list) support `container`: The (optional) required type for the node\n    #       the direct relation points to.\n    \"prop09\": ContainerProperty(DirectRelation),\n    \"prop10\": ContainerProperty(DirectRelation(is_list=True)),\n    # Note: Enum also support `unknown_value`: The value to use when the enum value is unknown.\n    \"prop11\": ContainerProperty(\n        Enum({\"Closed\": EnumValue(\"Valve is closed\"),\n              \"Opened\": EnumValue(\"Valve is opened\")})),\n    # Note: Floats support unit references, e.g. `unit=UnitReference(\"pressure:bar\")`:\n    \"prop12\": ContainerProperty(Float32),\n    \"prop13\": ContainerProperty(Float32(is_list=True)),\n    \"prop14\": ContainerProperty(Float64),\n    \"prop15\": ContainerProperty(Float64(is_list=True)),\n    \"prop16\": ContainerProperty(Int32),\n    \"prop17\": ContainerProperty(Int32(is_list=True)),\n    \"prop18\": ContainerProperty(Int64),\n    \"prop19\": ContainerProperty(Int64(is_list=True)),\n    \"prop20\": ContainerProperty(Json),\n    \"prop21\": ContainerProperty(Json(is_list=True)),\n    \"prop22\": ContainerProperty(SequenceReference),\n    \"prop23\": ContainerProperty(SequenceReference(is_list=True)),\n    # Note: It is adviced to represent files and time series directly as nodes\n    #       instead of referencing existing:\n    \"prop24\": ContainerProperty(FileReference),\n    \"prop25\": ContainerProperty(FileReference(is_list=True)),\n    \"prop26\": ContainerProperty(TimeSeriesReference),\n    \"prop27\": ContainerProperty(TimeSeriesReference(is_list=True)),\n}\ncontainer = ContainerApply(\n    space=\"my-space\",\n    external_id=\"my-everything-container\",\n    properties=container_properties,\n)\n"
    get:
      tags:
      - Containers
      summary: List containers defined in the project
      description: '


        > **Required capabilities:** `dataModelsAcl:READ`


        List of containers defined in the current project. You can filter the list by specifying a space.'
      operationId: listContainers
      parameters:
      - $ref: '#/components/parameters/ReducedLimit'
      - $ref: '#/components/parameters/Cursor'
      - $ref: '#/components/parameters/Space'
      - $ref: '#/components/parameters/IncludeGlobal'
      - $ref: '#/components/parameters/FilterUsedFor'
      x-capability:
      - dataModelsAcl:READ
      responses:
        '200':
          $ref: '#/components/responses/ContainerCollectionResponseWithCursor'
        '400':
          $ref: '#/components/responses/ErrorResponse'
      x-code-samples:
      - lang: Python
        label: Python SDK
        source: "container_list = client.data_modeling.containers.list(limit=5)\n\nfor container in client.data_modeling.containers:\n    container # do something with the container\n\nfor container_list in client.data_modeling.containers(chunk_size=10):\n    container_list # do something with the containers\n"
  /models/containers/byids:
    post:
      tags:
      - Containers
      summary: Retrieve containers by their external ids
      description: '


        > **Required capabilities:** `dataModelsAcl:READ`


        Retrieve up to 100 containers by their specified external ids.'
      operationId: byExternalIdsContainers
      requestBody:
        description: List of external-ids of containers to retrieve.
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/ListOfSpaceExternalIdsRequest'
        required: true
      x-capability:
      - dataModelsAcl:READ
      responses:
        '200':
          $ref: '#/components/responses/ContainerCollectionResponse'
        '400':
          $ref: '#/components/responses/ErrorResponse'
      x-code-samples:
      - lang: Python
        label: Python SDK
        source: 'res = client.data_modeling.containers.retrieve((''mySpace'', ''myContainer''))


          from cognite.client.data_classes.data_modeling import ContainerId

          res = client.data_modeling.containers.retrieve(ContainerId(space=''mySpace'', external_id=''myContainer''))

          '
  /models/containers/delete:
    post:
      tags:
      - Containers
      summary: Delete containers
      description: '


        > **Required capabilities:** `dataModelsAcl:WRITE`


        Delete one or more containers. Currently limited to 100 containers at a time.'
      operationId: deleteContainers
      requestBody:
        description: List of spaces and external-ids for the containers you want to delete.
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/ListOfSpaceExternalIdsRequest'
        required: true
      x-capability:
      - dataModelsAcl:WRITE
      responses:
        '200':
          $ref: '#/components/responses/ListOfSpaceExternalIdsResponse'
        '400':
          $ref: '#/components/responses/ErrorResponse'
      x-code-samples:
      - lang: Python
        label: Python SDK
        source: 'client.data_modeling.containers.delete(("mySpace", "myContainer"))

          '
  /models/containers/indexes/delete:
    post:
      tags:
      - Containers
      summary: Delete indexes from containers
      description: '


        > **Required capabilities:** `dataModelsAcl:WRITE`


        Delete one or more container indexes. Currently limited to 10 indexes at a time.'
      operationId: deleteContainerIndexes
      requestBody:
        description: List of references to the indexes you want to delete.
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/ListOfContainerSubObjectIdentifierRequest'
        required: true
      x-capability:
      - dataModelsAcl:WRITE
      responses:
        '200':
          $ref: '#/components/responses/ListOfContainerSubObjectIdentifierResponse'
        '400':
          $ref: '#/components/responses/ErrorResponse'
      x-code-samples:
      - lang: Python
        label: Python SDK
        source: "client.data_modeling.containers.delete_indexes(\n    [(ContainerId(\"mySpace\", \"myContainer\"), \"myIndex\")]\n)\n"
  /models/containers/indexes/retry:
    post:
      tags:
      - Containers
      summary: Retry failed indexes
      description: '


        > **Required capabilities:** `dataModelsAcl:WRITE`


        Triggers a retry of the given failed container indexes. This will usually entail scanning through all the data in the container, so use this sparingly. There are strict limits as to how often a given index can be retried, and how many schema entities can be in a retrying state simultaneously.'
      operationId: retryContainerIndexes
      requestBody:
        description: List of references to the indexes you want to retry.
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/ListOfContainerSubObjectIdentifierRequest'
        required: true
      x-capability:
      - dataModelsAcl:WRITE
      responses:
        '200':
          $ref: '#/components/responses/ListOfContainerSubObjectIdentifierResponse'
        '400':
          $ref: '#/components/responses/ErrorResponse'
  /models/containers/constraints/delete:
    post:
      tags:
      - Containers
      summary: Delete constraints from containers
      description: '


        > **Required capabilities:** `dataModelsAcl:WRITE`


        Delete one or more container constraints. Currently limited to 10 constraints at a time.'
      operationId: deleteContainerConstraints
      requestBody:
        description: List of references to the constraints you want to delete.
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/ListOfContainerSubObjectIdentifierRequest'
        required: true
      x-capability:
      - dataModelsAcl:WRITE
      responses:
        '200':
          $ref: '#/components/responses/ListOfContainerSubObjectIdentifierResponse'
        '400':
          $ref: '#/components/responses/ErrorResponse'
      x-code-samples:
      - lang: Python
        label: Python SDK
        source: "client.data_modeling.containers.delete_constraints(\n    [(ContainerId(\"mySpace\", \"myContainer\"), \"myConstraint\")]\n)\n"
  /models/containers/constraints/retry:
    post:
      tags:
      - Containers
      summary: Retry failed container constraints
      description: '


        > **Required capabilities:** `dataModelsAcl:WRITE`


        Triggers a revalidation of the given failed container constraints. This will usually entail scanning through all the data in the container, so use this sparingly. There are strict limits as to how often a given constraint can be revalidated, and how many schema entities can be in a retrying state simultaneously.'
      operationId: retryContainerConstraints
      requestBody:
        description: List of references to the constraints you want to retry.
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/ListOfContainerSubObjectIdentifierRequest'
        required: true
      x-capability:
      - dataModelsAcl:WRITE
      responses:
        '200':
          $ref: '#/components/responses/ListOfContainerSubObjectIdentifierResponse'
        '400':
          $ref: '#/components/responses/ErrorResponse'
  /models/containers/properties/retry:
    post:
      tags:
      - Containers
      summary: Retry failed property constraints
      description: '


        > **Required capabilities:** `dataModelsAcl:WRITE`


        Triggers a revalidation of failed constraints on the given properties. This includes `nullable`, `maxListSize` and `maxTextSize`. Revalidation usually entails scanning through all the data in the container, so use this sparingly. There are strict limits as to how often a given property can be revalidated, and how many schema entities can be in a retrying simultaneously.'
      operationId: retryPropertyConstraints
      requestBody:
        description: List of references to properties with property-level constraints that you want to retry.
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/ListOfContainerSubObjectIdentifierRequest'
        required: true
      x-capability:
      - dataModelsAcl:WRITE
      responses:
        '200':
          $ref: '#/components/responses/ListOfContainerSubObjectIdentifierResponse'
        '400':
          $ref: '#/components/responses/ErrorResponse'
  /models/containers/inspect:
    post:
      tags:
      - Containers
      summary: Inspect containers
      operationId: containerInspect
      requestBody:
        description: Which containers to inspect and the inspection operations to run.
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/ContainerInspectRequest'
        required: true
      x-capability:
      - dataModelsAcl:READ
      responses:
        '200':
          $ref: '#/components/responses/ContainerInspectResponse'
        '400':
          $ref: '#/components/responses/ErrorResponse'
      description: '


        > **Required capabilities:** `dataModelsAcl:READ`

        '
components:
  schemas:
    ConstraintCreateDefinition:
      type: object
      description: "Defines a constraint across the properties you include.\n\n\nYou can use constraints to enforce that;\n * Certain properties must be present,\n * A value must be unique across a single or several properties.\n\nA 'uniqueness' constraint can only apply to properties that are in the same container. Up to 10 'uniqueness' constraints can be added per container. \n\n\nA 'requires' constraint can reference other containers. As a result, the properties in those other containers must then also be set. Up to 25 'requires' constraints can be added per container. "
      oneOf:
      - $ref: '#/components/schemas/RequiresConstraintCreateDefinition'
      - $ref: '#/components/schemas/UniquenessConstraintCreateDefinition'
    RecordContainerCreateDefinition:
      title: Record Container
      allOf:
      - $ref: '#/components/schemas/ContainerCommon'
      - type: object
        required:
        - properties
        properties:
          usedFor:
            type: string
            description: Must be set to ```record``` for record containers. A single container cannot serve both instances (nodes/edges) and records.
            enum:
            - record
          properties:
            description: 'We index the property by a local unique identifier. The identifier has to have a length of between 1 and 255 characters.  It must also match the pattern ```^[a-zA-Z0-9][a-zA-Z0-9_-]{0,253}[a-zA-Z0-9]?$``` , and it cannot be any of the following reserved identifiers: ```space```, ```externalId```, ```createdTime```, ```lastUpdatedTime```, ```deletedTime```, ```edge_id```, ```node_id```, ```project_id```, ```property_group```, ```seq```, ```tg_table_name```, and ```extensions```. The maximum number of properties depends on the project subscription and is by default 1,000.'
            minProperties: 1
            additionalProperties:
              x-additionalPropertiesName: containerPropertyIdentifier
              allOf:
              - $ref: '#/components/schemas/RecordContainerPropertyCreateDefinition'
    UsedFor:
      type: string
      description: Should this operation apply to nodes, edges, records, or both nodes and edges. **NB!** Currently ```all``` applies to nodes and edges, but not records.
      enum:
      - node
      - edge
      - record
      - all
      default: node
    InvertedIndexCreateDefinition:
      type: object
      required:
      - properties
      properties:
        properties:
          type: array
          description: List of properties to define the index across
          items:
            type: string
        indexType:
          type: string
          enum:
          - inverted
          default: inverted
          description: 'An inverted index can be used to index composite values, and the queries to be handled by the index need to search for element values that appear within the composite items. So if for example you have a property X of type `int[]` and you want to efficiently query for all instances where X contains some value Y, you can create an inverted index on X. '
    ConstraintOrIndexState:
      type: string
      enum:
      - current
      - pending
      - failed
    ContainerPropertyTypeDefinition:
      type: object
      required:
      - type
      properties:
        type:
          description: "The type of data you can store in this property. Most properties can also hold a list of values, for example, a list of integers or a list of timestamps. The supported storage types are:\n\n\n* text (allows user control of collation),\n * boolean,\n * 32-bit, and 64-bit float,\n * 32-bit, and 64-bit integer,\n * timestamp,\n * date,\n * JSON fragment,\n * direct relation to an existing node,\n * time series external-id reference,\n * file external-id reference,\n * sequence external-id reference,\n * enum.\n\n\nThe JSON fragments have to be valid JSON objects. If JSON arrays are to be stored, these must be wrapped in a JSON object. JSON values (such as string, number, boolean) should use their respective primitive form instead. The maximum allowed size for a JSON object is 40960 bytes. For lists of json values, the size of the entire list must be within this limit. The maximum allowed length of a key is 128, while the maximum allowed size of a value is 10240 bytes and you can have up to 256 key-value pairs. The  byte sizes are computed by representing the data as a UTF-8 encoded JSON string.\nDirect relations use a space external-id, the external-id for an existing node, and the external-id for the data container. E.g. ```s-spaceExternalId.uniqueNodeExternalId.containerExternalId```\nTimestamps must be a string in the format 'YYYY-MM-DDTHH:MM:SS[.millis][Z|time zone]' with optional milliseconds having precision of 1-3 decimal digits and optional timezone with format ±HH:MM, ±HHMM, ±HH or Z, where Z represents UTC, Year must be between 0001 and 9999.\nDates must be a date string in the format 'YYYY-MM-DD'. Year must be between 1 and 9999. "
          oneOf:
          - $ref: '#/components/schemas/TextProperty'
          - $ref: '#/components/schemas/PrimitiveProperty'
          - $ref: '#/components/schemas/CDFExternalIdReference'
          - $ref: '#/components/schemas/DirectNodeRelation'
          - $ref: '#/components/schemas/EnumProperty'
    ContainerPropertyDefinition:
      description: Defines a property of a container.  You can reference this property in views.
      allOf:
      - $ref: '#/components/schemas/CorePropertyDefinition'
      - $ref: '#/components/schemas/ContainerPropertyTypeDefinition'
    IndexState:
      type: object
      required:
      - state
      properties:
        state:
          description: "This field describes the validity of the index.\n\nPossible values are:\n\n* `\"failed\"`: The index can't be built.\n  This can occur if data existing before the index was created data prevents the index from being built.\n  For example, property values in a btree index have a size limit on them.\n  Use `maxListSize` and `maxTextSize` to bound the size of btree indexed properties.\n* `\"current\"`: The index is built successfully.\n* `\"pending\"`: The index is still building.\n"
          $ref: '#/components/schemas/ConstraintOrIndexState'
    ContainerDefinition:
      required:
      - space
      - externalId
      - properties
      - usedFor
      - createdTime
      - lastUpdatedTime
      - isGlobal
      allOf:
      - $ref: '#/components/schemas/ContainerCommon'
      - type: object
        properties:
          usedFor:
            $ref: '#/components/schemas/UsedFor'
          createdTime:
            $ref: '#/components/schemas/EpochTimestamp'
          lastUpdatedTime:
            $ref: '#/components/schemas/EpochTimestamp'
          isGlobal:
            type: boolean
            description: Is this a global container.
          properties:
            description: 'We index the property by a local unique identifier. The identifier has to have a length of between 1 and 255 characters.  It must also match the pattern ```^[a-zA-Z0-9][a-zA-Z0-9_-]{0,253}[a-zA-Z0-9]?$``` , and it cannot be any of the following reserved identifiers: ```space```, ```externalId```, ```createdTime```, ```lastUpdatedTime```, ```deletedTime```, ```edge_id```, ```node_id```, ```project_id```, ```property_group```, ```seq```, ```tg_table_name```, and ```extensions```. The maximum number of properties depends on the project subscription and is by default 100 (or 1,000 for containers with ```usedFor``` set to ```record```).'
            minProperties: 1
            additionalProperties:
              x-additionalPropertiesName: containerPropertyIdentifier
              allOf:
              - $ref: '#/components/schemas/ContainerPropertyDefinition'
          constraints:
            type: object
            description: Set of constraints applied to the container. Constraints are not supported for containers with ```usedFor``` set to ```record```.
            additionalProperties:
              x-additionalPropertiesName: constraint-identifier
              allOf:
              - $ref: '#/components/schemas/ConstraintDefinition'
          indexes:
            type: object
            description: Set of indexes applied to the container. Indexes are not supported for containers with ```usedFor``` set to ```record```.
            additionalProperties:
              x-additionalPropertiesName: index-identifier
              allOf:
              - $ref: '#/components/schemas/IndexDefinition'
    Error:
      type: object
      required:
      - code
      - message
      description: Cognite API error.
      properties:
        code:
          type: integer
          description: HTTP status code.
          format: int32
          example: 401
        message:
          type: string
          description: Error message.
          example: Could not authenticate.
        missing:
          type: array
          description: List of lookup objects that do not match any results.
          items:
            type: object
            additionalProperties: true
        duplicated:
          type: array
          description: List of objects that are not unique.
          items:
            type: object
            additionalProperties: true
    ConstraintDefinition:
      type: object
      description: "Describes a constraint across the properties included.\n\n\nConstraints enforce that;\n * Certain properties must be present,\n * A value must be unique across a single or several properties.\n\nA 'uniqueness' constraint can only apply to properties that are in the same container. Up to 10 'uniqueness' constraints can be added per container. \n\n\nA 'requires' constraint can reference other containers. As a result, the properties in those other containers must then also be set. Up to 25 'requires' constraints can be added per container. "
      oneOf:
      - $ref: '#/components/schemas/RequiresConstraintDefinition'
      - $ref: '#/components/schemas/UniquenessConstraintDefinition'
    EnumProperty:
      type: object
      description: 'An enum type property.


        An enum property can only consist of predefined values.

        '
      required:
      - type
      - values
      properties:
        type:
          type: string
          enum:
          - enum
        unknownValue:
          type: string
          description: 'The value to use when the enum value is unknown.

            This can optionally be used to provide forward-compatibility, Specifying what value to use if the client does not recognize the returned value. It is not possible to ingest the unknown value, but it must be part of the allowed values.'
        values:
          type: object
          description: 'A set of all possible values for the enum property. The enum value identifier has to have a length of between 1 and 127 characters.  It must also match the pattern ```^[_A-Za-z][_0-9A-Za-z]{0,127}$```, and not be `"true"`, `"false"` or `"null"`.


            Example: ```{ "value1": { "name": "Value 1", "description": "This is value 1" }, "value2": { } }```'
          additionalProperties:
            x-additionalPropertiesName: enumValueIdentifier
            minProperties: 1
            maxProperties: 32
            allOf:
            - $ref: '#/components/schemas/EnumValueProperties'
      example:
        unknownValue: unknown
        values:
          value1:
            name: Value 1
            description: This is value 1
          value2: {}
          unknown:
            name: Unknown
            description: Used if the client does not recognize the returned value.
    RequiresConstraintCreateDefinition:
      type: object
      required:
      - require
      properties:
        constraintType:
          type: string
          enum:
          - requires
          default: requires
        require:
          $ref: '#/components/schemas/ContainerReference'
    UniquenessConstraintDefinition:
      allOf:
      - $ref: '#/components/schemas/ConstraintState'
      - $ref: '#/components/schemas/UniquenessConstraintCreateDefinition'
    ListOfContainerSubObjectIdentifierRequest:
      type: object
      required:
      - items
      properties:
        items:
          type: array
          minItems: 1
          maxItems: 10
          items:
            $ref: '#/comp

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