Skip to content

Look up entries of a connected list by id

POST
/models/{modelId}/value-sets/{classifierId}/entries:lookup
curl --request POST \
--url https://api.modeldesk.io/models/2489E9AD-2EE2-8E00-8EC9-32D5F69181C0/value-sets/2489E9AD-2EE2-8E00-8EC9-32D5F69181C0/entries:lookup \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '{ "ids": [ "2489E9AD-2EE2-8E00-8EC9-32D5F69181C0" ] }'

The entries with the ids the body names, at most 500, that the list a value-domain classifier is connected to holds at the release its connection reads. A field stores the entry it points at by id; this shows those entries and tells which of them the list no longer holds, since an id it does not hold is left out. A POST only because a page’s worth of ids does not fit in a request line; it changes nothing, and a read scope reaches it.

modelId
required
string format: uuid
classifierId
required
string format: uuid
ref
string format: uuid

The ref to read the classifier at, as for listing the entries.

Media typeapplication/json
object
ids
required

The entries to answer, by id.

Array<string>
>= 1 items <= 500 items

Example generated

{
"ids": [
"2489E9AD-2EE2-8E00-8EC9-32D5F69181C0"
]
}

OK

Media typeapplication/json
Array<object>

One entry of a list, the same shape whichever source serves it.

object
id
required

The entry, a row of the dataset; what a field taking its value stores.

string format: uuid
code

What the entry is shown and written as. Absent when the list has no code property.

string
labels
required

The entry’s name per language tag; the empty tag for a name without one.

object
key
additional properties
string
iri
string
status
string
broader
required

The entries this one sits under, in a hierarchical list.

Array<string>
selectable
required

Whether a value may point at this entry.

boolean

Example generated

[
{
"id": "2489E9AD-2EE2-8E00-8EC9-32D5F69181C0",
"code": "example",
"labels": {
"additionalProperty": "example"
},
"iri": "example",
"status": "example",
"broader": [
"2489E9AD-2EE2-8E00-8EC9-32D5F69181C0"
],
"selectable": true
}
]

The body names no id, or more than 500

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

The model, the ref or the classifier is not there for the caller, the classifier is connected to no list, or the list’s dataset or release does not exist or the caller cannot read it

Media typeapplication/problem+json
Any of:

A Problem answered when a ref the request reads at is not there for the caller, on a resource they may read: a ref id that names nothing, a ref of another resource, and another user’s draft, which reads exactly as a ref that does not exist. The draft routes answer it too when the caller holds no draft.

A 404, as a missing resource is, and told apart from one by its type. A resource the caller cannot read keeps the plain answer it always had, whatever ref was named, so this one never says anything about a resource the caller could not see. To a client it means that the ref it was reading, typically a draft committed or discarded in another session, is gone while the resource stays: it goes back to the branch. The problem names no ref, so the answer for an id that names nothing and for another user’s draft is the same, byte for byte.

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 404 from a resource that is missing or not the caller’s to read.

string format: uri
Allowed values: https://modeldesk.io/problems/ref-not-found

Example

{
"type": "https://modeldesk.io/problems/ref-not-found"
}