All URIs are relative to https://madisonreed.looker.com:19999/api/3.0
Method | HTTP request | Description |
---|---|---|
allUserAttributeGroupValues | GET /user_attributes/{user_attribute_id}/group_values | Get User Attribute Group Values |
allUserAttributes | GET /user_attributes | Get All User Attributes |
createUserAttribute | POST /user_attributes | Create User Attribute |
deleteUserAttribute | DELETE /user_attributes/{user_attribute_id} | Delete User Attribute |
setUserAttributeGroupValues | POST /user_attributes/{user_attribute_id}/group_values | Set User Attribute Group Values |
updateUserAttribute | PATCH /user_attributes/{user_attribute_id} | Update User Attribute |
userAttribute | GET /user_attributes/{user_attribute_id} | Get User Attribute |
[UserAttributeGroupValue] allUserAttributeGroupValues(userAttributeId, opts)
Get User Attribute Group Values
A user may be a member of multiple groups which define different values for a given user attribute. The order of group-values in the response determines precedence for selecting which group-value applies to a given user. For more information, see Set User Attribute Group Values.
Results will only include groups that the caller's user account has permission to see.
var LookerApi30Reference = require('looker-api-3');
var apiInstance = new LookerApi30Reference.UserAttributeApi()
var userAttributeId = 789; // {Integer} Id of user attribute
var opts = {
'fields': "fields_example" // {String} Requested fields.
};
var callback = function(error, data, response) {
if (error) {
console.error(error);
} else {
console.log('API called successfully. Returned data: ' + data);
}
};
api.allUserAttributeGroupValues(userAttributeId, opts, callback);
Name | Type | Description | Notes |
---|---|---|---|
userAttributeId | Integer | Id of user attribute | |
fields | String | Requested fields. | [optional] |
No authorization required
- Content-Type: application/json
- Accept: application/json
[UserAttribute] allUserAttributes(opts)
Get All User Attributes
var LookerApi30Reference = require('looker-api-3');
var apiInstance = new LookerApi30Reference.UserAttributeApi()
var opts = {
'fields': "fields_example", // {String} Requested fields.
'sorts': "sorts_example" // {String} Fields to sort by.
};
var callback = function(error, data, response) {
if (error) {
console.error(error);
} else {
console.log('API called successfully. Returned data: ' + data);
}
};
api.allUserAttributes(opts, callback);
Name | Type | Description | Notes |
---|---|---|---|
fields | String | Requested fields. | [optional] |
sorts | String | Fields to sort by. | [optional] |
No authorization required
- Content-Type: application/json
- Accept: application/json
UserAttribute createUserAttribute(opts)
Create User Attribute
var LookerApi30Reference = require('looker-api-3');
var apiInstance = new LookerApi30Reference.UserAttributeApi()
var opts = {
'body': new LookerApi30Reference.UserAttribute(), // {UserAttribute} User Attribute
'fields': "fields_example" // {String} Requested fields.
};
var callback = function(error, data, response) {
if (error) {
console.error(error);
} else {
console.log('API called successfully. Returned data: ' + data);
}
};
api.createUserAttribute(opts, callback);
Name | Type | Description | Notes |
---|---|---|---|
body | UserAttribute | User Attribute | [optional] |
fields | String | Requested fields. | [optional] |
No authorization required
- Content-Type: application/json
- Accept: application/json
'String' deleteUserAttribute(userAttributeId)
Delete User Attribute
var LookerApi30Reference = require('looker-api-3');
var apiInstance = new LookerApi30Reference.UserAttributeApi()
var userAttributeId = 789; // {Integer} Id of user_attribute
var callback = function(error, data, response) {
if (error) {
console.error(error);
} else {
console.log('API called successfully. Returned data: ' + data);
}
};
api.deleteUserAttribute(userAttributeId, callback);
Name | Type | Description | Notes |
---|---|---|---|
userAttributeId | Integer | Id of user_attribute |
'String'
No authorization required
- Content-Type: application/json
- Accept: application/json
[UserAttributeGroupValue] setUserAttributeGroupValues(userAttributeId, body)
Set User Attribute Group Values
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:
- the user's account settings
- the groups that the user is a member of
- 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 Value. To set a user attribute value for all members of a group, see Set User Attribute Group Value
var LookerApi30Reference = require('looker-api-3');
var apiInstance = new LookerApi30Reference.UserAttributeApi()
var userAttributeId = 789; // {Integer} Id of user attribute
var body = [new LookerApi30Reference.UserAttributeGroupValue()]; // {[UserAttributeGroupValue]} Array of group values.
var callback = function(error, data, response) {
if (error) {
console.error(error);
} else {
console.log('API called successfully. Returned data: ' + data);
}
};
api.setUserAttributeGroupValues(userAttributeId, body, callback);
Name | Type | Description | Notes |
---|---|---|---|
userAttributeId | Integer | Id of user attribute | |
body | [UserAttributeGroupValue] | Array of group values. |
No authorization required
- Content-Type: application/json
- Accept: application/json
UserAttribute updateUserAttribute(userAttributeId, body, opts)
Update User Attribute
var LookerApi30Reference = require('looker-api-3');
var apiInstance = new LookerApi30Reference.UserAttributeApi()
var userAttributeId = 789; // {Integer} Id of user attribute
var body = new LookerApi30Reference.UserAttribute(); // {UserAttribute} User Attribute
var opts = {
'fields': "fields_example" // {String} Requested fields.
};
var callback = function(error, data, response) {
if (error) {
console.error(error);
} else {
console.log('API called successfully. Returned data: ' + data);
}
};
api.updateUserAttribute(userAttributeId, body, opts, callback);
Name | Type | Description | Notes |
---|---|---|---|
userAttributeId | Integer | Id of user attribute | |
body | UserAttribute | User Attribute | |
fields | String | Requested fields. | [optional] |
No authorization required
- Content-Type: application/json
- Accept: application/json
UserAttribute userAttribute(userAttributeId, opts)
Get User Attribute
var LookerApi30Reference = require('looker-api-3');
var apiInstance = new LookerApi30Reference.UserAttributeApi()
var userAttributeId = 789; // {Integer} Id of user attribute
var opts = {
'fields': "fields_example" // {String} Requested fields.
};
var callback = function(error, data, response) {
if (error) {
console.error(error);
} else {
console.log('API called successfully. Returned data: ' + data);
}
};
api.userAttribute(userAttributeId, opts, callback);
Name | Type | Description | Notes |
---|---|---|---|
userAttributeId | Integer | Id of user attribute | |
fields | String | Requested fields. | [optional] |
No authorization required
- Content-Type: application/json
- Accept: application/json