Skip to navigation

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
import { IcePanelClient } from "@icepanel/sdk";
async function main() {
const client = new IcePanelClient({
apiKey: "YOUR_API_KEY_HERE",
});
await client.domains.create({
landscapeId: "landscapeId",
versionId: "versionId",
body: {
name: "string",
},
});
}
main();

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
import { IcePanelClient } from "@icepanel/sdk";
async function main() {
const client = new IcePanelClient({
apiKey: "YOUR_API_KEY_HERE",
});
await client.model.objects.list({
landscapeId: "landscapeId",
versionId: "versionId",
});
}
main();

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