post-insight-resource-results
dci post-insight-resource-results sourceID insightKey [flags]
Replaces all resource results for the specified insight. Any existing unresolved resource results not present in the new set will be removed. The response includes server-computed fields (severity, resolved, enhancement) for each resource result. To delete all resource results, send an empty array.
Request
Content-Type: application/json
Schema
{
"type": "object",
"description": "Request body for creating or replacing resource results for an insight.",
"required": [
"resourceResults"
],
"properties": {
"resourceResults": {
"type": "array",
"description": "A list of resource-level results for creating or updating an insight.",
"items": {
"type": "object",
"description": "A single resource-level result for creating or updating an insight. Server-computed fields (severity, resolved, enhancement) are not accepted here and will be ignored. Identity fields (resourceId, resultType, account, cloudProvider) form the composite key. The fields location and resource_type are set on creation only — any values provided for these fields during subsequent upserts are silently ignored.\n",
"required": [
"resourceId",
"resultType",
"account",
"cloudProvider"
],
"properties": {
"resourceId": {
"type": "string",
"description": "The cloud resource identifier."
},
"resourceType": {
"description": "What the resource actually is, e.g. for an EC2 resource ID, this field would be `instance`. Immutable after creation — updates to this field are silently ignored.\n",
"type": "string",
"example": "instance, disk, cache"
},
"cloudProvider": {
"description": "Immutable after creation — updates to this field are silently ignored.",
"allOf": [
{
"type": "string",
"example": "aws",
"description": "The cloud provider associated with the resource."
}
]
},
"account": {
"type": "string",
"description": "The cloud account or project ID containing this resource. Immutable after creation — updates to this field are silently ignored."
},
"location": {
"type": "string",
"description": "Represents the region/zone of the resource in AWS, or equivalent for other providers. Immutable after creation — updates to this field are silently ignored.\n",
"example": "eu-west-2"
},
"externalId": {
"type": "string",
"description": "the external ID of the resource in the provider's system for the resource"
},
"externalUrl": {
"type": "string",
"description": "the URL to the resource-level issue in the provider's system"
},
"metadata": {
"type": "object",
"description": "contains any additional information for the resource results"
},
"resultType": {
"type": "string",
"enum": [
"security_risk",
"potential_daily_savings",
"potential_daily_savings_with_recommendation",
"potential_daily_savings_with_cluster_agent"
],
"description": "The discriminator property that determines which fields are populated in the 'result' object."
},
"result": {
"description": "The result data for this resource. Which fields are populated depends on the resultType. For security_risk: critical, high, medium, low. For potential_daily_savings: value. For potential_daily_savings_with_recommendation: value, current, recommendation. For potential_daily_savings_with_cluster_agent: value, agentInstalled.\n",
"type": "object",
"properties": {
"value": {
"type": "number",
"format": "double",
"description": "the daily saving amount for this result"
},
"critical": {
"type": "integer",
"description": "number of critical security risks"
},
"high": {
"type": "integer",
"description": "number of high security risks"
},
"medium": {
"type": "integer",
"description": "number of medium security risks"
},
"low": {
"type": "integer",
"description": "number of low security risks"
},
"current": {
"type": "string",
"description": "the current state (i.e. current instance type)"
},
"recommendation": {
"type": "string",
"description": "the recommended state (i.e. recommended instance type)"
},
"agentInstalled": {
"type": "boolean",
"description": "true if the agent is installed"
}
}
}
}
}
}
}
}
Flags
--max-results: (integer default:1000)