Cognite Entity matching API

The entity matching contextualization endpoints lets you match CDF resources. For example, you can match time series to assets. The model uses similarity between string-fields from the source and the target to find potential matches, for instance the source name and the target name. The exact algorithm may change over time.

OpenAPI Specification

cognite-entity-matching-api-openapi.yml Raw ↑
openapi: 3.1.0
info:
  title: Cognite 3D Asset Mapping Entity matching 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: Entity matching
  description: The entity matching contextualization endpoints lets you match CDF resources. For example, you can match time series to assets. The model uses similarity between string-fields from the source and the target to find potential matches, for instance the source name and the target name. The exact algorithm may change over time.
paths:
  /context/entitymatching:
    get:
      tags:
      - Entity matching
      summary: List entity matching models
      description: '


        > **Required capabilities:** `entitymatchingAcl:READ`


        List all available entity matching models, with pagination.'
      operationId: entityMatchingModels
      parameters:
      - $ref: '#/components/parameters/Cursor'
      - $ref: '#/components/parameters/StrictLimit1000'
      responses:
        '200':
          description: Success
          content:
            application/json:
              schema:
                type: object
                required:
                - items
                properties:
                  items:
                    type: array
                    items:
                      $ref: '#/components/schemas/EntityMatcherResponseSchema'
                  nextCursor:
                    $ref: '#/components/schemas/NextCursorV3'
        '400':
          $ref: '#/components/responses/ErrorResponse'
      x-capability:
      - entitymatchingAcl:READ
      x-code-samples:
      - lang: Python
        label: Python SDK
        source: 'client.entity_matching.list(limit=1, name="test")

          '
    post:
      tags:
      - Entity matching
      summary: Create entity matcher model
      description: '


        > **Required capabilities:** `entitymatchingAcl:WRITE`


        Train a model that predicts matches between entities (for example, time series names to asset names). This is also known as fuzzy joining. If there are no trueMatches (labeled data), you train a static (unsupervised) model, otherwise a machine learned (supervised) model is trained.'
      operationId: entityMatchingCreate
      requestBody:
        content:
          application/json:
            schema:
              type: object
              required:
              - sources
              - targets
              properties:
                sources:
                  $ref: '#/components/schemas/Sources'
                targets:
                  $ref: '#/components/schemas/Targets'
                trueMatches:
                  $ref: '#/components/schemas/TrueMatches'
                externalId:
                  $ref: '#/components/schemas/CogniteExternalId'
                name:
                  $ref: '#/components/schemas/ModelName'
                description:
                  $ref: '#/components/schemas/ModelDescription'
                featureType:
                  description: "Each feature type defines one combination of features that will be created and used in the entity matcher model. All features are based on matching tokens. Tokens are defined at the top of the Entity matching section.\nThe options are:\n  * Simple: Calculates the cosine-distance similarity score for each of the pairs of fields defined in `matchFields`. This is the fastest option.\n  * Insensitive: Similar to Simple, but ignores lowercase/uppercase differences.\n  * Bigram: Similar to `simple`, but adds similarity score based on matching bigrams of the tokens.\n  * FrequencyWeightedBigram: Similar to `bigram`, but give higher weights to less commonly occurring tokens.\n  * BigramExtraTokenizers: Similar to `bigram`, but able to learn that leading zeros, spaces, and uppercase/lowercase differences should be ignored in matching.\n  * BigramCombo: Calculates all of the above options, relying on the model to determine the appropriate features to use.\n  Hence, this option is only appropriate if there are  labeled data/trueMatches. This is the slowest option.\n"
                  allOf:
                  - $ref: '#/components/schemas/FeatureType'
                matchFields:
                  $ref: '#/components/schemas/MatchFields'
                classifier:
                  $ref: '#/components/schemas/Classifier'
                ignoreMissingFields:
                  $ref: '#/components/schemas/IgnoreMissingFields'
      responses:
        '200':
          description: Success
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/EntityMatcherResponseSchema'
        '400':
          $ref: '#/components/responses/ErrorResponse'
      x-capability:
      - entitymatchingAcl:WRITE
      x-code-samples:
      - lang: JavaScript
        label: JavaScript SDK
        source: "const result = await client.entityMatching.create({\n sources: [{externalId: 'asset1', name: 'asset1'}, {externalId: 'asset2', name: 'asset2'}],\n targets: [{externalId: 'ts1', name: 'ts1'}, {externalId: 'ts2', name: 'ts2'}],\n externalId: 'model123',\n name: 'model123',\n});"
      - lang: Java
        label: Java SDK
        source: "List<Struct> source = generateSourceStructs(); \nList<Struct> target = generateTargetTrainingStructs(); \n\n// Train the matching model \nRequest entityMatchFitRequest = Request.create() \n          .withRootParameter(\"sources\",  source) \n          .withRootParameter(\"targets\", target) \n          .withRootParameter(\"matchFields\", Map.of(\"source\", \"name\", \"target\", \"externalId\")) \n          .withRootParameter(\"featureType\", \"insensitive\"); \n\nList<EntityMatchModel> models = client.contextualization() \n          .entityMatching() \n          .create(List.of(entityMatchFitRequest)); \n\nprivate List<Struct> generateSourceStructs() { \n     Struct entityA = Struct.newBuilder() \n          .putFields(\"id\", Values.of(1D)) \n          .putFields(\"name\", Values.of(\"23-DB-9101\")) \n          .putFields(\"fooField\", Values.of(\"bar\")) \n          .build(); \n     Struct entityB = Struct.newBuilder() \n          .putFields(\"id\", Values.of(2D)) \n          .putFields(\"name\", Values.of(\"23-PC-9101\")) \n          .putFields(\"barField\", Values.of(\"foo\")) \n          .build(); \n     return List.of(entityA, entityB); \n} \n\nprivate List<Struct> generateTargetTrainingStructs() { \n    Struct targetA = Struct.newBuilder() \n          .putFields(\"id\", Values.of(1D)) \n          .putFields(\"externalId\", Values.of(\"IA-23_DB_9101\")) \n          .build(); \n     Struct targetB = Struct.newBuilder() \n          .putFields(\"id\", Values.of(2D)) \n          .putFields(\"externalId\", Values.of(\"VAL_23_PC_9101\")) \n          .build(); \n     return List.of(targetA, targetB); \n} \n\n"
  /context/entitymatching/{id}:
    get:
      tags:
      - Entity matching
      summary: Retrieve an entity matching model by the ID of the model
      description: '


        > **Required capabilities:** `entitymatchingAcl:READ`


        Shows the status of the model. If the status is completed, shows the parameters used to train the model.'
      operationId: entityMatchingStatus
      parameters:
      - $ref: '#/components/parameters/CogniteInternalId'
      responses:
        '200':
          description: Success
          content:
            application/json:
              schema:
                required:
                - classifier
                - featureType
                allOf:
                - $ref: '#/components/schemas/EntityMatcherResponseSchema'
        '400':
          $ref: '#/components/responses/ErrorResponse'
      x-capability:
      - entitymatchingAcl:READ
  /context/entitymatching/byids:
    post:
      tags:
      - Entity matching
      summary: Retrieve entity matching models
      description: '


        > **Required capabilities:** `entitymatchingAcl:READ`


        Retrieve entity matching models by IDs or external IDs.'
      operationId: entityMatchingRetrieve
      requestBody:
        content:
          application/json:
            schema:
              type: object
              required:
              - items
              properties:
                items:
                  $ref: '#/components/schemas/OneOfId'
      responses:
        '200':
          description: Success
          content:
            application/json:
              schema:
                type: object
                required:
                - items
                properties:
                  items:
                    type: array
                    items:
                      $ref: '#/components/schemas/EntityMatcherResponseSchema'
        '400':
          $ref: '#/components/responses/ErrorResponse'
      x-capability:
      - entitymatchingAcl:READ
      x-code-samples:
      - lang: JavaScript
        label: JavaScript SDK
        source: 'const [result] = await client.entityMatching.retrieve([{ externalId: ''model123'' }]);'
      - lang: Python
        label: Python SDK
        source: 'retrieved_model = client.entity_matching.retrieve(id=1)

          retrieved_models = client.entity_matching.retrieve_multiple([1,2,3])

          '
  /context/entitymatching/list:
    post:
      tags:
      - Entity matching
      summary: Filter models
      description: '


        > **Required capabilities:** `entitymatchingAcl:READ`


        Use filtering options to find entity matcher models.'
      operationId: entityMatchingFilter
      requestBody:
        content:
          application/json:
            schema:
              type: object
              required:
              - filter
              properties:
                limit:
                  description: <- Limits the number of results to return.
                  type: integer
                  format: int32
                  minimum: 1
                  maximum: 1000
                  default: 100
                filter:
                  type: object
                  allOf:
                  - description: Filter on models with strict matching.
                  - $ref: '#/components/schemas/EntityMatchingFilterSchema'
      responses:
        '200':
          description: Success
          content:
            application/json:
              schema:
                type: object
                required:
                - items
                properties:
                  items:
                    type: array
                    items:
                      $ref: '#/components/schemas/EntityMatcherResponseSchema'
        '400':
          $ref: '#/components/responses/ErrorResponse'
      x-capability:
      - entitymatchingAcl:READ
      x-code-samples:
      - lang: JavaScript
        label: JavaScript SDK
        source: 'const { items } = await client.entityMatching.list({ filter: { name: ''model123'' }});'
  /context/entitymatching/update:
    post:
      tags:
      - Entity matching
      summary: Update entity matching models
      description: '


        > **Required capabilities:** `entitymatchingAcl:WRITE`


        Update entity matching models by IDs or external IDs.'
      operationId: entityMatchingUpdate
      requestBody:
        content:
          application/json:
            schema:
              type: object
              required:
              - items
              properties:
                items:
                  type: array
                  minItems: 1
                  maxItems: 1000
                  items:
                    $ref: '#/components/schemas/ModelChange'
      responses:
        '200':
          description: Success
          content:
            application/json:
              schema:
                type: object
                required:
                - items
                properties:
                  items:
                    type: array
                    items:
                      $ref: '#/components/schemas/EntityMatcherResponseSchema'
        '400':
          $ref: '#/components/responses/ErrorResponse'
      x-capability:
      - entitymatchingAcl:WRITE
      x-code-samples:
      - lang: JavaScript
        label: JavaScript SDK
        source: "const [updated] = await client.entityMatching.update([{\n externalId: 'model123',\n update: { description: { set: 'ø' }}\n}]);"
      - lang: Python
        label: Python SDK
        source: 'from cognite.client.data_classes.contextualization import EntityMatchingModelUpdate

          client.entity_matching.update(EntityMatchingModelUpdate(id=1).name.set("New name"))

          '
  /context/entitymatching/delete:
    post:
      tags:
      - Entity matching
      summary: Delete entity matcher model
      description: '


        > **Required capabilities:** `entitymatchingAcl:WRITE`


        Deletes an entity matching model. Currently, this is a soft delete, and only removes the entry from listing.'
      operationId: entityMatchingDelete
      requestBody:
        content:
          application/json:
            schema:
              type: object
              required:
              - items
              properties:
                items:
                  $ref: '#/components/schemas/OneOfId'
      responses:
        '200':
          description: Models deleted.
          content:
            application/json:
              schema:
                type: object
        '400':
          $ref: '#/components/responses/ErrorResponse'
      x-capability:
      - entitymatchingAcl:WRITE
      x-code-samples:
      - lang: JavaScript
        label: JavaScript SDK
        source: 'await client.entityMatching.delete([{ externalId: ''model123'' }]);'
      - lang: Python
        label: Python SDK
        source: 'client.entity_matching.delete(id=1)

          '
  /context/entitymatching/predict:
    post:
      tags:
      - Entity matching
      summary: Predict matches
      description: '


        > **Required capabilities:** `entitymatchingAcl:WRITE`


        Predicts entity matches using a trained model. Note: ''assetsAcl:READ'' capability is required unless both `sources` and `targets` are specified in the request. Also note that the header of a successful response contains a `X-Job-Token` which allows to fetch the result of the job at `/context/entitymatching/jobs/{jobId}` without requiring ''assetsAcl:READ''.'
      operationId: entityMatchingPredict
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/EntityMatchingPredictSchema'
      responses:
        '200':
          description: Success
          headers:
            X-Job-Token:
              schema:
                $ref: '#/components/schemas/JobToken'
          content:
            application/json:
              schema:
                type: object
                required:
                - jobId
                allOf:
                - properties:
                    jobId:
                      $ref: '#/components/schemas/JobId'
                - $ref: '#/components/schemas/StatusSchema'
        '400':
          $ref: '#/components/responses/ErrorResponse'
      x-capability:
      - entitymatchingAcl:WRITE
      x-code-samples:
      - lang: JavaScript
        label: JavaScript SDK
        source: "const response = await client.entityMatching.predict({\n externalId: 'model123',\n sources: [{externalId: 'asset1', name: 'asset1'}, {externalId: 'asset2', name: 'asset2'}],\n targets: [{externalId: 'ts1', name: 'ts1'}, {externalId: 'ts2', name: 'ts2'}],\n});"
      - lang: Python
        label: Python SDK
        source: "sources = {'id': 101, 'name': 'ChildAsset1', 'description': 'Child of ParentAsset1'}\ntargets = {'id': 1, 'name': 'ParentAsset1', 'description': 'Parent to ChildAsset1'}\ntrue_matches = [(1, 101)]\nmodel = client.entity_matching.predict(\n    sources = sources,\n    targets = targets,\n    num_matches = 1,\n    score_threshold = 0.6,\n    id=1\n)\n"
      - lang: Java
        label: Java SDK
        source: "List<EntityMatchModel> models = // list of EntityMatchModel; \nlong modelId = models.get(0).getId(); \nList<Struct> source = generateSourceStructs(); \nList<Struct> target = generateTargetStructs(); \nList<EntityMatchResult> matchResults = client.contextualization() \n          .entityMatching() \n          .predict(modelId, source, target); \n\nprivate List<Struct> generateSourceStructs() { \n     Struct entityA = Struct.newBuilder() \n          .putFields(\"id\", Values.of(1D)) \n          .putFields(\"name\", Values.of(\"23-DB-9101\")) \n          .putFields(\"fooField\", Values.of(\"bar\")) \n          .build(); \n     Struct entityB = Struct.newBuilder() \n          .putFields(\"id\", Values.of(2D)) \n          .putFields(\"name\", Values.of(\"23-PC-9101\")) \n          .putFields(\"barField\", Values.of(\"foo\")) \n          .build(); \n     return List.of(entityA, entityB); \n} \n\nprivate List<Struct> generateTargetStructs() { \n     Struct targetA = Struct.newBuilder() \n          .putFields(\"id\", Values.of(1D)) \n          .putFields(\"externalId\", Values.of(\"IA-23_DB_9101\")) \n          .putFields(\"uuid\", Values.of(UUID.randomUUID().toString())) \n          .build(); \n     Struct targetB = Struct.newBuilder() \n          .putFields(\"id\", Values.of(2D)) \n          .putFields(\"externalId\", Values.of(\"VAL_23_PC_9101\")) \n          .putFields(\"uuid\", Values.of(UUID.randomUUID().toString())) \n          .build(); \n     return List.of(targetA, targetB); \n} \n\n"
  /context/entitymatching/jobs/{jobId}:
    get:
      tags:
      - Entity matching
      summary: Retrieve entity matcher predict results
      description: '


        > **Required capabilities:** `assetsAcl:READ` `entitymatchingAcl:WRITE`


        Get the results from a predict job. Note: ''assetsAcl:READ'' capability is required, unless you specify a valid `X-Job-Token` in the request header. The `X-Job-Token` is provided in the response header of the initial call to `/context/entitymatching/predict`'
      operationId: entityMatchingPredictResults
      parameters:
      - $ref: '#/components/parameters/jobId'
      - in: header
        name: X-Job-Token
        schema:
          $ref: '#/components/schemas/JobToken'
      responses:
        '200':
          description: Success
          content:
            application/json:
              schema:
                type: object
                required:
                - jobId
                - items
                allOf:
                - $ref: '#/components/schemas/StatusSchema'
                - properties:
                    jobId:
                      $ref: '#/components/schemas/JobId'
                    status:
                      $ref: '#/components/schemas/JobStatus'
                    items:
                      type: array
                      description: List of matched entities with confidence score.
                      items:
                        type: object
                        required:
                        - source
                        - matches
                        properties:
                          source:
                            type: object
                            example:
                              field: value
                              ignoredfield:
                                key: value
                            description: The source item given to predict.
                          matches:
                            type: array
                            required:
                            - score
                            - target
                            description: Matched items, sorted from highest score to lowest. May be empty.
                            items:
                              type: object
                              properties:
                                score:
                                  type: number
                                  example: 0.98
                                  description: The model's confidence in the match.
                                target:
                                  type: object
                                  example:
                                    field: value
                                    ignoredfield:
                                      key: value
                                  description: The target item given to predict.
        '400':
          $ref: '#/components/responses/ErrorResponse'
      x-capability:
      - assetsAcl:READ
      - entitymatchingAcl:WRITE
      x-code-samples:
      - lang: JavaScript
        label: JavaScript SDK
        source: const { status, items } = await client.entityMatching.predictResult(12345678);
  /context/entitymatching/refit:
    post:
      tags:
      - Entity matching
      summary: Re-fit entity matcher model
      description: '


        > **Required capabilities:** `entitymatchingAcl:READ` `entitymatchingAcl:WRITE`


        Creates a new model by re-training an existing model on existing data but with additional true matches. The old model is not changed. The new model gets a new id and new external id if `newExternalId` is set, or no external id if `newExternalId` is not set. Use for efficient re-training of the model after a user creates additional confirmed matches.'
      operationId: entityMatchingReFit
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/EntityMatchingRefitSchema'
      responses:
        '200':
          description: Success
          content:
            application/json:
              schema:
                required:
                - classifier
                - featureType
                - originalId
                allOf:
                - $ref: '#/components/schemas/EntityMatcherResponseSchema'
        '400':
          $ref: '#/components/responses/ErrorResponse'
      x-capability:
      - entitymatchingAcl:READ
      - entitymatchingAcl:WRITE
      x-code-samples:
      - lang: JavaScript
        label: JavaScript SDK
        source: "await client.entityMatching.refit({\n newExternalId: 'newModel123',\n sources: [{externalId: 'asset1', name: 'asset1'}, {externalId: 'asset2', name: 'asset2'}],\n targets: [{externalId: 'ts1', name: 'ts1'}, {externalId: 'ts2', name: 'ts2'}],\n externalId: 'model123',\n trueMatches: [{sourceExternalId: 'asset1', targetExternalId: 'ts1'}]\n});"
      - lang: Python
        label: Python SDK
        source: 'sources = [{''id'': 101, ''name'': ''ChildAsset1'', ''description'': ''Child of ParentAsset1''}]

          targets = [{''id'': 1, ''name'': ''ParentAsset1'', ''description'': ''Parent to ChildAsset1''}]

          true_matches = [(1, 101)]

          model = client.entity_matching.refit(true_matches = true_matches, description="AssetMatchingJob1", id=1)

          '
