Skip to content

Suggest the nature of a based-on relationship

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

Returns the inferred edge nature (VERTICAL / HORIZONTAL / UNKNOWN) for a candidate based-on relationship between this model (the derived end) and a base model, so the UI can pre-fill the nature control when adding an origin. Advisory only — persists nothing.

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

The ID of the candidate base (origin) model to compare against this model.

string format: uuid
commitId

Optional commit of the base model. Ignored in v1 (the base model’s current state is used); carried for forward compatibility with pinned-commit evaluation.

string format: uuid

Example generated

{
"originModelId": "2489E9AD-2EE2-8E00-8EC9-32D5F69181C0",
"commitId": "2489E9AD-2EE2-8E00-8EC9-32D5F69181C0"
}

OK

Media typeapplication/json
object
nature
required

Inferred edge nature for the base → derived (this model) relationship.

string
Allowed values: VERTICAL HORIZONTAL UNKNOWN
baseLevel

Resolved canonical abstraction level of the base model, if known.

string
Allowed values: CONCEPTUAL LOGICAL PHYSICAL
derivedLevel

Resolved canonical abstraction level of the derived (this) model, if known.

string
Allowed values: CONCEPTUAL LOGICAL PHYSICAL

Example

{
"nature": "VERTICAL",
"baseLevel": "CONCEPTUAL",
"derivedLevel": "CONCEPTUAL"
}

Bad request

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

Model or base model 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"
}
]
}