Importing landscapes
This guide shows how to import and maintain landscapes as code using the LandscapeImportData JSON schema.
This is useful for:
- Generating diagrams with LLMs
- Syncing landscapes via CI/CD pipelines
- Maintaining diagrams in a git repository
Prerequisites:
- IcePanel account
- API key (created from
https://app.icepanel.io/organizations/:organizationId/manage/api-keys)
Steps
Select a landscape
To import diagrams into a landscape, you will need the landscape ID, which can be found in the URL:
Or, you can get the landscape ID with a GET request to the /landscapes endpoint.
This returns a list of all landscapes in your organization. Note the id of the landscape you want to import into.
Create your import file
Your landscape can be modelled in a JSON or YAML file by using the LandscapeImportData JSON schema. Each data model has a persistent id field, which is useful for upserting existing models.
Example JSON
Example YAML
Import your landscape
You can import the file through the UI or the API.
Each id in your import file maps to a resource in IcePanel. It’s either created if the resource does not exist or updated otherwise.
UI
API
From the landscape page, click Import model > File Upload and upload your file.

Set up CI/CD
To keep your landscape in sync automatically, call the import endpoint in a CI/CD job on every push to your main branch.
GitHub Actions
GitLab CI/CD
Add two repository secrets in GitHub (Settings > Secrets and variables > Actions):
ICEPANEL_LANDSCAPE_IDICEPANEL_API_KEY
Create a workflow file at .github/workflows/icepanel-sync.yml:
This triggers the synchronise-landscape job on every push to main/master.
Generating diagrams with LLMs
LLMs can generate a valid import file from a description of your architecture. The LandscapeImportData schema is publicly accessible, so you can point the LLM directly at it to validate the output.
See an example prompt that generates an import file for IcePanel.
Example output:
icepanel-landscape-import.yaml
Prune option
By default, data models that exist in IcePanel but are missing from your import file are left untouched. To have IcePanel delete models not present in the import file, add the prune=true query parameter.
Note that prune=true is a destructive operation. Any model objects, connections, tags, or tag groups in IcePanel that are not in your import file will be permanently deleted. Make sure your import file is the complete source of truth before using this option.
Namespace option
A namespace is a label that groups models by their import source. You can add a namespace to your import file to separate models by import source. When used with prune=true, only models in the same namespace are deleted. Models from other namespaces are left untouched.
This is useful for large organizations running multiple CI/CD pipelines from different repositories against the same landscape, with each pipeline managing its own models independently.
You can set the namespace in your YAML file:
Or pass it directly in the request body when using JSON: