Skip to main content

DelegationAPI Methods

An object defining methods for the DelegationAPI class.

SetUrl(url)

Sets the API URL for requests.

Parameters:

url (required): string
The new API URL.

Returns:

Type: void
Method does not return anything

Exceptions:

Type: ArgumentNullException
Throws ArgumentNullException if URL is null or empty.

Type: Exception
Throws Exception if the URL is invalid.

This is a sync method. Method runs synchronously.


Disable(request, telemetryCollectorHolder)

Disables an existing delegation using the provided secret key. This method is used when the delegation needs to be deactivated or revoked.

Parameters:

request (required): DisableDelegationRequest
Parameters required for regenerate delegation.

telemetryCollectorHolder (optional): ITelemetryCollectorHolder
Holds telemetry collection data. This property is advance using only.

Returns:

Type: Task<WrapResponse<bool>>
Returns true if disable operation is successfully completed. Otherwise returns false.

This is a async method. Method should be waited. Be careful if call this method without waiting.

See Also


GetTakenDelegations(request, telemetryCollectorHolder)

Retrieves delegations that have been assigned to the current user. This method is used to view the active, passive, or all delegations where the user is the recipient, helping users to understand which tasks or roles have been delegated to them.

Parameters:

request (required): GetDelegationsRequest
Parameters required for getting given delegations.

telemetryCollectorHolder (optional): ITelemetryCollectorHolder
Holds telemetry collection data. This property is advance using only.

Returns:

Type: Task<WrapResponse<GetDelegationsResponse>>
A list of delegations as GetDelegationsResponse object wrapped with WrapResponse class.

This is a async method. Method should be waited. Be careful if call this method without waiting.

See Also


Get(request, telemetryCollectorHolder)

Retrieves delegation details using the provided secret key. This method is used to fetch the delegation information like scope, positions, and other metadata related to the delegation.

Parameters:

request (required): GetDelegationRequest
Parameters required for getting delegation.

telemetryCollectorHolder (optional): ITelemetryCollectorHolder
Holds telemetry collection data. This property is advance using only.

Returns:

Type: Task<WrapResponse<GetDelegationResponse>>
Requested delegation as GetDelegationResponse object wrapped with WrapResponse class.

This is a async method. Method should be waited. Be careful if call this method without waiting.

See Also


GetGivenDelegations(request, telemetryCollectorHolder)

Retrieves delegations that have been given by the current user. This method is typically used to track the active, passive, or all delegations initiated by the user, allowing them to view or manage their delegation assignments.

Parameters:

request (required): GetDelegationsRequest
Parameters required for getting given delegations.

telemetryCollectorHolder (optional): ITelemetryCollectorHolder
Holds telemetry collection data. This property is advance using only.

Returns:

Type: Task<WrapResponse<GetDelegationsResponse>>
A list of delegations as GetDelegationsResponse object wrapped with WrapResponse class.

This is a async method. Method should be waited. Be careful if call this method without waiting.

See Also


Create(request, telemetryCollectorHolder)

Creates a new delegation based on the given request parameters. The user can delegate certain tasks or access rights to another user by specifying the delegation details, including the scope, the recipient, and the duration of the delegation.

Parameters:

request (required): CreateDelegationRequest
Parameters required for getting given delegations.

telemetryCollectorHolder (optional): ITelemetryCollectorHolder
Holds telemetry collection data. This property is advance using only.

Returns:

Type: Task<WrapResponse<GetDelegationResponse>>
Newly created delegation as GetDelegationResponse object wrapped with WrapResponse class.

This is a async method. Method should be waited. Be careful if call this method without waiting.

See Also


Edit(request, telemetryCollectorHolder)

Edits an existing delegation with updated details. This method is used when modifications are required to an already created delegation.

Parameters:

request (required): EditDelegationRequest
Parameters required for edit delegation.

telemetryCollectorHolder (optional): ITelemetryCollectorHolder
Holds telemetry collection data. This property is advance using only.

Returns:

Type: Task<WrapResponse<bool>>
Returns true if disable operation is successfully completed. Otherwise returns false.

This is a async method. Method should be waited. Be careful if call this method without waiting.

See Also


Regenerate(request, telemetryCollectorHolder)

Regenerates a delegation using a secret key. This method is typically used when a previously generated delegation needs to be refreshed or a new token/secret is required.

Parameters:

request (required): RegenerateDelegationRequest
Parameters required for regenerate delegation.

telemetryCollectorHolder (optional): ITelemetryCollectorHolder
Holds telemetry collection data. This property is advance using only.

Returns:

Type: Task<WrapResponse<GetDelegationResponse>>
Regenerated delegation as GetDelegationResponse object wrapped with WrapResponse class.

This is a async method. Method should be waited. Be careful if call this method without waiting.

See Also