Skip to main content

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:

  1. Sign in.
  2. 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.

Loading image...
A real POST /login request returns the user and sets a secure sessionId cookie; the course console masks the password.

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;
  • branchId when the operation does not target the main branch.

This context tells SysCraft which model and version the operation belongs to.

Loading image...
After reading organizations, landscapes, and domains, the course console selects Commerce Hub, E-Commerce, and General.

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}
Loading image...
GET /integration-api/model/elements with domainId and type=SYSTEM returns systems from the selected domain.

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"
}
}
Loading image...
POST /integration-api/model/elements sends the command scope, domain, and system properties; the response confirms the new version and ELEMENT_CREATED event.

The new object is immediately available in the regular SysCraft interface.

Loading image...
The Object Model search shows the new system in the General domain.

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
Loading image...
Landscape history shows CREATE_ELEMENT, the INTEGRATION source, the user, and the model-version transition.

Without limit, the backend returns a bounded set of recent records. Pass limit when you need an explicit maximum.

Deployment Data from CI/CD​

Update deployment properties atomically, trace CI runs in command history, and verify the result in the model.

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.

Loading image...
One atomic request updates four typed E-Commerce properties and includes run and correlation identifiers.

After a successful response:

  1. Store commandId and modelVersionAfter.
  2. Read /integration-api/model/events and confirm an event with the same commandId.
  3. Read /integration-api/model/commands/history and filter parent BATCH records by correlationId.
  4. 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.

Loading image...
Three parent batch commands share one correlationId and expose their source, user, status, and model-version transition.

The same current values appear in the system properties panel; the pipeline and web interface do not maintain separate copies.

Loading image...
The selected system shows its deployed version, build number, production environment, and latest delivery status.

Live Metrics from Monitoring​

Write a consistent metrics snapshot, inspect its events and history, and confirm the values in the C1 model.

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.

Loading image...
One request sends monthly and daily active users, availability, and error rate with shared request and correlation identifiers.

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.

Loading image...
The Integration API returns four stored properties; the course console calculates the daily-to-monthly audience ratio.

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.

Loading image...
The selected system shows MAU, DAU, availability, and error rate from the latest atomic snapshot.

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.
Loading image...
The course console shows two successful MCP calls in the common architecture-request log.

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.