Skip to content

Latest commit

 

History

History
executable file
·
2193 lines (1508 loc) · 61.5 KB

UserApi.md

File metadata and controls

executable file
·
2193 lines (1508 loc) · 61.5 KB

LookerApi31Reference.UserApi

All URIs are relative to /api/3.1

Method HTTP request Description
allUserCredentialsApi3s GET /users/{user_id}/credentials_api3 Get All API 3 Credentials
allUserCredentialsEmbeds GET /users/{user_id}/credentials_embed Get All Embedding Credentials
allUserSessions GET /users/{user_id}/sessions Get All Web Login Sessions
allUsers GET /users Get All Users
createUser POST /users Create User
createUserCredentialsApi3 POST /users/{user_id}/credentials_api3 Create API 3 Credential
createUserCredentialsEmail POST /users/{user_id}/credentials_email Create Email/Password Credential
createUserCredentialsEmailPasswordReset POST /users/{user_id}/credentials_email/password_reset Create Password Reset Token
createUserCredentialsTotp POST /users/{user_id}/credentials_totp Create Two-Factor Credential
deleteUser DELETE /users/{user_id} Delete User
deleteUserAttributeUserValue DELETE /users/{user_id}/attribute_values/{user_attribute_id} Delete User Attribute User Value
deleteUserCredentialsApi3 DELETE /users/{user_id}/credentials_api3/{credentials_api3_id} Delete API 3 Credential
deleteUserCredentialsEmail DELETE /users/{user_id}/credentials_email Delete Email/Password Credential
deleteUserCredentialsEmbed DELETE /users/{user_id}/credentials_embed/{credentials_embed_id} Delete Embedding Credential
deleteUserCredentialsGoogle DELETE /users/{user_id}/credentials_google Delete Google Auth Credential
deleteUserCredentialsLdap DELETE /users/{user_id}/credentials_ldap Delete LDAP Credential
deleteUserCredentialsLookerOpenid DELETE /users/{user_id}/credentials_looker_openid Delete Looker OpenId Credential
deleteUserCredentialsOidc DELETE /users/{user_id}/credentials_oidc Delete OIDC Auth Credential
deleteUserCredentialsSaml DELETE /users/{user_id}/credentials_saml Delete Saml Auth Credential
deleteUserCredentialsTotp DELETE /users/{user_id}/credentials_totp Delete Two-Factor Credential
deleteUserSession DELETE /users/{user_id}/sessions/{session_id} Delete Web Login Session
me GET /user Get Current User
searchUsers GET /users/search Search Users
searchUsersNames GET /users/search/names/{pattern} Search User Names
setUserAttributeUserValue PATCH /users/{user_id}/attribute_values/{user_attribute_id} Set User Attribute User Value
setUserRoles PUT /users/{user_id}/roles Set User Roles
updateUser PATCH /users/{user_id} Update User
updateUserCredentialsEmail PATCH /users/{user_id}/credentials_email Update Email/Password Credential
user GET /users/{user_id} Get User by Id
userAttributeUserValues GET /users/{user_id}/attribute_values Get User Attribute Values
userCredentialsApi3 GET /users/{user_id}/credentials_api3/{credentials_api3_id} Get API 3 Credential
userCredentialsEmail GET /users/{user_id}/credentials_email Get Email/Password Credential
userCredentialsEmbed GET /users/{user_id}/credentials_embed/{credentials_embed_id} Get Embedding Credential
userCredentialsGoogle GET /users/{user_id}/credentials_google Get Google Auth Credential
userCredentialsLdap GET /users/{user_id}/credentials_ldap Get LDAP Credential
userCredentialsLookerOpenid GET /users/{user_id}/credentials_looker_openid Get Looker OpenId Credential
userCredentialsOidc GET /users/{user_id}/credentials_oidc Get OIDC Auth Credential
userCredentialsSaml GET /users/{user_id}/credentials_saml Get Saml Auth Credential
userCredentialsTotp GET /users/{user_id}/credentials_totp Get Two-Factor Credential
userForCredential GET /users/credential/{credential_type}/{credential_id} Get User by Credential Id
userRoles GET /users/{user_id}/roles Get User Roles
userSession GET /users/{user_id}/sessions/{session_id} Get Web Login Session

allUserCredentialsApi3s

[CredentialsApi3] allUserCredentialsApi3s(userId, opts)

Get All API 3 Credentials

API 3 login information for the specified user. This is for the newer API keys that can be added for any user.

Example

var LookerApi31Reference = require('looker-node-api');

var apiInstance = new LookerApi31Reference.UserApi();

var userId = 789; // Number | id of user

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);
  }
};
apiInstance.allUserCredentialsApi3s(userId, opts, callback);

Parameters

Name Type Description Notes
userId Number id of user
fields String Requested fields. [optional]

Return type

[CredentialsApi3]

Authorization

No authorization required

HTTP request headers

  • Content-Type: application/json
  • Accept: application/json

allUserCredentialsEmbeds

[CredentialsEmbed] allUserCredentialsEmbeds(userId, opts)

Get All Embedding Credentials

Embed login information for the specified user.

Example

var LookerApi31Reference = require('looker-node-api');

var apiInstance = new LookerApi31Reference.UserApi();

