For the complete documentation index, see llms.txt. This page is also available as Markdown.

Cloud Coverage

API for retrieving code-to-cloud coverage ratio for the requested view.

Get Code-to-Cloud Coverage Ratio

get

Returns the Code-to-Cloud coverage ratio, which measures the percentage of your assets that have a traceable lineage between code and cloud. This is the same value shown on the Code to Cloud dashboard.

Set direction to choose which way lineage is traced, and type to choose which kind of asset to trace:

direction

Traces

code_to_cloud

Repositories → their deployed cloud assets

cloud_to_code

Cloud assets → their source repositories

type

Traces

artifact

Repositories → the cloud images built from them

infrastructure

IaC resources → the cloud assets deployed from them

Required license

Cortex Cloud Posture Management or Cortex Cloud Runtime Security with Application Security add-on.

Query parameters
directionstring · enumRequired

The direction to trace lineage

Possible values:
typestring · enumRequired

The asset type to calculate coverage

Possible values:
only_onboardedbooleanOptional

If true, only onboarded repositories are included in the calculation. Only applies when direction is code_to_cloud and type is artifact; ignored otherwise.

Default: false
applicationstringOptional

Limit the calculation to a single application, by name.

providerstringOptional

Limit the calculation to a single provider, by name .

Example: GITHUB
Header parameters
AuthorizationstringRequired

{api_key}

Example: your-api-key-here
x-xdr-auth-idstringRequired

{api_key_id}

Example: 1
Responses
200

Ok

application/json

Returns the coverage ratio for the requested direction and type.

coveragenumber · doubleOptional

The coverage ratio, as a decimal between 0 and 1. Multiply by 100 to get the percentage shown on the Code to Cloud dashboard. Returns 0 if there isn't enough data to calculate coverage.

Example: 0.5
get/public_api/appsec/v1/code-to-cloud/coverage
GET /public_api/appsec/v1/code-to-cloud/coverage?direction=code_to_cloud&type=artifact HTTP/1.1
Host: api-yourfqdn
Authorization: your-api-key-here
x-xdr-auth-id: 1
Accept: */*
200

Ok

{
  "coverage": 0.5
}

Last updated

Was this helpful?