Skip to content

Get an import

GET
/imports/{importId}
curl --request GET \
--url https://api.modeldesk.io/imports/2489E9AD-2EE2-8E00-8EC9-32D5F69181C0 \
--header 'Authorization: Bearer <token>'

Get model import. An import into a model is read only by a caller who may also read that model now; to anyone else it answers as not found.

importId
required
string format: uuid

OK

Media typeapplication/json
object
id
required
string format: uuid
metamodelId
required
string format: uuid
metamodel
object
id
required
string format: uuid
name
required
string
fullName
string
description
string
abstract

True when a model can be created on the metamodel only together with an extension that concretizes it.

boolean
kind

Absent on an ordinary information metamodel. DATA_SCHEMA marks one whose models the platform derives for datasets: it is never offered where models are created, imported or picked.

string
Allowed values: DATA_SCHEMA
completionLabel
string
towerName

The display name of the tower this metamodel is the root of. Authored on the root only. Presentation data: it changes no resolution, validation or dependency behavior.

string
towerDescription

One line describing the tower, authored on its root beside towerName.

string
purpose

The metamodel’s task line, what a user makes with a model of it.

string
layerOnly

True when the metamodel exists only for other metamodels to build on, so no one creates or imports a model on it directly. Absent means false.

boolean
contentLanguage

The language tag of the language the metamodel’s standard is written in, in lower case. Authored on a base metamodel only; omitted when the standard declares none.

string
standardVersion

The version of the standard the metamodel implements. A release is named after it, or 1.0.0 when the metamodel declares none.

string
profilesMetamodel

The declared base metamodel that application profiles of this metamodel are built to profile, propagated from a family extension’s binding. Absent on a base metamodel and on any metamodel carrying no family binding.

string format: uuid
builtInElementModelIds
Array<string>
addOn

True when the metamodel is an add-on: a model adds its profiles on top of its own metamodel, so no one creates or imports a model on it directly. Absent means false.

boolean
metamodelVersion

The release of the metamodel the import reads into. Absent only on imports older than version pinning.

string
loader
string
source
required

Where an import reads its file from.

One of: discriminator: type
upload

A file sent with the request.

object
type
required
string
Allowed value: upload
filename

The file’s name, which some loaders read the format from.

string
binaryData
required

The file’s bytes.

string
status
required
string
Allowed values: INITIALIZED PROCESSING READY ERROR COMPLETED
createdAt
required
string format: date-time
owner
required
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
accessMode

Who inside the owning organization may reach a model. Optional on creation and update: a creation that omits it takes the owner organization’s default access mode (falling back to SHARED).

string
Allowed values: SHARED INDIVIDUAL
createdBy
object
id
required
string format: uuid
name
string
modelId

The model a completed import created.

string format: uuid
targetModelId

The existing model the import goes into. Absent for an import that creates a model.

string format: uuid
targetBranchId

The branch of targetModelId the import merges into. Absent when the import names no target.

string format: uuid
referringModelId

The model whose unresolved references sent the user here, when the import was started from a references panel. Completing such an import adds the imported model to this one as a dependency, and the import page uses it to offer the resolve and the way back. Absent for an import nobody was referred from.

string format: uuid
referringDependency

What completing an import did about the model that sent the user to it. Exactly one field is set. The dependency answers rules the import never had to satisfy — the referring model may admit no dependency on this metamodel, or belong to another owner — and failing the completion over one of them would throw away a model the user has already reviewed and named, so the import completes either way and records which happened.

object
dependencyId

The dependency created on the referring model. Absent when none was.

string format: uuid
notAdded

Why no dependency was created. Absent when one was.

string
metamodel

A compiled metamodel, documented in full under Get a metamodel (GET /metamodels/{metamodelId}).

object
metamodelExtensionIds
Array<string>
metamodelExtensions
Array<object>

A compiled metamodel extension, documented in full under Get a metamodel extension (GET /metamodel-extensions/{extensionId}).

object
metamodelExtensionVersions

The release of each extension, by version name, keyed by extension id.

object
key
additional properties
string
metamodelAddOnIds

The add-ons the imported model adds to its metamodel, in order.

Array<string>
metamodelAddOns

The add-ons, compiled at their pinned releases, in order. An add-on whose release is no longer registered is left out.

Array<object>

A compiled metamodel, documented in full under Get a metamodel (GET /metamodels/{metamodelId}).

object
metamodelAddOnVersions

The pinned standard version per add-on id.

object
key
additional properties
string
modelId
string format: uuid
targetModelId

The existing model the import goes into. Absent for an import that creates a model.

string format: uuid
targetBranchId

The branch of targetModelId the import merges into. Absent when the import names no target.

string format: uuid
sourceId

The import that created targetModelId; its loader is the one this import parses with. Absent when the import names no target.

string format: uuid
importCommitId

The commit holding this import’s parse on the target model’s import line. Absent until that commit is written, and when the import names no target.

string format: uuid
mergeCommitId

The merge commit that brought this import into targetBranchId. Absent until the import is merged, and when the import names no target.

string format: uuid
referringModelId

