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:

Property Type Required Description
name string Yes Name of the saved view. Must be unique per application.
id string No Element ID of an existing view. Required for updates.
update boolean No Set to true to update an existing view.
createdBy string No Username of the creator.
custom boolean No Whether this is a user-created custom view.
version string No Version identifier.
drillDownMode string No Drill-down mode for community views.
drillDownNode string No Drill-down node for community views.
drillDownPath []string No Drill-down path for community views.
levelXDrill object No Level drill-down configuration.
canvas object Yes Canvas state including positions and layout.
callGraphData object No Call graph configuration.
graphOptionsData object No Graph rendering options.
levelNodeData []object No Level-specific node data.

Canvas object

Property Type Required Description
x number No Canvas pan X position.
y number No Canvas pan Y position.
zoom number No Canvas zoom level.
angle number No Canvas rotation angle.
height number No Canvas height.
width number No Canvas width.
level string No Level label for level views.
isObjectsView boolean No Whether this is an objects view.
isMethodsView boolean No Whether this is a methods view.
isCommunities boolean No Whether communities mode is enabled.
levelTransformation integer No Level transformation identifier.
nodes []object Yes List of objects with positions on the canvas.
edges []object No List of custom edges.
comments []object No List of comments on the canvas.
groups []object No List of groups on the canvas.

Node object

Property Type Required Description
id string Yes AipId of the object.
x number Yes X position on the canvas.
y number Yes Y position on the canvas.
opacity number No Node opacity (defaults to 1).
color string No Node 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

Property Type Description
name string Name of the saved view.
id string Neo4j element ID of the created/updated view.
message string Success message.