Skip to content

Get a resolved template instance

GET
/models/{modelId}/templates/{templateId}/instances/{rootElementId}
curl --request GET \
--url https://api.modeldesk.io/models/2489E9AD-2EE2-8E00-8EC9-32D5F69181C0/templates/2489E9AD-2EE2-8E00-8EC9-32D5F69181C0/instances/2489E9AD-2EE2-8E00-8EC9-32D5F69181C0 \
--header 'Authorization: Bearer <token>'

Get resolved template instance

modelId
required
string format: uuid
templateId
required
string format: uuid
rootElementId
required
string format: uuid

OK

Media typeapplication/json
object
templateId
required
string format: uuid
rootElementId
required
string format: uuid
diagramId
string format: uuid
name
required
string
layoutType
string
Allowed values: LAYERED
diagramTypeId
string format: uuid
orientation
string
Allowed values: TOP_TO_BOTTOM BOTTOM_TO_TOP
hierarchyOrientation
string
Allowed values: TOP_TO_BOTTOM BOTTOM_TO_TOP
layoutRules
Array
One of: discriminator: @type
LevelRule
object
@type
required
string
Allowed values: LevelRule
id
string format: uuid
element
required
string format: uuid
refElement
required
string format: uuid
type
required
string
Allowed values: SAME_LEVEL BELOW ABOVE
hierarchyGroups
Array<object>
object
id

Absent on a creation whose id the server is to mint, and on an update, whose target is named beside it. Always present on a group that exists.

string format: uuid
root
required
string format: uuid
maxLeft

How many siblings spread to the left of the root. Omitted, none.

integer
0
maxRight

How many siblings spread to the right of the root. Omitted, none.

integer
0
elementIds
required
Array<string>
published

Whether this view leaves the model. A view with no stored diagram behind it is always published; once stored, this reports the stored diagram’s state.

boolean
default: true

Example

{
"layoutType": "LAYERED",
"orientation": "TOP_TO_BOTTOM",
"hierarchyOrientation": "TOP_TO_BOTTOM",
"layoutRules": [
{
"@type": "LevelRule",
"type": "SAME_LEVEL"
}
],
"hierarchyGroups": [
{
"maxLeft": 0,
"maxRight": 0
}
],
"published": true
}

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"
}
]
}