search-cloud-diagrams
dci search-cloud-diagrams
Full-text search across diagram layers, components by name, and components by property values. Returns three result categories: diagram (matching layers), component (matching components by name), and prop (matching components by property values).
Request
Content-Type: application/json
Schema
{
"type": "object",
"required": [
"query"
],
"description": "Request body for searching diagrams and components.",
"properties": {
"query": {
"type": "string",
"description": "Search query string."
},
"ss_id": {
"type": "string",
"description": "Limit search to components within this layer."
},
"from": {
"type": "integer",
"minimum": 0,
"description": "Pagination offset (default 0)."
},
"size": {
"type": "integer",
"minimum": 1,
"description": "Maximum number of results per category (default 20)."
}
}
}
Output
OK - Search results 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 |
|---|---|---|
scheme | array of object | Diagram layers (cloud accounts) matching the query. |
scheme[]._id | string | Layer ID. |
scheme[].account_name | string | Cloud account name. |
scheme[].scheme_id | string | Parent diagram ID. |
scheme[].ss_id | string | Layer ID (same as _id). |
scheme[].scheme | string | Parent diagram name. |
scheme[].status | string | Import/sync status. |
scheme[].name | string | Layer name. |
scheme[].type | string | Component type — always "statussheet" for this category. One of: "statussheet". |
component | array of object | Components matching the query by name. |
component[]._id | string | Component ID. |
component[].account_name | string | Cloud account name. |
component[].icon | string | Component icon identifier. |
component[].color | string | Component color. |
component[].scheme_id | string | Parent diagram ID. |
component[].ss_id | string | Layer ID. |
component[].name | string | Component name. |
component[].type | string | Component type. One of: "attachment", "combiner", "element", "group", "link", "node", "note". |
component[].node_type | string | Node type. One of: "app_component", "app_group", "app_link", "attachment", "group", "host", "link", "service". |
component[].group_type | string | Group type (for group components). |
component[].props | object | Component properties. For the "prop" category contains the matched property key-value pairs. |
component[].props.service_type | string | Cloud service type (e.g. AWS::EC2::Instance). |
prop | array of object | Components matching the query by property values. |
prop[]._id | string | Component ID. |
prop[].account_name | string | Cloud account name. |
prop[].icon | string | Component icon identifier. |
prop[].color | string | Component color. |
prop[].scheme_id | string | Parent diagram ID. |
prop[].ss_id | string | Layer ID. |
prop[].name | string | Component name. |
prop[].type | string | Component type. One of: "attachment", "combiner", "element", "group", "link", "node", "note". |
prop[].node_type | string | Node type. One of: "app_component", "app_group", "app_link", "attachment", "group", "host", "link", "service". |
prop[].group_type | string | Group type (for group components). |
prop[].props | object | Component properties. For the "prop" category contains the matched property key-value pairs. |
prop[].props.service_type | string | Cloud service type (e.g. AWS::EC2::Instance). |
Raw JSON schema
{
"type": "object",
"description": "Search results grouped into three categories.",
"properties": {
"scheme": {
"type": "array",
"description": "Diagram layers (cloud accounts) matching the query.",
"items": {
"type": "object",
"required": [
"_id",
"type"
],
"description": "A diagram layer (cloud account) matching the search query.",
"properties": {
"_id": {
"type": "string",
"description": "Layer ID."
},
"account_name": {
"type": "string",
"description": "Cloud account name."
},
"scheme_id": {
"type": "string",
"description": "Parent diagram ID."
},
"ss_id": {
"type": "string",
"description": "Layer ID (same as _id)."
},
"scheme": {
"type": "string",
"description": "Parent diagram name."
},
"status": {
"type": "string",
"description": "Import/sync status."
},
"name": {
"type": "string",
"description": "Layer name."
},
"type": {
"type": "string",
"enum": [
"statussheet"
],
"description": "Component type — always \"statussheet\" for this category."
}
}
}
},
"component": {
"type": "array",
"description": "Components matching the query by name.",
"items": {
"type": "object",
"required": [
"_id",
"type"
],
"description": "A component matching the search query.",
"properties": {
"_id": {
"type": "string",
"description": "Component ID."
},
"account_name": {
"type": "string",
"description": "Cloud account name."
},
"icon": {
"type": "string",
"description": "Component icon identifier."
},
"color": {
"type": "string",
"description": "Component color."
},
"scheme_id": {
"type": "string",
"description": "Parent diagram ID."
},
"ss_id": {
"type": "string",
"description": "Layer ID."
},
"name": {
"type": "string",
"description": "Component name."
},
"type": {
"type": "string",
"enum": [
"attachment",
"combiner",
"element",
"group",
"link",
"node",
"note"
],
"description": "Component type."
},
"node_type": {
"type": "string",
"enum": [
"app_component",
"app_group",
"app_link",
"attachment",
"group",
"host",
"link",
"service"
],
"description": "Node type."
},
"group_type": {
"type": "string",
"description": "Group type (for group components)."
},
"props": {
"type": "object",
"description": "Component properties. For the \"prop\" category contains the matched property key-value pairs.",
"properties": {
"service_type": {
"type": "string",
"description": "Cloud service type (e.g. AWS::EC2::Instance)."
}
}
}
}
}
},
"prop": {
"type": "array",
"description": "Components matching the query by property values.",
"items": {
"type": "object",
"required": [
"_id",
"type"
],
"description": "A component matching the search query.",
"properties": {
"_id": {
"type": "string",
"description": "Component ID."
},
"account_name": {
"type": "string",
"description": "Cloud account name."
},
"icon": {
"type": "string",
"description": "Component icon identifier."
},
"color": {
"type": "string",
"description": "Component color."
},
"scheme_id": {
"type": "string",
"description": "Parent diagram ID."
},
"ss_id": {
"type": "string",
"description": "Layer ID."
},
"name": {
"type": "string",
"description": "Component name."
},
"type": {
"type": "string",
"enum": [
"attachment",
"combiner",
"element",
"group",
"link",
"node",
"note"
],
"description": "Component type."
},
"node_type": {
"type": "string",
"enum": [
"app_component",
"app_group",
"app_link",
"attachment",
"group",
"host",
"link",
"service"
],
"description": "Node type."
},
"group_type": {
"type": "string",
"description": "Group type (for group components)."
},
"props": {
"type": "object",
"description": "Component properties. For the \"prop\" category contains the matched property key-value pairs.",
"properties": {
"service_type": {
"type": "string",
"description": "Cloud service type (e.g. AWS::EC2::Instance)."
}
}
}
}
}
}
}
}
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: searchclouddiagrams