Users

class Users(umami: Umami)

Provides functionalities for interacting with Users in the Umami API.

Parameters

umami

The Umami instance used for making HTTP requests.

Constructors

Link copied to clipboard
constructor(umami: Umami)

Functions

Link copied to clipboard
suspend fun create(username: String, password: String, role: String, id: String? = null): User

Creates a new user.

Link copied to clipboard
suspend fun delete(userId: String)

Deletes a user.

Link copied to clipboard
suspend fun get(userId: String): User

Gets a user by ID.

Link copied to clipboard
suspend fun getTeams(userId: String, page: Int? = null, pageSize: Int? = null): SearchResponse<Team>

Gets all teams that belong to a user.

Link copied to clipboard
suspend fun getWebsites(userId: String, includeTeams: Boolean = false, search: String? = null, page: Int? = null, pageSize: Int? = null): SearchResponse<Website>

Gets all websites that belong to a user.

Link copied to clipboard
suspend fun update(userId: String, username: String? = null, password: String? = null, role: String? = null): User

Updates a user.