Help Center/ Ubiquitous Cloud Native Service/ API Reference/ API/ Permissions/ Obtaining the Permission Policy List
Updated on 2025-07-15 GMT+08:00

Obtaining the Permission Policy List

Function

This API is used to obtain 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 Parameters in the request header

Parameter

Mandatory

Type

Description

X-Auth-Token

Yes

String

Identity authentication information

Response Parameters

Status code: 200

Table 3 Parameters in the response body

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

Details about the permission policy. UCS creates or updates the permission policy by spec.

Table 5 ObjectMeta

Parameter

Type

Description

uid

String

Cluster ID

name

String

Cluster name

labels

Map<String,String>

Labels

creationTimestamp

String

Creation time. It is the UTC time in the RFC 3339 format.

updateTimestamp

String

Update timestamp

Table 6 RuleSpec

Parameter

Type

Description

iamuserids

Array of strings

Information of IAM users 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 7 Content

Parameter

Type

Description

verbs

Array of strings

Action list

resources

Array of strings

Resource list

Status code: 400

Table 8 Parameters in the response body

Parameter

Type

Description

-

String

Status code: 500

Table 9 Parameters in the response body

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.