Table of Contents

Interface IHooksClient

Namespace
Auth0.ManagementApi.Clients
Assembly
Auth0.ManagementApi.dll
public interface IHooksClient

Methods

CreateAsync(HookCreateRequest, CancellationToken)

Creates a new hook according to the request.

Task<Hook> CreateAsync(HookCreateRequest request, CancellationToken cancellationToken = default)

Parameters

request HookCreateRequest

The HookCreateRequest containing the details of the hook to create.

cancellationToken CancellationToken

The cancellation token to cancel operation.

Returns

Task<Hook>

The newly created Hook.

DeleteAsync(string, CancellationToken)

Deletes a hook.

Task DeleteAsync(string id, CancellationToken cancellationToken = default)

Parameters

id string

The ID of the hook to delete.

cancellationToken CancellationToken

The cancellation token to cancel operation.

Returns

Task

A Task that represents the asynchronous delete operation.

GetAllAsync(GetHooksRequest, PaginationInfo, CancellationToken)

Retrieves a list of all hooks.

Task<IPagedList<Hook>> GetAllAsync(GetHooksRequest request, PaginationInfo pagination = null, CancellationToken cancellationToken = default)

Parameters

request GetHooksRequest

Specifies criteria to use when querying hooks.

pagination PaginationInfo

Specifies pagination info to use when requesting paged results.

cancellationToken CancellationToken

The cancellation token to cancel operation.

Returns

Task<IPagedList<Hook>>

An IPagedList<T> containing the hooks requested.

GetAsync(string, string, CancellationToken)

Retrieves a hook by its ID.

Task<Hook> GetAsync(string id, string fields = null, CancellationToken cancellationToken = default)

Parameters

id string

The ID of the hook to retrieve.

fields string

A comma separated list of fields to include, empty to retrieve all fields.

cancellationToken CancellationToken

The cancellation token to cancel operation.

Returns

Task<Hook>

The Hook that was requested.

UpdateAsync(string, HookUpdateRequest, CancellationToken)

Updates a hook.

Task<Hook> UpdateAsync(string id, HookUpdateRequest request, CancellationToken cancellationToken = default)

Parameters

id string

The ID of the hook to update.

request HookUpdateRequest

A HookUpdateRequest containing the information to update.

cancellationToken CancellationToken

The cancellation token to cancel operation.

Returns

Task<Hook>

The newly updated Hook.