Skip to main content
POST
/
landscapes
/
{landscapeId}
/
versions
/
{versionId}
/
diagrams
Create
curl --request POST \
  --url https://api.icepanel.io/v1/landscapes/{landscapeId}/versions/{versionId}/diagrams \
  --header 'Authorization: <authorization>' \
  --header 'Content-Type: application/json' \
  --data '{
  "commit": 123,
  "description": "<string>",
  "groupId": "<string>",
  "index": 123,
  "labels": {},
  "modelId": "<string>",
  "name": "<string>",
  "parentId": "<string>",
  "pinned": true,
  "pinnedAt": "2023-11-07T05:31:56Z",
  "pinnedIndex": 123,
  "status": "current",
  "zoomOverrides": {},
  "handleId": "<string>",
  "type": "app-diagram",
  "comments": {},
  "connections": {},
  "objects": {},
  "tasksProposed": [
    "<any>"
  ]
}'
{
  "diagram": {
    "commit": 123,
    "description": "<string>",
    "groupId": "<string>",
    "index": 123,
    "labels": {},
    "modelId": "<string>",
    "name": "<string>",
    "parentId": "<string>",
    "pinned": true,
    "pinnedAt": "2023-11-07T05:31:56Z",
    "pinnedIndex": 123,
    "status": "current",
    "zoomOverrides": {},
    "handleId": "<string>",
    "type": "app-diagram",
    "commentCount": 123,
    "connectionCount": 123,
    "createdAt": "2023-11-07T05:31:56Z",
    "createdBy": "user",
    "createdById": "<string>",
    "deletedAt": "2023-11-07T05:31:56Z",
    "deletedBy": "user",
    "deletedById": "<string>",
    "id": "<string>",
    "landscapeId": "<string>",
    "objectCount": {
      "actor": 123,
      "app": 123,
      "group": 123,
      "component": 123,
      "store": 123,
      "system": 123,
      "area": 123,
      "box": 123
    },
    "stats": {
      "edits": {
        "all": {
          "count": 123,
          "users": {}
        },
        "day": {},
        "month": {},
        "week": {}
      },
      "views": {
        "all": {
          "count": 123,
          "users": {}
        },
        "day": {},
        "month": {},
        "week": {}
      }
    },
    "updatedAt": "2023-11-07T05:31:56Z",
    "updatedBy": "user",
    "updatedById": "<string>",
    "version": 123,
    "versionId": "<string>"
  },
  "diagramContent": {
    "comments": {},
    "commit": 123,
    "connections": {},
    "objects": {},
    "tasksProposed": [
      {
        "proposedAt": "2023-11-07T05:31:56Z",
        "proposedBy": "user",
        "proposedById": "<string>",
        "task": "<any>"
      }
    ],
    "createdAt": "2023-11-07T05:31:56Z",
    "createdBy": "user",
    "createdById": "<string>",
    "deletedAt": "2023-11-07T05:31:56Z",
    "deletedBy": "user",
    "deletedById": "<string>",
    "groupId": "<string>",
    "handleId": "<string>",
    "id": "<string>",
    "landscapeId": "<string>",
    "modelId": "<string>",
    "name": "<string>",
    "status": "current",
    "type": "app-diagram",
    "updatedAt": "2023-11-07T05:31:56Z",
    "updatedBy": "user",
    "updatedById": "<string>",
    "version": 123,
    "versionId": "<string>",
    "viewedAt": "2023-11-07T05:31:56Z",
    "viewedBy": "user",
    "viewedById": "<string>"
  }
}

Headers

Authorization
string
required

Path Parameters

landscapeId
string
required
versionId
string
required

Query Parameters

updateViewedAt
boolean

Body

application/json
index
number
required
modelId
string
required

model object id this object belongs to

name
string
required
type
enum<string>
required
Available options:
app-diagram,
component-diagram,
context-diagram
commit
number
description
string
groupId
string | null
labels
object
parentId
string | null
pinned
boolean
pinnedAt
string<date-time>
pinnedIndex
number
status
enum<string>
Available options:
current,
draft
zoomOverrides
object | null

Custom zoom levels for specific model objects within the diagram. The key is the modelObjectId and the value is the diagram id.

handleId
string
comments
object
connections
object
objects
object
tasksProposed
object[]
  • Option 1
  • Option 2
  • Option 3
  • Option 4
  • Option 5
  • Option 6
  • Option 7
  • Option 8
  • Option 9
  • Option 10
  • Option 11
  • Option 12
  • Option 13
  • Option 14
  • Option 15
  • Option 16
  • Option 17
  • Option 18
  • Option 19
  • Option 20
  • Option 21
  • Option 22
  • Option 23
  • Option 24
  • Option 25
  • Option 26
  • Option 27
  • Option 28
  • Option 29
  • Option 30
  • Option 31
  • Option 32
  • Option 33
  • Option 34
  • Option 35
  • Option 36

Response

OK

diagram
object
required
diagramContent
object
required