components:
  schemas:
    EntityMatchingRefitFeatureSchema:
      type: object
      required:
      - trueMatches
      properties:
        newExternalId:
          description: ExternalId for the new refitted model provided by client. Must be unique within the project.
          allOf:
          - $ref: '#/components/schemas/CogniteExternalId'
        trueMatches:
          description: List of additional confirmed matches used to train the model. The new model uses a combination of this and trueMatches from the orginal model. If there are identical match-from ids, the pair from the original model is dropped.
          allOf:
          - $ref: '#/components/schemas/TrueMatches'
        sources:
          description: List of source entities, for example, time series. If omitted, will use data from fit.
          allOf:
          - $ref: '#/components/schemas/Sources'
        targets:
          description: List of target entities, for example, assets. If omitted, will use data from fit.
          allOf:
          - $ref: '#/components/schemas/Targets'
    ModelDescription:
      type: string
      description: User defined description.
      example: Simple model 1
      maxLength: 500
    SourceId:
      description: The id for the from-object of the match.
      allOf:
      - $ref: '#/components/schemas/CogniteInternalId'
    MatchFields:
      type: array
      example:
      - source: name
        target: name
      - source: name
        target: someField
      default:
      - source: name
        target: name
      description: List of pairs of fields from the target and source items, used to calculate features. All source and target items should have all the `source` and `target` fields specified here.
      items:
        type: object
        required:
        - source
        - target
        properties:
          source:
            type: string
          target:
            type: string
    EntityMatchingFilterSchema:
      type: object
      properties:
        featureType:
          $ref: '#/components/schemas/FeatureType'
        classifier:
          $ref: '#/components/schemas/Classifier'
        originalId:
          type: integer
          description: The ID of original model, only relevant when the model is a retrained model.
          example: 111
        name:
          $ref: '#/components/schemas/ModelName'
        description:
          $ref: '#/components/schemas/ModelDescription'
    EntityMatchingRefitSchema:
      type: object
      oneOf:
      - allOf:
        - type: object
          required:
          - id
          properties:
            id:
              description: The ID of the original model.
              allOf:
              - $ref: '#/components/schemas/CogniteInternalId'
        - $ref: '#/components/schemas/EntityMatchingRefitFeatureSchema'
      - allOf:
        - type: object
          required:
          - externalId
          properties:
            externalId:
              description: The externalId of the original model.
              allOf:
              - $ref: '#/components/schemas/CogniteExternalId'
        - $ref: '#/components/schemas/EntityMatchingRefitFeatureSchema'
    CogniteExternalId:
      description: The external ID provided by the client. Must be unique for the resource type.
      type: string
      maxLength: 255
      example: my.known.id
    ModelChangeById:
      allOf:
      - $ref: '#/components/schemas/ModelPatch'
      - type: object
        required:
        - id
        properties:
          id:
            $ref: '#/components/schemas/CogniteInternalId'
    ModelName:
      type: string
      description: User defined name.
      example: simple_model_1
      maxLength: 256
    SinglePatchRequiredModelDescription:
      title: Description
      type: object
      properties:
        set:
          $ref: '#/components/schemas/ModelDescription'
      description: Set a new value for description.
      required:
      - set
    StatusSchema:
      type: object
      required:
      - status
      - createdTime
      - startTime
      - statusTime
      properties:
        status:
          

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