Updated on 2024-07-30 GMT+08:00

Listing User Groups

Function

List groups that a user joins.

URI

GET /koodrive/ose/v1/usergroups

Table 1 Query Parameters

Parameter

Mandatory

Type

Description

pageSize

Yes

Integer

Number of records to be returned on each page. Default and maximum value: 100. It is possible that partial or empty result pages are returned before the end of the result list has been reached.

pageCursor

Yes

String

Current page cursor, which is obtained from nextCursor of the previous response.

groupName

No

String

User group name.

sourceType

Yes

Integer

User group type.

Request Parameters

Table 2 Request header parameters

Parameter

Mandatory

Type

Description

Authorization

Yes

String

Access token. Token authentication is used to call KooDrive APIs. A token indicates the permission. When an API is called, the token is added to the request header to obtain the operation permission. For details about how to obtain an access token, see the corresponding developer guide. The format is Bearer+{access_token}.

X-Traceid

No

String

Message log trace ID. The value contains 58 bits.

language

No

String

Language code, which complies with the internationalization specifications. For example, en-US indicates English (United States). English (United States) is used by default.

Response Parameters

Status code: 200

Table 3 Response body parameters

Parameter

Type

Description

code

String

Response code.

msg

String

Response information.

nextCursor

String

Pagination cursor. If the cursor does not exist, the last record has been returned.

userGroupList

Array of UserGroupInfo objects

User group information.

total

Integer

Total number of records.

Table 4 UserGroupInfo

Parameter

Type

Description

id

String

User group ID.

groupName

String

User group name.

ownerId

String

Creator ID.

createdTime

String

Creation time.

updatedTime

String

Update time.

Example Requests

Lists the groups that a user joins.

GET /koodrive/ose/v1/usergroups

Authorization:Bearer+c69b0f40334782d560bb154032cf22ef43d671843c4ffbad

Example Responses

Status code: 200

Group list information.

{
  "total" : 2,
  "userGroupList" : [ {
    "id" : "1407237551361847809",
    "groupName" : "7",
    "ownerId" : "1395476983395324033",
    "createdTime" : "2024-04-25T06:49:49.000Z",
    "updatedTime" : "2024-04-25T06:49:49.000Z"
  }, {
    "id" : "1404926806536180481",
    "groupName" : "111",
    "ownerId" : "1395476983395324033",
    "createdTime" : "2024-04-22T02:18:46.000Z",
    "updatedTime" : "2024-04-22T02:18:46.000Z"
  } ],
  "code" : 0,
  "msg" : "OK"
}

Status Codes

Status Code

Description

200

Group list information.