search-cloud-diagrams
dci search-cloud-diagrams [body]
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).
Pass the request body as name: value arguments or pipe JSON on stdin — see Command structure.
Examples
# Search layers, component names, and component property values for a term.
dci search-cloud-diagrams query: payments-db
# Limit the search to one layer and return up to five hits per category.
dci search-cloud-diagrams query: payments-db, size: 5, ss_id: <layer-id>
# The next page of a larger result, as JSON.
dci search-cloud-diagrams --output json query: payments-db, size: 20, from: 20
Request
Content-Type: application/json
| Field | Type | Required | Description |
|---|---|---|---|
query | string | yes | Search query string. |
ss_id | string | Limit search to components within this layer. | |
from | integer | Pagination offset (default 0). | |
size | integer | Maximum number of results per category (default 20). |
Raw 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)."
}
}
}
}
}
}
}
}