var userId = 789; // Number | id of user

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);
  }
};
apiInstance.allUserCredentialsEmbeds(userId, opts, callback);

Parameters

Name Type Description Notes
userId Number id of user
fields String Requested fields. [optional]

Return type

[CredentialsEmbed]

Authorization

No authorization required

HTTP request headers

  • Content-Type: application/json
  • Accept: application/json

allUserSessions

[Session] allUserSessions(userId, opts)

Get All Web Login Sessions

Web login session for the specified user.

Example

var LookerApi31Reference = require('looker-node-api');

var apiInstance = new LookerApi31Reference.UserApi();

var userId = 789; // Number | id of user

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);
  }
};
apiInstance.allUserSessions(userId, opts, callback);

Parameters

Name Type Description Notes
userId Number id of user
fields String Requested fields. [optional]

Return type

[Session]

Authorization

No authorization required

HTTP request headers

  • Content-Type: application/json
  • Accept: application/json

allUsers

[User] allUsers(opts)

Get All Users

Get information about all users.

Example

var LookerApi31Reference = require('looker-node-api');

var apiInstance = new LookerApi31Reference.UserApi();

var opts = {
  'fields': "fields_example", // String | Requested fields.
  'page': 789, // Number | Requested page.
  'perPage': 789, // Number | Results per page.
  'sorts': "sorts_example", // String | Fields to sort by.
  'ids': [3.4] // [Number] | Optional list of ids to get specific users.
};

var callback = function(error, data, response) {
  if (error) {
    console.error(error);
  } else {
    console.log('API called successfully. Returned data: ' + data);
  }
};
apiInstance.allUsers(opts, callback);

Parameters

Name Type Description Notes
fields String Requested fields. [optional]
page Number Requested page. [optional]
perPage Number Results per page. [optional]
sorts String Fields to sort by. [optional]
ids [Number] Optional list of ids to get specific users. [optional]

Return type

[User]

Authorization

No authorization required

HTTP request headers

  • Content-Type: application/json
  • Accept: application/json

createUser

User createUser(opts)

Create User

Create a user with the specified information.

Example

var LookerApi31Reference = require('looker-node-api');

var apiInstance = new LookerApi31Reference.UserApi();

var opts = {
  'body': new LookerApi31Reference.User(), // User | User
  '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);
  }
};
apiInstance.createUser(opts, callback);

Parameters

Name Type Description Notes
body User User [optional]
fields String Requested fields. [optional]

Return type

User

Authorization

No authorization required

HTTP request headers

  • Content-Type: application/json
  • Accept: application/json

createUserCredentialsApi3

CredentialsApi3 createUserCredentialsApi3(userId, opts)

Create API 3 Credential

API 3 login information for the specified user. This is for the newer API keys that can be added for any user.

Example

var LookerApi31Reference = require('looker-node-api');

var apiInstance = new LookerApi31Reference.UserApi();

var userId = 789; // Number | id of user

var opts = {
  'body': new LookerApi31Reference.CredentialsApi3(), // CredentialsApi3 | API 3 Credential
  '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);
  }
};
apiInstance.createUserCredentialsApi3(userId, opts, callback);

Parameters

Name Type Description Notes
userId Number id of user
body CredentialsApi3 API 3 Credential [optional]
fields String Requested fields. [optional]

Return type

CredentialsApi3

Authorization

No authorization required

HTTP request headers

  • Content-Type: application/json
  • Accept: application/json

createUserCredentialsEmail

CredentialsEmail createUserCredentialsEmail(userId, opts)

Create Email/Password Credential

Email/password login information for the specified user.

Example

var LookerApi31Reference = require('looker-node-api');

var apiInstance = new LookerApi31Reference.UserApi();

var userId = 789; // Number | id of user

var opts = {
  'body': new LookerApi31Reference.CredentialsEmail(), // CredentialsEmail | Email/Password Credential
  '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);
  }
};
apiInstance.createUserCredentialsEmail(userId, opts, callback);

Parameters

Name Type Description Notes
userId Number id of user
body CredentialsEmail Email/Password Credential [optional]
fields String Requested fields. [optional]

Return type

CredentialsEmail

Authorization

No authorization required

HTTP request headers

  • Content-Type: application/json
  • Accept: application/json

createUserCredentialsEmailPasswordReset

CredentialsEmail createUserCredentialsEmailPasswordReset(userId, opts)

Create Password Reset Token

Create a password reset token. This will create a cryptographically secure random password reset token for the user. If the user already has a password reset token then this invalidates the old token and creates a new one. The token is expressed as the 'password_reset_url' of the user's email/password credential object. This takes an optional 'expires' param to indicate if the new token should be an expiring token. Tokens that expire are typically used for self-service password resets for existing users. Invitation emails for new users typically are not set to expire. The expire period is always 60 minutes when expires is enabled. This method can be called with an empty body.

Example

var LookerApi31Reference = require('looker-node-api');

var apiInstance = new LookerApi31Reference.UserApi();

var userId = 789; // Number | Id of user

var opts = {
  'expires': true, // Boolean | Expiring token.
  '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);
  }
};
apiInstance.createUserCredentialsEmailPasswordReset(userId, opts, callback);

