Domains

Domains are named groupings that organise model objects into bounded contexts. They map closely to the Domain-Driven Design (DDD).


What a domain is

Every model object in a version belongs to exactly one domain. Domains provide a way to segment a large architecture either by business unit (e.g., Payments) or by team ownership (e.g., platform).


Creating domains

Create a domain in a version:

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

Filtering model objects by domain

Use the GET endpoint with query parameter ?filter[domainId]={domainId} to filter objects.

GET
/v1/landscapes/:landscapeId/versions/:versionId/model/objects
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.list("landscapeId", "versionId", {});
8}
9main();

This is useful for extracting a bounded-context slice of the architecture for reports or external tools.