Xsolla-logo

从服务器通过属性获取用户

post/attributes/users/get

Gets a list of users by an attribute. Returns a list of the users’ IDs, their emails, and the attributes that were specified in the ‘key’ object of the request.

SecurityAttributesServer
Request
Request Body schema: application/json
required
object

属性用于获取用户列表。

after
string or null

用户属性的更新日期和keys列表中最新属性的ID。第一次时请勿设置。 按属性获取用户时,会按更新日期排序。如果多个属性的更新日期相同,则按属性ID排序。 用于API分页。

attr_type
string
Default: "client"

定义用户对服务属性的访问级别。

Enum: "client" "server"
keys
Array of strings <= 5 items

要获取的属性键列表。如果不指定,则仅返回用户ID列表。

limit
integer [ 0 .. 20 ]
Default: 20

按属性搜索时返回的用户数量。

login_project_id
string

Login ID from Publisher Account which you want to get user’s attributes for. If you do specify it, it is use instead your merchant ID and project ID from Publisher Account.

publisher_id
integer or null

请求所针对的商家ID。请求授权时需要。

publisher_project_id
integer

要获取其用户的发布商帐户中的项目ID。如果不指定,则返回没有该参数值的用户。

search_type
string
Default: "equal"

Сomparison condition that defines search criteria.

Enum: "equal" "like"
Responses
200

确定

400

错误的请求

403

无法处理的实体

422

无法处理的实体

429

请求过多

Request samples
application/json
{
  • "after": "string",
  • "attr_type": "client",
  • "attribute": {
    },
  • "keys": [
    ],
  • "limit": 20,
  • "login_project_id": "string",
  • "publisher_id": 0,
  • "publisher_project_id": 0,
  • "search_type": "equal"
}
Response samples
application/json
[
  • {
    }
]