Skip to navigation

Export objects and relationships

This guide shows how to export IcePanel model objects and relationships. Useful for scenarios like identifying a service’s dependencies and ownership during incident response.

IcePanel supports two formats:

  1. CSV for importing spreadsheets (does not support Flows).
  2. JSON for build pipelines, scripts, and automation (supports Flows).

Prerequisites

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

Export as CSV

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

Export model objects

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

Export model connections

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

Export as JSON

Export the whole model as JSON which can be easily used as part of a build pipeline, script or automation. This also includes flows which the CSV export does not.

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