Create model objects

This guide shows how to create new objects in your landscape model. Useful for automatically filling out your model from another source.

Prerequisites

$export ICEPANEL_API_KEY='your-api-key'
$export ICEPANEL_ORGANIZATION_ID='your-organization-id'

Steps

1

Get your landscape

Get all landscapes in your organization and select a landscape ID:

GET
/v1/organizations/:organizationId/landscapes
1curl https://api.icepanel.io/v1/organizations/organizationId/landscapes \
2 -H "X-API-Key: <apiKey>"

Note the id of the landscape:

$export ICEPANEL_LANDSCAPE_ID='your-landscape-id'
2

Find the root object

Call a GET request with query parameter ?filter[type]=root to find the root model object. Your landscape may have multiple root model objects if you use domains.

GET
/v1/landscapes/:landscapeId/versions/:versionId/model/objects
1curl https://api.icepanel.io/v1/landscapes/landscapeId/versions/versionId/model/objects \
2 -H "X-API-Key: <apiKey>"

Note the id from the response. This is the parentId for any top-level objects you create.

3

Create an object

Create a new model object as a child of the root:

POST
/v1/landscapes/:landscapeId/versions/:versionId/model/objects
1curl -X POST https://api.icepanel.io/v1/landscapes/landscapeId/versions/versionId/model/objects \
2 -H "X-API-Key: <apiKey>" \
3 -H "Content-Type: application/json" \
4 -d '{
5 "name": "string",
6 "parentId": "string",
7 "type": "actor"
8}'

Below is a list of different objects you can create.

Object types

TypeDescription
rootA root object of a landscape.
systemA top-level system or bounded context
appAn application or service within a system
componentA component within an app
storeA data store (database, queue, cache)
actorAn external user, team, or system
groupA logical grouping within a diagram