get-cloud-diagrams-stats
dci get-cloud-diagrams-stats [flags]
Returns a list of all diagrams with activity stats for the given time period.
Flags
--start: (string format:date-time)
--end: (string format:date-time)
Output
OK - List of diagrams with stats returned.
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 |
|---|---|---|
[]._id | string | ID of the diagram. |
[].ss_id | string | ID of the layer the diagram belongs to. |
[].name | string | Name of the diagram. |
[].type | string | Type of the diagram. One of: "application", "infrastructure", "network", "template". |
[].account_name | string | Cloud account name. |
[].account_id | string | Cloud account ID. |
[].account_type | string | Cloud account type. |
[].changes | array of object | Activity changes within the period. |
[].changes[].type | string | Type of the change. One of: "NODE_CREATE", "NODE_UPDATE", "NODE_DELETE". |
[].changes[].service | string | Cloud service the change applies to. |
[].changes[].count | integer | Number of occurrences of this change type. |
[].import | object | Current import/sync state for a cloud-connected diagram. |
[].import.status | string | Import status. One of: "queued", "in_progress", "success", "failure". |
[].import.type | string | Connected cloud account type. One of: "AWS", "GCP", "AZURE". |
[].import.account | string | Connected account ID. |
[].import.cloudId | string | Cloud account ID. |
[].import.errorMessage | string | Error message if the import failed. |
[].import.syncedAt | string (date-time) | Timestamp of the last successful sync. |
Raw JSON schema
{
"type": "array",
"items": {
"type": "object",
"description": "Diagram with activity stats for a given time period.",
"properties": {
"_id": {
"type": "string",
"description": "ID of the diagram."
},
"ss_id": {
"type": "string",
"description": "ID of the layer the diagram belongs to."
},
"name": {
"type": "string",
"description": "Name of the diagram."
},
"type": {
"type": "string",
"enum": [
"application",
"infrastructure",
"network",
"template"
],
"description": "Type of the diagram."
},
"account_name": {
"type": "string",
"description": "Cloud account name."
},
"account_id": {
"type": "string",
"description": "Cloud account ID."
},
"account_type": {
"type": "string",
"description": "Cloud account type."
},
"changes": {
"type": "array",
"description": "Activity changes within the period.",
"items": {
"type": "object",
"description": "A single activity change entry in a diagram stats record.",
"properties": {
"type": {
"type": "string",
"enum": [
"NODE_CREATE",
"NODE_UPDATE",
"NODE_DELETE"
],
"description": "Type of the change."
},
"service": {
"type": "string",
"description": "Cloud service the change applies to."
},
"count": {
"type": "integer",
"description": "Number of occurrences of this change type."
}
}
}
},
"import": {
"type": "object",
"description": "Current import/sync state for a cloud-connected diagram.",
"properties": {
"status": {
"type": "string",
"enum": [
"queued",
"in_progress",
"success",
"failure"
],
"description": "Import status."
},
"type": {
"type": "string",
"enum": [
"AWS",
"GCP",
"AZURE"
],
"description": "Connected cloud account type."
},
"account": {
"type": "string",
"description": "Connected account ID."
},
"cloudId": {
"type": "string",
"description": "Cloud account ID."
},
"errorMessage": {
"type": "string",
"description": "Error message if the import failed."
},
"syncedAt": {
"type": "string",
"format": "date-time",
"description": "Timestamp of the last successful sync."
}
}
}
}
}
}
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: getclouddiagramsstats