Skip to main content
POST
/
context
/
entitymatching
/
refit
JavaScript SDK
await client.entityMatching.refit({
 newExternalId: 'newModel123',
 sources: [{externalId: 'asset1', name: 'asset1'}, {externalId: 'asset2', name: 'asset2'}],
 targets: [{externalId: 'ts1', name: 'ts1'}, {externalId: 'ts2', name: 'ts2'}],
 externalId: 'model123',
 trueMatches: [{sourceExternalId: 'asset1', targetExternalId: 'ts1'}]
});
{
  "id": 4503599627370496,
  "externalId": "my.known.id",
  "status": "Queued",
  "createdTime": 1730204346000,
  "startTime": 1730204346000,
  "statusTime": 1730204346000,
  "name": "simple_model_1",
  "description": "Simple model 1",
  "featureType": "simple",
  "classifier": "randomforest",
  "originalId": 111,
  "errorMessage": null,
  "matchFields": [
    {
      "source": "name",
      "target": "name"
    },
    {
      "source": "name",
      "target": "someField"
    }
  ],
  "ignoreMissingFields": true
}

Authorizations

Authorization
string
header
required

Access token issued by the CDF project's configured identity provider. Access token must be an OpenID Connect token, and the project must be configured to accept OpenID Connect tokens. Use a header key of 'Authorization' with a value of 'Bearer $accesstoken'. The token can be obtained through any flow supported by the identity provider.

Body

application/json
id
integer<int64>
required

The ID of the original model.

Required range: 1 <= x <= 9007199254740991
trueMatches
object[]
required

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.

Required array length: 1 - 2000000 elements

A pair of source ID and target ID, that indicates a match between two entities in the source and target spaces. Internal and external IDs are supported.

Example:
{
"sourceId": 23,
"targetExternalId": "my.known.id"
}
newExternalId
string

ExternalId for the new refitted model provided by client. Must be unique within the project.

Maximum string length: 255
Example:

"my.known.id"

sources
object[]

List of source entities, for example, time series. If omitted, will use data from fit.

Maximum array length: 2000000
targets
object[]

List of target entities, for example, assets. If omitted, will use data from fit.

Required array length: 1 - 2000000 elements

Response

Success

id
integer<int64>
required

A server-generated ID for the object.

Required range: 1 <= x <= 9007199254740991
externalId
string
required

The external ID provided by the client. Must be unique for the resource type.

Maximum string length: 255
Example:

"my.known.id"

status
enum<string>
required

The status of the job.

Available options:
Queued,
Running,
Completed,
Failed
createdTime
integer<int64>
required

The number of milliseconds since 00:00:00 Thursday, 1 January 1970, Coordinated Universal Time (UTC), minus leap seconds.

Required range: x >= 0
Example:

1730204346000

startTime
integer<int64>
required

The number of milliseconds since 00:00:00 Thursday, 1 January 1970, Coordinated Universal Time (UTC), minus leap seconds.

Required range: x >= 0
Example:

1730204346000

statusTime
integer<int64>
required

The number of milliseconds since 00:00:00 Thursday, 1 January 1970, Coordinated Universal Time (UTC), minus leap seconds.

Required range: x >= 0
Example:

1730204346000

name
string
required

User defined name.

Maximum string length: 256
Example:

"simple_model_1"

description
string
required

User defined description.

Maximum string length: 500
Example:

"Simple model 1"

featureType
enum<string>
default:simple
required

Each feature type defines the combination of features that will be created and used in the entity matcher model.

Available options:
simple,
insensitive,
bigram,
frequencyweightedbigram,
bigramextratokenizers,
bigramcombo
Example:

"simple"

classifier
enum<string>
default:randomforest
required

Name of the classifier used in the model, "Unsupervised" if unsupervised model.

Available options:
randomforest,
decisiontree,
logisticregression,
augmentedlogisticregression,
augmentedrandomforest
Example:

"randomforest"

originalId
integer
required

The ID of original model, only relevant when the model is a retrained model.

Example:

111

errorMessage
string

If the job failed, some more information about the error cause.

Example:

null

matchFields
object[]

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.

Example:
[
{ "source": "name", "target": "name" },
{ "source": "name", "target": "someField" }
]
ignoreMissingFields
boolean
default:false

If True, missing fields in sources or targets entities set in matchFields, are replaced with empty strings.

Example:

true

Last modified on April 23, 2026