Parameters

Name Type Description Notes
userId Number Id of user
expires Boolean Expiring token. [optional]
fields String Requested fields. [optional]

Return type

CredentialsEmail

Authorization

No authorization required

HTTP request headers

  • Content-Type: application/json
  • Accept: application/json

createUserCredentialsTotp

CredentialsTotp createUserCredentialsTotp(userId, opts)

Create Two-Factor Credential

Two-factor login information for the specified user.

Example

var LookerApi31Reference = require('looker-node-api');

var apiInstance = new LookerApi31Reference.UserApi();

var userId = 789; // Number | id of user

var opts = {
  'body': new LookerApi31Reference.CredentialsTotp(), // CredentialsTotp | Two-Factor Credential
  '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);
  }
};
apiInstance.createUserCredentialsTotp(userId, opts, callback);

Parameters

Name Type Description Notes
userId Number id of user
body CredentialsTotp Two-Factor Credential [optional]
fields String Requested fields. [optional]

Return type

CredentialsTotp

Authorization

No authorization required

HTTP request headers

  • Content-Type: application/json
  • Accept: application/json

deleteUser

'String' deleteUser(userId)

Delete User

Delete the user with a specific id. DANGER this will delete the user and all looks and other information owned by the user.

Example

var LookerApi31Reference = require('looker-node-api');

var apiInstance = new LookerApi31Reference.UserApi();

var userId = 789; // Number | Id of user


var callback = function(error, data, response) {
  if (error) {
    console.error(error);
  } else {
    console.log('API called successfully. Returned data: ' + data);
  }
};
apiInstance.deleteUser(userId, callback);

Parameters

Name Type Description Notes
userId Number Id of user

Return type

'String'

Authorization

No authorization required

HTTP request headers

  • Content-Type: application/json
  • Accept: application/json

deleteUserAttributeUserValue

deleteUserAttributeUserValue(userId, userAttributeId)

Delete User Attribute User Value

Delete a user attribute value from a user's account settings. After the user attribute value is deleted from the user's account settings, subsequent requests for the user attribute value for this user will draw from the user's groups or the default value of the user attribute. See Get User Attribute Values for more information about how user attribute values are resolved.

Example

var LookerApi31Reference = require('looker-node-api');

var apiInstance = new LookerApi31Reference.UserApi();

var userId = 789; // Number | Id of user

var userAttributeId = 789; // Number | Id of user attribute


var callback = function(error, data, response) {
  if (error) {
    console.error(error);
  } else {
    console.log('API called successfully.');
  }
};
apiInstance.deleteUserAttributeUserValue(userId, userAttributeId, callback);

Parameters

Name Type Description Notes
userId Number Id of user
userAttributeId Number Id of user attribute

Return type

null (empty response body)

Authorization

No authorization required

HTTP request headers

  • Content-Type: application/json
  • Accept: application/json

deleteUserCredentialsApi3

'String' deleteUserCredentialsApi3(userId, credentialsApi3Id)

Delete API 3 Credential

API 3 login information for the specified user. This is for the newer API keys that can be added for any user.

Example

var LookerApi31Reference = require('looker-node-api');

var apiInstance = new LookerApi31Reference.UserApi();

var userId = 789; // Number | id of user

var credentialsApi3Id = 789; // Number | id of API 3 Credential


var callback = function(error, data, response) {
  if (error) {
    console.error(error);
  } else {
    console.log('API called successfully. Returned data: ' + data);
  }
};
apiInstance.deleteUserCredentialsApi3(userId, credentialsApi3Id, callback);

Parameters

Name Type Description Notes
userId Number id of user
credentialsApi3Id Number id of API 3 Credential

Return type

'String'

Authorization

No authorization required

HTTP request headers

  • Content-Type: application/json
  • Accept: application/json

deleteUserCredentialsEmail

'String' deleteUserCredentialsEmail(userId)

Delete Email/Password Credential

Email/password login information for the specified user.

Example

var LookerApi31Reference = require('looker-node-api');

var apiInstance = new LookerApi31Reference.UserApi();

var userId = 789; // Number | id of user


var callback = function(error, data, response) {
  if (error) {
    console.error(error);
  } else {
    console.log('API called successfully. Returned data: ' + data);
  }
};
apiInstance.deleteUserCredentialsEmail(userId, callback);

Parameters

Name Type Description Notes
userId Number id of user

Return type

'String'

Authorization

No authorization required

HTTP request headers

  • Content-Type: application/json
  • Accept: application/json

deleteUserCredentialsEmbed

'String' deleteUserCredentialsEmbed(userId, credentialsEmbedId)

Delete Embedding Credential

Embed login information for the specified user.

Example

var LookerApi31Reference = require('looker-node-api');

var apiInstance = new LookerApi31Reference.UserApi();

var userId = 789; // Number | id of user

var credentialsEmbedId = 789; // Number | id of Embedding Credential


var callback = function(error, data, response) {
  if (error) {
    console.error(error);
  } else {
    console.log('API called successfully. Returned data: ' + data);
  }
};
apiInstance.deleteUserCredentialsEmbed(userId, credentialsEmbedId, callback);

Parameters

