From ca1e9483eb17012886737630f0e77e0c6c455446 Mon Sep 17 00:00:00 2001 From: Shehab Abdel-Salam Date: Tue, 17 Mar 2026 21:52:21 +0000 Subject: [PATCH] Add namespace section --- fern/guides/import-diagrams.mdx | 32 +++++++++++++++++++++++++++++++- 1 file changed, 31 insertions(+), 1 deletion(-) diff --git a/fern/guides/import-diagrams.mdx b/fern/guides/import-diagrams.mdx index e960b9c..e56e62b 100644 --- a/fern/guides/import-diagrams.mdx +++ b/fern/guides/import-diagrams.mdx @@ -1171,7 +1171,6 @@ tags: ``` - ## 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. @@ -1186,3 +1185,34 @@ curl -sf -X POST "https://api.icepanel.io/v1/landscapes/$ICEPANEL_LANDSCAPE_ID/v -H "Content-Type: application/yaml" \ --data-binary @icepanel-landscape-import.yaml ``` + +## 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: + +```yaml +# yaml-language-server: $schema=https://api.icepanel.io/v1/schemas/LandscapeImportData + +namespace: my-repo + +modelObjects: + - id: system-storefront + name: Storefront + type: system +``` + +Or pass it directly in the request body when using JSON: + +```bash +curl -sf -X POST "https://api.icepanel.io/v1/landscapes/$ICEPANEL_LANDSCAPE_ID/versions/latest/import" \ + -H "X-API-Key: $ICEPANEL_API_KEY" \ + -H "Content-Type: application/json" \ + -d '{ + "namespace": "my-repo", + "modelObjects": [...] + }' +```