Get Policy 1

Get Policy 1

Find a specific policy based on the input policy id.

Request
URI
GET
https://{api_host}/policy/api/policies/{id}
COPY
Path Parameters
string
id
Required

Policy ID

Query Parameters
boolean
computeStats
Optional

computeStats


Authentication
This operation uses the following authentication methods.
Responses
200

OK

Returns Policy of type(s) application/json
{
    "createdAt": "string",
    "createdBy": "string",
    "creator": {
        "email": "string",
        "firstname": "string",
        "id": "string",
        "lastname": "string",
        "type": "string"
    },
    "criteria": {
        "matchExpression": [
            {}
        ]
    },
    "definition": {},
    "definitionLegend": {
        "definitionLegend": {
            "description": "string",
            "error": "string",
            "id": "string",
            "name": "string",
            "properties": {
                "properties": {}
            }
        }
    },
    "description": "string",
    "enforcementType": "string",
    "id": "string",
    "lastUpdatedAt": "string",
    "lastUpdatedBy": "string",
    "lastUpdater": {
        "email": "string",
        "firstname": "string",
        "id": "string",
        "lastname": "string",
        "type": "string"
    },
    "name": "string",
    "opaRegoCriteria": "string",
    "orgId": "string",
    "projectId": "string",
    "scopeCriteria": {
        "matchExpression": [
            {}
        ]
    },
    "statistics": {
        "conflictCount": 0,
        "enforcedCount": 0,
        "notEnforcedCount": 0
    },
    "typeId": "string"
}
string As date-time As date-time
createdAt
Optional

Policy creation timestamp.

string
createdBy
Optional

Policy author.

object
creator
Optional

Expanded policy last updater details

object
criteria
Optional

Policy-type-specific target object filter criteria applied during enforcement.

object
definition
Optional

definition

object
definitionLegend
Optional

definitionLegend

string
description
Optional
Constraints: maxLength: 2000

The policy description.

string
enforcementType
Optional

Defines enforcement type for policy. Default enforcement type is HARD.

Possible values are : SOFT, HARD,
string As uuid As uuid
id
Optional

The policy ID.

string As date-time As date-time
lastUpdatedAt
Optional

Most recent policy update timestamp.

string
lastUpdatedBy
Optional

Most recent policy editor.

object
lastUpdater
Optional

Expanded policy last updater details

string
name
Optional
Constraints: maxLength: 1024

The policy name.

string
opaRegoCriteria
Optional

OPA Rego code applied during enforcement to filter target objects.

string
orgId
Optional

The ID of the organization to which the policy belongs.

string
projectId
Optional

For project-scoped policies, the ID of the project to which the policy belongs.

object
scopeCriteria
Optional

Policy-type-specific target object filter criteria applied during enforcement.

object
statistics
Optional

statistics

string
typeId
Required

The policy type ID.


401

Unauthorized

Returns Policy of type(s) application/json
"Policy Object"
string As date-time As date-time
createdAt
Optional

Policy creation timestamp.

string
createdBy
Optional

Policy author.

object
creator
Optional

Expanded policy last updater details

object
criteria
Optional

Policy-type-specific target object filter criteria applied during enforcement.

object
definition
Optional

definition

object
definitionLegend
Optional

definitionLegend

string
description
Optional
Constraints: maxLength: 2000

The policy description.

string
enforcementType
Optional

Defines enforcement type for policy. Default enforcement type is HARD.

Possible values are : SOFT, HARD,
string As uuid As uuid
id
Optional

The policy ID.

string As date-time As date-time
lastUpdatedAt
Optional

Most recent policy update timestamp.

string
lastUpdatedBy
Optional

Most recent policy editor.

object
lastUpdater
Optional

Expanded policy last updater details

string
name
Optional
Constraints: maxLength: 1024

The policy name.

string
opaRegoCriteria
Optional

OPA Rego code applied during enforcement to filter target objects.

string
orgId
Optional

The ID of the organization to which the policy belongs.

string
projectId
Optional

For project-scoped policies, the ID of the project to which the policy belongs.

object
scopeCriteria
Optional

Policy-type-specific target object filter criteria applied during enforcement.

object
statistics
Optional

statistics

string
typeId
Required

The policy type ID.


403

Forbidden

Returns Policy of type(s) application/json
"Policy Object"
string As date-time As date-time
createdAt
Optional

Policy creation timestamp.

string
createdBy
Optional

Policy author.

object
creator
Optional

Expanded policy last updater details

object
criteria
Optional

Policy-type-specific target object filter criteria applied during enforcement.

object
definition
Optional

definition

object
definitionLegend
Optional

definitionLegend

string
description
Optional
Constraints: maxLength: 2000

The policy description.

string
enforcementType
Optional

Defines enforcement type for policy. Default enforcement type is HARD.

Possible values are : SOFT, HARD,
string As uuid As uuid
id
Optional

The policy ID.

string As date-time As date-time
lastUpdatedAt
Optional

Most recent policy update timestamp.

string
lastUpdatedBy
Optional

Most recent policy editor.

object
lastUpdater
Optional

Expanded policy last updater details

string
name
Optional
Constraints: maxLength: 1024

The policy name.

string
opaRegoCriteria
Optional

OPA Rego code applied during enforcement to filter target objects.

string
orgId
Optional

The ID of the organization to which the policy belongs.

string
projectId
Optional

For project-scoped policies, the ID of the project to which the policy belongs.

object
scopeCriteria
Optional

Policy-type-specific target object filter criteria applied during enforcement.

object
statistics
Optional

statistics

string
typeId
Required

The policy type ID.


404

Not Found

Returns Policy of type(s) application/json
"Policy Object"
string As date-time As date-time
createdAt
Optional

Policy creation timestamp.

string
createdBy
Optional

Policy author.

object
creator
Optional

Expanded policy last updater details

object
criteria
Optional

Policy-type-specific target object filter criteria applied during enforcement.

object
definition
Optional

definition

object
definitionLegend
Optional

definitionLegend

string
description
Optional
Constraints: maxLength: 2000

The policy description.

string
enforcementType
Optional

Defines enforcement type for policy. Default enforcement type is HARD.

Possible values are : SOFT, HARD,
string As uuid As uuid
id
Optional

The policy ID.

string As date-time As date-time
lastUpdatedAt
Optional

Most recent policy update timestamp.

string
lastUpdatedBy
Optional

Most recent policy editor.

object
lastUpdater
Optional

Expanded policy last updater details

string
name
Optional
Constraints: maxLength: 1024

The policy name.

string
opaRegoCriteria
Optional

OPA Rego code applied during enforcement to filter target objects.

string
orgId
Optional

The ID of the organization to which the policy belongs.

string
projectId
Optional

For project-scoped policies, the ID of the project to which the policy belongs.

object
scopeCriteria
Optional

Policy-type-specific target object filter criteria applied during enforcement.

object
statistics
Optional

statistics

string
typeId
Required

The policy type ID.


Code Samples
COPY
                    curl -H 'Authorization: <value>' https://{api_host}/policy/api/policies/{id}