Set User Attribute Group Values

Version 4.0.24.6 (latest)

Define values for a user attribute across a set of groups, in priority order.

This function defines all values for a user attribute defined by user groups. This is a global setting, potentially affecting all users in the system. This function replaces any existing group value definitions for the indicated user attribute.

The value of a user attribute for a given user is determined by searching the following locations, in this order:

  1. the user's account settings
  2. the groups that the user is a member of
  3. the default value of the user attribute, if any

The user may be a member of multiple groups which define different values for that user attribute. The order of items in the group_values parameter determines which group takes priority for that user. Lowest array index wins.

An alternate method to indicate the selection precedence of group-values is to assign numbers to the 'rank' property of each group-value object in the array. Lowest 'rank' value wins. If you use this technique, you must assign a rank value to every group-value object in the array.

To set a user attribute value for a single user, see Set User Attribute User Value. To set a user attribute value for all members of a group, see Set User Attribute Group Value.

Request

POST /user_attributes/{user_attribute_id}/group_values
Datatype
Description
Request
HTTP Request
path
HTTP Path
Expand HTTP Path definition...
user_attribute_id
string
Id of user attribute
body
HTTP Body
Expand HTTP Body definition...
Expand UserAttributeGroupValue definition...
can
object
Operations the current user is able to perform on this object
id
string
Unique Id of this group-attribute relation
group_id
string
Id of group
user_attribute_id
string
Id of user attribute
value_is_hidden
boolean
If true, the "value" field will be null, because the attribute settings block access to this value
rank
integer
Precedence for resolving value for user
value
string
Value of user attribute for group

Response

200: Array of group values.

Datatype
Description
can
object
Operations the current user is able to perform on this object
id
string
Unique Id of this group-attribute relation
group_id
string
Id of group
user_attribute_id
string
Id of user attribute
value_is_hidden
boolean
If true, the "value" field will be null, because the attribute settings block access to this value
rank
integer
Precedence for resolving value for user
value
string
Value of user attribute for group

400: Bad Request

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

404: Not Found

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

409: Resource Already Exists

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

422: Validation Error

Datatype
Description
(object)
message
string
Error details
Expand ValidationErrorDetail definition...
field
string
Field with error
code
string
Error code
message
string
Error info message
documentation_url
string
Documentation link
documentation_url
string
Documentation link

429: Too Many Requests

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