Create landscape versions

Version your landscape and create a snapshot in time on your version timeline. This can be run automatically as part of a build or release 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
1import { IcePanelClient } from "@icepanel/sdk";
2
3async function main() {
4 const client = new IcePanelClient({
5 apiKey: "YOUR_API_KEY_HERE",
6 });
7 await client.organizations.landscapes.list("organizationId");
8}
9main();

Note the id of the landscape:

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

Create a version

POST
/v1/landscapes/:landscapeId/versions
1import { IcePanelClient } from "@icepanel/sdk";
2
3async function main() {
4 const client = new IcePanelClient({
5 apiKey: "YOUR_API_KEY_HERE",
6 });
7 await client.versions.create("landscapeId", {
8 body: {
9 modelHandleId: "string",
10 name: "string",
11 notes: "string",
12 },
13 });
14}
15main();