curl --request GET \
--url https://{cluster}.cognitedata.com/api/v1/projects/{project}/context/diagram/detect/{jobId} \
--header 'Authorization: Bearer <token>'{
"jobId": 123,
"status": "Queued",
"createdTime": 1730204346000,
"startTime": 1730204346000,
"statusTime": 1730204346000,
"items": [
{
"fileId": 1234,
"annotations": [
{
"text": "21-PT-1019",
"region": {
"shape": "rectangle",
"vertices": [
{
"x": 0.58,
"y": 0.12
}
],
"page": 1
},
"confidence": 0.5,
"entities": [
{
"userDefinedField": "21PT1017",
"ignoredField": "AA11"
},
{
"userDefinedField": [
"21PT1017-A",
"21PT1017-B"
]
}
]
}
],
"fileExternalId": "1234",
"fileInstanceId": {
"space": "space",
"externalId": "externalId"
}
}
],
"errorMessage": null,
"searchField": "userDefinedField",
"partialMatch": false,
"minTokens": 2,
"configuration": {
"annotationExtract": true,
"caseSensitive": true,
"connectionFlags": [
"<string>"
],
"customizeFuzziness": {
"minChars": 123,
"maxBoxes": 123,
"fuzzyScore": 1
},
"directionDelta": 90,
"directionWeights": {
"left": 1,
"right": 1,
"up": 1,
"down": 1
},
"minFuzzyScore": 0.85,
"readEmbeddedText": true,
"removeLeadingZeros": true,
"substitutions": {}
},
"patternMode": true
}Required capabilities:
assetsAcl:READfilesAcl:READ
Get the results from an engineering diagram detect job. Providing the X-Job-Token header returned by the
/context/diagram/detect endpoint is required unless the caller has read access to all assets. Results are available for 30 days following the completion of the detect job.
curl --request GET \
--url https://{cluster}.cognitedata.com/api/v1/projects/{project}/context/diagram/detect/{jobId} \
--header 'Authorization: Bearer <token>'{
"jobId": 123,
"status": "Queued",
"createdTime": 1730204346000,
"startTime": 1730204346000,
"statusTime": 1730204346000,
"items": [
{
"fileId": 1234,
"annotations": [
{
"text": "21-PT-1019",
"region": {
"shape": "rectangle",
"vertices": [
{
"x": 0.58,
"y": 0.12
}
],
"page": 1
},
"confidence": 0.5,
"entities": [
{
"userDefinedField": "21PT1017",
"ignoredField": "AA11"
},
{
"userDefinedField": [
"21PT1017-A",
"21PT1017-B"
]
}
]
}
],
"fileExternalId": "1234",
"fileInstanceId": {
"space": "space",
"externalId": "externalId"
}
}
],
"errorMessage": null,
"searchField": "userDefinedField",
"partialMatch": false,
"minTokens": 2,
"configuration": {
"annotationExtract": true,
"caseSensitive": true,
"connectionFlags": [
"<string>"
],
"customizeFuzziness": {
"minChars": 123,
"maxBoxes": 123,
"fuzzyScore": 1
},
"directionDelta": 90,
"directionWeights": {
"left": 1,
"right": 1,
"up": 1,
"down": 1
},
"minFuzzyScore": 0.85,
"readEmbeddedText": true,
"removeLeadingZeros": true,
"substitutions": {}
},
"patternMode": true
}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.
Contextualization job ID.
123
Success
Contextualization job ID.
123
The status of the job.
Queued, Running, Completed, Failed The number of milliseconds since 00:00:00 Thursday, 1 January 1970, Coordinated Universal Time (UTC), minus leap seconds.
x >= 01730204346000
The number of milliseconds since 00:00:00 Thursday, 1 January 1970, Coordinated Universal Time (UTC), minus leap seconds.
x >= 01730204346000
The number of milliseconds since 00:00:00 Thursday, 1 January 1970, Coordinated Universal Time (UTC), minus leap seconds.
x >= 01730204346000
An array of detected results, returned when the job finished or failed partially.
Show child attributes
If the job failed, some more information about the error cause.
null
This field determines the string to search for and to identify object entities.
"userDefinedField"
Allow partial (fuzzy) matching of entities in the engineering diagrams. Creates a match only when it is possible to do so unambiguously.
Each detected item must match the detected entity on at least this number of tokens. A token is a substring of consecutive letters or digits.
Configuration for diagram detect that is only available in beta.
Show child attributes
Only available in beta. If true, entities are not required to contain the search field. Instead they require a field called 'sample'. The sample field can be string, or list of alternative strings. Each string defines a pattern. E.g. 21-PT-1019 enables detecting tags consisting of 2 digits, 2 letters and 4 digits. Special characters are not necessary for detecting, but will be included in the detected string. It is possible to mark parts of the sample as constant strings by enclosing them in square brackets. Within square brackets, a | character can be used to separate alternative constants. Alternative constants must be either all digits or all letters. If false, regular diagram detect is performed, searching for occurrences of the search strings of the entities.
Was this page helpful?