Cloud Coverage
API for retrieving code-to-cloud coverage ratio for the requested view.
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.
The direction to trace lineage
The asset type to calculate coverage
If true, only onboarded repositories are included in the calculation. Only applies when direction is code_to_cloud and type is artifact; ignored otherwise.
falseLimit the calculation to a single application, by name.
Limit the calculation to a single provider, by name .
GITHUB{api_key}
your-api-key-here{api_key_id}
1Ok
Returns the coverage ratio for the requested direction and type.
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.
0.5GET /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: */*
Ok
{
"coverage": 0.5
}Last updated
Was this helpful?