Name Type Description Notes
userId Number id of user
credentialsEmbedId Number id of Embedding Credential

Return type

'String'

Authorization

No authorization required

HTTP request headers

  • Content-Type: application/json
  • Accept: application/json

deleteUserCredentialsGoogle

'String' deleteUserCredentialsGoogle(userId)

Delete Google Auth Credential

Google authentication login information for the specified user.

Example

var LookerApi31Reference = require('looker-node-api');

var apiInstance = new LookerApi31Reference.UserApi();

var userId = 789; // Number | id of user


var callback = function(error, data, response) {
  if (error) {
    console.error(error);
  } else {
    console.log('API called successfully. Returned data: ' + data);
  }
};
apiInstance.deleteUserCredentialsGoogle(userId, callback);

Parameters

Name Type Description Notes
userId Number id of user

Return type

'String'

Authorization

No authorization required

HTTP request headers

  • Content-Type: application/json
  • Accept: application/json

deleteUserCredentialsLdap

'String' deleteUserCredentialsLdap(userId)

Delete LDAP Credential

LDAP login information for the specified user.

Example

var LookerApi31Reference = require('looker-node-api');

var apiInstance = new LookerApi31Reference.UserApi();

var userId = 789; // Number | id of user


var callback = function(error, data, response) {
  if (error) {
    console.error(error);
  } else {
    console.log('API called successfully. Returned data: ' + data);
  }
};
apiInstance.deleteUserCredentialsLdap(userId, callback);

Parameters

Name Type Description Notes
userId Number id of user

Return type

'String'

Authorization

No authorization required

HTTP request headers

  • Content-Type: application/json
  • Accept: application/json

deleteUserCredentialsLookerOpenid

'String' deleteUserCredentialsLookerOpenid(userId)

Delete Looker OpenId Credential

Looker Openid login information for the specified user. Used by Looker Analysts.

Example

var LookerApi31Reference = require('looker-node-api');

var apiInstance = new LookerApi31Reference.UserApi();

var userId = 789; // Number | id of user


var callback = function(error, data, response) {
  if (error) {
    console.error(error);
  } else {
    console.log('API called successfully. Returned data: ' + data);
  }
};
apiInstance.deleteUserCredentialsLookerOpenid(userId, callback);

Parameters

Name Type Description Notes
userId Number id of user

Return type

'String'

Authorization

No authorization required

HTTP request headers

  • Content-Type: application/json
  • Accept: application/json

deleteUserCredentialsOidc

'String' deleteUserCredentialsOidc(userId)

Delete OIDC Auth Credential

OpenID Connect (OIDC) authentication login information for the specified user.

Example

var LookerApi31Reference = require('looker-node-api');

var apiInstance = new LookerApi31Reference.UserApi();

var userId = 789; // Number | id of user


var callback = function(error, data, response) {
  if (error) {
    console.error(error);
  } else {
    console.log('API called successfully. Returned data: ' + data);
  }
};
apiInstance.deleteUserCredentialsOidc(userId, callback);

Parameters

Name Type Description Notes
userId Number id of user

Return type

'String'

Authorization

No authorization required

HTTP request headers

  • Content-Type: application/json
  • Accept: application/json

deleteUserCredentialsSaml

'String' deleteUserCredentialsSaml(userId)

Delete Saml Auth Credential

Saml authentication login information for the specified user.

Example

var LookerApi31Reference = require('looker-node-api');

var apiInstance = new LookerApi31Reference.UserApi();

var userId = 789; // Number | id of user


var callback = function(error, data, response) {
  if (error) {
    console.error(error);
  } else {
    console.log('API called successfully. Returned data: ' + data);
  }
};
apiInstance.deleteUserCredentialsSaml(userId, callback);

Parameters

Name Type Description Notes
userId Number id of user

Return type

'String'

Authorization

No authorization required

HTTP request headers

  • Content-Type: application/json
  • Accept: application/json

deleteUserCredentialsTotp

'String' deleteUserCredentialsTotp(userId)

Delete Two-Factor Credential

Two-factor login information for the specified user.

Example

var LookerApi31Reference = require('looker-node-api');

var apiInstance = new LookerApi31Reference.UserApi();

var userId = 789; // Number | id of user


var callback = function(error, data, response) {
  if (error) {
    console.error(error);
  } else {
    console.log('API called successfully. Returned data: ' + data);
  }
};
apiInstance.deleteUserCredentialsTotp(userId, callback);

Parameters

Name Type Description Notes
userId Number id of user

Return type

'String'

Authorization

No authorization required

HTTP request headers

  • Content-Type: application/json
  • Accept: application/json

deleteUserSession

'String' deleteUserSession(userId, sessionId)

Delete Web Login Session

Web login session for the specified user.

Example

var LookerApi31Reference = require('looker-node-api');

var apiInstance = new LookerApi31Reference.UserApi();

var userId = 789; // Number | id of user

var sessionId = 789; // Number | id of Web Login Session


var callback = function(error, data, response) {
  if (error) {
    console.error(error);
  } else {
    console.log('API called successfully. Returned data: ' + data);
  }
};
apiInstance.deleteUserSession(userId, sessionId, callback);

Parameters

Name Type Description Notes
userId Number id of user
sessionId Number id of Web Login Session

