Skip to content

Create an export job

POST
/models/{modelId}/export-jobs
curl --request POST \
--url https://api.modeldesk.io/models/2489E9AD-2EE2-8E00-8EC9-32D5F69181C0/export-jobs \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '{ "type": "diagrams", "templateId": "2489E9AD-2EE2-8E00-8EC9-32D5F69181C0" }'

Create an export job for a model

modelId
required
string format: uuid
Media typeapplication/json
object
type
required

The export kind. Only diagrams may be created through this endpoint; content-bundle-diagrams jobs are triggered server-side via POST /models/{modelId}/content-bundle/diagrams.

string
Allowed values: diagrams
templateId
string format: uuid

Accepted

Media typeapplication/json
object
id
required
string format: uuid
type
required

Job kind: diagrams (whole-model diagram ZIP render) or content-bundle-diagrams (commit-pinned per-diagram content-bundle media).

string
templateId
string format: uuid
commit

The commit a content-bundle diagram-media render is pinned to. Present only for content-bundle-diagrams jobs; server-set (read-only on creation).

string format: uuid
localTemplateIds

The local diagram templates a content-bundle-diagrams job renders besides the published diagrams, as the trigger’s localDiagrams named them. Absent for none; server-set (read-only on creation).

Array<string>
status
required
string
Allowed values: PENDING PROCESSING COMPLETED COMPLETED_WITH_ERRORS FAILED
progress
object
completed
required
integer
total
required
integer
currentItem
string
modelId
required
string format: uuid
modelName
string
owner
object
id
required
string format: uuid
type
required

USER is a person, MACHINE a service account, and SYSTEM the platform itself, whose commits (metamodel seeding and re-pins) the commit log hides unless asked for them.

string
Allowed values: USER ORGANIZATION SYSTEM MACHINE
name

The display name, where one is known: a person’s from their account, a service account’s as stored with what it wrote. Left out for the platform and for a person whose account holds no name.

string
metamodelId

The metamodel of the exported model.

string format: uuid
downloadUrl
string
fileSize
integer format: int64
expiresAt
string format: date-time
error
string
failures
Array<object>
object
name
required
string
error
required
string
createdAt
string format: date-time
startedAt
string format: date-time
completedAt
string format: date-time

Example

{
"status": "PENDING",
"owner": {
"type": "USER"
}
}

Not found

Media typeapplication/problem+json

An RFC 9457 problem document, always sent as application/problem+json.

object
type

Present only on a typed refusal, whose own schema requires it and fixes its value. An untyped problem omits it, which RFC 9457 defines as about:blank: the status and title are all there is to branch on.

string format: uri
title
required
string
status
required
integer
detail
required
string
instance

The path of the request that was refused. Absent when the request was refused before it reached the application’s handlers: a 401 for a missing or unusable access token, and a 403 for a service account whose scopes do not reach the route.

string
violations

Present on a 400 raised by request-body validation, and on a 422 that refuses named fields (a malformed slug or namespace prefix). Each entry names the rejected property, so a client can attach the message to the field that caused it rather than showing one error for the whole form.

Array<object>
object
property
required
string
message
required
string

Example generated

{
"type": "https://example.com",
"title": "example",
"status": 1,
"detail": "example",
"instance": "example",
"violations": [
{
"property": "example",
"message": "example"
}
]
}

Error

Media typeapplication/problem+json

An RFC 9457 problem document, always sent as application/problem+json.

object
type

Present only on a typed refusal, whose own schema requires it and fixes its value. An untyped problem omits it, which RFC 9457 defines as about:blank: the status and title are all there is to branch on.

string format: uri
title
required
string
status
required
integer
detail
required
string
instance

The path of the request that was refused. Absent when the request was refused before it reached the application’s handlers: a 401 for a missing or unusable access token, and a 403 for a service account whose scopes do not reach the route.

string
violations

Present on a 400 raised by request-body validation, and on a 422 that refuses named fields (a malformed slug or namespace prefix). Each entry names the rejected property, so a client can attach the message to the field that caused it rather than showing one error for the whole form.

Array<object>
object
property
required
string
message
required
string

Example generated

{
"type": "https://example.com",
"title": "example",
"status": 1,
"detail": "example",
"instance": "example",
"violations": [
{
"property": "example",
"message": "example"
}
]
}