curl --request GET \
--url https://{cluster}.cognitedata.com/api/v1/projects/{project}/context/diagram/convert/{jobId} \
--header 'Authorization: Bearer <token>'{
"jobId": 123,
"status": "Queued",
"createdTime": 1730204346000,
"startTime": 1730204346000,
"statusTime": 1730204346000,
"items": [
{
"fileId": 1234,
"results": [
{
"page": 1,
"svgUrl": "https://storage.googleapis.com/cluster/1234/PH-ME-P-0004-001.svg",
"pngUrl": "https://storage.googleapis.com/cluster/1234/PH-ME-P-0004-001.png"
}
],
"fileExternalId": "1234",
"fileInstanceId": {
"space": "space",
"externalId": "externalId"
}
}
],
"errorMessage": null,
"grayscale": true
}Required capabilities:
assetsAcl:READfilesAcl:READ
Get the results for converting an engineering diagram to SVG and PNG formats.
curl --request GET \
--url https://{cluster}.cognitedata.com/api/v1/projects/{project}/context/diagram/convert/{jobId} \
--header 'Authorization: Bearer <token>'{
"jobId": 123,
"status": "Queued",
"createdTime": 1730204346000,
"startTime": 1730204346000,
"statusTime": 1730204346000,
"items": [
{
"fileId": 1234,
"results": [
{
"page": 1,
"svgUrl": "https://storage.googleapis.com/cluster/1234/PH-ME-P-0004-001.svg",
"pngUrl": "https://storage.googleapis.com/cluster/1234/PH-ME-P-0004-001.png"
}
],
"fileExternalId": "1234",
"fileInstanceId": {
"space": "space",
"externalId": "externalId"
}
}
],
"errorMessage": null,
"grayscale": 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 converted results, returned when the job finished or failed partially.
Show child attributes
If the job failed, some more information about the error cause.
null
Return the SVG version in grayscale colors only (reduces the file size).
true
Was this page helpful?