Skip to main content
View as Markdown

Bounded contexts and the CDM

A bounded context is a business area with its own entities and vocabulary — design, library management, procurement and so on. The Altium 365 API, this reference and the Common Data Model (CDM) are organised by the same bounded contexts, so a concept you find in the CDM leads you straight to the API types and operations for it.

The bounded contexts​

Bounded contextCoversStart here
PlatformWorkspaces, users, organizations, apps and tokens, folders, events, notifications, solutions, knowledge graphOverview
DesignHardware projects, design data, rule checks, comparisons, releasesOverview
InsightsWorkspace insights about parts and designsOverview
Library ManagementComponents, component templates, parts, symbols, footprints, datasheets, reuse blocks, library searchOverview
CollaborationComments, comment threads, annotations, tasksOverview
Configuration ManagementEnvironment configuration; project, settings and sheet templates (component templates are library entities)Overview
ProcurementManaged BOMs and BOM releasesOverview
SupplyParts, offers, part families, reference designs, evaluation kits, solution templatesOverview
CustomizationExtension points, scripts, workflowsOverview
System DesignSystem design documents, system models, software librariesOverview
RequirementsRequirements projects and dataOverview
Renesas (preview)Renesas-specific device models, software projects and toolsOverview
CommonShared scalars, paging, errors, filtering and sorting types, directivesOverview

Each context's overview page links its concepts in the CDM, lists the API types that represent CDM entities, and names the entry-point queries that look entities up by identifier.

API types and CDM entities​

A CDM entity (for example Hardware Project) is represented in the API by one or more GraphQL types (for example DesProject). The type's reference page has a Common Data Model section that lists the entity's IRI, which links to its definition in the CDM, and its GRID pattern. The IRI (for example https://w3id.org/altium/cdm/design/Project) is the entity's stable identifier in the CDM; the GRID is the global resource identifier format of its instances, such as grid:workspace:{workspace-id}:design:project/{id}. See Identifiers and lookups for how GRIDs are used in queries.

From a concept to a query​

  1. Find the concept in the CDM and note its bounded context.
  2. Open that context's overview page here and find the API type in Entities.
  3. Pick an operation from Entry points (lookups by identifier) or the context's queries.
  4. Check the fields on the type page, then write the query:
query ProjectById($id: ID!) {
desProjectById(id: $id) {
id
name
workspaceUrl
updatedAt
}
}

Coding assistants can follow the same path through llms.txt: each context has an llms.txt with its entities, entry points and operations, and a schema.graphql slice with only that context's part of the schema.


Comments​