# Looker API 3.0 Reference
#
# ### Authorization The Looker API uses Looker **API3** credentials for authorization and access control. Looker admins can create API3 credentials on Looker's **Admin/Users** page. Pass API3 credentials to the **/login** endpoint to obtain a temporary access_token. Include that access_token in the Authorization header of Looker API requests. For details, see [Looker API Authorization](https://looker.com/docs/r/api/authorization) ### Client SDKs The Looker API is a RESTful system that should be usable by any programming language capable of making HTTPS requests. Client SDKs for a variety of programming languages can be generated from the Looker API's Swagger JSON metadata to streamline use of the Looker API in your applications. A client SDK for Ruby is available as an example. For more information, see [Looker API Client SDKs](https://looker.com/docs/r/api/client_sdks) ### Try It Out! The 'api-docs' page served by the Looker instance includes 'Try It Out!' buttons for each API method. After logging in with API3 credentials, you can use the \"Try It Out!\" buttons to call the API directly from the documentation page to interactively explore API features and responses. ### Versioning Future releases of Looker will expand this API release-by-release to securely expose more and more of the core power of Looker to API client applications. API endpoints marked as \"beta\" may receive breaking changes without warning. Stable (non-beta) API endpoints should not receive breaking changes in future releases. For more information, see [Looker API Versioning](https://looker.com/docs/r/api/versioning)
#
# OpenAPI spec version: 3.0.0
#
# Generated by: https://github.com/swagger-api/swagger-codegen.git
#' @title User operations
#' @description swagger.User
#'
#' @field path Stores url path of the request.
#' @field apiClient Handles the client-server communication.
#' @field userAgent Set the user agent of the request.
#'
#' @importFrom R6 R6Class
#'
#' @section Methods:
#' \describe{
#'
#' all_user_access_filters Get All Access Filters
#'
#'
#' all_user_credentials_api3s Get All API 3 Credentials
#'
#'
#' all_user_credentials_embeds Get All Embedding Credentials
#'
#'
#' all_user_sessions Get All Web Login Sessions
#'
#'
#' all_users Get All Users
#'
#'
#' create_user Create User
#'
#'
#' create_user_access_filter Create Access Filter
#'
#'
#' create_user_credentials_api Create API Credential
#'
#'
#' create_user_credentials_api3 Create API 3 Credential
#'
#'
#' create_user_credentials_email Create Email/Password Credential
#'
#'
#' create_user_credentials_email_password_reset Create Password Reset Token
#'
#'
#' create_user_credentials_totp Create Two-Factor Credential
#'
#'
#' delete_user Delete User
#'
#'
#' delete_user_access_filter Delete Access Filter
#'
#'
#' delete_user_attribute_user_value Delete User Attribute User Value
#'
#'
#' delete_user_credentials_api Delete API Credential
#'
#'
#' delete_user_credentials_api3 Delete API 3 Credential
#'
#'
#' delete_user_credentials_email Delete Email/Password Credential
#'
#'
#' delete_user_credentials_embed Delete Embedding Credential
#'
#'
#' delete_user_credentials_google Delete Google Auth Credential
#'
#'
#' delete_user_credentials_ldap Delete LDAP Credential
#'
#'
#' delete_user_credentials_looker_openid Delete Looker OpenId Credential
#'
#'
#' delete_user_credentials_oidc Delete OIDC Auth Credential
#'
#'
#' delete_user_credentials_saml Delete Saml Auth Credential
#'
#'
#' delete_user_credentials_totp Delete Two-Factor Credential
#'
#'
#' delete_user_session Delete Web Login Session
#'
#'
#' me Get Current User
#'
#'
#' search_users Search Users
#'
#'
#' search_users_names Search User Names
#'
#'
#' set_user_attribute_user_value Set User Attribute User Value
#'
#'
#' set_user_roles Set User Roles
#'
#'
#' update_user Update User
#'
#'
#' update_user_access_filter Update Access Filter
#'
#'
#' update_user_credentials_email Update Email/Password Credential
#'
#'
#' user Get User by Id
#'
#'
#' user_access_filter Get Access Filter
#'
#'
#' user_attribute_user_values Get User Attribute Values
#'
#'
#' user_credentials_api Get API Credential
#'
#'
#' user_credentials_api3 Get API 3 Credential
#'
#'
#' user_credentials_email Get Email/Password Credential
#'
#'
#' user_credentials_embed Get Embedding Credential
#'
#'
#' user_credentials_google Get Google Auth Credential
#'
#'
#' user_credentials_ldap Get LDAP Credential
#'
#'
#' user_credentials_looker_openid Get Looker OpenId Credential
#'
#'
#' user_credentials_oidc Get OIDC Auth Credential
#'
#'
#' user_credentials_saml Get Saml Auth Credential
#'
#'
#' user_credentials_totp Get Two-Factor Credential
#'
#'
#' user_for_credential Get User by Credential Id
#'
#'
#' user_roles Get User Roles
#'
#'
#' user_session Get Web Login Session
#'
#' }
#'
#' @export
UserApi <- R6::R6Class(
'UserApi',
public = list(
userAgent = "Swagger-Codegen/1.0.0/r",
apiClient = NULL,
initialize = function(apiClient){
if (!missing(apiClient)) {
self$apiClient <- apiClient
}
else {
self$apiClient <- ApiClient$new()
}
},
all_user_access_filters = function(user_id, fields, ...){
args <- list(...)
queryParams <- list()
headerParams <- character()
if (!missing(`fields`)) {
queryParams['fields'] <- fields
}
urlPath <- "/users/{user_id}/access_filters"
if (!missing(`user_id`)) {
urlPath <- gsub(paste0("\\{", "user_id", "\\}"), `user_id`, urlPath)
}
resp <- self$apiClient$callApi(url = paste0(self$apiClient$basePath, urlPath),
method = "GET",
queryParams = queryParams,
headerParams = headerParams,
body = body,
...)
if (httr::status_code(resp) >= 200 && httr::status_code(resp) <= 299) {
returnObject <- AccessFilter$new()
result <- returnObject$fromJSON(httr::content(resp, "text", encoding = "UTF-8"))
Response$new(returnObject, resp)
} else if (httr::status_code(resp) >= 400 && httr::status_code(resp) <= 499) {
Response$new("API client error", resp)
} else if (httr::status_code(resp) >= 500 && httr::status_code(resp) <= 599) {
Response$new("API server error", resp)
}
},
all_user_credentials_api3s = function(user_id, fields, ...){
args <- list(...)
queryParams <- list()
headerParams <- character()
if (!missing(`fields`)) {
queryParams['fields'] <- fields
}
urlPath <- "/users/{user_id}/credentials_api3"
if (!missing(`user_id`)) {
urlPath <- gsub(paste0("\\{", "user_id", "\\}"), `user_id`, urlPath)
}
resp <- self$apiClient$callApi(url = paste0(self$apiClient$basePath, urlPath),
method = "GET",
queryParams = queryParams,
headerParams = headerParams,
body = body,
...)
if (httr::status_code(resp) >= 200 && httr::status_code(resp) <= 299) {
returnObject <- CredentialsApi3$new()
result <- returnObject$fromJSON(httr::content(resp, "text", encoding = "UTF-8"))
Response$new(returnObject, resp)
} else if (httr::status_code(resp) >= 400 && httr::status_code(resp) <= 499) {
Response$new("API client error", resp)
} else if (httr::status_code(resp) >= 500 && httr::status_code(resp) <= 599) {
Response$new("API server error", resp)
}
},
all_user_credentials_embeds = function(user_id, fields, ...){
args <- list(...)
queryParams <- list()
headerParams <- character()
if (!missing(`fields`)) {
queryParams['fields'] <- fields
}
urlPath <- "/users/{user_id}/credentials_embed"
if (!missing(`user_id`)) {
urlPath <- gsub(paste0("\\{", "user_id", "\\}"), `user_id`, urlPath)
}
resp <- self$apiClient$callApi(url = paste0(self$apiClient$basePath, urlPath),
method = "GET",
queryParams = queryParams,
headerParams = headerParams,
body = body,
...)
if (httr::status_code(resp) >= 200 && httr::status_code(resp) <= 299) {
returnObject <- CredentialsEmbed$new()
result <- returnObject$fromJSON(httr::content(resp, "text", encoding = "UTF-8"))
Response$new(returnObject, resp)
} else if (httr::status_code(resp) >= 400 && httr::status_code(resp) <= 499) {
Response$new("API client error", resp)
} else if (httr::status_code(resp) >= 500 && httr::status_code(resp) <= 599) {
Response$new("API server error", resp)
}
},
all_user_sessions = function(user_id, fields, ...){
args <- list(...)
queryParams <- list()
headerParams <- character()
if (!missing(`fields`)) {
queryParams['fields'] <- fields
}
urlPath <- "/users/{user_id}/sessions"
if (!missing(`user_id`)) {
urlPath <- gsub(paste0("\\{", "user_id", "\\}"), `user_id`, urlPath)
}
resp <- self$apiClient$callApi(url = paste0(self$apiClient$basePath, urlPath),
method = "GET",
queryParams = queryParams,
headerParams = headerParams,
body = body,
...)
if (httr::status_code(resp) >= 200 && httr::status_code(resp) <= 299) {
returnObject <- Session$new()
result <- returnObject$fromJSON(httr::content(resp, "text", encoding = "UTF-8"))
Response$new(returnObject, resp)
} else if (httr::status_code(resp) >= 400 && httr::status_code(resp) <= 499) {
Response$new("API client error", resp)
} else if (httr::status_code(resp) >= 500 && httr::status_code(resp) <= 599) {
Response$new("API server error", resp)
}
},
all_users = function(fields, page, per_page, sorts, ids, ...){
args <- list(...)
queryParams <- list()
headerParams <- character()
if (!missing(`fields`)) {
queryParams['fields'] <- fields
}
if (!missing(`page`)) {
queryParams['page'] <- page
}
if (!missing(`per_page`)) {
queryParams['per_page'] <- per_page
}
if (!missing(`sorts`)) {
queryParams['sorts'] <- sorts
}
if (!missing(`ids`)) {
queryParams['ids'] <- ids
}
urlPath <- "/users"
resp <- self$apiClient$callApi(url = paste0(self$apiClient$basePath, urlPath),
method = "GET",
queryParams = queryParams,
headerParams = headerParams,
body = body,
...)
if (httr::status_code(resp) >= 200 && httr::status_code(resp) <= 299) {
returnObject <- User$new()
result <- returnObject$fromJSON(httr::content(resp, "text", encoding = "UTF-8"))
Response$new(returnObject, resp)
} else if (httr::status_code(resp) >= 400 && httr::status_code(resp) <= 499) {
Response$new("API client error", resp)
} else if (httr::status_code(resp) >= 500 && httr::status_code(resp) <= 599) {
Response$new("API server error", resp)
}
},
create_user = function(body, fields, ...){
args <- list(...)
queryParams <- list()
headerParams <- character()
if (!missing(`fields`)) {
queryParams['fields'] <- fields
}
if (!missing(`body`)) {
body <- `body`$toJSONString()
} else {
body <- NULL
}
urlPath <- "/users"
resp <- self$apiClient$callApi(url = paste0(self$apiClient$basePath, urlPath),
method = "POST",
queryParams = queryParams,
headerParams = headerParams,
body = body,
...)
if (httr::status_code(resp) >= 200 && httr::status_code(resp) <= 299) {
returnObject <- User$new()
result <- returnObject$fromJSON(httr::content(resp, "text", encoding = "UTF-8"))
Response$new(returnObject, resp)
} else if (httr::status_code(resp) >= 400 && httr::status_code(resp) <= 499) {
Response$new("API client error", resp)
} else if (httr::status_code(resp) >= 500 && httr::status_code(resp) <= 599) {
Response$new("API server error", resp)
}
},
create_user_access_filter = function(user_id, body, fields, ...){
args <- list(...)
queryParams <- list()
headerParams <- character()
if (!missing(`fields`)) {
queryParams['fields'] <- fields
}
if (!missing(`body`)) {
body <- `body`$toJSONString()
} else {
body <- NULL
}
urlPath <- "/users/{user_id}/access_filters"
if (!missing(`user_id`)) {
urlPath <- gsub(paste0("\\{", "user_id", "\\}"), `user_id`, urlPath)
}
resp <- self$apiClient$callApi(url = paste0(self$apiClient$basePath, urlPath),
method = "POST",
queryParams = queryParams,
headerParams = headerParams,
body = body,
...)
if (httr::status_code(resp) >= 200 && httr::status_code(resp) <= 299) {
returnObject <- AccessFilter$new()
result <- returnObject$fromJSON(httr::content(resp, "text", encoding = "UTF-8"))
Response$new(returnObject, resp)
} else if (httr::status_code(resp) >= 400 && httr::status_code(resp) <= 499) {
Response$new("API client error", resp)
} else if (httr::status_code(resp) >= 500 && httr::status_code(resp) <= 599) {
Response$new("API server error", resp)
}
},
create_user_credentials_api = function(user_id, body, fields, ...){
args <- list(...)
queryParams <- list()
headerParams <- character()
if (!missing(`fields`)) {
queryParams['fields'] <- fields
}
if (!missing(`body`)) {
body <- `body`$toJSONString()
} else {
body <- NULL
}
urlPath <- "/users/{user_id}/credentials_api"
if (!missing(`user_id`)) {
urlPath <- gsub(paste0("\\{", "user_id", "\\}"), `user_id`, urlPath)
}
resp <- self$apiClient$callApi(url = paste0(self$apiClient$basePath, urlPath),
method = "POST",
queryParams = queryParams,
headerParams = headerParams,
body = body,
...)
if (httr::status_code(resp) >= 200 && httr::status_code(resp) <= 299) {
returnObject <- CredentialsApi$new()
result <- returnObject$fromJSON(httr::content(resp, "text", encoding = "UTF-8"))
Response$new(returnObject, resp)
} else if (httr::status_code(resp) >= 400 && httr::status_code(resp) <= 499) {
Response$new("API client error", resp)
} else if (httr::status_code(resp) >= 500 && httr::status_code(resp) <= 599) {
Response$new("API server error", resp)
}
},
create_user_credentials_api3 = function(user_id, body, fields, ...){
args <- list(...)
queryParams <- list()
headerParams <- character()
if (!missing(`fields`)) {
queryParams['fields'] <- fields
}
if (!missing(`body`)) {
body <- `body`$toJSONString()
} else {
body <- NULL
}
urlPath <- "/users/{user_id}/credentials_api3"
if (!missing(`user_id`)) {
urlPath <- gsub(paste0("\\{", "user_id", "\\}"), `user_id`, urlPath)
}
resp <- self$apiClient$callApi(url = paste0(self$apiClient$basePath, urlPath),
method = "POST",
queryParams = queryParams,
headerParams = headerParams,
body = body,
...)
if (httr::status_code(resp) >= 200 && httr::status_code(resp) <= 299) {
returnObject <- CredentialsApi3$new()
result <- returnObject$fromJSON(httr::content(resp, "text", encoding = "UTF-8"))
Response$new(returnObject, resp)
} else if (httr::status_code(resp) >= 400 && httr::status_code(resp) <= 499) {
Response$new("API client error", resp)
} else if (httr::status_code(resp) >= 500 && httr::status_code(resp) <= 599) {
Response$new("API server error", resp)
}
},
create_user_credentials_email = function(user_id, body, fields, ...){
args <- list(...)
queryParams <- list()
headerParams <- character()
if (!missing(`fields`)) {
queryParams['fields'] <- fields
}
if (!missing(`body`)) {
body <- `body`$toJSONString()
} else {
body <- NULL
}
urlPath <- "/users/{user_id}/credentials_email"
if (!missing(`user_id`)) {
urlPath <- gsub(paste0("\\{", "user_id", "\\}"), `user_id`, urlPath)
}
resp <- self$apiClient$callApi(url = paste0(self$apiClient$basePath, urlPath),
method = "POST",
queryParams = queryParams,
headerParams = headerParams,
body = body,
...)
if (httr::status_code(resp) >= 200 && httr::status_code(resp) <= 299) {
returnObject <- CredentialsEmail$new()
result <- returnObject$fromJSON(httr::content(resp, "text", encoding = "UTF-8"))
Response$new(returnObject, resp)
} else if (httr::status_code(resp) >= 400 && httr::status_code(resp) <= 499) {
Response$new("API client error", resp)
} else if (httr::status_code(resp) >= 500 && httr::status_code(resp) <= 599) {
Response$new("API server error", resp)
}
},
create_user_credentials_email_password_reset = function(user_id, expires, fields, ...){
args <- list(...)
queryParams <- list()
headerParams <- character()
if (!missing(`expires`)) {
queryParams['expires'] <- expires
}
if (!missing(`fields`)) {
queryParams['fields'] <- fields
}
urlPath <- "/users/{user_id}/credentials_email/password_reset"
if (!missing(`user_id`)) {
urlPath <- gsub(paste0("\\{", "user_id", "\\}"), `user_id`, urlPath)
}
resp <- self$apiClient$callApi(url = paste0(self$apiClient$basePath, urlPath),
method = "POST",
queryParams = queryParams,
headerParams = headerParams,
body = body,
...)
if (httr::status_code(resp) >= 200 && httr::status_code(resp) <= 299) {
returnObject <- CredentialsEmail$new()
result <- returnObject$fromJSON(httr::content(resp, "text", encoding = "UTF-8"))
Response$new(returnObject, resp)
} else if (httr::status_code(resp) >= 400 && httr::status_code(resp) <= 499) {
Response$new("API client error", resp)
} else if (httr::status_code(resp) >= 500 && httr::status_code(resp) <= 599) {
Response$new("API server error", resp)
}
},
create_user_credentials_totp = function(user_id, body, fields, ...){
args <- list(...)
queryParams <- list()
headerParams <- character()
if (!missing(`fields`)) {
queryParams['fields'] <- fields
}
if (!missing(`body`)) {
body <- `body`$toJSONString()
} else {
body <- NULL
}
urlPath <- "/users/{user_id}/credentials_totp"
if (!missing(`user_id`)) {
urlPath <- gsub(paste0("\\{", "user_id", "\\}"), `user_id`, urlPath)
}
resp <- self$apiClient$callApi(url = paste0(self$apiClient$basePath, urlPath),
method = "POST",
queryParams = queryParams,
headerParams = headerParams,
body = body,
...)
if (httr::status_code(resp) >= 200 && httr::status_code(resp) <= 299) {
returnObject <- CredentialsTotp$new()
result <- returnObject$fromJSON(httr::content(resp, "text", encoding = "UTF-8"))
Response$new(returnObject, resp)
} else if (httr::status_code(resp) >= 400 && httr::status_code(resp) <= 499) {
Response$new("API client error", resp)
} else if (httr::status_code(resp) >= 500 && httr::status_code(resp) <= 599) {
Response$new("API server error", resp)
}
},
delete_user = function(user_id, ...){
args <- list(...)
queryParams <- list()
headerParams <- character()
urlPath <- "/users/{user_id}"
if (!missing(`user_id`)) {
urlPath <- gsub(paste0("\\{", "user_id", "\\}"), `user_id`, urlPath)
}
resp <- self$apiClient$callApi(url = paste0(self$apiClient$basePath, urlPath),
method = "DELETE",
queryParams = queryParams,
headerParams = headerParams,
body = body,
...)
if (httr::status_code(resp) >= 200 && httr::status_code(resp) <= 299) {
returnObject <- Character$new()
result <- returnObject$fromJSON(httr::content(resp, "text", encoding = "UTF-8"))
Response$new(returnObject, resp)
} else if (httr::status_code(resp) >= 400 && httr::status_code(resp) <= 499) {
Response$new("API client error", resp)
} else if (httr::status_code(resp) >= 500 && httr::status_code(resp) <= 599) {
Response$new("API server error", resp)
}
},
delete_user_access_filter = function(user_id, access_filter_id, ...){
args <- list(...)
queryParams <- list()
headerParams <- character()
urlPath <- "/users/{user_id}/access_filters/{access_filter_id}"
if (!missing(`user_id`)) {
urlPath <- gsub(paste0("\\{", "user_id", "\\}"), `user_id`, urlPath)
}
if (!missing(`access_filter_id`)) {
urlPath <- gsub(paste0("\\{", "access_filter_id", "\\}"), `access_filter_id`, urlPath)
}
resp <- self$apiClient$callApi(url = paste0(self$apiClient$basePath, urlPath),
method = "DELETE",
queryParams = queryParams,
headerParams = headerParams,
body = body,
...)
if (httr::status_code(resp) >= 200 && httr::status_code(resp) <= 299) {
returnObject <- Character$new()
result <- returnObject$fromJSON(httr::content(resp, "text", encoding = "UTF-8"))
Response$new(returnObject, resp)
} else if (httr::status_code(resp) >= 400 && httr::status_code(resp) <= 499) {
Response$new("API client error", resp)
} else if (httr::status_code(resp) >= 500 && httr::status_code(resp) <= 599) {
Response$new("API server error", resp)
}
},
delete_user_attribute_user_value = function(user_id, user_attribute_id, ...){
args <- list(...)
queryParams <- list()
headerParams <- character()
urlPath <- "/users/{user_id}/attribute_values/{user_attribute_id}"
if (!missing(`user_id`)) {
urlPath <- gsub(paste0("\\{", "user_id", "\\}"), `user_id`, urlPath)
}
if (!missing(`user_attribute_id`)) {
urlPath <- gsub(paste0("\\{", "user_attribute_id", "\\}"), `user_attribute_id`, urlPath)
}
resp <- self$apiClient$callApi(url = paste0(self$apiClient$basePath, urlPath),
method = "DELETE",
queryParams = queryParams,
headerParams = headerParams,
body = body,
...)
if (httr::status_code(resp) >= 200 && httr::status_code(resp) <= 299) {
# void response, no need to return anything
} else if (httr::status_code(resp) >= 400 && httr::status_code(resp) <= 499) {
Response$new("API client error", resp)
} else if (httr::status_code(resp) >= 500 && httr::status_code(resp) <= 599) {
Response$new("API server error", resp)
}
},
delete_user_credentials_api = function(user_id, ...){
args <- list(...)
queryParams <- list()
headerParams <- character()
urlPath <- "/users/{user_id}/credentials_api"
if (!missing(`user_id`)) {
urlPath <- gsub(paste0("\\{", "user_id", "\\}"), `user_id`, urlPath)
}
resp <- self$apiClient$callApi(url = paste0(self$apiClient$basePath, urlPath),
method = "DELETE",
queryParams = queryParams,
headerParams = headerParams,
body = body,
...)
if (httr::status_code(resp) >= 200 && httr::status_code(resp) <= 299) {
returnObject <- Character$new()
result <- returnObject$fromJSON(httr::content(resp, "text", encoding = "UTF-8"))
Response$new(returnObject, resp)
} else if (httr::status_code(resp) >= 400 && httr::status_code(resp) <= 499) {
Response$new("API client error", resp)
} else if (httr::status_code(resp) >= 500 && httr::status_code(resp) <= 599) {
Response$new("API server error", resp)
}
},
delete_user_credentials_api3 = function(user_id, credentials_api3_id, ...){
args <- list(...)
queryParams <- list()
headerParams <- character()
urlPath <- "/users/{user_id}/credentials_api3/{credentials_api3_id}"
if (!missing(`user_id`)) {
urlPath <- gsub(paste0("\\{", "user_id", "\\}"), `user_id`, urlPath)
}
if (!missing(`credentials_api3_id`)) {
urlPath <- gsub(paste0("\\{", "credentials_api3_id", "\\}"), `credentials_api3_id`, urlPath)
}
resp <- self$apiClient$callApi(url = paste0(self$apiClient$basePath, urlPath),
method = "DELETE",
queryParams = queryParams,
headerParams = headerParams,
body = body,
...)
if (httr::status_code(resp) >= 200 && httr::status_code(resp) <= 299) {
returnObject <- Character$new()
result <- returnObject$fromJSON(httr::content(resp, "text", encoding = "UTF-8"))
Response$new(returnObject, resp)
} else if (httr::status_code(resp) >= 400 && httr::status_code(resp) <= 499) {
Response$new("API client error", resp)
} else if (httr::status_code(resp) >= 500 && httr::status_code(resp) <= 599) {
Response$new("API server error", resp)
}
},
delete_user_credentials_email = function(user_id, ...){
args <- list(...)
queryParams <- list()
headerParams <- character()
urlPath <- "/users/{user_id}/credentials_email"
if (!missing(`user_id`)) {
urlPath <- gsub(paste0("\\{", "user_id", "\\}"), `user_id`, urlPath)
}
resp <- self$apiClient$callApi(url = paste0(self$apiClient$basePath, urlPath),
method = "DELETE",
queryParams = queryParams,
headerParams = headerParams,
body = body,
...)
if (httr::status_code(resp) >= 200 && httr::status_code(resp) <= 299) {
returnObject <- Character$new()
result <- returnObject$fromJSON(httr::content(resp, "text", encoding = "UTF-8"))
Response$new(returnObject, resp)
} else if (httr::status_code(resp) >= 400 && httr::status_code(resp) <= 499) {
Response$new("API client error", resp)
} else if (httr::status_code(resp) >= 500 && httr::status_code(resp) <= 599) {
Response$new("API server error", resp)
}
},
delete_user_credentials_embed = function(user_id, credentials_embed_id, ...){
args <- list(...)
queryParams <- list()
headerParams <- character()
urlPath <- "/users/{user_id}/credentials_embed/{credentials_embed_id}"
if (!missing(`user_id`)) {
urlPath <- gsub(paste0("\\{", "user_id", "\\}"), `user_id`, urlPath)
}
if (!missing(`credentials_embed_id`)) {
urlPath <- gsub(paste0("\\{", "credentials_embed_id", "\\}"), `credentials_embed_id`, urlPath)
}
resp <- self$apiClient$callApi(url = paste0(self$apiClient$basePath, urlPath),
method = "DELETE",
queryParams = queryParams,
headerParams = headerParams,
body = body,
...)
if (httr::status_code(resp) >= 200 && httr::status_code(resp) <= 299) {
returnObject <- Character$new()
result <- returnObject$fromJSON(httr::content(resp, "text", encoding = "UTF-8"))
Response$new(returnObject, resp)
} else if (httr::status_code(resp) >= 400 && httr::status_code(resp) <= 499) {
Response$new("API client error", resp)
} else if (httr::status_code(resp) >= 500 && httr::status_code(resp) <= 599) {
Response$new("API server error", resp)
}
},
delete_user_credentials_google = function(user_id, ...){
args <- list(...)
queryParams <- list()
headerParams <- character()
urlPath <- "/users/{user_id}/credentials_google"
if (!missing(`user_id`)) {
urlPath <- gsub(paste0("\\{", "user_id", "\\}"), `user_id`, urlPath)
}
resp <- self$apiClient$callApi(url = paste0(self$apiClient$basePath, urlPath),
method = "DELETE",
queryParams = queryParams,
headerParams = headerParams,
body = body,
...)
if (httr::status_code(resp) >= 200 && httr::status_code(resp) <= 299) {
returnObject <- Character$new()
result <- returnObject$fromJSON(httr::content(resp, "text", encoding = "UTF-8"))
Response$new(returnObject, resp)
} else if (httr::status_code(resp) >= 400 && httr::status_code(resp) <= 499) {
Response$new("API client error", resp)
} else if (httr::status_code(resp) >= 500 && httr::status_code(resp) <= 599) {
Response$new("API server error", resp)
}
},
delete_user_credentials_ldap = function(user_id, ...){
args <- list(...)
queryParams <- list()
headerParams <- character()
urlPath <- "/users/{user_id}/credentials_ldap"
if (!missing(`user_id`)) {
urlPath <- gsub(paste0("\\{", "user_id", "\\}"), `user_id`, urlPath)
}
resp <- self$apiClient$callApi(url = paste0(self$apiClient$basePath, urlPath),
method = "DELETE",
queryParams = queryParams,
headerParams = headerParams,
body = body,
...)
if (httr::status_code(resp) >= 200 && httr::status_code(resp) <= 299) {
returnObject <- Character$new()
result <- returnObject$fromJSON(httr::content(resp, "text", encoding = "UTF-8"))
Response$new(returnObject, resp)
} else if (httr::status_code(resp) >= 400 && httr::status_code(resp) <= 499) {
Response$new("API client error", resp)
} else if (httr::status_code(resp) >= 500 && httr::status_code(resp) <= 599) {
Response$new("API server error", resp)
}
},
delete_user_credentials_looker_openid = function(user_id, ...){
args <- list(...)
queryParams <- list()
headerParams <- character()
urlPath <- "/users/{user_id}/credentials_looker_openid"
if (!missing(`user_id`)) {
urlPath <- gsub(paste0("\\{", "user_id", "\\}"), `user_id`, urlPath)
}
resp <- self$apiClient$callApi(url = paste0(self$apiClient$basePath, urlPath),
method = "DELETE",
queryParams = queryParams,
headerParams = headerParams,
body = body,
...)
if (httr::status_code(resp) >= 200 && httr::status_code(resp) <= 299) {
returnObject <- Character$new()
result <- returnObject$fromJSON(httr::content(resp, "text", encoding = "UTF-8"))
Response$new(returnObject, resp)
} else if (httr::status_code(resp) >= 400 && httr::status_code(resp) <= 499) {
Response$new("API client error", resp)
} else if (httr::status_code(resp) >= 500 && httr::status_code(resp) <= 599) {
Response$new("API server error", resp)
}
},
delete_user_credentials_oidc = function(user_id, ...){
args <- list(...)
queryParams <- list()
headerParams <- character()
urlPath <- "/users/{user_id}/credentials_oidc"
if (!missing(`user_id`)) {
urlPath <- gsub(paste0("\\{", "user_id", "\\}"), `user_id`, urlPath)
}
resp <- self$apiClient$callApi(url = paste0(self$apiClient$basePath, urlPath),
method = "DELETE",
queryParams = queryParams,
headerParams = headerParams,
body = body,
...)
if (httr::status_code(resp) >= 200 && httr::status_code(resp) <= 299) {
returnObject <- Character$new()
result <- returnObject$fromJSON(httr::content(resp, "text", encoding = "UTF-8"))
Response$new(returnObject, resp)
} else if (httr::status_code(resp) >= 400 && httr::status_code(resp) <= 499) {
Response$new("API client error", resp)
} else if (httr::status_code(resp) >= 500 && httr::status_code(resp) <= 599) {
Response$new("API server error", resp)
}
},
delete_user_credentials_saml = function(user_id, ...){
args <- list(...)
queryParams <- list()
headerParams <- character()
urlPath <- "/users/{user_id}/credentials_saml"
if (!missing(`user_id`)) {
urlPath <- gsub(paste0("\\{", "user_id", "\\}"), `user_id`, urlPath)
}
resp <- self$apiClient$callApi(url = paste0(self$apiClient$basePath, urlPath),
method = "DELETE",
queryParams = queryParams,
headerParams = headerParams,
body = body,
...)
if (httr::status_code(resp) >= 200 && httr::status_code(resp) <= 299) {
returnObject <- Character$new()
result <- returnObject$fromJSON(httr::content(resp, "text", encoding = "UTF-8"))
Response$new(returnObject, resp)
} else if (httr::status_code(resp) >= 400 && httr::status_code(resp) <= 499) {
Response$new("API client error", resp)
} else if (httr::status_code(resp) >= 500 && httr::status_code(resp) <= 599) {
Response$new("API server error", resp)
}
},
delete_user_credentials_totp = function(user_id, ...){
args <- list(...)
queryParams <- list()
headerParams <- character()
urlPath <- "/users/{user_id}/credentials_totp"
if (!missing(`user_id`)) {
urlPath <- gsub(paste0("\\{", "user_id", "\\}"), `user_id`, urlPath)
}
resp <- self$apiClient$callApi(url = paste0(self$apiClient$basePath, urlPath),
method = "DELETE",
queryParams = queryParams,
headerParams = headerParams,
body = body,
...)
if (httr::status_code(resp) >= 200 && httr::status_code(resp) <= 299) {
returnObject <- Character$new()
result <- returnObject$fromJSON(httr::content(resp, "text", encoding = "UTF-8"))
Response$new(returnObject, resp)
} else if (httr::status_code(resp) >= 400 && httr::status_code(resp) <= 499) {
Response$new("API client error", resp)
} else if (httr::status_code(resp) >= 500 && httr::status_code(resp) <= 599) {
Response$new("API server error", resp)
}
},
delete_user_session = function(user_id, session_id, ...){
args <- list(...)
queryParams <- list()
headerParams <- character()
urlPath <- "/users/{user_id}/sessions/{session_id}"
if (!missing(`user_id`)) {
urlPath <- gsub(paste0("\\{", "user_id", "\\}"), `user_id`, urlPath)
}
if (!missing(`session_id`)) {
urlPath <- gsub(paste0("\\{", "session_id", "\\}"), `session_id`, urlPath)
}
resp <- self$apiClient$callApi(url = paste0(self$apiClient$basePath, urlPath),
method = "DELETE",
queryParams = queryParams,
headerParams = headerParams,
body = body,
...)
if (httr::status_code(resp) >= 200 && httr::status_code(resp) <= 299) {
returnObject <- Character$new()
result <- returnObject$fromJSON(httr::content(resp, "text", encoding = "UTF-8"))
Response$new(returnObject, resp)
} else if (httr::status_code(resp) >= 400 && httr::status_code(resp) <= 499) {
Response$new("API client error", resp)
} else if (httr::status_code(resp) >= 500 && httr::status_code(resp) <= 599) {
Response$new("API server error", resp)
}
},
me = function(fields, ...){
args <- list(...)
queryParams <- list()
headerParams <- character()
if (!missing(`fields`)) {
queryParams['fields'] <- fields
}
urlPath <- "/user"
resp <- self$apiClient$callApi(url = paste0(self$apiClient$basePath, urlPath),
method = "GET",
queryParams = queryParams,
headerParams = headerParams,
body = body,
...)
if (httr::status_code(resp) >= 200 && httr::status_code(resp) <= 299) {
returnObject <- User$new()
result <- returnObject$fromJSON(httr::content(resp, "text", encoding = "UTF-8"))
Response$new(returnObject, resp)
} else if (httr::status_code(resp) >= 400 && httr::status_code(resp) <= 499) {
Response$new("API client error", resp)
} else if (httr::status_code(resp) >= 500 && httr::status_code(resp) <= 599) {
Response$new("API server error", resp)
}
},
search_users = function(fields, page, per_page, sorts, id, first_name, last_name, verified_looker_employee, email, is_disabled, filter_or, content_metadata_id, group_id, ...){
args <- list(...)
queryParams <- list()
headerParams <- character()
if (!missing(`fields`)) {
queryParams['fields'] <- fields
}
if (!missing(`page`)) {
queryParams['page'] <- page
}
if (!missing(`per_page`)) {
queryParams['per_page'] <- per_page
}
if (!missing(`sorts`)) {
queryParams['sorts'] <- sorts
}
if (!missing(`id`)) {
queryParams['id'] <- id
}
if (!missing(`first_name`)) {
queryParams['first_name'] <- first_name
}
if (!missing(`last_name`)) {
queryParams['last_name'] <- last_name
}
if (!missing(`verified_looker_employee`)) {
queryParams['verified_looker_employee'] <- verified_looker_employee
}
if (!missing(`email`)) {
queryParams['email'] <- email
}
if (!missing(`is_disabled`)) {
queryParams['is_disabled'] <- is_disabled
}
if (!missing(`filter_or`)) {
queryParams['filter_or'] <- filter_or
}
if (!missing(`content_metadata_id`)) {
queryParams['content_metadata_id'] <- content_metadata_id
}
if (!missing(`group_id`)) {
queryParams['group_id'] <- group_id
}
urlPath <- "/users/search"
resp <- self$apiClient$callApi(url = paste0(self$apiClient$basePath, urlPath),
method = "GET",
queryParams = queryParams,
headerParams = headerParams,
body = body,
...)
if (httr::status_code(resp) >= 200 && httr::status_code(resp) <= 299) {
returnObject <- User$new()
result <- returnObject$fromJSON(httr::content(resp, "text", encoding = "UTF-8"))
Response$new(returnObject, resp)
} else if (httr::status_code(resp) >= 400 && httr::status_code(resp) <= 499) {
Response$new("API client error", resp)
} else if (httr::status_code(resp) >= 500 && httr::status_code(resp) <= 599) {
Response$new("API server error", resp)
}
},
search_users_names = function(pattern, fields, page, per_page, sorts, id, first_name, last_name, verified_looker_employee, email, is_disabled, ...){
args <- list(...)
queryParams <- list()
headerParams <- character()
if (!missing(`fields`)) {
queryParams['fields'] <- fields
}
if (!missing(`page`)) {
queryParams['page'] <- page
}
if (!missing(`per_page`)) {
queryParams['per_page'] <- per_page
}
if (!missing(`sorts`)) {
queryParams['sorts'] <- sorts
}
if (!missing(`id`)) {
queryParams['id'] <- id
}
if (!missing(`first_name`)) {
queryParams['first_name'] <- first_name
}
if (!missing(`last_name`)) {
queryParams['last_name'] <- last_name
}
if (!missing(`verified_looker_employee`)) {
queryParams['verified_looker_employee'] <- verified_looker_employee
}
if (!missing(`email`)) {
queryParams['email'] <- email
}
if (!missing(`is_disabled`)) {
queryParams['is_disabled'] <- is_disabled
}
urlPath <- "/users/search/names/{pattern}"
if (!missing(`pattern`)) {
urlPath <- gsub(paste0("\\{", "pattern", "\\}"), `pattern`, urlPath)
}
resp <- self$apiClient$callApi(url = paste0(self$apiClient$basePath, urlPath),
method = "GET",
queryParams = queryParams,
headerParams = headerParams,
body = body,
...)
if (httr::status_code(resp) >= 200 && httr::status_code(resp) <= 299) {
returnObject <- User$new()
result <- returnObject$fromJSON(httr::content(resp, "text", encoding = "UTF-8"))
Response$new(returnObject, resp)
} else if (httr::status_code(resp) >= 400 && httr::status_code(resp) <= 499) {
Response$new("API client error", resp)
} else if (httr::status_code(resp) >= 500 && httr::status_code(resp) <= 599) {
Response$new("API server error", resp)
}
},
set_user_attribute_user_value = function(user_id, user_attribute_id, body, ...){
args <- list(...)
queryParams <- list()
headerParams <- character()
if (!missing(`body`)) {
body <- `body`$toJSONString()
} else {
body <- NULL
}
urlPath <- "/users/{user_id}/attribute_values/{user_attribute_id}"
if (!missing(`user_id`)) {
urlPath <- gsub(paste0("\\{", "user_id", "\\}"), `user_id`, urlPath)
}
if (!missing(`user_attribute_id`)) {
urlPath <- gsub(paste0("\\{", "user_attribute_id", "\\}"), `user_attribute_id`, urlPath)
}
resp <- self$apiClient$callApi(url = paste0(self$apiClient$basePath, urlPath),
method = "PATCH",
queryParams = queryParams,
headerParams = headerParams,
body = body,
...)
if (httr::status_code(resp) >= 200 && httr::status_code(resp) <= 299) {
returnObject <- UserAttributeWithValue$new()
result <- returnObject$fromJSON(httr::content(resp, "text", encoding = "UTF-8"))
Response$new(returnObject, resp)
} else if (httr::status_code(resp) >= 400 && httr::status_code(resp) <= 499) {
Response$new("API client error", resp)
} else if (httr::status_code(resp) >= 500 && httr::status_code(resp) <= 599) {
Response$new("API server error", resp)
}
},
set_user_roles = function(user_id, body, fields, ...){
args <- list(...)
queryParams <- list()
headerParams <- character()
if (!missing(`fields`)) {
queryParams['fields'] <- fields
}
if (!missing(`body`)) {
body <- `body`$toJSONString()
} else {
body <- NULL
}
urlPath <- "/users/{user_id}/roles"
if (!missing(`user_id`)) {
urlPath <- gsub(paste0("\\{", "user_id", "\\}"), `user_id`, urlPath)
}
resp <- self$apiClient$callApi(url = paste0(self$apiClient$basePath, urlPath),
method = "PUT",
queryParams = queryParams,
headerParams = headerParams,
body = body,
...)
if (httr::status_code(resp) >= 200 && httr::status_code(resp) <= 299) {
returnObject <- Role$new()
result <- returnObject$fromJSON(httr::content(resp, "text", encoding = "UTF-8"))
Response$new(returnObject, resp)
} else if (httr::status_code(resp) >= 400 && httr::status_code(resp) <= 499) {
Response$new("API client error", resp)
} else if (httr::status_code(resp) >= 500 && httr::status_code(resp) <= 599) {
Response$new("API server error", resp)
}
},
update_user = function(user_id, body, fields, ...){
args <- list(...)
queryParams <- list()
headerParams <- character()
if (!missing(`fields`)) {
queryParams['fields'] <- fields
}
if (!missing(`body`)) {
body <- `body`$toJSONString()
} else {
body <- NULL
}
urlPath <- "/users/{user_id}"
if (!missing(`user_id`)) {
urlPath <- gsub(paste0("\\{", "user_id", "\\}"), `user_id`, urlPath)
}
resp <- self$apiClient$callApi(url = paste0(self$apiClient$basePath, urlPath),
method = "PATCH",
queryParams = queryParams,
headerParams = headerParams,
body = body,
...)
if (httr::status_code(resp) >= 200 && httr::status_code(resp) <= 299) {
returnObject <- User$new()
result <- returnObject$fromJSON(httr::content(resp, "text", encoding = "UTF-8"))
Response$new(returnObject, resp)
} else if (httr::status_code(resp) >= 400 && httr::status_code(resp) <= 499) {
Response$new("API client error", resp)
} else if (httr::status_code(resp) >= 500 && httr::status_code(resp) <= 599) {
Response$new("API server error", resp)
}
},
update_user_access_filter = function(user_id, access_filter_id, body, fields, ...){
args <- list(...)
queryParams <- list()
headerParams <- character()
if (!missing(`fields`)) {
queryParams['fields'] <- fields
}
if (!missing(`body`)) {
body <- `body`$toJSONString()
} else {
body <- NULL
}
urlPath <- "/users/{user_id}/access_filters/{access_filter_id}"
if (!missing(`user_id`)) {
urlPath <- gsub(paste0("\\{", "user_id", "\\}"), `user_id`, urlPath)
}
if (!missing(`access_filter_id`)) {
urlPath <- gsub(paste0("\\{", "access_filter_id", "\\}"), `access_filter_id`, urlPath)
}
resp <- self$apiClient$callApi(url = paste0(self$apiClient$basePath, urlPath),
method = "PATCH",
queryParams = queryParams,
headerParams = headerParams,
body = body,
...)
if (httr::status_code(resp) >= 200 && httr::status_code(resp) <= 299) {
returnObject <- AccessFilter$new()
result <- returnObject$fromJSON(httr::content(resp, "text", encoding = "UTF-8"))
Response$new(returnObject, resp)
} else if (httr::status_code(resp) >= 400 && httr::status_code(resp) <= 499) {
Response$new("API client error", resp)
} else if (httr::status_code(resp) >= 500 && httr::status_code(resp) <= 599) {
Response$new("API server error", resp)
}
},
update_user_credentials_email = function(user_id, body, fields, ...){
args <- list(...)
queryParams <- list()
headerParams <- character()
if (!missing(`fields`)) {
queryParams['fields'] <- fields
}
if (!missing(`body`)) {
body <- `body`$toJSONString()
} else {
body <- NULL
}
urlPath <- "/users/{user_id}/credentials_email"
if (!missing(`user_id`)) {
urlPath <- gsub(paste0("\\{", "user_id", "\\}"), `user_id`, urlPath)
}
resp <- self$apiClient$callApi(url = paste0(self$apiClient$basePath, urlPath),
method = "PATCH",
queryParams = queryParams,
headerParams = headerParams,
body = body,
...)
if (httr::status_code(resp) >= 200 && httr::status_code(resp) <= 299) {
returnObject <- CredentialsEmail$new()
result <- returnObject$fromJSON(httr::content(resp, "text", encoding = "UTF-8"))
Response$new(returnObject, resp)
} else if (httr::status_code(resp) >= 400 && httr::status_code(resp) <= 499) {
Response$new("API client error", resp)
} else if (httr::status_code(resp) >= 500 && httr::status_code(resp) <= 599) {
Response$new("API server error", resp)
}
},
user = function(user_id, fields, ...){
args <- list(...)
queryParams <- list()
headerParams <- character()
if (!missing(`fields`)) {
queryParams['fields'] <- fields
}
urlPath <- "/users/{user_id}"
if (!missing(`user_id`)) {
urlPath <- gsub(paste0("\\{", "user_id", "\\}"), `user_id`, urlPath)
}
resp <- self$apiClient$callApi(url = paste0(self$apiClient$basePath, urlPath),
method = "GET",
queryParams = queryParams,
headerParams = headerParams,
body = body,
...)
if (httr::status_code(resp) >= 200 && httr::status_code(resp) <= 299) {
returnObject <- User$new()
result <- returnObject$fromJSON(httr::content(resp, "text", encoding = "UTF-8"))
Response$new(returnObject, resp)
} else if (httr::status_code(resp) >= 400 && httr::status_code(resp) <= 499) {
Response$new("API client error", resp)
} else if (httr::status_code(resp) >= 500 && httr::status_code(resp) <= 599) {
Response$new("API server error", resp)
}
},
user_access_filter = function(user_id, access_filter_id, fields, ...){
args <- list(...)
queryParams <- list()
headerParams <- character()
if (!missing(`fields`)) {
queryParams['fields'] <- fields
}
urlPath <- "/users/{user_id}/access_filters/{access_filter_id}"
if (!missing(`user_id`)) {
urlPath <- gsub(paste0("\\{", "user_id", "\\}"), `user_id`, urlPath)
}
if (!missing(`access_filter_id`)) {
urlPath <- gsub(paste0("\\{", "access_filter_id", "\\}"), `access_filter_id`, urlPath)
}
resp <- self$apiClient$callApi(url = paste0(self$apiClient$basePath, urlPath),
method = "GET",
queryParams = queryParams,
headerParams = headerParams,
body = body,
...)
if (httr::status_code(resp) >= 200 && httr::status_code(resp) <= 299) {
returnObject <- AccessFilter$new()
result <- returnObject$fromJSON(httr::content(resp, "text", encoding = "UTF-8"))
Response$new(returnObject, resp)
} else if (httr::status_code(resp) >= 400 && httr::status_code(resp) <= 499) {
Response$new("API client error", resp)
} else if (httr::status_code(resp) >= 500 && httr::status_code(resp) <= 599) {
Response$new("API server error", resp)
}
},
user_attribute_user_values = function(user_id, fields, user_attribute_ids, all_values, include_unset, ...){
args <- list(...)
queryParams <- list()
headerParams <- character()
if (!missing(`fields`)) {
queryParams['fields'] <- fields
}
if (!missing(`user_attribute_ids`)) {
queryParams['user_attribute_ids'] <- user_attribute_ids
}
if (!missing(`all_values`)) {
queryParams['all_values'] <- all_values
}
if (!missing(`include_unset`)) {
queryParams['include_unset'] <- include_unset
}
urlPath <- "/users/{user_id}/attribute_values"
if (!missing(`user_id`)) {
urlPath <- gsub(paste0("\\{", "user_id", "\\}"), `user_id`, urlPath)
}
resp <- self$apiClient$callApi(url = paste0(self$apiClient$basePath, urlPath),
method = "GET",
queryParams = queryParams,
headerParams = headerParams,
body = body,
...)
if (httr::status_code(resp) >= 200 && httr::status_code(resp) <= 299) {
returnObject <- UserAttributeWithValue$new()
result <- returnObject$fromJSON(httr::content(resp, "text", encoding = "UTF-8"))
Response$new(returnObject, resp)
} else if (httr::status_code(resp) >= 400 && httr::status_code(resp) <= 499) {
Response$new("API client error", resp)
} else if (httr::status_code(resp) >= 500 && httr::status_code(resp) <= 599) {
Response$new("API server error", resp)
}
},
user_credentials_api = function(user_id, fields, ...){
args <- list(...)
queryParams <- list()
headerParams <- character()
if (!missing(`fields`)) {
queryParams['fields'] <- fields
}
urlPath <- "/users/{user_id}/credentials_api"
if (!missing(`user_id`)) {
urlPath <- gsub(paste0("\\{", "user_id", "\\}"), `user_id`, urlPath)
}
resp <- self$apiClient$callApi(url = paste0(self$apiClient$basePath, urlPath),
method = "GET",
queryParams = queryParams,
headerParams = headerParams,
body = body,
...)
if (httr::status_code(resp) >= 200 && httr::status_code(resp) <= 299) {
returnObject <- CredentialsApi$new()
result <- returnObject$fromJSON(httr::content(resp, "text", encoding = "UTF-8"))
Response$new(returnObject, resp)
} else if (httr::status_code(resp) >= 400 && httr::status_code(resp) <= 499) {
Response$new("API client error", resp)
} else if (httr::status_code(resp) >= 500 && httr::status_code(resp) <= 599) {
Response$new("API server error", resp)
}
},
user_credentials_api3 = function(user_id, credentials_api3_id, fields, ...){
args <- list(...)
queryParams <- list()
headerParams <- character()
if (!missing(`fields`)) {
queryParams['fields'] <- fields
}
urlPath <- "/users/{user_id}/credentials_api3/{credentials_api3_id}"
if (!missing(`user_id`)) {
urlPath <- gsub(paste0("\\{", "user_id", "\\}"), `user_id`, urlPath)
}
if (!missing(`credentials_api3_id`)) {
urlPath <- gsub(paste0("\\{", "credentials_api3_id", "\\}"), `credentials_api3_id`, urlPath)
}
resp <- self$apiClient$callApi(url = paste0(self$apiClient$basePath, urlPath),
method = "GET",
queryParams = queryParams,
headerParams = headerParams,
body = body,
...)
if (httr::status_code(resp) >= 200 && httr::status_code(resp) <= 299) {
returnObject <- CredentialsApi3$new()
result <- returnObject$fromJSON(httr::content(resp, "text", encoding = "UTF-8"))
Response$new(returnObject, resp)
} else if (httr::status_code(resp) >= 400 && httr::status_code(resp) <= 499) {
Response$new("API client error", resp)
} else if (httr::status_code(resp) >= 500 && httr::status_code(resp) <= 599) {
Response$new("API server error", resp)
}
},
user_credentials_email = function(user_id, fields, ...){
args <- list(...)
queryParams <- list()
headerParams <- character()
if (!missing(`fields`)) {
queryParams['fields'] <- fields
}
urlPath <- "/users/{user_id}/credentials_email"
if (!missing(`user_id`)) {
urlPath <- gsub(paste0("\\{", "user_id", "\\}"), `user_id`, urlPath)
}
resp <- self$apiClient$callApi(url = paste0(self$apiClient$basePath, urlPath),
method = "GET",
queryParams = queryParams,
headerParams = headerParams,
body = body,
...)
if (httr::status_code(resp) >= 200 && httr::status_code(resp) <= 299) {
returnObject <- CredentialsEmail$new()
result <- returnObject$fromJSON(httr::content(resp, "text", encoding = "UTF-8"))
Response$new(returnObject, resp)
} else if (httr::status_code(resp) >= 400 && httr::status_code(resp) <= 499) {
Response$new("API client error", resp)
} else if (httr::status_code(resp) >= 500 && httr::status_code(resp) <= 599) {
Response$new("API server error", resp)
}
},
user_credentials_embed = function(user_id, credentials_embed_id, fields, ...){
args <- list(...)
queryParams <- list()
headerParams <- character()
if (!missing(`fields`)) {
queryParams['fields'] <- fields
}
urlPath <- "/users/{user_id}/credentials_embed/{credentials_embed_id}"
if (!missing(`user_id`)) {
urlPath <- gsub(paste0("\\{", "user_id", "\\}"), `user_id`, urlPath)
}
if (!missing(`credentials_embed_id`)) {
urlPath <- gsub(paste0("\\{", "credentials_embed_id", "\\}"), `credentials_embed_id`, urlPath)
}
resp <- self$apiClient$callApi(url = paste0(self$apiClient$basePath, urlPath),
method = "GET",
queryParams = queryParams,
headerParams = headerParams,
body = body,
...)
if (httr::status_code(resp) >= 200 && httr::status_code(resp) <= 299) {
returnObject <- CredentialsEmbed$new()
result <- returnObject$fromJSON(httr::content(resp, "text", encoding = "UTF-8"))
Response$new(returnObject, resp)
} else if (httr::status_code(resp) >= 400 && httr::status_code(resp) <= 499) {
Response$new("API client error", resp)
} else if (httr::status_code(resp) >= 500 && httr::status_code(resp) <= 599) {
Response$new("API server error", resp)
}
},
user_credentials_google = function(user_id, fields, ...){
args <- list(...)
queryParams <- list()
headerParams <- character()
if (!missing(`fields`)) {
queryParams['fields'] <- fields
}
urlPath <- "/users/{user_id}/credentials_google"
if (!missing(`user_id`)) {
urlPath <- gsub(paste0("\\{", "user_id", "\\}"), `user_id`, urlPath)
}
resp <- self$apiClient$callApi(url = paste0(self$apiClient$basePath, urlPath),
method = "GET",
queryParams = queryParams,
headerParams = headerParams,
body = body,
...)
if (httr::status_code(resp) >= 200 && httr::status_code(resp) <= 299) {
returnObject <- CredentialsGoogle$new()
result <- returnObject$fromJSON(httr::content(resp, "text", encoding = "UTF-8"))
Response$new(returnObject, resp)
} else if (httr::status_code(resp) >= 400 && httr::status_code(resp) <= 499) {
Response$new("API client error", resp)
} else if (httr::status_code(resp) >= 500 && httr::status_code(resp) <= 599) {
Response$new("API server error", resp)
}
},
user_credentials_ldap = function(user_id, fields, ...){
args <- list(...)
queryParams <- list()
headerParams <- character()
if (!missing(`fields`)) {
queryParams['fields'] <- fields
}
urlPath <- "/users/{user_id}/credentials_ldap"
if (!missing(`user_id`)) {
urlPath <- gsub(paste0("\\{", "user_id", "\\}"), `user_id`, urlPath)
}
resp <- self$apiClient$callApi(url = paste0(self$apiClient$basePath, urlPath),
method = "GET",
queryParams = queryParams,
headerParams = headerParams,
body = body,
...)
if (httr::status_code(resp) >= 200 && httr::status_code(resp) <= 299) {
returnObject <- CredentialsLDAP$new()
result <- returnObject$fromJSON(httr::content(resp, "text", encoding = "UTF-8"))
Response$new(returnObject, resp)
} else if (httr::status_code(resp) >= 400 && httr::status_code(resp) <= 499) {
Response$new("API client error", resp)
} else if (httr::status_code(resp) >= 500 && httr::status_code(resp) <= 599) {
Response$new("API server error", resp)
}
},
user_credentials_looker_openid = function(user_id, fields, ...){
args <- list(...)
queryParams <- list()
headerParams <- character()
if (!missing(`fields`)) {
queryParams['fields'] <- fields
}
urlPath <- "/users/{user_id}/credentials_looker_openid"
if (!missing(`user_id`)) {
urlPath <- gsub(paste0("\\{", "user_id", "\\}"), `user_id`, urlPath)
}
resp <- self$apiClient$callApi(url = paste0(self$apiClient$basePath, urlPath),
method = "GET",
queryParams = queryParams,
headerParams = headerParams,
body = body,
...)
if (httr::status_code(resp) >= 200 && httr::status_code(resp) <= 299) {
returnObject <- CredentialsLookerOpenid$new()
result <- returnObject$fromJSON(httr::content(resp, "text", encoding = "UTF-8"))
Response$new(returnObject, resp)
} else if (httr::status_code(resp) >= 400 && httr::status_code(resp) <= 499) {
Response$new("API client error", resp)
} else if (httr::status_code(resp) >= 500 && httr::status_code(resp) <= 599) {
Response$new("API server error", resp)
}
},
user_credentials_oidc = function(user_id, fields, ...){
args <- list(...)
queryParams <- list()
headerParams <- character()
if (!missing(`fields`)) {
queryParams['fields'] <- fields
}
urlPath <- "/users/{user_id}/credentials_oidc"
if (!missing(`user_id`)) {
urlPath <- gsub(paste0("\\{", "user_id", "\\}"), `user_id`, urlPath)
}
resp <- self$apiClient$callApi(url = paste0(self$apiClient$basePath, urlPath),
method = "GET",
queryParams = queryParams,
headerParams = headerParams,
body = body,
...)
if (httr::status_code(resp) >= 200 && httr::status_code(resp) <= 299) {
returnObject <- CredentialsOIDC$new()
result <- returnObject$fromJSON(httr::content(resp, "text", encoding = "UTF-8"))
Response$new(returnObject, resp)
} else if (httr::status_code(resp) >= 400 && httr::status_code(resp) <= 499) {
Response$new("API client error", resp)
} else if (httr::status_code(resp) >= 500 && httr::status_code(resp) <= 599) {
Response$new("API server error", resp)
}
},
user_credentials_saml = function(user_id, fields, ...){
args <- list(...)
queryParams <- list()
headerParams <- character()
if (!missing(`fields`)) {
queryParams['fields'] <- fields
}
urlPath <- "/users/{user_id}/credentials_saml"
if (!missing(`user_id`)) {
urlPath <- gsub(paste0("\\{", "user_id", "\\}"), `user_id`, urlPath)
}
resp <- self$apiClient$callApi(url = paste0(self$apiClient$basePath, urlPath),
method = "GET",
queryParams = queryParams,
headerParams = headerParams,
body = body,
...)
if (httr::status_code(resp) >= 200 && httr::status_code(resp) <= 299) {
returnObject <- CredentialsSaml$new()
result <- returnObject$fromJSON(httr::content(resp, "text", encoding = "UTF-8"))
Response$new(returnObject, resp)
} else if (httr::status_code(resp) >= 400 && httr::status_code(resp) <= 499) {
Response$new("API client error", resp)
} else if (httr::status_code(resp) >= 500 && httr::status_code(resp) <= 599) {
Response$new("API server error", resp)
}
},
user_credentials_totp = function(user_id, fields, ...){
args <- list(...)
queryParams <- list()
headerParams <- character()
if (!missing(`fields`)) {
queryParams['fields'] <- fields
}
urlPath <- "/users/{user_id}/credentials_totp"
if (!missing(`user_id`)) {
urlPath <- gsub(paste0("\\{", "user_id", "\\}"), `user_id`, urlPath)
}
resp <- self$apiClient$callApi(url = paste0(self$apiClient$basePath, urlPath),
method = "GET",
queryParams = queryParams,
headerParams = headerParams,
body = body,
...)
if (httr::status_code(resp) >= 200 && httr::status_code(resp) <= 299) {
returnObject <- CredentialsTotp$new()
result <- returnObject$fromJSON(httr::content(resp, "text", encoding = "UTF-8"))
Response$new(returnObject, resp)
} else if (httr::status_code(resp) >= 400 && httr::status_code(resp) <= 499) {
Response$new("API client error", resp)
} else if (httr::status_code(resp) >= 500 && httr::status_code(resp) <= 599) {
Response$new("API server error", resp)
}
},
user_for_credential = function(credential_type, credential_id, fields, ...){
args <- list(...)
queryParams <- list()
headerParams <- character()
if (!missing(`fields`)) {
queryParams['fields'] <- fields
}
urlPath <- "/users/credential/{credential_type}/{credential_id}"
if (!missing(`credential_type`)) {
urlPath <- gsub(paste0("\\{", "credential_type", "\\}"), `credential_type`, urlPath)
}
if (!missing(`credential_id`)) {
urlPath <- gsub(paste0("\\{", "credential_id", "\\}"), `credential_id`, urlPath)
}
resp <- self$apiClient$callApi(url = paste0(self$apiClient$basePath, urlPath),
method = "GET",
queryParams = queryParams,
headerParams = headerParams,
body = body,
...)
if (httr::status_code(resp) >= 200 && httr::status_code(resp) <= 299) {
returnObject <- User$new()
result <- returnObject$fromJSON(httr::content(resp, "text", encoding = "UTF-8"))
Response$new(returnObject, resp)
} else if (httr::status_code(resp) >= 400 && httr::status_code(resp) <= 499) {
Response$new("API client error", resp)
} else if (httr::status_code(resp) >= 500 && httr::status_code(resp) <= 599) {
Response$new("API server error", resp)
}
},
user_roles = function(user_id, fields, direct_association_only, ...){
args <- list(...)
queryParams <- list()
headerParams <- character()
if (!missing(`fields`)) {
queryParams['fields'] <- fields
}
if (!missing(`direct_association_only`)) {
queryParams['direct_association_only'] <- direct_association_only
}
urlPath <- "/users/{user_id}/roles"
if (!missing(`user_id`)) {
urlPath <- gsub(paste0("\\{", "user_id", "\\}"), `user_id`, urlPath)
}
resp <- self$apiClient$callApi(url = paste0(self$apiClient$basePath, urlPath),
method = "GET",
queryParams = queryParams,
headerParams = headerParams,
body = body,
...)
if (httr::status_code(resp) >= 200 && httr::status_code(resp) <= 299) {
returnObject <- Role$new()
result <- returnObject$fromJSON(httr::content(resp, "text", encoding = "UTF-8"))
Response$new(returnObject, resp)
} else if (httr::status_code(resp) >= 400 && httr::status_code(resp) <= 499) {
Response$new("API client error", resp)
} else if (httr::status_code(resp) >= 500 && httr::status_code(resp) <= 599) {
Response$new("API server error", resp)
}
},
user_session = function(user_id, session_id, fields, ...){
args <- list(...)
queryParams <- list()
headerParams <- character()
if (!missing(`fields`)) {
queryParams['fields'] <- fields
}
urlPath <- "/users/{user_id}/sessions/{session_id}"
if (!missing(`user_id`)) {
urlPath <- gsub(paste0("\\{", "user_id", "\\}"), `user_id`, urlPath)
}
if (!missing(`session_id`)) {
urlPath <- gsub(paste0("\\{", "session_id", "\\}"), `session_id`, urlPath)
}
resp <- self$apiClient$callApi(url = paste0(self$apiClient$basePath, urlPath),
method = "GET",
queryParams = queryParams,
headerParams = headerParams,
body = body,
...)
if (httr::status_code(resp) >= 200 && httr::status_code(resp) <= 299) {
returnObject <- Session$new()
result <- returnObject$fromJSON(httr::content(resp, "text", encoding = "UTF-8"))
Response$new(returnObject, resp)
} else if (httr::status_code(resp) >= 400 && httr::status_code(resp) <= 499) {
Response$new("API client error", resp)
} else if (httr::status_code(resp) >= 500 && httr::status_code(resp) <= 599) {
Response$new("API server error", resp)
}
}
)
)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.