Skip to content

Keep a card of the engine's catalog in the library

POST
/api/library/from-catalog
curl --request POST \
--url https://forge.example.com/api/library/from-catalog \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '{ "cardId": "example", "kind": "example", "type": "example", "key": "example", "withThreats": true }'

Makes ordinary library items from one card: a service or appliance stencil of the type given, under key (the card’s id when left out), and with withThreats (the default) a threat item for each of the card’s threats and a control item for each control that answers one, placed with the stencil as its enterprise controls. The items are the organization’s from then on. Every key is checked first, so a card is kept whole or not at all: 409 when a key is taken. For the central team, curators and administrators.

Media typeapplication/json
object
cardId
required
string
kind
required
string
type
required
string
key
required
null | string
withThreats
boolean
default: true

OK

Media typeapplication/json
object
id
required
string format: uuid
kind
required
string
key
required
string
name
required
string
owner
required
null | string
status
required
string
replacedBy
required
null | string format: uuid
latestVersion
required
integer | string format: int32
/^-?(?:0|[1-9]\d*)$/
version
required
integer | string format: int32
/^-?(?:0|[1-9]\d*)$/
environmentRef
required
null | string
createdBy
required
One of:
null
createdAt
required
string format: date-time
updatedAt
required
string format: date-time
versions
required
Array<object>
object
number
required
integer | string format: int32
/^-?(?:0|[1-9]\d*)$/
content
required
zone
required
null | string
appliesWhen
required
Array<string>
match
required
Array<string>
dependencyKind
required
null | string
text
required
null | string
responsibility
required
One of:
null
controls
required
Array<string>
weight
required
null | string
dueOn
required
null | string format: date
notes
required
null | string
publishedBy
required
One of:
null
publishedAt
required
string format: date-time
uses
required
Array<object>
object
modelId
required
string format: uuid
modelName
required
string
elementKind
required
string
elementRef
required
string
tab
required
null | string
pinnedVersion
required
integer | string format: int32
/^-?(?:0|[1-9]\d*)$/
altered
required
boolean
stencilKind
required
null | string
canEdit
required
boolean

Example generated

{
"id": "2489E9AD-2EE2-8E00-8EC9-32D5F69181C0",
"kind": "example",
"key": "example",
"name": "example",
"owner": "example",
"status": "example",
"replacedBy": "2489E9AD-2EE2-8E00-8EC9-32D5F69181C0",
"latestVersion": 1,
"version": 1,
"environmentRef": "example",
"createdBy": {
"id": "2489E9AD-2EE2-8E00-8EC9-32D5F69181C0",
"displayName": "example"
},
"createdAt": "2026-04-15T12:00:00Z",
"updatedAt": "2026-04-15T12:00:00Z",
"versions": [
{
"number": 1,
"content": "example",
"zone": "example",
"appliesWhen": [
"example"
],
"match": [
"example"
],
"dependencyKind": "example",
"text": "example",
"responsibility": {
"kind": "example",
"owner": "example",
"provides": "example",
"reliesOn": [
"example"
]
},
"controls": [
"2489E9AD-2EE2-8E00-8EC9-32D5F69181C0"
],
"weight": "example",
"dueOn": "2026-04-15",
"notes": "example",
"publishedBy": {
"id": "2489E9AD-2EE2-8E00-8EC9-32D5F69181C0",
"displayName": "example"
},
"publishedAt": "2026-04-15T12:00:00Z"
}
],
"uses": [
{
"modelId": "2489E9AD-2EE2-8E00-8EC9-32D5F69181C0",
"modelName": "example",
"elementKind": "example",
"elementRef": "example",
"tab": "example",
"pinnedVersion": 1,
"altered": true,
"stencilKind": "example"
}
],
"canEdit": true
}

A refusal or an error, as a problem document. A model or draft you may not see answers 404, as one that does not exist.

Media typeapplication/problem+json
object
type
string
title
string
status
integer
detail
string
instance
string

Example generated

{
"type": "example",
"title": "example",
"status": 1,
"detail": "example",
"instance": "example"
}