Switch Aggregation Link Mode (RESERVED)
RESERVED: The keyword RESERVED annotation means that the API is available for use but is not yet part of the officially supported specification. Its behavior, interface, or output may change in future releases without backward compatibility guarantees.
Overview
In an existing architecture custom view, you can switch between the Authorization and Unauthorization modes:
authorized: the links drawn in the view are the dependencies that are allowed.unauthorized: the links drawn in the view are the dependencies that are forbidden.
Changing the mode keeps your custom node definitions but removes the link design: every link already drawn in the view, both AUTHORIZED_LINK and UNAUTHORIZED_LINK, is deleted, and the view is rebuilt in the selected mode. The view’s other settings (Unassigned node, user links, collaborators, publication) are kept.
Switching also marks the view and its custom nodes as not validated. After drawing the links for the new mode, validate the view again by saving it with "validated": true through Update Custom View.
The links are deleted and the validation is reset in the same step as the mode change, so a failed request leaves the view as it was. Sending the mode the view already has changes nothing: the links and the validation are kept.
This operation is supported for architecture custom views only, and only for views you can edit.
URI
POST /rest/applications/{name}/custom-views/{viewId}/architecture/switch
Path parameters
name (string)
This parameter identifies the analyzed application. The application name must be properly encoded if required. Character back-quote is not allowed.
viewId (string)
The unique identifier of the architecture custom view.
Request Body
{
"linkMode": "unauthorized"
}
| Property | Type | Required | Description |
|---|---|---|---|
| linkMode | string | Yes | The mode to switch to: authorized or unauthorized. |
Notes
- If the target custom view is not an architecture view, the API returns a client error.
- Links are drawn with Create Architecture Link; their type follows the view’s
linkMode.
Responses
application/json
Success Response
{
"success": {
"id": "abc123-def456",
"name": "Layer Rules",
"collaborators": [],
"validated": false,
"unassigned": false,
"linkMode": "unauthorized",
"userLinks": true,
"isCreator": true,
"createdBy": "admin",
"createdAt": "2024-01-17T09:00:00"
}
}
Error Response
Unknown link mode:
{
"code": 2,
"message": "linkMode must be \"authorized\" or \"unauthorized\"",
"status": 400
}
Switching a dynamic view:
{
"code": 2,
"message": "Custom view abc123-def456 is not an architecture view. Manual links and this endpoint are only supported for architecture custom views.",
"status": 400
}
JSON representation
| Property | Type | Description |
|---|---|---|
| success.id | string | The unique identifier for the view. |
| success.name | string | The view name. |
| success.collaborators | []string | List of collaborator usernames. |
| success.validated | boolean | Whether the view is validated. false after a switch. |
| success.unassigned | boolean | Whether the Unassigned node is enabled. |
| success.linkMode | string | The view’s link mode after the switch: authorized or unauthorized. |
| success.userLinks | boolean | Whether the view shows the user’s links with the computed dependencies. |
| success.isCreator | boolean | Whether the current user is the creator. |
| success.createdBy | string | Username of the view creator. |
| success.createdAt | string | Timestamp when the view was created. |