メインコンテンツへスキップ

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.

FieldTypeDescription
[]._idstringID of the diagram.
[].ss_idstringID of the layer the diagram belongs to.
[].namestringName of the diagram.
[].typestringType of the diagram. One of: "application", "infrastructure", "network", "template".
[].account_namestringCloud account name.
[].account_idstringCloud account ID.
[].account_typestringCloud account type.
[].changesarray of objectActivity changes within the period.
[].changes[].typestringType of the change. One of: "NODE_CREATE", "NODE_UPDATE", "NODE_DELETE".
[].changes[].servicestringCloud service the change applies to.
[].changes[].countintegerNumber of occurrences of this change type.
[].importobjectCurrent import/sync state for a cloud-connected diagram.
[].import.statusstringImport status. One of: "queued", "in_progress", "success", "failure".
[].import.typestringConnected cloud account type. One of: "AWS", "GCP", "AZURE".
[].import.accountstringConnected account ID.
[].import.cloudIdstringCloud account ID.
[].import.errorMessagestringError message if the import failed.
[].import.syncedAtstring (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 statusExit codeError codeMeaning
40030VALIDATION_ERRORThe arguments or request body were rejected. Review the command's flags and payload.
40110AUTHENTICATION_FAILEDNot signed in, or the API token is invalid. Run dci login or check DCI_API_KEY.
40311PERMISSION_DENIEDThe DoiT user or the active customer context does not have access.

Aliases: getclouddiagramsstats