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, UserAuthenticationType, CancellationToken)
Adds a user.
Declaration
Task<IResult<IAddUserResult>> AddUserAsync(string userName, string siteRole, UserAuthenticationType authentication, 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. |
UserAuthenticationType | authentication | The authentication type of the user. |
CancellationToken | cancel | The cancellation token to obey. |
Returns
Type | Description |
---|---|
Task<IResult<IAddUserResult>> | The added user information. |
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> | A result indicating success or failure. |
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. |
RetrieveUserSavedCredentialsAsync(Guid, IDestinationSiteInfo, CancellationToken)
Retrieves saved credentials for a specific user.
Declaration
Task<IResult<IEmbeddedCredentialKeychainResult>> RetrieveUserSavedCredentialsAsync(Guid userId, IDestinationSiteInfo destinationSiteInfo, CancellationToken cancel)
Parameters
Type | Name | Description |
---|---|---|
Guid | userId | The user's ID. |
IDestinationSiteInfo | destinationSiteInfo | The destination site information.. |
CancellationToken | cancel | The cancellation token. |
Returns
Type | Description |
---|---|
Task<IResult<IEmbeddedCredentialKeychainResult>> | The user's |
UpdateUserAsync(Guid, string, CancellationToken, string?, string?, string?, UserAuthenticationType?)
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, UserAuthenticationType? newAuthentication = 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. |
UserAuthenticationType? | newAuthentication | (Optional) The new authentication for the user. |
Returns
Type | Description |
---|---|
Task<IResult<IUpdateUserResult>> | The updated user information. |
UploadUserSavedCredentialsAsync(Guid, IEnumerable<string>, CancellationToken)
Uploads saved credentials for a user
Declaration
Task<IResult> UploadUserSavedCredentialsAsync(Guid userId, IEnumerable<string> encryptedKeychains, CancellationToken cancel)
Parameters
Type | Name | Description |
---|---|---|
Guid | userId | The user id |
IEnumerable<string> | encryptedKeychains | The list of encrypted keychains |
CancellationToken | cancel | The cancellation token |
Returns
Type | Description |
---|---|
Task<IResult> |