Return type

'String'

Authorization

No authorization required

HTTP request headers

  • Content-Type: application/json
  • Accept: application/json

me

User me(opts)

Get Current User

Get information about the current user; i.e. the user account currently calling the API.

Example

var LookerApi31Reference = require('looker-node-api');

var apiInstance = new LookerApi31Reference.UserApi();

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);
  }
};
apiInstance.me(opts, callback);

Parameters

Name Type Description Notes
fields String Requested fields. [optional]

Return type

User

Authorization

No authorization required

HTTP request headers

  • Content-Type: application/json
  • Accept: application/json

searchUsers

[User] searchUsers(opts)

Search Users

Search users Returns all<sup></sup> user records that match the given search criteria. If multiple search params are given and `filter_or` is FALSE or not specified, search params are combined in a logical AND operation. Only rows that match all search param criteria will be returned. If `filter_or` is TRUE, multiple search params are combined in a logical OR operation. Results will include rows that match any of the search criteria. String search params use case-insensitive matching. String search params can contain `%` and '_' as SQL LIKE pattern match wildcard expressions. example=&quot;dan%&quot; will match &quot;danger&quot; and &quot;Danzig&quot; but not &quot;David&quot; example=&quot;D_m%&quot; will match &quot;Damage&quot; and &quot;dump&quot; Integer search params can accept a single value or a comma separated list of values. The multiple values will be combined under a logical OR operation - results will match at least one of the given values. Most search params can accept &quot;IS NULL&quot; and &quot;NOT NULL&quot; as special expressions to match or exclude (respectively) rows where the column is null. Boolean search params accept only &quot;true&quot; and &quot;false&quot; as values. (<sup></sup>) Results are always filtered to the level of information the caller is permitted to view. Looker admins can see all user details; normal users in an open system can see names of other users but no details; normal users in a closed system can only see names of other users who are members of the same group as the user.

Example

var LookerApi31Reference = require('looker-node-api');

var apiInstance = new LookerApi31Reference.UserApi();

var opts = {
  'fields': "fields_example", // String | Include only these fields in the response
  'page': 789, // Number | Return only page N of paginated results
  'perPage': 789, // Number | Return N rows of data per page
  'sorts': "sorts_example", // String | Fields to sort by.
  'id': 789, // Number | Match User Id.
  'firstName': "firstName_example", // String | Match First name.
  'lastName': "lastName_example", // String | Match Last name.
  'verifiedLookerEmployee': true, // Boolean | Search for user accounts associated with Looker employees
  'email': "email_example", // String | Search for the user with this email address
  'isDisabled': true, // Boolean | Search for disabled user accounts
  'filterOr': true, // Boolean | Combine given search criteria in a boolean OR expression
  'contentMetadataId': 789, // Number | Search for users who have access to this content_metadata item
  'groupId': 789 // Number | Search for users who are direct members of this group
};

var callback = function(error, data, response) {
  if (error) {
    console.error(error);
  } else {
    console.log('API called successfully. Returned data: ' + data);
  }
};
apiInstance.searchUsers(opts, callback);

Parameters

Name Type Description Notes
fields String Include only these fields in the response [optional]
page Number Return only page N of paginated results [optional]
perPage Number Return N rows of data per page [optional]
sorts String Fields to sort by. [optional]
id Number Match User Id. [optional]
firstName String Match First name. [optional]
lastName String Match Last name. [optional]
verifiedLookerEmployee Boolean Search for user accounts associated with Looker employees [optional]
email String Search for the user with this email address [optional]
isDisabled Boolean Search for disabled user accounts [optional]
filterOr Boolean Combine given search criteria in a boolean OR expression [optional]
contentMetadataId Number Search for users who have access to this content_metadata item [optional]
groupId Number Search for users who are direct members of this group [optional]

Return type

[User]

Authorization

No authorization required

HTTP request headers

  • Content-Type: application/json
  • Accept: application/json

searchUsersNames

[User] searchUsersNames(pattern, opts)

Search User Names

Search for user accounts by name Returns all user accounts where `first_name` OR `last_name` OR `email` field values match a pattern. The pattern can contain `%` and `_` wildcards as in SQL LIKE expressions. Any additional search params will be combined into a logical AND expression.

Example

var LookerApi31Reference = require('looker-node-api');

var apiInstance = new LookerApi31Reference.UserApi();

var pattern = "pattern_example"; // String | Pattern to match

var opts = {
  'fields': "fields_example", // String | Include only these fields in the response
  'page': 789, // Number | Return only page N of paginated results
  'perPage': 789, // Number | Return N rows of data per page
  'sorts': "sorts_example", // String | Fields to sort by
  'id': 789, // Number | Match User Id
  'firstName': "firstName_example", // String | Match First name
  'lastName': "lastName_example", // String | Match Last name
  'verifiedLookerEmployee': true, // Boolean | Match Verified Looker employee
  'email': "email_example", // String | Match Email Address
  'isDisabled': true // Boolean | Include or exclude disabled accounts in the results
};

var callback = function(error, data, response) {
  if (error) {
    console.error(error);
  } else {
    console.log('API called successfully. Returned data: ' + data);
  }
};
apiInstance.searchUsersNames(pattern, opts, callback);

