Project Diagram

To enable this feature, please reach out to your Customer Success Manager (CSM).

Get a Project Diagram

This endpoint retrieves a project diagram.

The diagram is formatted in JSON according to a proprietary JSON Schema. The schema is hosted on your instance and its location is included in the schema property of a diagram response.

GET /api/v2/projects/{project_id}/diagram/

URL Parameters

Parameter Description
project_id The ID of the Project

Sample Diagram

The example payload represents the diagram below.

Sample diagram

GET /api/v2/projects/{project_id}/diagram/ HTTP/1.1
Accept: application/json
Authorization: Token "YOUR SDE ACCESS TOKEN"
HTTP/1.1 200 OK
Content-Type: application/json

{
  "last_updated": "2022-05-24T15:43:58.558756-04:00",
  "data": {
    "elements": {
      "edges": [
        {
          "data": {
            "id": "79fc8ed1-3cc8-463c-903b-2e4aed385e38",
            "label": "tcp",
            "source": "dda4e0d3-ea68-4249-929f-cfe2d0dfecbd",
            "target": "b55a8df7-6134-499d-9814-272497a52b6f"
          },
          "locked": false,
          "classes": "single-arrowhead solid-line",
          "removed": false,
          "position": {
            "x": 0,
            "y": 0
          }
        }
      ],
      "nodes": [
        {
          "data": {
            "id": "b55a8df7-6134-499d-9814-272497a52b6f",
            "label": "DB",
            "parent": "ebf7c83a-3ed2-41d7-9ea9-d0283fc067d7",
            "component_id": "SC1"
          },
          "locked": false,
          "classes": "category-database",
          "removed": false,
          "position": {
            "x": 1509.0903183786497,
            "y": -628.6603060270612
          }
        },
        {
          "data": {
            "id": "dda4e0d3-ea68-4249-929f-cfe2d0dfecbd",
            "label": "Web server",
            "parent": null,
            "component_id": "SC28"
          },
          "locked": false,
          "classes": "category-web",
          "removed": false,
          "position": {
            "x": 1381.6548506084246,
            "y": -571.6015527959455
          }
        },
        {
          "data": {
            "id": "ebf7c83a-3ed2-41d7-9ea9-d0283fc067d7",
            "label": "Trusted Zone",
            "parent": null
          },
          "locked": false,
          "classes": "zone",
          "removed": false,
          "position": {
            "x": 1509.0903183786497,
            "y": -614.4103060270612
          }
        }
      ]
    }
  }
}

results matching ""

    No results matching ""