Save View (Reserved)


Overview

Create or update a saved view for an application. A saved view captures a canvas state including object positions, edges, comments, and groups.

URI

POST /rest/applications/{name}/saved-views

Path parameters

name (string)

This parameter identifies the analyzed application. The application name must be properly encoded if it is required. Character back-quote is not allowed.

Request Body

{
    "name": "My Saved View",
    "createdBy": "admin",
    "custom": true,
    "version": "3.6.0",
    "canvas": {
        "x": 0,
        "y": 0,
        "zoom": 1,
        "angle": 0,
        "height": 651,
        "width": 672,
        "isObjectsView": true,
        "nodes": [
            {
                "id": "1744",
                "x": 10.0,
                "y": 0.0,
                "opacity": 1,
                "color": ""
            }
        ]
    }
}

A JSON object describing the view to save:

PropertyTypeRequiredDescription
namestringYesName of the saved view. Must be unique per application.
idstringNoElement ID of an existing view. Required for updates.
updatebooleanNoSet to true to update an existing view.
createdBystringNoUsername of the creator.
custombooleanNoWhether this is a user-created custom view.
versionstringNoVersion identifier.
drillDownModestringNoDrill-down mode for community views.
drillDownNodestringNoDrill-down node for community views.
drillDownPath[]stringNoDrill-down path for community views.
levelXDrillobjectNoLevel drill-down configuration.
canvasobjectYesCanvas state including positions and layout.
callGraphDataobjectNoCall graph configuration.
graphOptionsDataobjectNoGraph rendering options.
levelNodeData[]objectNoLevel-specific node data.

Canvas object

PropertyTypeRequiredDescription
xnumberNoCanvas pan X position.
ynumberNoCanvas pan Y position.
zoomnumberNoCanvas zoom level.
anglenumberNoCanvas rotation angle.
heightnumberNoCanvas height.
widthnumberNoCanvas width.
levelstringNoLevel label for level views.
isObjectsViewbooleanNoWhether this is an objects view.
isMethodsViewbooleanNoWhether this is a methods view.
isCommunitiesbooleanNoWhether communities mode is enabled.
levelTransformationintegerNoLevel transformation identifier.
nodes[]objectYesList of objects with positions on the canvas.
edges[]objectNoList of custom edges.
comments[]objectNoList of comments on the canvas.
groups[]objectNoList of groups on the canvas.

Node object

PropertyTypeRequiredDescription
idstringYesAipId of the object.
xnumberYesX position on the canvas.
ynumberYesY position on the canvas.
opacitynumberNoNode opacity (defaults to 1).
colorstringNoNode color override.

Responses

application/json

Success Response

{
    "name": "My Saved View",
    "id": "4:abc123:456",
    "message": "View saved successfully"
}

Error Responses

Duplicate view name:

{
    "code": 1,
    "message": "view name already exists",
    "status": 409
}

Invalid request body:

{
    "error": "invalid request body"
}

JSON representation

Response

PropertyTypeDescription
namestringName of the saved view.
idstringNeo4j element ID of the created/updated view.
messagestringSuccess message.