The model whose unresolved references sent the user here, when the import was started from a references panel. Completing such an import adds the imported model to this one as a dependency, and the import page uses it to offer the resolve and the way back. Absent for an import nobody was referred from.

string format: uuid
referringDependency

What completing an import did about the model that sent the user to it. Exactly one field is set. The dependency answers rules the import never had to satisfy — the referring model may admit no dependency on this metamodel, or belong to another owner — and failing the completion over one of them would throw away a model the user has already reviewed and named, so the import completes either way and records which happened.

object
dependencyId

The dependency created on the referring model. Absent when none was.

string format: uuid
notAdded

Why no dependency was created. Absent when one was.

string
lineageOutcomes

What completing the import did about the model’s lineage, when the imported file declares the model it was generated from: one entry per model the imported one was generated from, and one per earlier import’s model that was generated from this one. Absent until the import completes, and for an import whose file declares no lineage.

Array<object>
Import lineage outcome

What completing an import did about one model the imported model was generated from, or one model generated from it. Completing an import whose file names its source looks for an earlier import of that source by the same owner, and declares the newer model based on the older one, with a link per element pair the file declares. Exactly one of correspondenceId and notCreated is set. The model is already created and named when this runs, so a link that cannot be made never fails the completion: it is recorded here with the reason.

object
direction
required

SOURCE when the completed import’s model is based on an earlier import’s model; DERIVED when an earlier import’s model is now based on the completed import’s model.

string
Allowed values: SOURCE DERIVED
identity
required

The source tool’s identity of the model looked for: the source’s for SOURCE, the completed import’s own for DERIVED. Opaque; meant for matching, not for display.

string
baseModelId

The model the derived one is based on. Absent when no earlier import of the source was found.

string format: uuid
derivedModelId
required

The model that holds the correspondence, the one based on the other.

string format: uuid
correspondenceId

The correspondence created on the derived model. Absent when none was.

string format: uuid
linked
required

The element links written.

integer
unmatched
required

The element pairs the file declares that were left out, because one of the two elements is not in its model.

integer
notCreated

Why no correspondence was created, as a sentence. Absent when one was.

string
errorMessage
string
logEntries
Array<object>
object
code
required
string
logLevel
required

INFO entries are informational — something the reader should know that is not a defect, notably the “unverifiable” verdicts of profile resolution. An INFO entry never makes a model invalid.

string
Allowed values: WARN ERROR INFO
title
required
string
detailMessage
required
string
modelElementId
string format: uuid
property
string
valueIndex
integer
otherElementId

The other element a finding is about, where it concerns two: the element whose key or value this one repeats, or the dependency element publishing the same IRI.

string format: uuid
fingerprint

A hash of the value the finding was about. Sent with modelElementId (as elementId, left out for a model-level finding), code and property to POST /models/{modelId}/dismissals to dismiss the finding; the dismissal holds while the value hashes the same.

string
dismissed

Who dismissed this warning or informational finding and when, where a dismissal of the model names it by element, code, property and fingerprint, so while the value it was about is unchanged. Never on an error, nor on a finding on an element another model answers for.

object
by
required

Who dismissed it: a person (USER) with their current name. name is absent where nothing answers to the id any more, such as an erased user.

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
at
string format: date-time
subject

What exactly a finding is about, when its check can report more than one finding at the same code, element and property: a relation target, an offending value (with its language tag for a language string) or an identifier the check is about. Exactly one of target, value and name is present, language only beside value.

object
target
string format: uuid
value
string
language
string
name
string
key

The finding’s identity across validation runs: the lowercase hex SHA-256 of the canonical JSON of code, modelElementId (as elementId), property and subject, each left out when absent, keys sorted and no whitespace. Neither valueIndex nor the message is part of it. Present on every entry of a validation result.

string
/^[0-9a-f]{64}$/

Example

{
"metamodel": {
"kind": "DATA_SCHEMA"
},
"source": {
"type": "upload"
},
"status": "INITIALIZED",
"owner": {
"type": "USER"
},
"accessMode": "SHARED",
"lineageOutcomes": [
{
"direction": "SOURCE"
}
],
"logEntries": [
{
"logLevel": "WARN",
"dismissed": {
"by": {
"type": "USER"
}
}
}
]
}

The caller is an agent acting for a person and the organization that owns the import has not enabled the agent’s AI platform, answered as AgentPlatformNotEnabledProblem.

Media typeapplication/problem+json
Any of:

A Problem answered when an agent acting for a person reached a model whose owning organization has not enabled the AI platform the agent runs on, which its token names. Model content reaches the platform an agent runs on, so the organization decides: until an organization admin turns the platform on in the organization’s AI agent platforms setting, every route on the model refuses the agent, conditional reads and the events stream included, and the model list and every page that names other models leave the organization’s models out. A change of the setting applies to new requests within a minute; an events stream that is already open ends at its token’s expiry, at most ten minutes later.

object
type
required

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
type
required

Stable constant a client branches on, which is what tells this 403 from the plain one the same routes answer for a model the caller may not read.

string format: uri
Allowed values: https://modeldesk.io/problems/agent-platform-not-enabled

Example

{
"type": "https://modeldesk.io/problems/agent-platform-not-enabled"
}

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