Parameters

Name Type Description Notes
pattern String Pattern to match
fields String Include only these fields in the response [optional]
page Number Return only page N of paginated results [optional]
perPage Number Return N rows of data per page [optional]
sorts String Fields to sort by [optional]
id Number Match User Id [optional]
firstName String Match First name [optional]
lastName String Match Last name [optional]
verifiedLookerEmployee Boolean Match Verified Looker employee [optional]
email String Match Email Address [optional]
isDisabled Boolean Include or exclude disabled accounts in the results [optional]

Return type

[User]

Authorization

No authorization required

HTTP request headers

  • Content-Type: application/json
  • Accept: application/json

setUserAttributeUserValue

UserAttributeWithValue setUserAttributeUserValue(userId, userAttributeId, body)

Set User Attribute User Value

Store a custom value for a user attribute in a user's account settings. Per-user user attribute values take precedence over group or default values.

Example

var LookerApi31Reference = require('looker-node-api');

var apiInstance = new LookerApi31Reference.UserApi();

var userId = 789; // Number | Id of user

var userAttributeId = 789; // Number | Id of user attribute

var body = new LookerApi31Reference.UserAttributeWithValue(); // UserAttributeWithValue | New attribute value for user.


var callback = function(error, data, response) {
  if (error) {
    console.error(error);
  } else {
    console.log('API called successfully. Returned data: ' + data);
  }
};
apiInstance.setUserAttributeUserValue(userId, userAttributeId, body, callback);

Parameters

Name Type Description Notes
userId Number Id of user
userAttributeId Number Id of user attribute
body UserAttributeWithValue New attribute value for user.

Return type

UserAttributeWithValue

Authorization

No authorization required

HTTP request headers

  • Content-Type: application/json
  • Accept: application/json

setUserRoles

[Role] setUserRoles(userId, body, opts)

Set User Roles

Set roles of the user with a specific id.

Example

var LookerApi31Reference = require('looker-node-api');

var apiInstance = new LookerApi31Reference.UserApi();

var userId = 789; // Number | id of user

var body = [new LookerApi31Reference.[Number]()]; // [Number] | array of roles ids for user

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);
  }
};
apiInstance.setUserRoles(userId, body, opts, callback);

Parameters

Name Type Description Notes
userId Number id of user
body [Number] array of roles ids for user
fields String Requested fields. [optional]

Return type

[Role]

Authorization

No authorization required

HTTP request headers

  • Content-Type: application/json
  • Accept: application/json

updateUser

User updateUser(userId, body, opts)

Update User

Update information about the user with a specific id.

Example

var LookerApi31Reference = require('looker-node-api');

var apiInstance = new LookerApi31Reference.UserApi();

var userId = 789; // Number | Id of user

var body = new LookerApi31Reference.User(); // User | User

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);
  }
};
apiInstance.updateUser(userId, body, opts, callback);

Parameters

Name Type Description Notes
userId Number Id of user
body User User
fields String Requested fields. [optional]

Return type

User

Authorization

No authorization required

HTTP request headers

  • Content-Type: application/json
  • Accept: application/json

updateUserCredentialsEmail

CredentialsEmail updateUserCredentialsEmail(userId, body, opts)

Update Email/Password Credential

Email/password login information for the specified user.

Example

var LookerApi31Reference = require('looker-node-api');

var apiInstance = new LookerApi31Reference.UserApi();

var userId = 789; // Number | id of user

var body = new LookerApi31Reference.CredentialsEmail(); // CredentialsEmail | Email/Password Credential

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);
  }
};
apiInstance.updateUserCredentialsEmail(userId, body, opts, callback);

Parameters

Name Type Description Notes
userId Number id of user
body CredentialsEmail Email/Password Credential
fields String Requested fields. [optional]

Return type

CredentialsEmail

Authorization

No authorization required

HTTP request headers

  • Content-Type: application/json
  • Accept: application/json

user

User user(userId, opts)

Get User by Id

Get information about the user with a specific id. If the caller is an admin or the caller is the user being specified, then full user information will be returned. Otherwise, a minimal 'public' variant of the user information will be returned. This contains The user name and avatar url, but no sensitive information.

Example

var LookerApi31Reference = require('looker-node-api');

var apiInstance = new LookerApi31Reference.UserApi();

var userId = 789; // Number | Id of user

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);
  }
};
apiInstance.user(userId, opts, callback);

Parameters

Name Type Description Notes
userId Number Id of user
fields String Requested fields. [optional]

Return type

User

Authorization

No authorization required

HTTP request headers

  • Content-Type: application/json
  • Accept: application/json

userAttributeUserValues

[UserAttributeWithValue] userAttributeUserValues(userId, opts)

Get User Attribute Values

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 1. in groups that the user is a member of 1. 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.

Example

var LookerApi31Reference = require('looker-node-api');

var apiInstance = new LookerApi31Reference.UserApi();

var userId = 789; // Number | Id of user

var opts = {
  'fields': "fields_example", // String | Requested fields.
  'userAttributeIds': [3.4], // [Number] | Specific user attributes to request. Omit or leave blank to request all user attributes.
  'allValues': true, // Boolean | If true, returns all values in the search path instead of just the first value found. Useful for debugging group precedence.
  'includeUnset': true // Boolean | If true, returns an empty record for each requested attribute that has no user, group, or default value.
};

