Skip to main content
POST
/
diagram-parsing
/
parsing
/
instant
Run an instant parsing job for a file
curl --request POST \
  --url https://{cluster}.cognitedata.com/api/v1/projects/{project}/diagram-parsing/parsing/instant \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '
{
  "document": {
    "fileId": {
      "space": "<string>",
      "externalId": "my.known.id"
    },
    "pageNumber": 123
  },
  "libraryId": "my.known.id"
}
'
{
  "entities": [
    {
      "externalId": "my.known.id",
      "pathIds": [
        "<string>"
      ],
      "symbolId": "my.known.id"
    }
  ],
  "status": "Failed",
  "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.

Body

application/json

Specifies the library to use when instant parsing the given file.

document
object
required
libraryId
string
required

The external ID of a library for parsing

Maximum string length: 255
Example:

"my.known.id"

Response

Temporary diagram entity detections in a given file based on the provided library.

Temporary diagram entity data resulting from running instant parsing with a library on a file.

entities
object[]
required
status
enum<string>
required

Status of a parsing job

Available options:
Failed,
InProgress,
InQueue,
Pending,
Success
message
string
Last modified on April 23, 2026