Get API Dependency Graph (Reserved)


Overview

Retrieve the dependency graph for a specific API in an application. This endpoint returns a graph structure containing nodes (APIs and their dependencies) and edges (relationships between them). The graph helps visualize the call hierarchy and relationships of the specified API.

URI

GET /rest/applications/{application}/api/{id}/graph

Path parameters

application (string)

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

id (string)

required The unique identifier of the API for which to retrieve the dependency graph.

Responses

application/json

The response contains a graph structure with nodes and edges representing the API and its dependencies. Example:

{
    "nodes": [
        {
            "id": "4:2970fb0e-c0ea-47e3-9507-c4f50880db84:518655",
            "data": {
                "AipId": "462488",
                "FullName": "org.openmrs.module.web.OpenmrsJspServlet.service/*.jsp/ANY",
                "Name": "*.jsp/",
                "StartPoint": "start",
                "Type": "Servlet Any Operation"
            }
        },
        {
            "id": "4:2970fb0e-c0ea-47e3-9507-c4f50880db84:523540",
            "data": {
                "AipId": "465131",
                "FullName": "org.openmrs.module.web.OpenmrsJspServlet.service",
                "Name": "service",
                "Type": "Java Method"
            }
        }
    ],
    "edges": [
        {
            "id": "5:2970fb0e-c0ea-47e3-9507-c4f50880db84:6038215",
            "source": "4:2970fb0e-c0ea-47e3-9507-c4f50880db84:523540",
            "target": "4:2970fb0e-c0ea-47e3-9507-c4f50880db84:517187",
            "type": "OVERRIDE"
        },
        {
            "id": "5:2970fb0e-c0ea-47e3-9507-c4f50880db84:6038214",
            "source": "4:2970fb0e-c0ea-47e3-9507-c4f50880db84:523540",
            "target": "4:2970fb0e-c0ea-47e3-9507-c4f50880db84:517187",
            "type": "CALL"
        }
    ]
}

JSON representation

Property Type Description
nodes array An array of node objects representing APIs and dependencies in the graph.
edges array An array of edge objects representing relationships between nodes.

Node Object

Each node in the nodes array contains:

Property Type Description
id string The unique identifier of the node in the graph.
data object Contains detailed information about the node.

Node Data Object

The data object within each node contains:

Property Type Description
AipId string The AIP identifier.
FullName string The full name of the API or method.
Name string The short name of the API or method.
Type string The type of the node (e.g., “Servlet Any Operation”, “Java Method”).
StartPoint string Optional. Indicates if this node is the starting point of the graph (value: “start”).

Edge Object

Each edge in the edges array contains:

Property Type Description
id string The unique identifier of the edge in the graph.
source string The node id from which the edge originates.
target string The node id to which the edge points.
type string The type of relationship (e.g., “CALL”, “OVERRIDE”).