Get policy list

Prev Next

Available in Classic and VPC

Get a policy list.

Request

This section describes the request format. The method and URI are as follows:

Method URI
GET /api/v1/policies

Request headers

For information about the headers common to all Sub Account APIs, see Sub Account request headers.

Request query parameters

You can use the following query parameters with your request:

Field Type Required Description
page Integer Optional Page number
  • 0-N (default: 0)
size Integer Optional Page output count
  • 1-N (default: 10)
searchColumn String Optional Search column
  • policyName
    • policyName: policy name
searchWord String Optional Search keyword
type String Optional Policy type
  • SYSTEM_MANAGED | USER_CREATED
    • SYSTEM_MANAGED: System Managed Policies
    • USER_CREATED: User Created Policies

Request example

The request example is as follows:

curl --location --request GET 'https://subaccount.apigw.ntruss.com/api/v1/policies?type=SYSTEM_MANAGED' \
--header 'x-ncp-apigw-timestamp: {Timestamp}' \
--header 'x-ncp-iam-access-key: {Access Key}' \
--header 'x-ncp-apigw-signature-v2: {API Gateway Signature}' \
--header 'Accept: application/json'

Response

This section describes the response format.

Response body

The response body includes the following data:

Field Type Required Description
page Integer - Page number
totalPages Integer - Total number of pages
totalItems Integer - Number of response results
hasPrevious Boolean - Whether previous page exists
  • true | false
    • true: It exists
    • false: It doesn't exist
hasNext Boolean - Whether next page exists
  • true | false
    • true: It exists
    • false: It doesn't exist
items Array - Policy list
isFirst Boolean - Whether it is the first page
  • true | false
    • true: first page
    • false: not a first page
isLast Boolean - Whether it is the last page
  • true | false
    • true: last page
    • false: not a last page

items

The following describes items.

Field Type Required Description
policyId String - Policy ID
policyName String - Policy Name
policyType String - Policy type
  • SYSTEM_MANAGED | USER_CREATED
    • SYSTEM_MANAGED: System Managed Policies
    • USER_CREATED: User Created Policies
policyDesc String - Policy description
nrn String - NAVER Cloud Platform resource identification value for policy

Response status codes

For information about the HTTP status codes common to all Sub Account APIs, see Sub Account status codes.

Response example

The response example is as follows:

{
    "page": 0,
    "totalPages": 88,
    "totalItems": 264,
    "hasPrevious": false,
    "hasNext": true,
    "items": [
        {
            "policyId": "7a0760f0-****-****-****-246e966ebec4",
            "policyName": "NCP_NCLOUD_STORAGE_VIEWER",
            "policyType": "SYSTEM_MANAGED",
            "policyDesc": "Permission to use only the query feature within the Ncloud Storage service",
            "nrn": "nrn:PUB:IAM:::Policy/7a0760f0-****-****-****-246e966ebec4"
        },
        {
            "policyId": "7a05b340-****-****-****-246e966ebec4",
            "policyName": "NCP_NCLOUD_STORAGE_MANAGER",
            "policyType": "SYSTEM_MANAGED",
            "policyDesc": "Permission to use all the features in the Ncloud Storage service",
            "nrn": "nrn:PUB:IAM:::Policy/7a05b340-****-****-****-246e966ebec4"
        },
        {
            "policyId": "6869c8e0-****-****-****-246e966ebec4",
            "policyName": "NCP_COST_EXPLORER_VIEWER",
            "policyType": "SYSTEM_MANAGED",
            "policyDesc": "Permission to use only the query feature within the Cost Explorer service",
            "nrn": "nrn:PUB:IAM:::Policy/6869c8e0-****-****-****-246e966ebec4"
        }
    ],
    "isFirst": true,
    "isLast": false
}