Class UserClient
Inherited Members
Namespace: System.Dynamic.ExpandoObject
Syntax
public class UserClient : ClientBase
Constructors
UserClient(Contract.IPictureparkServiceSettings, Http.HttpClient)
Declaration
public UserClient(Contract.IPictureparkServiceSettings configuration, Http.HttpClient httpClient)
Parameters
Picturepark.SDK.V1.Contract.IPictureparkServiceSettings
configuration
|
System.Net.Http.HttpClient
httpClient
|
Properties
JsonSerializerSettings
Declaration
protected Newtonsoft.Json.JsonSerializerSettings JsonSerializerSettings { get; }
Property Value
Newtonsoft.Json.JsonSerializerSettings
|
ReadResponseAsString
Declaration
public bool ReadResponseAsString { get; set; }
Property Value
System.Boolean
|
Methods
AggregateAsync(UserAggregationRequest, CancellationToken)
Aggregate users
Declaration
public virtual async Task<ObjectAggregationResult> AggregateAsync(UserAggregationRequest request, CancellationToken cancellationToken = default(CancellationToken))
Parameters
UserAggregationRequest
request
User aggregation request. |
System.Threading.CancellationToken
cancellationToken
A cancellation token that can be used by other objects or threads to receive notice of cancellation. |
Returns
System.Threading.Tasks.Task<ObjectAggregationResult>
Aggregation based on the request |
ArchiveAsync(String, CancellationToken)
Archive user
Declaration
public virtual async Task ArchiveAsync(string id, CancellationToken cancellationToken = default(CancellationToken))
Parameters
System.String
id
User ID |
System.Threading.CancellationToken
cancellationToken
A cancellation token that can be used by other objects or threads to receive notice of cancellation. |
Returns
System.Threading.Tasks.Task
OK |
Remarks
Only deleted users can be archived. If a user, before being deleted, was an owner of contents, schemas or permissions sets, the archiving through this endpoint won't be possible:
in such a case the archiving will be executed automatically by the system after the retention time is passed.
AssignUserRolesAsync(UserRoleAssignManyRequest, CancellationToken)
Assign or unassign userRoles
Declaration
public virtual async Task<BusinessProcess> AssignUserRolesAsync(UserRoleAssignManyRequest request, CancellationToken cancellationToken = default(CancellationToken))
Parameters
UserRoleAssignManyRequest
request
Information about users to modify and kind of operation |
System.Threading.CancellationToken
cancellationToken
A cancellation token that can be used by other objects or threads to receive notice of cancellation. |
Returns
System.Threading.Tasks.Task<BusinessProcess>
Business process |
CancelDeletionRequestAsync(String, CancellationToken)
Cancels a user triggered deletion request and returns user to Reviewed state.
Declaration
public virtual async Task CancelDeletionRequestAsync(string id, CancellationToken cancellationToken = default(CancellationToken))
Parameters
System.String
id
User ID to action on. |
System.Threading.CancellationToken
cancellationToken
A cancellation token that can be used by other objects or threads to receive notice of cancellation. |
Returns
System.Threading.Tasks.Task
OK |
CreateAsync(UserCreateRequest, CancellationToken)
Create user
Declaration
public virtual async Task<UserDetail> CreateAsync(UserCreateRequest request, CancellationToken cancellationToken = default(CancellationToken))
Parameters
UserCreateRequest
request
Requested user information. |
System.Threading.CancellationToken
cancellationToken
A cancellation token that can be used by other objects or threads to receive notice of cancellation. |
Returns
System.Threading.Tasks.Task<UserDetail>
Newly created user |
Remarks
User will not be invited.
DeleteAsync(String, UserDeleteRequest, CancellationToken)
Delete user
Declaration
public virtual async Task DeleteAsync(string id, UserDeleteRequest request, CancellationToken cancellationToken = default(CancellationToken))
Parameters
System.String
id
User ID |
UserDeleteRequest
request
Request with details about deletion |
System.Threading.CancellationToken
cancellationToken
A cancellation token that can be used by other objects or threads to receive notice of cancellation. |
Returns
System.Threading.Tasks.Task
OK |
GetAsync(String, CancellationToken)
Get user
Declaration
public virtual async Task<UserDetail> GetAsync(string id, CancellationToken cancellationToken = default(CancellationToken))
Parameters
System.String
id
User ID to search for. |
System.Threading.CancellationToken
cancellationToken
A cancellation token that can be used by other objects or threads to receive notice of cancellation. |
Returns
System.Threading.Tasks.Task<UserDetail>
Requested user details |
GetByOwnerTokenAsync(String, CancellationToken)
Get user by owner token
Declaration
public virtual async Task<UserDetail> GetByOwnerTokenAsync(string tokenId, CancellationToken cancellationToken = default(CancellationToken))
Parameters
System.String
tokenId
ID of the owner token. |
System.Threading.CancellationToken
cancellationToken
A cancellation token that can be used by other objects or threads to receive notice of cancellation. |
Returns
System.Threading.Tasks.Task<UserDetail>
User details of the user referenced by the owner token |
GetManyAsync(IEnumerable<String>, CancellationToken)
Get multiple users
Declaration
public virtual async Task<ICollection<UserDetail>> GetManyAsync(IEnumerable<string> ids = null, CancellationToken cancellationToken = default(CancellationToken))
Parameters
System.Collections.Generic.IEnumerable<System.String>
ids
User IDs. |
System.Threading.CancellationToken
cancellationToken
A cancellation token that can be used by other objects or threads to receive notice of cancellation. |
Returns
System.Threading.Tasks.Task<System.Collections.Generic.ICollection<UserDetail>>
Details of all the users who were found |
Remarks
Can fetch 100 users at most.
InviteAsync(String, CancellationToken)
Invite user
Declaration
public virtual async Task InviteAsync(string id, CancellationToken cancellationToken = default(CancellationToken))
Parameters
System.String
id
User ID to action on. |
System.Threading.CancellationToken
cancellationToken
A cancellation token that can be used by other objects or threads to receive notice of cancellation. |
Returns
System.Threading.Tasks.Task
OK |
Remarks
Formally invites a user, e.g. sends an invitation email. Transitions AuthorizationState to Invited, implicitly reviews user.
InviteManyAsync(UserInviteManyRequest, CancellationToken)
Invite multiple users
Declaration
public virtual async Task<BusinessProcess> InviteManyAsync(UserInviteManyRequest request, CancellationToken cancellationToken = default(CancellationToken))
Parameters
UserInviteManyRequest
request
Information about users to invite |
System.Threading.CancellationToken
cancellationToken
A cancellation token that can be used by other objects or threads to receive notice of cancellation. |
Returns
System.Threading.Tasks.Task<BusinessProcess>
Business process |
Remarks
Formally invites users, e.g. sends an invitation email. Transitions to Invited, implicitly reviews user. The operation is executed asynchronously and is not awaited. Call WaitForCompletion to wait for the process to finish.
ListAsync(UserListRequest, CancellationToken)
List users, result contains only essential info about user. Requires the ListUsers
or the ManageUsers
UserRight.
Declaration
public virtual async Task<UserListResult> ListAsync(UserListRequest request, CancellationToken cancellationToken = default(CancellationToken))
Parameters
UserListRequest
request
User list request. |
System.Threading.CancellationToken
cancellationToken
A cancellation token that can be used by other objects or threads to receive notice of cancellation. |
Returns
System.Threading.Tasks.Task<UserListResult>
Result of the list users |
LockAsync(String, UserLockRequest, CancellationToken)
Lock / unlock user
Declaration
public virtual async Task LockAsync(string id, UserLockRequest request, CancellationToken cancellationToken = default(CancellationToken))
Parameters
System.String
id
User ID to action on. |
UserLockRequest
request
Request detailing if the user should be locked or unlocked. |
System.Threading.CancellationToken
cancellationToken
A cancellation token that can be used by other objects or threads to receive notice of cancellation. |
Returns
System.Threading.Tasks.Task
OK |
Remarks
Does not affect AuthorizationState of user.
If User is already in desired state, this will be returned as error.
LockManyAsync(UserLockManyRequest, CancellationToken)
Change lock state of multiple users
Declaration
public virtual async Task<BusinessProcess> LockManyAsync(UserLockManyRequest request, CancellationToken cancellationToken = default(CancellationToken))
Parameters
UserLockManyRequest
request
Information about users to update and the desired lock state |
System.Threading.CancellationToken
cancellationToken
A cancellation token that can be used by other objects or threads to receive notice of cancellation. |
Returns
System.Threading.Tasks.Task<BusinessProcess>
Business process |
Remarks
Does not affect AuthorizationState of users
Users which are already in desired state will be returned as errors. The operation is executed asynchronously and is not awaited. Call WaitForCompletion to wait for the process to finish.
ReadObjectResponseAsync<T>(Http.HttpResponseMessage, IReadOnlyDictionary<String, IEnumerable<String>>, CancellationToken)
Declaration
protected virtual async Task<UserClient.ObjectResponseResult<T>> ReadObjectResponseAsync<T>(Http.HttpResponseMessage response, IReadOnlyDictionary<string, IEnumerable<string>> headers, CancellationToken cancellationToken)
Parameters
System.Net.Http.HttpResponseMessage
response
|
System.Collections.Generic.IReadOnlyDictionary<System.String, System.Collections.Generic.IEnumerable<System.String>>
headers
|
System.Threading.CancellationToken
cancellationToken
|
Returns
System.Threading.Tasks.Task<UserClient.ObjectResponseResult<T>>
|
Type Parameters
T
|
ReinviteAsync(String, CancellationToken)
Reinvite user
Declaration
public virtual async Task ReinviteAsync(string id, CancellationToken cancellationToken = default(CancellationToken))
Parameters
System.String
id
User ID to action on. |
System.Threading.CancellationToken
cancellationToken
A cancellation token that can be used by other objects or threads to receive notice of cancellation. |
Returns
System.Threading.Tasks.Task
OK |
Remarks
Formally re-invites a user, e.g. sends an invitation email.
ReInviteManyAsync(UserReinviteManyRequest, CancellationToken)
Reinvite users
Declaration
public virtual async Task<BusinessProcess> ReInviteManyAsync(UserReinviteManyRequest request, CancellationToken cancellationToken = default(CancellationToken))
Parameters
UserReinviteManyRequest
request
Information about users to reinvite |
System.Threading.CancellationToken
cancellationToken
A cancellation token that can be used by other objects or threads to receive notice of cancellation. |
Returns
System.Threading.Tasks.Task<BusinessProcess>
Business process |
Remarks
Formally re-invites users, e.g. sends an invitation email. The operation is executed asynchronously and is not awaited. Call WaitForCompletion to wait for the process to finish.
RestoreAsync(String, CancellationToken)
Restore user
Declaration
public virtual async Task RestoreAsync(string id, CancellationToken cancellationToken = default(CancellationToken))
Parameters
System.String
id
User ID to action on. |
System.Threading.CancellationToken
cancellationToken
A cancellation token that can be used by other objects or threads to receive notice of cancellation. |
Returns
System.Threading.Tasks.Task
OK |
Remarks
Restores previously deleted user, who was not cleaned up yet.
ReviewAsync(String, UserReviewRequest, CancellationToken)
Change user's review state
Declaration
public virtual async Task ReviewAsync(string id, UserReviewRequest request, CancellationToken cancellationToken = default(CancellationToken))
Parameters
System.String
id
User ID to action on. |
UserReviewRequest
request
Request detailing if the user should be set as reviewed or to be reviewed. |
System.Threading.CancellationToken
cancellationToken
A cancellation token that can be used by other objects or threads to receive notice of cancellation. |
Returns
System.Threading.Tasks.Task
OK |
Remarks
Users with AuthorizationState != ToBeReviewed are considered reviewed.
ReviewManyAsync(UserReviewManyRequest, CancellationToken)
Change Review state of multiple users
Declaration
public virtual async Task<BusinessProcess> ReviewManyAsync(UserReviewManyRequest request, CancellationToken cancellationToken = default(CancellationToken))
Parameters
UserReviewManyRequest
request
Information about users to update and the desired review state |
System.Threading.CancellationToken
cancellationToken
A cancellation token that can be used by other objects or threads to receive notice of cancellation. |
Returns
System.Threading.Tasks.Task<BusinessProcess>
Business process |
Remarks
Users with AuthorizationState != ToBeReviewed are considered reviewed. The operation is executed asynchronously and is not awaited. Call WaitForCompletion to wait for the process to finish.
SearchAsync(UserSearchRequest, CancellationToken)
Search users
Declaration
public virtual async Task<UserSearchResult> SearchAsync(UserSearchRequest request, CancellationToken cancellationToken = default(CancellationToken))
Parameters
UserSearchRequest
request
User search request. |
System.Threading.CancellationToken
cancellationToken
A cancellation token that can be used by other objects or threads to receive notice of cancellation. |
Returns
System.Threading.Tasks.Task<UserSearchResult>
Result of the user search |
UpdateAsync(String, UserUpdateRequest, CancellationToken)
Update user
Declaration
public virtual async Task<UserDetail> UpdateAsync(string id, UserUpdateRequest request, CancellationToken cancellationToken = default(CancellationToken))
Parameters
System.String
id
User ID to action on. |
UserUpdateRequest
request
New user information. |
System.Threading.CancellationToken
cancellationToken
A cancellation token that can be used by other objects or threads to receive notice of cancellation. |
Returns
System.Threading.Tasks.Task<UserDetail>
User details after the update of the user |
UpdateIdentityProviderManyAsync(UserUpdateIdentityProviderManyRequest, CancellationToken)
Update identity provider on multiple users
Declaration
public virtual async Task<BusinessProcess> UpdateIdentityProviderManyAsync(UserUpdateIdentityProviderManyRequest request, CancellationToken cancellationToken = default(CancellationToken))
Parameters
UserUpdateIdentityProviderManyRequest
request
User update identity provider request. |
System.Threading.CancellationToken
cancellationToken
A cancellation token that can be used by other objects or threads to receive notice of cancellation. |
Returns
System.Threading.Tasks.Task<BusinessProcess>
Business process |