Query Permission Groups
Updated at:2025-11-11
Description
- Query information about a specific or all permission groups
- The results support marker-based pagination, which can be specified via the maxKeys parameter
Request
Request structure
Plain Text
1GET /v{version}/accessGroup?accessGroupName={agName}&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 | Query | Name of the permission group to be queried; if not provided, batch lists will be 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 |
|---|---|---|
| accessGroups | List[AccessGroupModel](https://cloud.baidu.com/doc/CFS/s/Njwvy1rry#accessgroupmodel) | 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?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 "accessGroups": [
9 {
10 "accessGroupName": "DEFAULT_ACCESS_GROUP_NAME",
11 "accessRules": [
12 {
13 "accessRuleId": 1,
14 "ip": "0.0.0.0",
15 "mask": 0,
16 "priority": 100,
17 "userAccess": "no_squash",
18 "writeAccess": "read_write"
19 }
20 ],
21 "createTime": {
22 "tv_nsec": 17287487,
23 "tv_sec": 1649844117
24 },
25 "description": "DEFAULT ACCESS GROUP NAME",
26 "fsCount": 15
27 },
28 {
29 "accessGroupName": "ag_test",
30 "accessRules": [],
31 "createTime": {
32 "tv_nsec": 785321975,
33 "tv_sec": 1692080514
34 },
35 "description": "",
36 "fsCount": 0
37 }
38 ],
39 "isTruncated": true,
40 "marker": "0s0s",
41 "maxKeys": 2,
42 "nextMarker": "1700471969s137639240slong"
43}
