Updated on 2025-12-01 GMT+08:00

Querying the Permission Policy List

Function

This API is used to query the permission policy list.

URI

GET /v1/permissions/rules

Table 1 Query Parameters

Parameter

Mandatory

Type

Description

limit

No

Integer

The number of records allowed on each page when the list is queried by page. The default value is -1.

offset

No

Integer

Start offset when the list is queried by page. The default value is 0.

order_by

No

String

Sorting parameter when the list is queried by page. The value can be create_at or update_at.

order

No

String

Sorting order when the list is queried by page. The value can be desc or asc.

Request Parameters

Table 2 Request header parameters

Parameter

Mandatory

Type

Description

X-Auth-Token

No

String

Identity authentication information. Requests for calling an API can be authenticated using either a token or AK/SK. If token-based authentication is used, this parameter is mandatory and must be set to a user token.

Response Parameters

Status code: 200

Table 3 Response body parameters

Parameter

Type

Description

items

Array of Rule objects

Permission policy list

total

Integer

Total number of records on all pages

Table 4 Rule

Parameter

Type

Description

kind

String

API type.

apiVersion

String

API version. The value is fixed at v1 and cannot be changed.

metadata

ObjectMeta object

Basic information

spec

RuleSpec object

Detailed description of an object. UCS creates or updates objects by defining or updating spec.

Table 5 ObjectMeta

Parameter

Type

Description

uid

String

Resource ID

name

String

Resource name

generateName

String

If no name is provided, the server uses the prefix to generate a unique name.

namespace

String

Namespace

labels

Map<String,String>

Label

annotations

Map<String,String>

Annotation

creationTimestamp

String

Creation time

updateTimestamp

String

Update time

resourceVersion

String

Internal version of a resource

generation

String

Generation of the desired resource state

managedFields

Array of ManagedFieldsEntry objects

Fields managed by workflows

ownerReferences

Array of OwnerReference objects

Ownership, dependencies, and garbage collection mechanism of objects. It supports resource management by the controller.

Table 6 ManagedFieldsEntry

Parameter

Type

Description

manager

String

Manager name

operation

String

Operation type that causes this entry being created. The value can only be Apply or Update.

apiVersion

String

Resource API version used by a manager for defining fields

time

String

Timestamp when this entry was created or last updated

fieldsType

String

Field structure format. The value is fixed at "FieldsV1".

fieldsV1

Object

Information about the managed fields

Table 7 OwnerReference

Parameter

Type

Description

apiVersion

String

API version of the referent

kind

String

Type of the referent

name

String

Name of the referent

uid

String

UID of the referent

controller

Boolean

If the value is true, this reference points to the controller that manages the resource.

blockOwnerDeletion

Boolean

If the value is true and the owner has a finalizer named foregroundDeletion, the owner cannot be deleted until this reference is removed.

Table 8 RuleSpec

Parameter

Type

Description

iamUserIDs

Array of strings

IAM user information associated with a permission policy

type

String

Permission policy type. The value can be readonly, develop, admin, or custom.

contents

Array of Content objects

Permission policy content

description

String

Permission policy description

Table 9 Content

Parameter

Type

Description

verbs

Array of strings

Action list

resources

Array of strings

Resource list

Status code: 400

Table 10 Response body parameters

Parameter

Type

Description

-

String

-

Status code: 500

Table 11 Response body parameters

Parameter

Type

Description

-

String

-

Example Requests

None

Example Responses

Status code: 200

Permission policy list

{
  "items" : [ {
    "metadata" : {
      "name" : "admin",
      "uid" : "3dcdef78-65bb-11ee-bdf2-0255ac100033",
      "creationTimestamp" : "2023-10-08 09:15:36.526016 +0000 UTC",
      "updateTimestamp" : "2023-10-08 09:15:36.526016 +0000 UTC"
    },
    "spec" : {
      "iamUserIDs" : [ "873395a21c8d4d8ba9e37d6d32debc41" ],
      "type" : "admin",
      "contents" : [ {
        "verbs" : [ "*" ],
        "resources" : [ "*" ]
      } ]
    }
  } ],
  "total" : 1
}

Status Codes

Status Code

Description

200

Permission policy list

400

Client request error. The server could not execute the request.

500

Internal server error.

Error Codes

See Error Codes.