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

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.

FieldTypeDescription
schemearray of objectDiagram layers (cloud accounts) matching the query.
scheme[]._idstringLayer ID.
scheme[].account_namestringCloud account name.
scheme[].scheme_idstringParent diagram ID.
scheme[].ss_idstringLayer ID (same as _id).
scheme[].schemestringParent diagram name.
scheme[].statusstringImport/sync status.
scheme[].namestringLayer name.
scheme[].typestringComponent type — always "statussheet" for this category. One of: "statussheet".
componentarray of objectComponents matching the query by name.
component[]._idstringComponent ID.
component[].account_namestringCloud account name.
component[].iconstringComponent icon identifier.
component[].colorstringComponent color.
component[].scheme_idstringParent diagram ID.
component[].ss_idstringLayer ID.
component[].namestringComponent name.
component[].typestringComponent type. One of: "attachment", "combiner", "element", "group", "link", "node", "note".
component[].node_typestringNode type. One of: "app_component", "app_group", "app_link", "attachment", "group", "host", "link", "service".
component[].group_typestringGroup type (for group components).
component[].propsobjectComponent properties. For the "prop" category contains the matched property key-value pairs.
component[].props.service_typestringCloud service type (e.g. AWS::EC2::Instance).
proparray of objectComponents matching the query by property values.
prop[]._idstringComponent ID.
prop[].account_namestringCloud account name.
prop[].iconstringComponent icon identifier.
prop[].colorstringComponent color.
prop[].scheme_idstringParent diagram ID.
prop[].ss_idstringLayer ID.
prop[].namestringComponent name.
prop[].typestringComponent type. One of: "attachment", "combiner", "element", "group", "link", "node", "note".
prop[].node_typestringNode type. One of: "app_component", "app_group", "app_link", "attachment", "group", "host", "link", "service".
prop[].group_typestringGroup type (for group components).
prop[].propsobjectComponent properties. For the "prop" category contains the matched property key-value pairs.
prop[].props.service_typestringCloud 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 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: searchclouddiagrams