Create Architecture Link (RESERVED)


Overview

Create an authorization link between two custom nodes in an architecture custom view.

This operation is supported for architecture custom views only.

URI

POST /rest/applications/{name}/custom-views/architecture/link

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.

Request Body

{
    "modeId": "abc123-def456",
    "sourceId": "4:abc:123",
    "targetId": "4:abc:456",
    "linkType": "AUTHORIZED_LINK"
}
Property Type Required Description
modeId string Yes ID of the custom view to add the link to. The referenced view must be Architecture.
sourceId string Yes ID of the source custom node.
targetId string Yes ID of the target custom node. Must be different from sourceId.
linkType string No AUTHORIZED_LINK (default) or UNAUTHORIZED_LINK. Must match the view’s linkMode: AUTHORIZED_LINK for authorized views and UNAUTHORIZED_LINK for unauthorized views, otherwise the API returns a client error.

Responses

application/json

Example:

{
    "success": {
        "id": "5:def789:1",
        "sourceId": "4:abc:123",
        "targetId": "4:abc:456",
        "linkType": "AUTHORIZED_LINK",
        "createdBy": "jdoe",
        "createdAt": "2024-01-15T00:00:00Z"
    }
}

Error Response

Missing, or identical, node IDs:

{
    "code": 2,
    "message": "modeId, sourceId, and a distinct targetId are required",
    "status": 400
}

A linkType that does not match the view’s linkMode:

{
    "code": 2,
    "message": "linkType UNAUTHORIZED_LINK does not match the view's linkMode \"authorized\"; expected AUTHORIZED_LINK",
    "status": 400
}

JSON representation

Property Type Description
success object The created link.
success.id string Unique identifier of the link relationship.
success.sourceId string Source custom node ID.
success.targetId string Target custom node ID.
success.linkType string The type of the created link: AUTHORIZED_LINK or UNAUTHORIZED_LINK.
success.createdBy string Username of the creator.
success.createdAt string Creation timestamp.