find-cloud-diagrams
dci find-cloud-diagrams [body]
Returns diagram URLs matching the provided resource IDs.
Pass the request body as name: value arguments or pipe JSON on stdin — see Command structure.
Examples
# Find the diagrams that include a cloud resource, by its cloud resource ID.
dci find-cloud-diagrams resources: [<resource-id>]
# Several resources at once, read from a file; each match is a diagram viewer URL plus an image URL.
dci find-cloud-diagrams --output json < resources.json
# resources.json
{"resources": ["<resource-id>", "<resource-id>"]}
Request
Content-Type: application/json
| Field | Type | Required | Description |
|---|---|---|---|
resources | array of string | yes | Resource IDs to find diagrams for. |
Raw JSON schema
{
"type": "object",
"required": [
"resources"
],
"description": "Request body for locating cloud diagrams for given resource IDs.",
"properties": {
"resources": {
"type": "array",
"description": "Resource IDs to find diagrams for.",
"items": {
"type": "string"
}
}
}
}
Output
OK - Diagram URLs matching the criteria 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 |
|---|---|---|
[].diagramUrl | string (uri) | URL to the diagram viewer. |
[].imageUrl | string (uri) | URL to the diagram image. |
Raw JSON schema
{
"type": "array",
"description": "List of diagram URLs matching the criteria.",
"items": {
"type": "object",
"required": [
"diagramUrl",
"imageUrl"
],
"properties": {
"diagramUrl": {
"type": "string",
"format": "uri",
"description": "URL to the diagram viewer."
},
"imageUrl": {
"type": "string",
"format": "uri",
"description": "URL to the diagram image."
}
}
}
}
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 to exit code mapping
| 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. |
Related
- search-cloud-diagrams — Search diagrams and components
- get-cloud-diagram-components — Get diagram components
- get-cloud-diagrams-stats — Get diagrams with stats
- API reference: POST /clouddiagrams/v1/scheme/find
Aliases: findclouddiagrams