Clone Custom View (RESERVED)


Overview

Duplicate an existing custom aggregation view, including its custom nodes and the links between them. The copy is named Copy of <source name>, or Copy of <source name> (2), (3) and so on when earlier copies exist. It starts unpublished.

For an architecture view, the copy keeps the source view’s linkMode, and each copied link keeps its original type, so the links carry the same meaning as in the source view.

This operation is supported for dynamic and architecture custom views. Static custom views return a client error.

URI

POST /rest/applications/{name}/custom-views/{viewId}/clone

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 custom view to duplicate.

Request Body

No request body required.

Responses

application/json

Example:

{
    "success": {
        "id": "xyz789-uvw012",
        "name": "Copy of Forbidden Dependencies",
        "collaborators": [],
        "mode": "architecture",
        "published": false,
        "unassigned": false,
        "linkMode": "unauthorized",
        "isCreator": true,
        "createdBy": "admin",
        "createdAt": "2024-01-17T09:00:00"
    }
}

Error Response

Cloning a static view:

{
    "code": 2,
    "message": "Static custom views do not support cloning. Allowed operations are view, rename, and delete.",
    "status": 400
}

JSON representation

Property Type Description
success.id string The unique identifier for the new copy.
success.name string The name given to the copy.
success.collaborators []string List of collaborator usernames.
success.mode string The view mode: dynamic or architecture.
success.published boolean Always false for a new copy.
success.unassigned boolean Whether the Unassigned node is enabled.
success.linkMode string Architecture views only: authorized or unauthorized, copied from the source view.
success.isCreator boolean Whether the current user is the creator.
success.createdBy string Username of the view creator.
success.createdAt string Timestamp when the copy was created.