var callback = function(error, data, response) {
  if (error) {
    console.error(error);
  } else {
    console.log('API called successfully. Returned data: ' + data);
  }
};
apiInstance.userAttributeUserValues(userId, opts, callback);

Parameters

Name Type Description Notes
userId Number Id of user
fields String Requested fields. [optional]
userAttributeIds [Number] Specific user attributes to request. Omit or leave blank to request all user attributes. [optional]
allValues Boolean If true, returns all values in the search path instead of just the first value found. Useful for debugging group precedence. [optional]
includeUnset Boolean If true, returns an empty record for each requested attribute that has no user, group, or default value. [optional]

Return type

[UserAttributeWithValue]

Authorization

No authorization required

HTTP request headers

  • Content-Type: application/json
  • Accept: application/json

userCredentialsApi3

CredentialsApi3 userCredentialsApi3(userId, credentialsApi3Id, opts)

Get API 3 Credential

API 3 login information for the specified user. This is for the newer API keys that can be added for any user.

Example

var LookerApi31Reference = require('looker-node-api');

var apiInstance = new LookerApi31Reference.UserApi();

var userId = 789; // Number | Id of user

var credentialsApi3Id = 789; // Number | Id of API 3 Credential

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);
  }
};
apiInstance.userCredentialsApi3(userId, credentialsApi3Id, opts, callback);

Parameters

Name Type Description Notes
userId Number Id of user
credentialsApi3Id Number Id of API 3 Credential
fields String Requested fields. [optional]

Return type

CredentialsApi3

Authorization

No authorization required

HTTP request headers

  • Content-Type: application/json
  • Accept: application/json

userCredentialsEmail

CredentialsEmail userCredentialsEmail(userId, opts)

Get Email/Password Credential

Email/password login information for the specified user.

Example

var LookerApi31Reference = require('looker-node-api');

var apiInstance = new LookerApi31Reference.UserApi();

var userId = 789; // Number | id of user

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);
  }
};
apiInstance.userCredentialsEmail(userId, opts, callback);

Parameters

Name Type Description Notes
userId Number id of user
fields String Requested fields. [optional]

Return type

CredentialsEmail

Authorization

No authorization required

HTTP request headers

  • Content-Type: application/json
  • Accept: application/json

userCredentialsEmbed

CredentialsEmbed userCredentialsEmbed(userId, credentialsEmbedId, opts)

Get Embedding Credential

Embed login information for the specified user.

Example

var LookerApi31Reference = require('looker-node-api');

var apiInstance = new LookerApi31Reference.UserApi();

var userId = 789; // Number | Id of user

var credentialsEmbedId = 789; // Number | Id of Embedding Credential

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);
  }
};
apiInstance.userCredentialsEmbed(userId, credentialsEmbedId, opts, callback);

Parameters

Name Type Description Notes
userId Number Id of user
credentialsEmbedId Number Id of Embedding Credential
fields String Requested fields. [optional]

Return type

CredentialsEmbed

Authorization

No authorization required

HTTP request headers

  • Content-Type: application/json
  • Accept: application/json

userCredentialsGoogle

CredentialsGoogle userCredentialsGoogle(userId, opts)

Get Google Auth Credential

Google authentication login information for the specified user.

Example

var LookerApi31Reference = require('looker-node-api');

var apiInstance = new LookerApi31Reference.UserApi();

var userId = 789; // Number | id of user

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);
  }
};
apiInstance.userCredentialsGoogle(userId, opts, callback);

Parameters

Name Type Description Notes
userId Number id of user
fields String Requested fields. [optional]

Return type

CredentialsGoogle

Authorization

No authorization required

HTTP request headers

  • Content-Type: application/json
  • Accept: application/json

userCredentialsLdap

CredentialsLDAP userCredentialsLdap(userId, opts)

Get LDAP Credential

LDAP login information for the specified user.

Example

var LookerApi31Reference = require('looker-node-api');

var apiInstance = new LookerApi31Reference.UserApi();

var userId = 789; // Number | id of user

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);
  }
};
apiInstance.userCredentialsLdap(userId, opts, callback);

Parameters

Name Type Description Notes
userId Number id of user
fields String Requested fields. [optional]

Return type

CredentialsLDAP

Authorization

No authorization required

HTTP request headers

  • Content-Type: application/json
  • Accept: application/json

userCredentialsLookerOpenid

CredentialsLookerOpenid userCredentialsLookerOpenid(userId, opts)

Get Looker OpenId Credential

Looker Openid login information for the specified user. Used by Looker Analysts.

Example

var LookerApi31Reference = require('looker-node-api');

var apiInstance = new LookerApi31Reference.UserApi();

var userId = 789; // Number | id of user

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);
  }
};
apiInstance.userCredentialsLookerOpenid(userId, opts, callback);

Parameters

Name Type Description Notes
userId Number id of user
fields String Requested fields. [optional]

Return type

CredentialsLookerOpenid

Authorization

No authorization required

HTTP request headers

  • Content-Type: application/json
  • Accept: application/json

