export-cloud-diagram-json
dci export-cloud-diagram-json id
Exports the full content of a diagram layer as a structured JSON document, including all components and export metadata.
Output
OK - Diagram exported as JSON.
By default dci renders the result as a table. Use --output json to get the full structure described below — see Output formats.
| Field | Type | Description |
|---|---|---|
statussheet | object | Diagram-level metadata (excluding internal IDs). |
metadata | object | Metadata included in a diagram JSON export. |
metadata.user | string | Email of the user who triggered the export. |
metadata.date | string (date-time) | ISO 8601 timestamp of the export. |
metadata.version | string | Export format version. |
metadata.connections | map of string | Map of component ID to display label for external connections referenced by cross-diagram links. |
nodes | array of object | Exported nodes. |
nodes[]._id | string | Node ID. |
nodes[].name | string | Component name. |
nodes[].props | object | Custom component properties (key-value pairs). |
nodes[].cld_id | string | Cloud resource ID (set on cloud-imported components). |
nodes[].cld_type | string | Cloud account type. One of: "AWS", "GCP", "AZURE". |
nodes[].cld_sync | boolean | Whether this component is synced with cloud. |
nodes[].cld_account | string | Cloud account ID. |
nodes[].tags | array of string | Tags assigned to the component. |
nodes[].color | string | Node color. |
nodes[].icon | string | Node icon identifier. |
nodes[].parent | string | Parent node ID. |
nodes[].infra_node | object | Reference to a linked infrastructure node in another diagram. |
nodes[].infra_node._id | string | Infrastructure node ID. |
nodes[].infra_node.scheme_id | string | Parent diagram ID. |
nodes[].infra_node.ss_id | string | Parent layer ID. |
nodes[].instance_count | integer | Number of instances represented by this node. |
nodes[].running | boolean | Whether the node is currently running. |
nodes[].issues | array of object | Issues associated with this node. |
nodes[].issues[]._id | string | Issue reference ID. |
nodes[].issues[].comment | string | Optional comment on the issue. |
nodes[].issues[].snoozed | number | Snooze duration in seconds. |
nodes[].issues[].jira | string | Linked Jira ticket key or URL. |
elements | array of object | Exported elements. |
elements[]._id | string | Element ID. |
elements[].name | string | Component name. |
elements[].props | object | Custom component properties (key-value pairs). |
elements[].cld_id | string | Cloud resource ID (set on cloud-imported components). |
elements[].cld_type | string | Cloud account type. One of: "AWS", "GCP", "AZURE". |
elements[].cld_sync | boolean | Whether this component is synced with cloud. |
elements[].cld_account | string | Cloud account ID. |
elements[].tags | array of string | Tags assigned to the component. |
elements[].color | string | Element color. |
elements[].icon | string | Element icon identifier. |
elements[].parent | string | Parent element ID. |
elements[].issues | array of object | Issues associated with this element. |
elements[].issues[]._id | string | Issue reference ID. |
elements[].issues[].comment | string | Optional comment on the issue. |
elements[].issues[].snoozed | number | Snooze duration in seconds. |
elements[].issues[].jira | string | Linked Jira ticket key or URL. |
groups | array of object | Exported groups. |
groups[]._id | string | Group ID. |
groups[].name | string | Component name. |
groups[].props | object | Custom component properties (key-value pairs). |
groups[].cld_id | string | Cloud resource ID (set on cloud-imported components). |
groups[].cld_type | string | Cloud account type. One of: "AWS", "GCP", "AZURE". |
groups[].cld_sync | boolean | Whether this component is synced with cloud. |
groups[].cld_account | string | Cloud account ID. |
groups[].tags | array of string | Tags assigned to the component. |
groups[].group_type | string | Group type. One of: "account", "az", "azure_subscription", "customer_gateway", "ecs", "eks", "aks", "k8s_namespace", "k8s_pod", "k8s_deployment", "k8s_daemon_set", "k8s_replica_set", …. |
groups[].color | string | Group color. |
groups[].icon | string | Group icon identifier. |
groups[].items | array of object | Components contained in the group. |
groups[].items[]._id | string | Component ID. |
groups[].items[].type | string | Component type. One of: "attachment", "combiner", "element", "group", "link", "node", "note", "scheme", "statussheet". |
groups[].issues | array of object | Issues associated with this group. |
groups[].issues[]._id | string | Issue reference ID. |
groups[].issues[].comment | string | Optional comment on the issue. |
groups[].issues[].snoozed | number | Snooze duration in seconds. |
groups[].issues[].jira | string | Linked Jira ticket key or URL. |
attachments | array of object | Exported attachments. |
attachments[]._id | string | Attachment ID. |
attachments[].name | string | Component name. |
attachments[].props | object | Custom component properties (key-value pairs). |
attachments[].cld_id | string | Cloud resource ID (set on cloud-imported components). |
attachments[].cld_type | string | Cloud account type. One of: "AWS", "GCP", "AZURE". |
attachments[].cld_sync | boolean | Whether this component is synced with cloud. |
attachments[].cld_account | string | Cloud account ID. |
attachments[].tags | array of string | Tags assigned to the component. |
attachments[].color | string | Attachment color. |
attachments[].icon | string | Attachment icon identifier. |
attachments[].group | string | Parent group ID. |
attachments[].issues | array of object | Issues associated with this attachment. |
attachments[].issues[]._id | string | Issue reference ID. |
attachments[].issues[].comment | string | Optional comment on the issue. |
attachments[].issues[].snoozed | number | Snooze duration in seconds. |
attachments[].issues[].jira | string | Linked Jira ticket key or URL. |
links | array of object | Exported links. |
links[]._id | string | Link ID. |
links[].name | string | Component name. |
links[].props | object | Custom component properties (key-value pairs). |
links[].cld_id | string | Cloud resource ID (set on cloud-imported components). |
links[].cld_type | string | Cloud account type. One of: "AWS", "GCP", "AZURE". |
links[].cld_sync | boolean | Whether this component is synced with cloud. |
links[].cld_account | string | Cloud account ID. |
links[].tags | array of string | Tags assigned to the component. |
links[].connection_type | string | Link connection type. One of: "normal", "tunnel", "private", "VPN", "VPC Peering", "Network Connectivity Center", "Private Service Connect", "Private Google Access", "Serverless VPC", "Serverless VPC Access Connector", "Cross Cloud Interconnect", "Partner Interconnect", …. |
links[].origin | object | Reference to a diagram component, including its parent diagram and layer. |
links[].origin._id | string | Component ID. |
links[].origin.type | string | Component type. One of: "attachment", "combiner", "element", "group", "link", "node", "note", "scheme", "statussheet". |
links[].origin.scheme_id | string | Parent diagram ID. |
links[].origin.ss_id | string | Parent layer ID. |
links[].destination | object | Reference to a diagram component, including its parent diagram and layer. |
links[].destination._id | string | Component ID. |
Note
The field list above is truncated. Expand the raw JSON schema below for the full structure.
Raw JSON schema
{
"type": "object",
"required": [
"metadata"
],
"description": "Full diagram export as a structured JSON document.",
"properties": {
"statussheet": {
"type": "object",
"description": "Diagram-level metadata (excluding internal IDs).",
"additionalProperties": true
},
"metadata": {
"type": "object",
"required": [
"user",
"date",
"version"
],
"description": "Metadata included in a diagram JSON export.",
"properties": {
"user": {
"type": "string",
"description": "Email of the user who triggered the export."
},
"date": {
"type": "string",
"format": "date-time",
"description": "ISO 8601 timestamp of the export."
},
"version": {
"type": "string",
"description": "Export format version."
},
"connections": {
"type": "object",
"description": "Map of component ID to display label for external connections referenced by cross-diagram links.",
"additionalProperties": {
"type": "string"
}
}
}
},
"nodes": {
"type": "array",
"description": "Exported nodes.",
"items": {
"type": "object",
"required": [
"_id"
],
"description": "A node component (host, service, or application component).",
"properties": {
"_id": {
"type": "string",
"description": "Node ID."
},
"name": {
"type": "string",
"description": "Component name."
},
"props": {
"type": "object",
"additionalProperties": true,
"description": "Custom component properties (key-value pairs)."
},
"cld_id": {
"type": "string",
"description": "Cloud resource ID (set on cloud-imported components)."
},
"cld_type": {
"type": "string",
"enum": [
"AWS",
"GCP",
"AZURE"
],
"description": "Cloud account type."
},
"cld_sync": {
"type": "boolean",
"description": "Whether this component is synced with cloud."
},
"cld_account": {
"type": "string",
"description": "Cloud account ID."
},
"tags": {
"type": "array",
"description": "Tags assigned to the component.",
"items": {
"type": "string"
}
},
"color": {
"type": "string",
"description": "Node color."
},
"icon": {
"type": "string",
"description": "Node icon identifier."
},
"parent": {
"type": "string",
"description": "Parent node ID."
},
"infra_node": {
"type": "object",
"required": [
"_id",
"scheme_id",
"ss_id"
],
"description": "Reference to a linked infrastructure node in another diagram.",
"properties": {
"_id": {
"type": "string",
"description": "Infrastructure node ID."
},
"scheme_id": {
"type": "string",
"description": "Parent diagram ID."
},
"ss_id": {
"type": "string",
"description": "Parent layer ID."
}
}
},
"instance_count": {
"type": "integer",
"description": "Number of instances represented by this node."
},
"running": {
"type": "boolean",
"description": "Whether the node is currently running."
},
"issues": {
"type": "array",
"description": "Issues associated with this node.",
"items": {
"type": "object",
"description": "Issue annotation linked to a component.",
"properties": {
"_id": {
"type": "string",
"description": "Issue reference ID."
},
"comment": {
"type": "string",
"description": "Optional comment on the issue."
},
"snoozed": {
"type": "number",
"description": "Snooze duration in seconds."
},
"jira": {
"type": "string",
"description": "Linked Jira ticket key or URL."
}
}
}
}
}
}
},
"elements": {
"type": "array",
"description": "Exported elements.",
"items": {
"type": "object",
"required": [
"_id"
],
"description": "An element component (application-layer component).",
"properties": {
"_id": {
"type": "string",
"description": "Element ID."
},
"name": {
"type": "string",
"description": "Component name."
},
"props": {
"type": "object",
"additionalProperties": true,
"description": "Custom component properties (key-value pairs)."
},
"cld_id": {
"type": "string",
"description": "Cloud resource ID (set on cloud-imported components)."
},
"cld_type": {
"type": "string",
"enum": [
"AWS",
"GCP",
"AZURE"
],
"description": "Cloud account type."
},
"cld_sync": {
"type": "boolean",
"description": "Whether this component is synced with cloud."
},
"cld_account": {
"type": "string",
"description": "Cloud account ID."
},
"tags": {
"type": "array",
"description": "Tags assigned to the component.",
"items": {
"type": "string"
}
},
"color": {
"type": "string",
"description": "Element color."
},
"icon": {
"type": "string",
"description": "Element icon identifier."
},
"parent": {
"type": "string",
"description": "Parent element ID."
},
"issues": {
"type": "array",
"description": "Issues associated with this element.",
"items": {
"type": "object",
"description": "Issue annotation linked to a component.",
"properties": {
"_id": {
"type": "string",
"description": "Issue reference ID."
},
"comment": {
"type": "string",
"description": "Optional comment on the issue."
},
"snoozed": {
"type": "number",
"description": "Snooze duration in seconds."
},
"jira": {
"type": "string",
"description": "Linked Jira ticket key or URL."
}
}
}
}
}
}
},
"groups": {
"type": "array",
"description": "Exported groups.",
"items": {
"type": "object",
"required": [
"_id"
],
"description": "A group component (VPC, subnet, region, cluster, etc.).",
"properties": {
"_id": {
"type": "string",
"description": "Group ID."
},
"name": {
"type": "string",
"description": "Component name."
},
"props": {
"type": "object",
"additionalProperties": true,
"description": "Custom component properties (key-value pairs)."
},
"cld_id": {
"type": "string",
"description": "Cloud resource ID (set on cloud-imported components)."
},
"cld_type": {
"type": "string",
"enum": [
"AWS",
"GCP",
"AZURE"
],
"description": "Cloud account type."
},
"cld_sync": {
"type": "boolean",
"description": "Whether this component is synced with cloud."
},
"cld_account": {
"type": "string",
"description": "Cloud account ID."
},
"tags": {
"type": "array",
"description": "Tags assigned to the component.",
"items": {
"type": "string"
}
},
"group_type": {
"type": "string",
"enum": [
"account",
"az",
"azure_subscription",
"customer_gateway",
"ecs",
"eks",
"aks",
"k8s_namespace",
"k8s_pod",
"k8s_deployment",
"k8s_daemon_set",
"k8s_replica_set",
"k8s_stateful_set",
"project",
"region",
"security_group",
"subnet",
"vpc",
"gcp_instance_group",
"gcp_managed_zone",
"gke_cluster",
"azure_dns_zone",
"azure_cdn_profile",
"azure_resource_group"
],
"description": "Group type."
},
"color": {
"type": "string",
"description": "Group color."
},
"icon": {
"type": "string",
"description": "Group icon identifier."
},
"items": {
"type": "array",
"description": "Components contained in the group.",
"items": {
"type": "object",
"required": [
"_id",
"type"
],
"description": "Reference to a component contained within a group.",
"properties": {
"_id": {
"type": "string",
"description": "Component ID."
},
"type": {
"type": "string",
"enum": [
"attachment",
"combiner",
"element",
"group",
"link",
"node",
"note",
"scheme",
"statussheet"
],
"description": "Component type."
}
}
}
},
"issues": {
"type": "array",
"description": "Issues associated with this group.",
"items": {
"type": "object",
"description": "Issue annotation linked to a component.",
"properties": {
"_id": {
"type": "string",
"description": "Issue reference ID."
},
"comment": {
"type": "string",
"description": "Optional comment on the issue."
},
"snoozed": {
"type": "number",
"description": "Snooze duration in seconds."
},
"jira": {
"type": "string",
"description": "Linked Jira ticket key or URL."
}
}
}
}
}
}
},
"attachments": {
"type": "array",
"description": "Exported attachments.",
"items": {
"type": "object",
"required": [
"_id"
],
"description": "An attachment component added to a group.",
"properties": {
"_id": {
"type": "string",
"description": "Attachment ID."
},
"name": {
"type": "string",
"description": "Component name."
},
"props": {
"type": "object",
"additionalProperties": true,
"description": "Custom component properties (key-value pairs)."
},
"cld_id": {
"type": "string",
"description": "Cloud resource ID (set on cloud-imported components)."
},
"cld_type": {
"type": "string",
"enum": [
"AWS",
"GCP",
"AZURE"
],
"description": "Cloud account type."
},
"cld_sync": {
"type": "boolean",
"description": "Whether this component is synced with cloud."
},
"cld_account": {
"type": "string",
"description": "Cloud account ID."
},
"tags": {
"type": "array",
"description": "Tags assigned to the component.",
"items": {
"type": "string"
}
},
"color": {
"type": "string",
"description": "Attachment color."
},
"icon": {
"type": "string",
"description": "Attachment icon identifier."
},
"group": {
"type": "string",
"description": "Parent group ID."
},
"issues": {
"type": "array",
"description": "Issues associated with this attachment.",
"items": {
"type": "object",
"description": "Issue annotation linked to a component.",
"properties": {
"_id": {
"type": "string",
"description": "Issue reference ID."
},
"comment": {
"type": "string",
"description": "Optional comment on the issue."
},
"snoozed": {
"type": "number",
"description": "Snooze duration in seconds."
},
"jira": {
"type": "string",
"description": "Linked Jira ticket key or URL."
}
}
}
}
}
}
},
"links": {
"type": "array",
"description": "Exported links.",
"items": {
"type": "object",
"required": [
"_id",
"origin",
"destination"
],
"description": "A link component connecting two nodes or groups.",
"properties": {
"_id": {
"type": "string",
"description": "Link ID."
},
"name": {
"type": "string",
"description": "Component name."
},
"props": {
"type": "object",
"additionalProperties": true,
"description": "Custom component properties (key-value pairs)."
},
"cld_id": {
"type": "string",
"description": "Cloud resource ID (set on cloud-imported components)."
},
"cld_type": {
"type": "string",
"enum": [
"AWS",
"GCP",
"AZURE"
],
"description": "Cloud account type."
},
"cld_sync": {
"type": "boolean",
"description": "Whether this component is synced with cloud."
},
"cld_account": {
"type": "string",
"description": "Cloud account ID."
},
"tags": {
"type": "array",
"description": "Tags assigned to the component.",
"items": {
"type": "string"
}
},
"connection_type": {
"type": "string",
"enum": [
"normal",
"tunnel",
"private",
"VPN",
"VPC Peering",
"Network Connectivity Center",
"Private Service Connect",
"Private Google Access",
"Serverless VPC",
"Serverless VPC Access Connector",
"Cross Cloud Interconnect",
"Partner Interconnect",
"Dedicated Interconnect"
],
"description": "Link connection type."
},
"origin": {
"type": "object",
"required": [
"_id",
"type",
"scheme_id",
"ss_id"
],
"description": "Reference to a diagram component, including its parent diagram and layer.",
"properties": {
"_id": {
"type": "string",
"description": "Component ID."
},
"type": {
"type": "string",
"enum": [
"attachment",
"combiner",
"element",
"group",
"link",
"node",
"note",
"scheme",
"statussheet"
],
"description": "Component type."
},
"scheme_id": {
"type": "string",
"description": "Parent diagram ID."
},
"ss_id": {
"type": "string",
"description": "Parent layer ID."
}
}
},
"destination": {
"type": "object",
"required": [
"_id",
"type",
"scheme_id",
"ss_id"
],
"description": "Reference to a diagram component, including its parent diagram and layer.",
"properties": {
"_id": {
"type": "string",
"description": "Component ID."
},
"type": {
"type": "string",
"enum": [
"attachment",
"combiner",
"element",
"group",
"link",
"node",
"note",
"scheme",
"statussheet"
],
"description": "Component type."
},
"scheme_id": {
"type": "string",
"description": "Parent diagram ID."
},
"ss_id": {
"type": "string",
"description": "Parent layer ID."
}
}
},
"owner_ss_id": {
"type": "string",
"description": "Owner layer ID for cross-diagram links."
},
"issues": {
"type": "array",
"description": "Issues associated with this link.",
"items": {
"type": "object",
"description": "Issue annotation linked to a component.",
"properties": {
"_id": {
"type": "string",
"description": "Issue reference ID."
},
"comment": {
"type": "string",
"description": "Optional comment on the issue."
},
"snoozed": {
"type": "number",
"description": "Snooze duration in seconds."
},
"jira": {
"type": "string",
"description": "Linked Jira ticket key or URL."
}
}
}
}
}
}
},
"combiners": {
"type": "array",
"description": "Exported combiners.",
"items": {
"type": "object",
"required": [
"_id"
],
"description": "A combiner component that visually groups multiple components.",
"properties": {
"_id": {
"type": "string",
"description": "Combiner ID."
},
"name": {
"type": "string",
"description": "Combiner name."
},
"color": {
"type": "string",
"description": "Combiner color."
},
"icon": {
"type": "string",
"description": "Combiner icon identifier."
},
"items": {
"type": "array",
"description": "Components contained in the combiner.",
"items": {
"type": "object",
"required": [
"_id",
"type"
],
"description": "A component reference contained within a combiner.",
"properties": {
"_id": {
"type": "string",
"description": "Component ID."
},
"type": {
"type": "string",
"enum": [
"attachment",
"combiner",
"element",
"group",
"link",
"node",
"note",
"scheme",
"statussheet"
],
"description": "Component type."
}
}
}
}
}
}
},
"notes": {
"type": "array",
"description": "Exported notes.",
"items": {
"type": "object",
"required": [
"_id"
],
"description": "A text note placed on the diagram.",
"properties": {
"_id": {
"type": "string",
"description": "Note ID."
},
"text": {
"type": "string",
"description": "Note text content."
},
"color": {
"type": "string",
"description": "Note background color."
},
"font_size": {
"type": "number",
"description": "Note font size."
}
}
}
}
}
}
Errors
On failure, dci prints a single error message — with a hint when one is available — and exits with a typed code your scripts can branch on. See Errors and exit codes for the full contract.
| HTTP status | Exit code | Error code | Meaning |
|---|---|---|---|
| 400 | 30 | VALIDATION_ERROR | The arguments or request body were rejected. Review the command's flags and payload. |
| 401 | 10 | AUTHENTICATION_FAILED | Not signed in, or the API token is invalid. Run dci login or check DCI_API_KEY. |
| 403 | 11 | PERMISSION_DENIED | The DoiT user or the active customer context does not have access. |
Aliases: exportclouddiagramjson