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
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

Export model objects

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

Export model connections

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

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
1import { IcePanelClient } from "@icepanel/sdk";
2
3async function main() {
4 const client = new IcePanelClient({
5 apiKey: "YOUR_API_KEY_HERE",
6 });
7 await client.model.objects.export.dependenciesJson("landscapeId", "versionId", "modelObjectId");
8}
9main();