Interface IUsersApiClient
Interface for API client user operations.
Inherited Members
Namespace: Tableau.Migration.Api
Assembly: Tableau.Migration.dll
Syntax
public interface IUsersApiClient : IPagedListApiClient<IUser>, IBatchPublishApiClient<IUser>, IApiPageAccessor<IUser>, IContentApiClient, IReadApiClient<IUser>, IPublishApiClient<IUser>, IPublishApiClient<IUser, IUser>
Methods
AddUserAsync(string, string, string?, CancellationToken)
Adds a user.
Declaration
Task<IResult<IAddUserResult>> AddUserAsync(string userName, string siteRole, string? authenticationType, CancellationToken cancel)
Parameters
Type | Name | Description |
---|---|---|
string | userName | The username. In case of Tableau Cloud, the user name is the email address of the user. |
string | siteRole | The site role for the user. |
string | authenticationType | The optional authentication type of the user. |
CancellationToken | cancel | The cancellation token to obey. |
Returns
Type | Description |
---|---|
Task<IResult<IAddUserResult>> |
DeleteUserAsync(Guid, CancellationToken)
Deletes a user.
Declaration
Task<IResult> DeleteUserAsync(Guid userId, CancellationToken cancel)
Parameters
Type | Name | Description |
---|---|---|
Guid | userId | The user's ID. |
CancellationToken | cancel | The cancellation token to obey. |
Returns
Type | Description |
---|---|
Task<IResult> |
GetAllUsersAsync(int, int, CancellationToken)
Gets all users in the current site.
Declaration
Task<IPagedResult<IUser>> GetAllUsersAsync(int pageNumber, int pageSize, CancellationToken cancel)
Parameters
Type | Name | Description |
---|---|---|
int | pageNumber | The 1-indexed page number. |
int | pageSize | The size of the page. |
CancellationToken | cancel | The cancellation token to obey. |
Returns
Type | Description |
---|---|
Task<IPagedResult<IUser>> | A list of a page of users in the current site. |
GetUserGroupsAsync(Guid, int, int, CancellationToken)
Gets the groups belonging to a user.
Declaration
Task<IPagedResult<IGroup>> GetUserGroupsAsync(Guid userId, int pageNumber, int pageSize, CancellationToken cancel)
Parameters
Type | Name | Description |
---|---|---|
Guid | userId | The user's ID. |
int | pageNumber | The 1-indexed page number. |
int | pageSize | The size of the page. |
CancellationToken | cancel | The cancellation token to obey. |
Returns
Type | Description |
---|---|
Task<IPagedResult<IGroup>> | A list of groups for the given user ID |
ImportUsersAsync(IEnumerable<IUser>, Stream, CancellationToken)
Imports users into the current site from a CSV file.
Declaration
Task<IResult<IImportJob>> ImportUsersAsync(IEnumerable<IUser> users, Stream csvStream, CancellationToken cancel)
Parameters
Type | Name | Description |
---|---|---|
IEnumerable<IUser> | users | The users to include in the request payload. |
Stream | csvStream | The in-memory stream containing user data in a csv format. |
CancellationToken | cancel | The cancellation token to obey. |
Returns
Type | Description |
---|---|
Task<IResult<IImportJob>> | The newly created import job. |
UpdateUserAsync(Guid, string, CancellationToken, string?, string?, string?, string?)
Updates the user already present at the destination.
Declaration
Task<IResult<IUpdateUserResult>> UpdateUserAsync(Guid id, string newSiteRole, CancellationToken cancel, string? newfullName = null, string? newEmail = null, string? newPassword = null, string? newAuthSetting = null)
Parameters
Type | Name | Description |
---|---|---|
Guid | id | The Identifier for the user. |
string | newSiteRole | The new Site Role for the user. |
CancellationToken | cancel | The cancellation token to obey. |
string | newfullName | (Optional) The new Full Name for the user. |
string | newEmail | (Optional) The new email address for the user. |
string | newPassword | (Optional) The new password for the user. |
string | newAuthSetting | (Optional) The new email Auth Setting for the user. |
Returns
Type | Description |
---|---|
Task<IResult<IUpdateUserResult>> |