Xsolla-logo

Get users by attribute from serverServer-side

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

Attribute is used to get users’ list.

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

Name of attribute that is used to identify user’s attribute. Must be unique per user.

value
string or null

Value of user’s attribute. Needed for getting users with the key parameter with this value. If you do not specify it, it returns all users with any value for this key.

after
string or null

Update date of user’s attribute and ID of the latest attribute in the keys list. Do not set it at the first time. When you get users by attribute, they are sorted by their update date. If several attributes have the same update date, they are sorted by attribute ID. It is used for API pagination.

attr_type
string
Default: "client"

Definition of user’s access level to service attributes.

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

List of attributes’ keys which you want to get. If you do not specify them, the method returns all user’s attributes.

limit
integer [ 0 .. 20 ]
Default: 20

Number of users that is returned when searching by attribute.

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

Your merchant ID the request is made for. Needed for request authorizing.

publisher_project_id
integer

Project ID from Publisher Account which you want to get users for. If you do not specify it, it returns users without the value of this parameter.

search_type
string
Default: "equal"

Сomparison condition that defines search criteria.

Enum: "equal" "like"
Responses
200

OK

400

Bad Request

403

Forbidden

422

Unprocessable Entity

429

Too Many Requests

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