All Products
Search
Document Center

Content Moderation:Query a list of individuals

Last Updated:Jul 25, 2024

You can call the getPersonList operation to query the IDs of all individuals in an individual group.

QPS limits

You can call this operation up to 20 times per second per account. If the number of calls per second exceeds the limit, throttling is triggered. As a result, your business may be affected. We recommend that you take note of the limit when you call this operation.

Request syntax

POST /green/sface/group/persons HTTPS|HTTP

Request headers

This operation uses only common request headers. For more information, see Common request headers.

Request parameters

Parameter

Type

Required

Example

Description

clientInfo

JSONObject

No

{"userId":"120234234","userNick":"Mike","userType":"others"}

The client information that is serialized from the ClientInfo structure in the JSON format. The information includes the unique machine identifier (UMID) and International Mobile Equipment Identity (IMEI) of the client. For more information, see ClientInfo.

RequestBody

You must also specify the following parameters in RequestBody to specify the information of the individual group to be queried.

Parameter

Type

Required

Example

Description

groupId

String

Yes

group1

The ID of the individual group to query.

currentPage

Integer

No

1

The number of the current page to return, starting from 1. Default value: 1.

pageSize

Integer

No

20

The number of entries to return on each page. Default value: 20. Valid values: 1 to 100.

Response parameters

JSON-formatted data is returned for all requests. For more information about common response parameters, see Common response parameters. The data parameter in the response is used to return business-related data. In general, the value of this parameter is a JSON structure or array.

Note

The data parameter may be empty when an error occurs.

The following table describes the parameters that are returned in the data field.

Parameter

Type

Example

Description

code

Integer

200

The returned HTTP status code.

For more information, see Common error codes.

personIds

StringArray

["person1","person2"]

The list of all individual IDs in the individual group.

currentPage

Integer

1

The number of the current page returned.

pageSize

Integer

20

The number of entries returned on each page.

totalCount

Integer

100

The total number of individuals.

Examples

Sample requests

POST /green/sface/group/persons HTTP/1.1
Common request headers
{
    "groupId": "group1",
    "pageSize": 10,
    "currentPage": 1
}

Sample success responses

{
    "msg": "OK",
    "code": 200,
    "requestId": "36D384DA-8023-4E84-BCFD-0C5581352C16",
    "data": {
        "code": 200,
        "personIds": [
            "person1",
            "person2"
        ],
        "pageSize": 10,
        "currentPage": 1,
        "totalCount": 17
    }
}