userCredentialsOidc

CredentialsOIDC userCredentialsOidc(userId, opts)

Get OIDC Auth Credential

OpenID Connect (OIDC) authentication login information for the specified user.

Example

var LookerApi31Reference = require('looker-node-api');

var apiInstance = new LookerApi31Reference.UserApi();

var userId = 789; // Number | id of user

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);
  }
};
apiInstance.userCredentialsOidc(userId, opts, callback);

Parameters

Name Type Description Notes
userId Number id of user
fields String Requested fields. [optional]

Return type

CredentialsOIDC

Authorization

No authorization required

HTTP request headers

  • Content-Type: application/json
  • Accept: application/json

userCredentialsSaml

CredentialsSaml userCredentialsSaml(userId, opts)

Get Saml Auth Credential

Saml authentication login information for the specified user.

Example

var LookerApi31Reference = require('looker-node-api');

var apiInstance = new LookerApi31Reference.UserApi();

var userId = 789; // Number | id of user

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);
  }
};
apiInstance.userCredentialsSaml(userId, opts, callback);

Parameters

Name Type Description Notes
userId Number id of user
fields String Requested fields. [optional]

Return type

CredentialsSaml

Authorization

No authorization required

HTTP request headers

  • Content-Type: application/json
  • Accept: application/json

userCredentialsTotp

CredentialsTotp userCredentialsTotp(userId, opts)

Get Two-Factor Credential

Two-factor login information for the specified user.

Example

var LookerApi31Reference = require('looker-node-api');

var apiInstance = new LookerApi31Reference.UserApi();

var userId = 789; // Number | id of user

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);
  }
};
apiInstance.userCredentialsTotp(userId, opts, callback);

Parameters

Name Type Description Notes
userId Number id of user
fields String Requested fields. [optional]

Return type

CredentialsTotp

Authorization

No authorization required

HTTP request headers

  • Content-Type: application/json
  • Accept: application/json

userForCredential

User userForCredential(credentialType, credentialId, opts)

Get User by Credential Id

Get information about the user with a credential of given type with specific id. This is used to do things like find users by their embed external_user_id. Or, find the user with a given api3 client_id, etc. The 'credential_type' matchs the 'type' name of the various credential types. It must be one of the values listed in the table below. The 'credential_id' is your unique Id for the user and is specific to each type of credential. An example using the Ruby sdk might look like: `sdk.user_for_credential('embed', 'customer-4959425')` This table shows the supported 'Credential Type' strings. The right column is for reference; it shows which field in the given credential type is actually searched when finding a user with the supplied 'credential_id'. | Credential Types | Id Field Matched | | ---------------- | ---------------- | | email | email | | google | google_user_id | | saml | saml_user_id | | oidc | oidc_user_id | | ldap | ldap_id | | api | token | | api3 | client_id | | embed | external_user_id | | looker_openid | email | NOTE: The 'api' credential type was only used with the legacy Looker query API and is no longer supported. The credential type for API you are currently looking at is 'api3'.

Example

var LookerApi31Reference = require('looker-node-api');

var apiInstance = new LookerApi31Reference.UserApi();

var credentialType = "credentialType_example"; // String | Type name of credential

var credentialId = "credentialId_example"; // String | Id of credential

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);
  }
};
apiInstance.userForCredential(credentialType, credentialId, opts, callback);

Parameters

Name Type Description Notes
credentialType String Type name of credential
credentialId String Id of credential
fields String Requested fields. [optional]

Return type

User

Authorization

No authorization required

HTTP request headers

  • Content-Type: application/json
  • Accept: application/json

userRoles

[Role] userRoles(userId, opts)

Get User Roles

Get information about roles of a given user

Example

var LookerApi31Reference = require('looker-node-api');

var apiInstance = new LookerApi31Reference.UserApi();

var userId = 789; // Number | id of user

var opts = {
  'fields': "fields_example", // String | Requested fields.
  'directAssociationOnly': true // Boolean | Get only roles associated directly with the user: exclude those only associated through groups.
};

var callback = function(error, data, response) {
  if (error) {
    console.error(error);
  } else {
    console.log('API called successfully. Returned data: ' + data);
  }
};
apiInstance.userRoles(userId, opts, callback);

Parameters

Name Type Description Notes
userId Number id of user
fields String Requested fields. [optional]
directAssociationOnly Boolean Get only roles associated directly with the user: exclude those only associated through groups. [optional]

Return type

[Role]

Authorization

No authorization required

HTTP request headers

  • Content-Type: application/json
  • Accept: application/json

userSession

Session userSession(userId, sessionId, opts)

Get Web Login Session

Web login session for the specified user.

Example

var LookerApi31Reference = require('looker-node-api');

var apiInstance = new LookerApi31Reference.UserApi();

var userId = 789; // Number | Id of user

var sessionId = 789; // Number | Id of Web Login Session

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);
  }
};
apiInstance.userSession(userId, sessionId, opts, callback);

Parameters

Name Type Description Notes
userId Number Id of user
sessionId Number Id of Web Login Session
fields String Requested fields. [optional]

Return type

Session

Authorization

No authorization required

HTTP request headers

  • Content-Type: application/json
  • Accept: application/json