Create a Policy Report

Prev Next
Post
/api/1.0/reports/{envId}/{reportType}

This API call begins the report generation process. Use the reportId returned in the response in the Get Request to generate a link to the report PDF.

Security
HTTP
Type bearer

For more details about Administration API Authentication, check out the Authentication APIs documentation
Provide your bearer token in the Authorization header when making requests to protected resources.
Example: Authorization: Bearer 123

Path parameters
envId
string (uuid) Required

The Environment ID can be found under the Details Tab in the Environment Settings. If your PAA is installed on the Tenant level, input - as your envId.

reportType
stringRequired

Identifies which report to generate.

Valid values[ "policy_by_attribute" ]
Body parameters
Policies by multiple attributes (all filters)

Policies grouped by regulatoryTags and Policy-Workflow (two Applications)

{
  "attributes": [
    {
      "attributeId": "regulatoryTags"
    },
    {
      "attributeId": "Policy-Workflow"
    }
  ],
  "filters": {
    "applicationIds": [
      "HR-Application",
      "internal-platform"
    ],
    "state": "Active",
    "completed": true,
    "accessType": "Allow"
  }
}
Expand All
object
attributes
Array of object Required

One or more policy attributes to group report results by. Each entry must reference an attribute ID that exists in the environment's policy custom schema and is a value-list (enum) type. At least one attribute is required.

Min items1
object
attributeId
string Required

The Attribute ID. This can be found in Identity Settings.

values
Array of string

Optional list of specific values to filter by for this attribute. When provided, only policies whose attribute value matches one of these entries are included. If omitted, all values for this attribute are included.

string
filters
object

Optional filters to narrow the set of policies included in the report. All filter fields are optional; omitting a field includes policies regardless of that field's value. All filter conditions are combined with AND logic.

applicationIds
Array of string

Application ID(s) as shown in the Application section of the Platform. Note: This input is case-sensitive.

string
state
string

Specifies whether the Policy is Active or Inactive.

Valid values[ "Active", "Inactive" ]
accessType
string

Specifies whether the Policy is set to allow or deny.

Valid values[ "Allow", "Restrict" ]
ExampleAllow
completed
boolean

Specifies whether the Policy is complete or incomplete.

Responses
202

Report job accepted

Accepted (status=processing)

Job accepted; poll GET /api/1.0/reports// until status is "ready"

{
  "data": {
    "reportId": "c3100ddd-e77d-4bb3-8704-d03e01f36443",
    "reportName": "policies_by_attribute_7c04f99f-ddf4-4425-97c0-8fd9d2f9ea38_2026-05-11_13-15",
    "reportType": "policies_by_attribute",
    "status": "processing",
    "dateTime": "2026-05-11 13:15",
    "anchor": {
      "envId": "7c04f99f-ddf4-4425-97c0-8fd9d2f9ea38"
    }
  }
}
Expand All
object
data
object

Report job details returned when the request is accepted.

reportId
string (uuid)

Unique identifier for the report job. Use in GET /reports// to poll for status.

reportName
string

Auto-generated report file name, derived from the report type, environment ID, and creation timestamp.

reportType
string

The type of report that was requested (e.g. policies_by_attribute).

status
string

Current generation status. On creation this is always "processing". Poll GET until "ready".

Valid values[ "processing", "ready", "failed" ]
dateTime
string

Date and time the report job was created (UTC, format "YYYY-MM-DD HH:mm").

anchor
object

Context anchor for the report, identifying the environment it belongs to.

envId
string (uuid)

The environment ID the report was generated for.

400

Validation error

Invalid attribute id

attributeId is not present in the environment's policy custom schema

{
  "id": "EW70XA",
  "status": 400,
  "name": "badRequestError",
  "message": "regulatoryTags is not a valid attribute for env 7c04f99f-ddf4-4425-97c0-8fd9d2f9ea38"
}
Attribute not groupable

attributeId exists but is not a value-list (enum) attribute

{
  "id": "EW71XA",
  "status": 400,
  "name": "badRequestError",
  "message": "Attribute 'policyOwner' is not supported for this report type."
}
Unknown applicationIds

one or more applicationIds values are not known external Application IDs in this env

{
  "id": "EW79XA",
  "status": 400,
  "name": "badRequestError",
  "message": "unknown applicationIds: ghost-app"
}
Expand All
object
code
string
id
string
status
integer
name
string
message
string
args
object
path
string
403

Forbidden

Feature disabled for tenant

platform.reports.use feature toggle is off for this tenant

{
  "id": "EW72XA",
  "code": "C-011",
  "status": 403,
  "name": "featureNotAllowedError",
  "message": "Platform reports are not enabled for this tenant"
}
Insufficient permissions on environment

The current user lacks insert permission on the target environment

{
  "id": "EW73XA",
  "status": 403,
  "name": "forbiddenEnvironment",
  "message": "operation insert for resource Environment 7c04f99f-ddf4-4425-97c0-8fd9d2f9ea38 isn't allowed due to: the current user has no appropriate permissions"
}
Expand All
object
code
string
id
string
status
integer
name
string
message
string
args
object
path
string
404

Environment not found

Environment not found

envId path parameter does not exist for the current tenant

{
  "code": "EVM-002",
  "id": "EW74XA",
  "status": 404,
  "name": "environmentNotFoundError",
  "message": "environment id: 7c04f99f-ddf4-4425-97c0-8fd9d2f9ea38 doesn't exist"
}
Expand All
object
code
string
id
string
status
integer
name
string
message
string
args
object
path
string
422

Unsupported report type

Unsupported report type

reportType path segment is not a known report type

{
  "id": "EW75XA",
  "status": 422,
  "name": "unprocessableEntityError",
  "message": "unsupported report type: policies_by_unknown_attribute"
}
Expand All
object
code
string
id
string
status
integer
name
string
message
string
args
object
path
string

© 2024 PlainID LTD. All rights reserved.