Get User Attribute Values

Version 4.0.24.14

Get user attribute values for a given user.

Returns the values of specified user attributes (or all user attributes) for a certain user.

A value for each user attribute is searched for in the following locations, in this order:

  1. in the user's account information
  2. in groups that the user is a member of
  3. the default value of the user attribute

If more than one group has a value defined for a user attribute, the group with the lowest rank wins.

The response will only include user attributes for which values were found. Use include_unset=true to include empty records for user attributes with no value.

The value of all hidden user attributes will be blank.

Request

GET /users/{user_id}/attribute_values
Datatype
Description
Request
HTTP Request
path
HTTP Path
Expand HTTP Path definition...
user_id
string
Id of user
query
HTTP Query
Expand HTTP Query definition...
fields
string
Requested fields.
user_attribute_ids
string[]
all_values
boolean
If true, returns all values in the search path instead of just the first value found. Useful for debugging group precedence.
include_unset
boolean
If true, returns an empty record for each requested attribute that has no user, group, or default value.

Response

200: Value of user attribute.

Datatype
Description
can
object
Operations the current user is able to perform on this object
name
string
Name of user attribute
label
string
Human-friendly label for user attribute
rank
integer
Precedence for setting value on user (lowest wins)
value
string
Value of attribute for user
user_id
string
Id of User
user_can_edit
boolean
Can the user set this value
value_is_hidden
boolean
If true, the "value" field will be null, because the attribute settings block access to this value
user_attribute_id
string
Id of User Attribute
source
string
How user got this value for this attribute
hidden_value_domain_whitelist
string
If this user attribute is hidden, allowed list of destinations to which it may be sent.

404: Not Found

Datatype
Description
(object)
message
string
Error details
documentation_url
string
Documentation link

429: Too Many Requests

Datatype
Description
(object)
message
string
Error details
documentation_url
string
Documentation link

Examples