Skip to main content
GET
/
diagram-parsing
/
diagrams
/
{diagramId}
/
with-paths
Get an extended diagram with paths by external id
curl --request GET \
  --url https://{cluster}.cognitedata.com/api/v1/projects/{project}/diagram-parsing/diagrams/{diagramId}/with-paths \
  --header 'Authorization: Bearer <token>'
{
  "connections": [
    {
      "createdTime": 1730204346000,
      "diagramId": "my.known.id",
      "endNodeId": "my.known.id",
      "externalId": "my.known.id",
      "isUserDetected": true,
      "lastUpdatedTime": 1730204346000,
      "startNodeId": "my.known.id"
    }
  ],
  "createdTime": 1730204346000,
  "entities": [
    {
      "createdTime": 1730204346000,
      "diagramId": "my.known.id",
      "externalId": "my.known.id",
      "isAssetVerified": true,
      "isUserDetected": true,
      "lastUpdatedTime": 1730204346000,
      "paths": [
        {
          "id": "<string>",
          "d": "<string>",
          "styleId": "<string>"
        }
      ],
      "symbolId": "my.known.id",
      "annotationId": {
        "space": "<string>",
        "externalId": "my.known.id"
      },
      "assetId": {
        "space": "<string>",
        "externalId": "my.known.id"
      }
    }
  ],
  "externalId": "my.known.id",
  "fileId": {
    "space": "<string>",
    "externalId": "my.known.id"
  },
  "height": "<string>",
  "lastUpdatedTime": 1730204346000,
  "libraryId": "my.known.id",
  "pageNumber": 123,
  "status": "Failed",
  "viewBox": "<string>",
  "width": "<string>",
  "message": "<string>"
}

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.

Path Parameters

diagramId
string
required

External ID of a diagram The external ID provided by the client. Must be unique for the resource type.

Maximum string length: 255
Example:

"my.known.id"

Query Parameters

cursor
string

Cursor for paging through results. In general, if a response contains a nextCursor property, it means that there may be more results, and you should pass that value as the cursor parameter in the next request.

Note that the cursor may or may not be encrypted, but either way, it is not intended to be decoded. Its internal structure is not a part of the public API, and may change without notice. You should treat it as an opaque string and not attempt to craft your own cursors.

Example:

"4zj0Vy2fo0NtNMb229mI9r1V3YG5NBL752kQz1cKtwo"

Response

Diagram with its entities, connections, and SVG paths data

Diagram with its entities, connections, and SVG paths data

connections
object[]
required
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

entities
object[]
required
externalId
string
required

The external ID of the diagram

Maximum string length: 255
Example:

"my.known.id"

fileId
object
required

ID of a file the diagram is parsed from

height
string
required

Height attribute of the SVG diagram

lastUpdatedTime
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

libraryId
string
required

The external ID of a library the diagram is parsed with

Maximum string length: 255
Example:

"my.known.id"

pageNumber
integer
required

The page number of a file the diagram is parsed from

status
enum<string>
required

Parsing status of a diagram

Available options:
Failed,
InProgress,
InQueue,
Pending,
Success
viewBox
string
required

ViewBox attribute of the SVG diagram

width
string
required

Width attribute of the SVG diagram

message
string

Message containing errors or other information

Last modified on April 23, 2026