Skip to navigation

Update descriptions with Markdown

Use the existing Markdown documentation stored in a code repository to populate the descriptions of your IcePanel model objects and connections. This can be automatically updated as part of a build pipeline.

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
import { IcePanelClient } from "@icepanel/sdk";
async function main() {
const client = new IcePanelClient({
apiKey: "YOUR_API_KEY_HERE",
});
await client.organizations.landscapes.list({
organizationId: "organizationId",
});
}
main();

Note the id of the landscape:

export ICEPANEL_LANDSCAPE_ID='your-landscape-id'
2

Find the object to update

List all model objects in a landscape:

GET
/v1/landscapes/:landscapeId/versions/:versionId/model/objects
import { IcePanelClient } from "@icepanel/sdk";
async function main() {
const client = new IcePanelClient({
apiKey: "YOUR_API_KEY_HERE",
});
await client.model.objects.list({
landscapeId: "landscapeId",
versionId: "versionId",
});
}
main();

Note the id of the object you want to update.

3

Update the description

Patch the model object with your Markdown description. Replace modelObjectId with the object’s id.

PATCH
/v1/landscapes/:landscapeId/versions/:versionId/model/objects/:modelObjectId
import { IcePanelClient } from "@icepanel/sdk";
async function main() {
const client = new IcePanelClient({
apiKey: "YOUR_API_KEY_HERE",
});
await client.model.objects.update({
landscapeId: "landscapeId",
versionId: "versionId",
modelObjectId: "modelObjectId",
body: {},
});
}
main();