Query permission group rules
Updated at:2025-11-11
Description
- Query information about a specific or all permission rules under a certain permission group
- The results support marker-based pagination, which can be specified via the maxKeys parameter
Request
Request structure
Plain Text
1GET /v{version}/accessGroup/{agName}?accessRuleId={arId}&marker={marker}&maxKeys={maxKeys} HTTP/1.1
2Host: cfs.bj.baidubce.com
3Authorization: authorization string
Request headers: No special headers beyond common headers
Request parameters
| Parameter name | Types | Whether required | Parameter location | Description |
|---|---|---|---|---|
| version | String | Yes | URL parameter | The current API version number is 1. |
| agName | String | No | URL parameter | Name of the permission group of rules to be queried |
| arId | int | No | Query | Identifier of a rule to be queried; if not provided, the batch list is queried. |
| marker | String | No | Query | The starting position for the batch list query, which is a system-generated string. |
| maxKeys | int | No | Query | Maximum number of items per page is 1,000, with a default value of 1000. |
Response
Response status code: Respond with 200 after successful operation, and respond with error codes after failed operation, as shown in Error Codes
Response headers: No special headers beyond common headers
Response parameters
| Parameter name | Types | Description |
|---|---|---|
| accessRules | List[AccessRuleModel](https://cloud.baidu.com/doc/CFS/s/Njwvy1rry#accessrulemodel) | List containing query results |
| marker | String | Marker indicating the starting position of the query. If the result list is empty, this field does not exist. |
| isTruncated | boolean | true indicates there is more data later, false indicates it is the last page |
| nextMarker | String | The marker value needed to fetch the next page. This field is absent when isTruncated is false. |
| maxKeys | int | Number of items included in the results per page |
Example
Request:
Plain Text
1POST /v1/accessGroup/ag_test?maxKeys={2} HTTP/1.1
2HOST cfs.bj.baidubce.com
3Authorization bce-auth-v1/5e5a8adf11ae475ba95f1bd38228b44f/2016-04-10T08:26:52Z/1800/host;x-bce-date/ec3c0069f9abb1e247773a62707224124b2b31b4c171133677f9042969791f02
Response:
Plain Text
1HTTP/1.1 200 OK
2x-bce-request-id: 946002ee-cb4f-4aad-b686-5be55df27f09
3Date: Wed, 10 Apr 2016 08:26:52 GMT
4Transfer-Encoding: chunked
5Content-Type: application/json;charset=UTF-8
6Server: BWS
7{
8 "accessRules": [
9 {
10 "accessRuleId": 1,
11 "ip": "10.10.1.123",
12 "mask": 32,
13 "priority": 1,
14 "userAccess": "no_squash",
15 "writeAccess": "read_only"
16 },
17 {
18 "accessRuleId": 2,
19 "ip": "10.10.1.123",
20 "mask": 32,
21 "priority": 99,
22 "userAccess": "all_squash",
23 "writeAccess": "read_only"
24 }
25 ],
26 "isTruncated": true,
27 "marker": "0",
28 "maxKeys": 2,
29 "nextMarker": "3"
30}
