post-insight-results
restish dci post-insight-results
Post Insight Results
Requestโ
Content-Type: application/json
Schemaโ
{
"type": "object",
"properties": {
"results": {
"type": "array",
"items": {
"type": "object",
"required": [
"key",
"title",
"shortDescription",
"provider",
"categories",
"resourceResults"
],
"properties": {
"key": {
"type": "string"
},
"title": {
"type": "string"
},
"shortDescription": {
"type": "string"
},
"detailedDescriptionMdx": {
"type": "string"
},
"provider": {
"type": "string",
"example": [
"aws",
"gcp",
"azure",
"snowflake",
"wiz"
],
"description": "The cloud provider associated with the resource."
},
"categories": {
"type": "array",
"minItems": 1,
"uniqueItems": true,
"items": {
"type": "string",
"enum": [
"FinOps",
"Security"
]
}
},
"tags": {
"description": "primary purpose, initially, is to provide security certification information, eg. ISO etc.",
"type": "array",
"items": {
"type": "string"
}
},
"reportUrl": {
"type": "string"
},
"cloudFlowTemplateId": {
"type": "string"
},
"easyWinDescription": {
"type": "string"
},
"resourceResults": {
"type": "array",
"items": {
"oneOf": [
{
"allOf": [
{
"type": "object",
"required": [
"resourceId",
"resultType",
"account",
"provider"
],
"properties": {
"resourceId": {
"type": "string"
},
"resourceType": {
"description": "What the resource actually is, eg. for an EC2 resource ID, this field would be `instance`",
"type": "string",
"example": "instance, disk, cache"
},
"provider": {
"type": "string",
"example": [
"aws",
"gcp",
"azure",
"snowflake",
"wiz"
],
"description": "The cloud provider associated with the resource."
},
"account": {
"type": "string"
},
"location": {
"type": "string",
"description": "represents the region/zone of the resource in AWS, or equivalent for other providers",
"example": "eu-west-2"
},
"resolved": {
"type": "boolean"
},
"severity": {
"type": "string",
"enum": [
"critical",
"high",
"medium",
"low"
]
},
"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"
},
"enhancement": {
"type": "object",
"properties": {
"tags": {
"type": "array",
"items": {
"type": "string"
}
},
"priority": {
"type": "object",
"properties": {
"value": {
"type": "string"
},
"priorityScore": {
"type": "number"
}
}
},
"lastUpdatedBy": {
"type": "string"
},
"lastUpdatedAt": {
"type": "string",
"format": "date-time"
}
}
},
"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 the schema of the 'result' field."
}
},
"discriminator": {
"propertyName": "resultType",
"mapping": {
"security_risk": "#/components/schemas/SecurityRiskResourceResult",
"potential_daily_savings": "#/components/schemas/DailySavingsResourceResult",
"potential_daily_savings_with_recommendation": "#/components/schemas/DailySavingsRecommendationResourceResult",
"potential_daily_savings_with_cluster_agent": "#/components/schemas/DailySavingsClusterAgentResourceResult"
}
}
},
{
"type": "object",
"required": [
"resultType"
],
"properties": {
"resultType": {
"type": "string",
"enum": [
"security_risk"
]
},
"result": {
"type": "object",
"properties": {
"critical": {
"type": "integer"
},
"high": {
"type": "integer"
},
"medium": {
"type": "integer"
},
"low": {
"type": "integer"
}
},
"required": [
"critical",
"high",
"medium",
"low"
]
}
}
}
]
},
{
"allOf": [
{
"type": "object",
"required": [
"resourceId",
"resultType",
"account",
"provider"
],
"properties": {
"resourceId": {
"type": "string"
},
"resourceType": {
"description": "What the resource actually is, eg. for an EC2 resource ID, this field would be `instance`",
"type": "string",
"example": "instance, disk, cache"
},
"provider": {
"type": "string",
"example": [
"aws",
"gcp",
"azure",
"snowflake",
"wiz"
],
"description": "The cloud provider associated with the resource."
},
"account": {
"type": "string"
},
"location": {
"type": "string",
"description": "represents the region/zone of the resource in AWS, or equivalent for other providers",
"example": "eu-west-2"
},
"resolved": {
"type": "boolean"
},
"severity": {
"type": "string",
"enum": [
"critical",
"high",
"medium",
"low"
]
},
"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"
},
"enhancement": {
"type": "object",
"properties": {
"tags": {
"type": "array",
"items": {
"type": "string"
}
},
"priority": {
"type": "object",
"properties": {
"value": {
"type": "string"
},
"priorityScore": {
"type": "number"
}
}
},
"lastUpdatedBy": {
"type": "string"
},
"lastUpdatedAt": {
"type": "string",
"format": "date-time"
}
}
},
"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 the schema of the 'result' field."
}
},
"discriminator": {
"propertyName": "resultType",
"mapping": {
"security_risk": "#/components/schemas/SecurityRiskResourceResult",
"potential_daily_savings": "#/components/schemas/DailySavingsResourceResult",
"potential_daily_savings_with_recommendation": "#/components/schemas/DailySavingsRecommendationResourceResult",
"potential_daily_savings_with_cluster_agent": "#/components/schemas/DailySavingsClusterAgentResourceResult"
}
}
},
{
"type": "object",
"required": [
"resultType"
],
"properties": {
"resultType": {
"type": "string",
"enum": [
"potential_daily_savings"
]
},
"result": {
"type": "object",
"properties": {
"value": {
"type": "number",
"description": "the daily saving amount for this result"
}
},
"required": [
"value"
]
}
}
}
]
},
{
"allOf": [
{
"type": "object",
"required": [
"resourceId",
"resultType",
"account",
"provider"
],
"properties": {
"resourceId": {
"type": "string"
},
"resourceType": {
"description": "What the resource actually is, eg. for an EC2 resource ID, this field would be `instance`",
"type": "string",
"example": "instance, disk, cache"
},
"provider": {
"type": "string",
"example": [
"aws",
"gcp",
"azure",
"snowflake",
"wiz"
],
"description": "The cloud provider associated with the resource."
},
"account": {
"type": "string"
},
"location": {
"type": "string",
"description": "represents the region/zone of the resource in AWS, or equivalent for other providers",
"example": "eu-west-2"
},
"resolved": {
"type": "boolean"
},
"severity": {
"type": "string",
"enum": [
"critical",
"high",
"medium",
"low"
]
},
"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"
},
"enhancement": {
"type": "object",
"properties": {
"tags": {
"type": "array",
"items": {
"type": "string"
}
},
"priority": {
"type": "object",
"properties": {
"value": {
"type": "string"
},
"priorityScore": {
"type": "number"
}
}
},
"lastUpdatedBy": {
"type": "string"
},
"lastUpdatedAt": {
"type": "string",
"format": "date-time"
}
}
},
"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 the schema of the 'result' field."
}
},
"discriminator": {
"propertyName": "resultType",
"mapping": {
"security_risk": "#/components/schemas/SecurityRiskResourceResult",
"potential_daily_savings": "#/components/schemas/DailySavingsResourceResult",
"potential_daily_savings_with_recommendation": "#/components/schemas/DailySavingsRecommendationResourceResult",
"potential_daily_savings_with_cluster_agent": "#/components/schemas/DailySavingsClusterAgentResourceResult"
}
}
},
{
"type": "object",
"required": [
"resultType"
],
"properties": {
"resultType": {
"type": "string",
"enum": [
"potential_daily_savings_with_recommendation"
]
},
"result": {
"type": "object",
"properties": {
"value": {
"type": "number",
"description": "the daily saving amount for this result"
},
"current": {
"type": "string",
"description": "the current state (i.e. current instance type)"
},
"recommendation": {
"type": "string",
"description": "the recommended state (i.e. recommended instance type)"
}
},
"required": [
"value",
"current",
"recommendation"
]
}
}
}
]
},
{
"allOf": [
{
"type": "object",
"required": [
"resourceId",
"resultType",
"account",
"provider"
],
"properties": {
"resourceId": {
"type": "string"
},
"resourceType": {
"description": "What the resource actually is, eg. for an EC2 resource ID, this field would be `instance`",
"type": "string",
"example": "instance, disk, cache"
},
"provider": {
"type": "string",
"example": [
"aws",
"gcp",
"azure",
"snowflake",
"wiz"
],
"description": "The cloud provider associated with the resource."
},
"account": {
"type": "string"
},
"location": {
"type": "string",
"description": "represents the region/zone of the resource in AWS, or equivalent for other providers",
"example": "eu-west-2"
},
"resolved": {
"type": "boolean"
},
"severity": {
"type": "string",
"enum": [
"critical",
"high",
"medium",
"low"
]
},
"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"
},
"enhancement": {
"type": "object",
"properties": {
"tags": {
"type": "array",
"items": {
"type": "string"
}
},
"priority": {
"type": "object",
"properties": {
"value": {
"type": "string"
},
"priorityScore": {
"type": "number"
}
}
},
"lastUpdatedBy": {
"type": "string"
},
"lastUpdatedAt": {
"type": "string",
"format": "date-time"
}
}
},
"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 the schema of the 'result' field."
}
},
"discriminator": {
"propertyName": "resultType",
"mapping": {
"security_risk": "#/components/schemas/SecurityRiskResourceResult",
"potential_daily_savings": "#/components/schemas/DailySavingsResourceResult",
"potential_daily_savings_with_recommendation": "#/components/schemas/DailySavingsRecommendationResourceResult",
"potential_daily_savings_with_cluster_agent": "#/components/schemas/DailySavingsClusterAgentResourceResult"
}
}
},
{
"type": "object",
"required": [
"resultType"
],
"properties": {
"resultType": {
"type": "string",
"enum": [
"potential_daily_savings_with_cluster_agent"
]
},
"result": {
"type": "object",
"properties": {
"value": {
"type": "number",
"description": "the daily saving amount for this result"
},
"agentInstalled": {
"type": "boolean",
"description": "true if the agent is installed"
}
},
"required": [
"value",
"agentInstalled"
]
}
}
}
]
}
]
}
}
}
}
}
}
}
Responsesโ
200 (application/json)โ
Successful operation
{
"type": "array",
"items": {
"type": "object",
"properties": {
"insightKey": {
"type": "string"
},
"error": {
"type": "string"
},
"code": {
"type": "integer"
}
}
}
}
400 (application/json)โ
Bad Request - The server cannot process the request, often due to a malformed request.
{
"type": "object",
"description": "Standard error response structure.",
"properties": {
"error": {
"type": "string",
"description": "Detailed error message."
}
}
}
401 (application/json)โ
Unauthorized - Invalid API key.
{
"type": "object",
"description": "Standard error response structure.",
"properties": {
"error": {
"type": "string",
"description": "Detailed error message."
}
}
}
403 (application/json)โ
Forbidden - The client is not authorized to perform the request.
{
"type": "object",
"description": "Standard error response structure.",
"properties": {
"error": {
"type": "string",
"description": "Detailed error message."
}
}
}
404 (application/json)โ
Not Found - The requested resource does not exist.
{
"type": "object",
"description": "Standard error response structure.",
"properties": {
"error": {
"type": "string",
"description": "Detailed error message."
}
}
}
500 (application/json)โ
Internal Server Error - Something went wrong with the DoiT API server.
{
"type": "object",
"description": "Standard error response structure.",
"properties": {
"error": {
"type": "string",
"description": "Detailed error message."
}
}
}
Aliases: post-insight-results, postinsightresults