Policy Results
Get Policy Compliance Results
/api/orgs/{orgName}/policyresults/complianceReturns compliance results for policy issues grouped by entity. The grouping can be by stack, cloud account, or severity, providing different views of the organization’s policy compliance posture. This powers the compliance dashboard in the Pulumi Cloud console.
Request Parameters
orgNamestring path requiredThe organization name
Request Body
entityenum requiredEntity type to filter byValues:stack,account,severitycontinuationTokenstring optionalContinuation token for paginationsizeinteger optionalNumber of results to return
Responses
columnsarray[string] requiredColumn names (policy pack names) in order- List of policy compliance result rows
- ↳
entityNamestring requiredEntity name (stack name or account name) - ↳
scoresarray[integer] requiredArray of compliance scores correlating to columns array. -1 indicates N/A continuationTokenstring optionalContinuation token for next page
List Policy Issues
/api/orgs/{orgName}/policyresults/issuesReturns all policy issues for an organization with support for pagination and advanced filtering via the grid request format. Policy issues represent violations detected by Policy Packs during stack updates or continuous compliance scans. Each issue includes the violating resource, policy details, enforcement level (advisory or mandatory), severity, and triage status.
Request Parameters
orgNamestring path requiredThe organization name
Request Body
startRowinteger optionalThe start rowendRowinteger optionalThe end row- List of row group cols
- ↳
idstring requiredThe unique identifier - ↳
displayNamestring requiredThe display name - ↳
fieldstring optionalThe field - ↳
aggFuncstring optionalThe agg func - List of value cols
- ↳
idstring requiredThe unique identifier - ↳
displayNamestring requiredThe display name - ↳
fieldstring optionalThe field - ↳
aggFuncstring optionalThe agg func groupKeysarray[string] requiredList of group keys- The filter model
- ↳
typestring requiredThe type - List of conditions
- List of sort model
- ↳
colIdstring requiredColumn Id to apply the sort to. - ↳
sortstring requiredSort direction
Responses
- The list of policy issues
- ↳
idstring requiredThe unique identifier of the policy issue. - ↳
entityTypeenum requiredThe type of entity this issue applies to.Values:stack,insights-account - ↳
entityProjectstring requiredThe project name (for stack entities) or parent Insights account name (for resource entities). - ↳
entityIdstring requiredThe identifier of the entity this issue applies to. - ↳
stackVersioninteger optionalThe stack version where the issue was detected. - ↳
resourceVersioninteger optionalThe resource version where the issue was detected. - ↳
policyPackstring requiredThe name of the policy pack that produced this issue. - ↳
policyPackTagstring requiredThe tag of the policy pack version that produced this issue. - ↳
policyNamestring requiredThe name of the policy that was violated. - ↳
resourceURNstring requiredThe URN of the resource that violated the policy. - ↳
resourceProviderstring requiredThe provider of the resource that violated the policy. - ↳
resourceTypestring requiredThe type of the resource that violated the policy. - ↳
resourceNamestring requiredThe name of the resource that violated the policy. - ↳
messagestring optionalA human-readable message describing the policy violation. - ↳
observedAtstring requiredThe timestamp when the issue was first observed. - ↳
lastModifiedstring optionalThe timestamp when the issue was last modified. - ↳
levelstring requiredThe enforcement level of the policy (e.g. advisory, mandatory, disabled). - ↳
severityenum requiredThe severity of the policy violation.Values:,low,medium,high,critical - ↳
statusenum requiredThe current status of the policy issue.Values:open,in_progress,by_design,fixed,ignored - ↳
kindenum requiredThe kind of policy issue (audit or preventative).Values:audit,preventative - ↳
priorityenum requiredThe priority level of the policy issue.Values:p0,p1,p2,p3,p4 - The user the policy issue is assigned to.
- ↳
policyGroupNamestring optionalThe name of the policy group this issue belongs to. - ↳
policyGroupTypeenum optionalThe type of the policy group this issue belongs to.Values:audit,preventative groupDataarray[object] requiredGrouped data for policy issue aggregationrowCountinteger optionalThe total number of policy issue rows
Get Policy Issue
/api/orgs/{orgName}/policyresults/issues/{issueId}Returns the details of a specific policy issue, including the violating resource, the policy pack and policy name that flagged the violation, the enforcement level (advisory or mandatory), severity, and the current triage status of the issue.
Request Parameters
orgNamestring path requiredThe organization nameissueIdstring path requiredThe issue identifier
Responses
- The policy issue details
- ↳
idstring requiredThe unique identifier of the policy issue. - ↳
entityTypeenum requiredThe type of entity this issue applies to.Values:stack,insights-account - ↳
entityProjectstring requiredThe project name (for stack entities) or parent Insights account name (for resource entities). - ↳
entityIdstring requiredThe identifier of the entity this issue applies to. - ↳
stackVersioninteger optionalThe stack version where the issue was detected. - ↳
resourceVersioninteger optionalThe resource version where the issue was detected. - ↳
policyPackstring requiredThe name of the policy pack that produced this issue. - ↳
policyPackTagstring requiredThe tag of the policy pack version that produced this issue. - ↳
policyNamestring requiredThe name of the policy that was violated. - ↳
resourceURNstring requiredThe URN of the resource that violated the policy. - ↳
resourceProviderstring requiredThe provider of the resource that violated the policy. - ↳
resourceTypestring requiredThe type of the resource that violated the policy. - ↳
resourceNamestring requiredThe name of the resource that violated the policy. - ↳
messagestring optionalA human-readable message describing the policy violation. - ↳
observedAtstring requiredThe timestamp when the issue was first observed. - ↳
lastModifiedstring optionalThe timestamp when the issue was last modified. - ↳
levelstring requiredThe enforcement level of the policy (e.g. advisory, mandatory, disabled). - ↳
severityenum requiredThe severity of the policy violation.Values:,low,medium,high,critical - ↳
statusenum requiredThe current status of the policy issue.Values:open,in_progress,by_design,fixed,ignored - ↳
kindenum requiredThe kind of policy issue (audit or preventative).Values:audit,preventative - ↳
priorityenum requiredThe priority level of the policy issue.Values:p0,p1,p2,p3,p4 - The user the policy issue is assigned to.
- ↳
policyGroupNamestring optionalThe name of the policy group this issue belongs to. - ↳
policyGroupTypeenum optionalThe type of the policy group this issue belongs to.Values:audit,preventative - The policy definition that caused this issue. May be null if the policy has been deleted or is unavailable.
- ↳
namestring requiredUnique URL-safe name for the policy. This is unique to a specific version of a Policy Pack. - ↳
displayNamestring requiredThe display name - ↳
descriptionstring requiredDescription is used to provide more context about the purpose of the policy. - ↳
enforcementLevelenum requiredThe enforcement levelValues:advisory,mandatory,remediate,disabled - ↳
messagestring requiredMessage is the message that will be displayed to end users when they violate this policy. - The JSON schema for the Policy’s configuration.
- ↳
severityenum optionalThe severity of the policy.Values:,low,medium,high,critical - The compliance framework that this policy belongs to.
- ↳
tagsarray[string] optionalTags associated with the policy. - ↳
remediationStepsstring optionalA description of the steps to take to remediate a policy violation. - ↳
urlstring optionalA URL to more information about the policy. - The registry policy pack metadata. May be null if the policy pack is unavailable.
- ↳
idstring requiredID is the unique identifier for this policy pack in the registry. This is a UUID that corresponds to the policy pack’s database ID. - ↳
sourcestring requiredSource indicates where this policy pack is hosted (e.g., “private”, “pulumi”). Currently, only “private” policy packs are supported. - ↳
publisherstring requiredPublisher is the organization or user that published this policy pack. This corresponds to the Pulumi organization name. - ↳
namestring requiredName is the unique identifier for this policy pack within the publisher’s namespace. Policy pack names must be URL-safe and unique per publisher. - ↳
versionstring requiredVersion is the semantic version of this policy pack. This represents the latest or specific version being referenced. - ↳
displayNamestring requiredDisplayName is a human-readable name for this policy pack. This is typically more descriptive than the technical name. - ↳
accessLevelenum requiredAccessLevel is the client’s level of access to this policy pack.Values:full,view-only,deny - ↳
enforcementLevelsarray[string] requiredEnforcementLevels are the client’s allowed enforcement levels for this policy pack.
Update Policy Issue
/api/orgs/{orgName}/policyresults/issues/{issueId}Updates a policy issue’s triage status and other mutable fields. All body fields are optional — only provide the fields you want to update.
status:open,in_progress,by_design,fixed, orignoredpriority:p0,p1,p2,p3, orp4assignedTo: username to assign the issue to, ornullto unassign
Request Parameters
orgNamestring path requiredThe organization nameissueIdstring path requiredThe issue identifier
Request Body
assignedTostring optionalThe user to assign the policy issue to.statusenum optionalThe new status for the policy issue. Valid values: open, in_progress, by_design, ignored. Note: fixed cannot be set manually.Values:open,in_progress,by_design,fixed,ignoredpriorityenum optionalThe new priority for the policy issue.Values:p0,p1,p2,p3,p4
Responses
- The policy issue details
- ↳
idstring requiredThe unique identifier of the policy issue. - ↳
entityTypeenum requiredThe type of entity this issue applies to.Values:stack,insights-account - ↳
entityProjectstring requiredThe project name (for stack entities) or parent Insights account name (for resource entities). - ↳
entityIdstring requiredThe identifier of the entity this issue applies to. - ↳
stackVersioninteger optionalThe stack version where the issue was detected. - ↳
resourceVersioninteger optionalThe resource version where the issue was detected. - ↳
policyPackstring requiredThe name of the policy pack that produced this issue. - ↳
policyPackTagstring requiredThe tag of the policy pack version that produced this issue. - ↳
policyNamestring requiredThe name of the policy that was violated. - ↳
resourceURNstring requiredThe URN of the resource that violated the policy. - ↳
resourceProviderstring requiredThe provider of the resource that violated the policy. - ↳
resourceTypestring requiredThe type of the resource that violated the policy. - ↳
resourceNamestring requiredThe name of the resource that violated the policy. - ↳
messagestring optionalA human-readable message describing the policy violation. - ↳
observedAtstring requiredThe timestamp when the issue was first observed. - ↳
lastModifiedstring optionalThe timestamp when the issue was last modified. - ↳
levelstring requiredThe enforcement level of the policy (e.g. advisory, mandatory, disabled). - ↳
severityenum requiredThe severity of the policy violation.Values:,low,medium,high,critical - ↳
statusenum requiredThe current status of the policy issue.Values:open,in_progress,by_design,fixed,ignored - ↳
kindenum requiredThe kind of policy issue (audit or preventative).Values:audit,preventative - ↳
priorityenum requiredThe priority level of the policy issue.Values:p0,p1,p2,p3,p4 - The user the policy issue is assigned to.
- ↳
policyGroupNamestring optionalThe name of the policy group this issue belongs to. - ↳
policyGroupTypeenum optionalThe type of the policy group this issue belongs to.Values:audit,preventative - The policy definition that caused this issue. May be null if the policy has been deleted or is unavailable.
- ↳
namestring requiredUnique URL-safe name for the policy. This is unique to a specific version of a Policy Pack. - ↳
displayNamestring requiredThe display name - ↳
descriptionstring requiredDescription is used to provide more context about the purpose of the policy. - ↳
enforcementLevelenum requiredThe enforcement levelValues:advisory,mandatory,remediate,disabled - ↳
messagestring requiredMessage is the message that will be displayed to end users when they violate this policy. - The JSON schema for the Policy’s configuration.
- ↳
severityenum optionalThe severity of the policy.Values:,low,medium,high,critical - The compliance framework that this policy belongs to.
- ↳
tagsarray[string] optionalTags associated with the policy. - ↳
remediationStepsstring optionalA description of the steps to take to remediate a policy violation. - ↳
urlstring optionalA URL to more information about the policy. - The registry policy pack metadata. May be null if the policy pack is unavailable.
- ↳
idstring requiredID is the unique identifier for this policy pack in the registry. This is a UUID that corresponds to the policy pack’s database ID. - ↳
sourcestring requiredSource indicates where this policy pack is hosted (e.g., “private”, “pulumi”). Currently, only “private” policy packs are supported. - ↳
publisherstring requiredPublisher is the organization or user that published this policy pack. This corresponds to the Pulumi organization name. - ↳
namestring requiredName is the unique identifier for this policy pack within the publisher’s namespace. Policy pack names must be URL-safe and unique per publisher. - ↳
versionstring requiredVersion is the semantic version of this policy pack. This represents the latest or specific version being referenced. - ↳
displayNamestring requiredDisplayName is a human-readable name for this policy pack. This is typically more descriptive than the technical name. - ↳
accessLevelenum requiredAccessLevel is the client’s level of access to this policy pack.Values:full,view-only,deny - ↳
enforcementLevelsarray[string] requiredEnforcementLevels are the client’s allowed enforcement levels for this policy pack.
Export Policy Issues
/api/orgs/{orgName}/policyresults/issues/exportExports policy issues for an organization to CSV format for offline analysis or reporting. Policy issues represent violations detected by Policy Packs during stack updates or continuous compliance scans. The export includes issue details such as the violating resource, policy name, enforcement level, and severity.
Request Parameters
orgNamestring path requiredThe organization name
Request Body
startRowinteger optionalThe start rowendRowinteger optionalThe end row- List of row group cols
- ↳
idstring requiredThe unique identifier - ↳
displayNamestring requiredThe display name - ↳
fieldstring optionalThe field - ↳
aggFuncstring optionalThe agg func - List of value cols
- ↳
idstring requiredThe unique identifier - ↳
displayNamestring requiredThe display name - ↳
fieldstring optionalThe field - ↳
aggFuncstring optionalThe agg func groupKeysarray[string] requiredList of group keys- The filter model
- ↳
typestring requiredThe type - List of conditions
- List of sort model
- ↳
colIdstring requiredColumn Id to apply the sort to. - ↳
sortstring requiredSort direction
Responses
Get Policy Issues Filters
/api/orgs/{orgName}/policyresults/issues/filtersReturns the available filter options for listing policy issues, such as policy pack names, enforcement levels, severity values, and resource types. This is used to populate filter dropdowns in the policy issues UI.
Request Parameters
orgNamestring path requiredThe organization name
Request Body
- Optional filter model to apply when getting available filter values. Same format as used in policy issues list.
- ↳
typestring requiredThe type - List of conditions
fieldstring requiredField name
Responses
fieldstring requiredThe field name for which filter values are provided.- The available filter values for the field.
- ↳
namestring requiredThe name of the filter value. - ↳
countinteger requiredThe count of policy issues matching this filter value.
Get Policy Results Metadata
/api/orgs/{orgName}/policyresults/metadataReturns high-level policy compliance statistics for an organization, including total violation counts, breakdown by severity and enforcement level, and trends over time. This provides an overview of the organization’s policy compliance posture.
Request Parameters
orgNamestring path requiredThe organization name
Responses
policyTotalCountinteger requiredTotal number of policiespolicyWithIssuesCountinteger requiredNumber of policies with issuesresourcesTotalCountinteger requiredTotal number of resources covered by policiesresourcesWithIssuesCountinteger requiredNumber of resources with issues
List Policies Compliance
/api/orgs/{orgName}/policyresults/policiesReturns policy compliance data grouped by policy pack and policy name, showing how many stacks are in compliance or violation for each individual policy rule. Supports pagination and filtering via the grid request format.
Request Parameters
orgNamestring path requiredThe organization name
Request Body
startRowinteger optionalThe start rowendRowinteger optionalThe end row- List of row group cols
- ↳
idstring requiredThe unique identifier - ↳
displayNamestring requiredThe display name - ↳
fieldstring optionalThe field - ↳
aggFuncstring optionalThe agg func - List of value cols
- ↳
idstring requiredThe unique identifier - ↳
displayNamestring requiredThe display name - ↳
fieldstring optionalThe field - ↳
aggFuncstring optionalThe agg func groupKeysarray[string] requiredList of group keys- The filter model
- ↳
typestring requiredThe type - List of conditions
- List of sort model
- ↳
colIdstring requiredColumn Id to apply the sort to. - ↳
sortstring requiredSort direction
Responses
- The list of policy compliance rows
- ↳
policyNamestring requiredThe name of the policy - ↳
severityenum requiredThe severity level of the policyValues:,low,medium,high,critical - ↳
failingResourcesinteger requiredNumber of resources failing this policy - ↳
governedResourcesinteger requiredTotal number of resources governed by this policy - ↳
percentCompliantinteger requiredPercentage of resources that are compliant (0-100) - ↳
policyPackstring requiredThe policy pack this policy belongs to - ↳
policyGroupNamestring requiredThe policy group this policy belongs to - ↳
policyGroupTypeenum requiredThe type of the policy group this policy belongs toValues:audit,preventative totalCountinteger optionalThe total number of policiescontinuationTokenstring optionalContinuation token for pagination
List Policy Violations V2
ListPolicyIssues instead./api/orgs/{orgName}/policyresults/violationsv2ListPolicyViolationsV2Handler gets all the policy violations for an org. Deprecated: Use /policyresults/issues
Request Parameters
orgNamestring path requiredThe organization name
Responses
- The list of policy violations
- ↳
idstring requiredThe unique identifier of the policy violation. - ↳
projectNamestring requiredThe name of the project containing the violating resource. - ↳
stackNamestring optionalThe name of the stack containing the violating resource. - ↳
stackVersioninteger optionalThe stack version where the violation was detected. - ↳
accountNamestring optionalThe Insights account name associated with the violation, for resource-scoped violations. - ↳
resourceVersioninteger optionalThe resource version where the violation was detected. - ↳
policyPackstring requiredThe name of the policy pack that produced this violation. - ↳
policyPackTagstring requiredThe tag of the policy pack version that produced this violation. - ↳
policyNamestring requiredThe name of the policy that was violated. - ↳
resourceURNstring requiredThe URN of the resource that violated the policy. - ↳
resourceTypestring requiredThe type of the resource that violated the policy. - ↳
resourceNamestring requiredThe name of the resource that violated the policy. - ↳
messagestring requiredA human-readable message describing the policy violation. - ↳
observedAtstring requiredThe timestamp when the violation was observed. - ↳
levelstring requiredThe enforcement level of the violated policy (e.g. advisory, mandatory, disabled). - ↳
kindenum requiredThe kind of policy violation (audit or preventative).Values:audit,preventative continuationTokenstring optionalContinuation token for pagination
Thank you for your feedback!
If you have a question about how to use Pulumi, reach out in Community Slack.
Open an issue on GitHub to report a problem or suggest an improvement.