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.

Notice
Rate limits for server-side methods are applied to this method.

SecurityAttributesServer
Request
Request Body schema: application/json
required
object

属性用于获取用户列表。

key
required
string <= 256 characters [A-Za-z0-9_]+

用于标识用户属性的属性名称。对于每个用户必须是唯一的。

value
string or null

用户属性的值。用于获取key参数为此值的用户。如果不指定它,将返回该键具有值的所有用户。

after
string or null

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

attr_type
string
Default: "client"

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

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

要获取的属性键列表。如果不指定,则方法返回所有用户属性。

limit
integer [ 0 .. 20 ]
Default: 20

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

login_project_id
string

发布商帐户中的登录管理器ID,以便获取它的用户属性。如果指定了该ID,则将使用该ID而不使用发布商帐户中的商户ID和项目ID。

publisher_id
integer or null

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

publisher_project_id
integer

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

search_type
string
Default: "equal"

定义搜索条件的比较条件。

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
[
  • {
    }
]