Integration API
The Integration API lets external systems read and update the SysCraft architecture model. Typical uses include initial imports, CMDB or service-catalog synchronization, automated element creation, property updates, AI and MCP integrations, and repeatable model-maintenance workflows.
The screenshots below use the course console. It sends real requests to a local backend but is not a separate screen in the SysCraft product interface.
When to Use the Integration API
Use the API when authoritative data already exists elsewhere and must be brought into SysCraft. For example, you can:
- import systems, containers, and components;
- update element properties;
- create a diagram with a predefined set of visible elements;
- read elements for an external report;
- import interfaces from API documentation.
Authentication
Requests run on behalf of a user. A session-based workflow normally has two steps:
- Sign in.
- Send the returned session cookie with subsequent Integration API requests.
POST /login
Content-Type: application/x-www-form-urlencoded
login=u12345678&password=test
After a successful sign-in, the backend returns a sessionId cookie.
The API applies the same authorization rules as the product interface. Creating elements, diagrams, data flows, or interfaces, changing properties, and merging branches all require the corresponding permissions. An unauthorized model operation returns 403 with the ACCESS_DENIED code.
Model-changing requests are also rejected when the working branch is locked by an active merge request. The lock is released when that request is completed, rejected, or canceled. Before a bulk import, review the merge process.
If the landscape uses the Master Branch Is Read-Only policy, model-changing requests without a branchId fail with MASTER_BRANCH_READ_ONLY. Send automated changes to a working branch, review them there, and merge them into master through the normal workflow.
Request Context
Most operations require:
organizationId;landscapeId;domainId;branchIdwhen the operation does not target the main branch.
This context tells SysCraft which model and version the operation belongs to.
Reading Data
Common read requests include:
GET /integration-api/model/organizations
GET /integration-api/model/landscapes?organizationId={organizationId}
GET /integration-api/model/domains?organizationId={organizationId}&landscapeId={landscapeId}
GET /integration-api/model/diagrams?organizationId={organizationId}&landscapeId={landscapeId}&domainId={domainId}
GET /integration-api/model/elements?organizationId={organizationId}&landscapeId={landscapeId}
GET /integration-api/model/elements/{elementId}/properties?organizationId={organizationId}&landscapeId={landscapeId}
Creating the Model Context
Create an organization:
POST /integration-api/model/organizations
Content-Type: application/json
{
"name": "Customer Architecture"
}
Create a landscape:
POST /integration-api/model/landscapes?organizationId={organizationId}
Content-Type: application/json
{
"name": "Production Landscape"
}
Create a domain:
POST /integration-api/model/domains?organizationId={organizationId}&landscapeId={landscapeId}
Content-Type: application/json
{
"name": "Payments"
}
Creating an Element
Element changes use the common command mechanism. Put command context in the JSON scope object, not in query parameters. actorUserId identifies the user whose permissions are checked and whose identity appears in the audit history.
POST /integration-api/model/elements
Content-Type: application/json
{
"scope": {
"organizationId": "{organizationId}",
"landscapeId": "{landscapeId}",
"actorUserId": "U########",
"requestId": "integration-api-example"
},
"domainId": "{domainId}",
"name": "Payment Gateway",
"type": "SYSTEM",
"description": "Gateway for payment processing"
}
The actorUserId must match the authenticated session and have permission to create an object in the selected context. For containers and components, also provide belongsTo with the parent element ID.
A successful response contains the command ID, model versions before and after the change, emitted events, and the operation result:
{
"commandId": "{commandId}",
"modelVersionBefore": 1888,
"modelVersionAfter": 1889,
"events": [
{"eventType": "ELEMENT_CREATED", "modelVersion": 1889}
],
"resultPayload": {
"name": "Payment Gateway",
"type": "SYSTEM"
}
}
The new object is immediately available in the regular SysCraft interface.
Creating a Diagram
A diagram can be created with an initial set of visible elements:
POST /integration-api/model/diagrams?organizationId={organizationId}&landscapeId={landscapeId}
Content-Type: application/json
{
"name": "C1. Payments",
"description": "Payments system context",
"type": "C1",
"domainId": "{domainId}",
"visualizeIds": ["{systemId}", "{actorId}", "{linkId}"]
}
visualizeIds controls visibility on that diagram. The referenced objects remain part of the shared architecture model.
Copying Data Flows into a New Diagram
When creating a copy, set copyDataFlowsFromDiagramId to copy the source diagram's flows:
{
"name": "Customer journey copy",
"description": "A diagram copy with its data flows",
"type": "DYNAMIC",
"domainId": "{domainId}",
"visualizeIds": ["{systemId}", "{actorId}"],
"copyDataFlowsFromDiagramId": "{sourceDiagramId}"
}
SysCraft copies flows, steps, transitions, interactions, attachments, and properties, and remaps internal references to the new IDs. This option is supported for Dynamic, C1, C2, and C3 diagrams when allowed by environment settings and user permissions. Omit it if the source type cannot contain flows or the user cannot create them.
Command History
All model changes pass through the command mechanism, which checks permissions before execution. This also applies to batch operations: split the import or grant the missing permission if a child operation is not authorized.
GET /integration-api/model/commands/history?landscapeId={landscapeId}&includeAllBranches=false
Without limit, the backend returns a bounded set of recent records. Pass limit when you need an explicit maximum.
Deployment Data from CI/CD
A delivery pipeline can store an operational snapshot on the relevant model system. Use one atomic POST /integration-api/model/commands/batch request containing UPDATE_PROPERTY commands so the application version, deployment status, environment, and build number receive the same model version.
Use a unique requestId for each pipeline run and a stable correlationId for the application or deployment process. The former identifies a retried request; the latter groups multiple runs into a single history.
After a successful response:
- Store
commandIdandmodelVersionAfter. - Read
/integration-api/model/eventsand confirm an event with the samecommandId. - Read
/integration-api/model/commands/historyand filter parentBATCHrecords bycorrelationId. - Read the current values through
/integration-api/model/elements/{elementId}/properties.
History contains both a parent BATCH and child UPDATE_PROPERTY records. Use parent records for a list of pipeline runs and child records for a field-level audit.
The same current values appear in the system properties panel; the pipeline and web interface do not maintain separate copies.
Live Metrics from Monitoring
A monitoring system can write both product and technical metrics to the architecture model. For example, one batch can update MAU, DAU, availability, and error rate. Because the fields share one model version, consumers never observe a partially updated snapshot.
Read current values through GET /integration-api/model/elements/{elementId}/properties. Compute derived indicators such as DAU-to-MAU ratio in the reporting or integration layer instead of storing a second copy of the source data.
The parent batch ID connects the update to model events, while correlationId groups consecutive snapshots in command history. The latest values also appear in the element properties panel on the C1 diagram.
MCP Use-Case Refactoring
The MCP interface exposes two model-changing operations:
- Extract steps to use case — extract a continuous range of steps into a new use case;
- Inline use case — replace a selected call step with the called use case.
Both operations use the same command mechanism as the application. The MCP adapter supplies its configured technical user, records MCP as the source, executes an atomic batch, and returns the command ID, version transition, and child-operation result. The operation therefore appears in the common audit trail and can be reverted as one unit through command history.
Extraction requires the organization, landscape, branch, diagram, source flow, new use-case name, and selected step IDs. Inlining requires the same context, the call-step ID, a confirmed COPY or MOVE mode, and the confirmed set of discovered references. Clients may also send the expected model version and a requestId for optimistic locking and tracing.
MCP does not bypass refactoring safeguards. The range must be continuous, external GOTO references block a move, and deletion requires both the absence of other references and sufficient permissions. Personal alternative-visibility settings are neither imported nor changed by these operations.
Recommendations
- Run bulk imports in a dedicated working branch.
- Do not import into a branch locked by an active merge request.
- Review Overview and the health check after an import.
- Reuse existing model elements instead of creating duplicates.
- Always provide both source and target for a relationship.
- Import interfaces as well as elements for integration models.
- Review automated changes and merge them into the main branch through the standard process.