Request

Response

    Class WebhooksClient

    Namespace: Autodesk.Webhooks
    Assembly: Autodesk.Webhooks.dll

    Client for managing webhooks.

    public class WebhooksClient : BaseClient
    

    Inheritance

    object ← BaseClient ← WebhooksClient

    Inherited Members

    BaseClient.AuthenticationProvider, object.Equals(object?) , object.Equals(object?, object?) , object.GetHashCode() , object.GetType() , object.MemberwiseClone() , object.ReferenceEquals(object?, object?) , object.ToString()

    Constructors

    WebhooksClient(SDKManager, IAuthenticationProvider)

    Operation: Initializes a new instance of the class.

    public WebhooksClient(SDKManager sdkManager = null, IAuthenticationProvider authenticationProvider = null)
    

    Parameters

    sdkManager SDKManager

    The SDK manager instance.

    authenticationProvider IAuthenticationProvider

    The authentication provider instance.

    Methods

    CreateSystemEventHookAsync(string, string, HookPayload, Region, string, bool)

    Operation: Create a Webhook for an Event

    public Task<HttpResponseMessage> CreateSystemEventHookAsync(string system, string _event, HookPayload hookPayload, Region region = Region.US, string accessToken = null, bool throwOnError = true)
    

    Adds a new webhook to receive notifications of the occurrence of a specified event for the specified system.

    Parameters

    system string

    The ID of the system the webhook applies to. For example data for Data Management. See Supported Events for a full list of supported systems and their IDs.

    _event string

    The ID of the event the webhook monitors. See Supported Events for a full list of events.

    hookPayload HookPayload

    The payload for the webhook.

    region Region

    Specifies the geographical location (region) of the server the request must be executed on. This also corresponds to the region where the Webhook data is stored. It is also the location of the server that will make request to your callback URL. Possible values:

    • US - (Default) Data center dedicated to serve the United States region.
    • EMEA - Data center dedicated to serve the European Union, Middle East, and Africa regions.
    • AUS - Data center dedicated to serve the Australia region.
    • CAN - Data center dedicated to serve the Canada region.
    • DEU - Data center dedicated to serve the Germany region.
    • IND - Data center dedicated to serve the India region.
    • JPN - Data center dedicated to serve the Japan region.
    • GBR - Data center dedicated to serve the United Kingdom region.

    accessToken string

    An access token obtained by a call to GetThreeLeggedTokenAsync() or GetTwoLeggedTokenAsync().(optional)

    throwOnError bool

    Specifies whether to throw an exception on error. (optional)

    Returns

    Task <HttpResponseMessage >

    An object that represents a response that only contains response headers.

    Exceptions

    HttpRequestException

    An object that is returned when an API call to the Webhooks service fails.

    CreateSystemEventHookAsync(Systems, Events, HookPayload, Region, string, bool)

    Operation: Create a Webhook for an Event

    public Task<HttpResponseMessage> CreateSystemEventHookAsync(Systems system, Events _event, HookPayload hookPayload, Region region = Region.US, string accessToken = null, bool throwOnError = true)
    

    Adds a new webhook to receive notifications of the occurrence of a specified event for the specified system.

    Parameters

    system Systems

    The ID of the system the webhook applies to. For example data for Data Management. See Supported Events for a full list of supported systems and their IDs.

    _event Events

    The ID of the event the webhook monitors. See Supported Events for a full list of events.

    hookPayload HookPayload

    The payload for the webhook.

    region Region

    Specifies the geographical location (region) of the server the request must be executed on. This also corresponds to the region where the Webhook data is stored. It is also the location of the server that will make request to your callback URL. Possible values:

    • US - (Default) Data center dedicated to serve the United States region.
    • EMEA - Data center dedicated to serve the European Union, Middle East, and Africa regions.
    • AUS - Data center dedicated to serve the Australia region.
    • CAN - Data center dedicated to serve the Canada region.
    • DEU - Data center dedicated to serve the Germany region.
    • IND - Data center dedicated to serve the India region.
    • JPN - Data center dedicated to serve the Japan region.
    • GBR - Data center dedicated to serve the United Kingdom region.

    accessToken string

    An access token obtained by a call to GetThreeLeggedTokenAsync() or GetTwoLeggedTokenAsync().(optional)

    throwOnError bool

    Specifies whether to throw an exception on error. (optional)

    Returns

    Task <HttpResponseMessage >

    An object that represents a response that only contains response headers.

    Exceptions

    HttpRequestException

    An object that is returned when an API call to the Webhooks service fails.

    CreateSystemHookAsync(string, HookPayload, Region, string, bool)

    Operation: Create Webhooks for All Events

    public Task<Hook> CreateSystemHookAsync(string system, HookPayload hookPayload, Region region = Region.US, string accessToken = null, bool throwOnError = true)
    

    Adds a new webhook to receive notifications of all events for the specified system.

    Parameters

    system string

    The ID of the system the webhook applies to. For example data for Data Management. See Supported Events for a full list of supported systems and their IDs.

    hookPayload HookPayload

    The payload for the webhook.

    region Region

    Specifies the geographical location (region) of the server the request must be executed on. This also corresponds to the region where the Webhook data is stored. It is also the location of the server that will make request to your callback URL. Possible values:

    • US - (Default) Data center dedicated to serve the United States region.
    • EMEA - Data center dedicated to serve the European Union, Middle East, and Africa regions.
    • AUS - Data center dedicated to serve the Australia region.
    • CAN - Data center dedicated to serve the Canada region.
    • DEU - Data center dedicated to serve the Germany region.
    • IND - Data center dedicated to serve the India region.
    • JPN - Data center dedicated to serve the Japan region.
    • GBR - Data center dedicated to serve the United Kingdom region.

    accessToken string

    An access token obtained by a call to GetThreeLeggedTokenAsync() or GetTwoLeggedTokenAsync().(optional)

    throwOnError bool

    Specifies whether to throw an exception on error. (optional)

    Returns

    Task <Hook >

    An object that represents the response to a Create Webhooks for All Events request.

    Exceptions

    HttpRequestException

    An object that is returned when an API call to the Webhooks service fails.

    CreateSystemHookAsync(Systems, HookPayload, Region, string, bool)

    Operation: Create Webhooks for All Events

    public Task<Hook> CreateSystemHookAsync(Systems system, HookPayload hookPayload, Region region = Region.US, string accessToken = null, bool throwOnError = true)
    

    Adds a new webhook to receive notifications of all events for the specified system.

    Parameters

    system Systems

    The ID of the system the webhook applies to. For example data for Data Management. See Supported Events for a full list of supported systems and their IDs.

    hookPayload HookPayload

    The payload for the webhook.

    region Region

    Specifies the geographical location (region) of the server the request must be executed on. This also corresponds to the region where the Webhook data is stored. It is also the location of the server that will make request to your callback URL. Possible values:

    • US - (Default) Data center dedicated to serve the United States region.
    • EMEA - Data center dedicated to serve the European Union, Middle East, and Africa regions.
    • AUS - Data center dedicated to serve the Australia region.
    • CAN - Data center dedicated to serve the Canada region.
    • DEU - Data center dedicated to serve the Germany region.
    • IND - Data center dedicated to serve the India region.
    • JPN - Data center dedicated to serve the Japan region.
    • GBR - Data center dedicated to serve the United Kingdom region.

    accessToken string

    An access token obtained by a call to GetThreeLeggedTokenAsync() or GetTwoLeggedTokenAsync().(optional)

    throwOnError bool

    Specifies whether to throw an exception on error. (optional)

    Returns

    Task <Hook >

    An object that represents the response to a Create Webhooks for All Events request.

    Exceptions

    HttpRequestException

    An object that is returned when an API call to the Webhooks service fails.

    CreateTokenAsync(TokenPayload, Region, string, bool)

    Operation: Create Secret Token

    public Task<Token> CreateTokenAsync(TokenPayload tokenPayload, Region region = Region.US, string accessToken = null, bool throwOnError = true)
    

    Sets a secret token to verify the authenticity of webhook payloads.

    When a webhook event occurs, the service calculates a hash signature using the token and includes it in the event notification. The receiving application listening at the callback URL can verify the payload’s integrity by comparing the calculated signature to the one received.

    The webhooks affected by this operation are determined by the type of access token you use.

    • Two-legged Access Token: Sets the secret token for all webhooks owned by calling the app.
    • Three-legged Access Token: Sets the secret token for all webhooks owned by the calling user

    Note: Use the Update Webhook operation to set a token for a specific webhook.

    See the Secret Token section in API Basics for more information.

    Parameters

    tokenPayload TokenPayload

    The payload containing the token information.

    region Region

    Specifies the geographical location (region) of the server the request must be executed on. This also corresponds to the region where the Webhook data is stored. It is also the location of the server that will make request to your callback URL. Possible values:

    • US - (Default) Data center dedicated to serve the United States region.
    • EMEA - Data center dedicated to serve the European Union, Middle East, and Africa regions.
    • AUS - Data center dedicated to serve the Australia region.
    • CAN - Data center dedicated to serve the Canada region.
    • DEU - Data center dedicated to serve the Germany region.
    • IND - Data center dedicated to serve the India region.
    • JPN - Data center dedicated to serve the Japan region.
    • GBR - Data center dedicated to serve the United Kingdom region.

    accessToken string

    An access token obtained by a call to GetThreeLeggedTokenAsync() or GetTwoLeggedTokenAsync().(optional)

    throwOnError bool

    Specifies whether to throw an exception on error. (optional)

    Returns

    Task <Token >

    An object that represents the response to a Create Secret Token request.

    Exceptions

    HttpRequestException

    An object that is returned when an API call to the Webhooks service fails.

    DeleteSystemEventHookAsync(string, string, string, Region, string, bool)

    Operation: Delete a Webhook

    public Task<HttpResponseMessage> DeleteSystemEventHookAsync(string system, string _event, string hookId, Region region = Region.US, string accessToken = null, bool throwOnError = true)
    

    Deletes the webhook specified by its ID.

    Parameters

    system string

    The ID of the system the webhook applies to. For example data for Data Management. See Supported Events for a full list of supported systems and their IDs.

    _event string

    The ID of the event the webhook monitors. See Supported Events for a full list of events.

    hookId string

    The ID of the webhook to delete.

    region Region

    Specifies the geographical location (region) of the server the request must be executed on. This also corresponds to the region where the Webhook data is stored. It is also the location of the server that will make request to your callback URL. Possible values:

    • US - (Default) Data center dedicated to serve the United States region.
    • EMEA - Data center dedicated to serve the European Union, Middle East, and Africa regions.
    • AUS - Data center dedicated to serve the Australia region.
    • CAN - Data center dedicated to serve the Canada region.
    • DEU - Data center dedicated to serve the Germany region.
    • IND - Data center dedicated to serve the India region.
    • JPN - Data center dedicated to serve the Japan region.
    • GBR - Data center dedicated to serve the United Kingdom region.

    accessToken string

    An access token obtained by a call to GetThreeLeggedTokenAsync() or GetTwoLeggedTokenAsync().(optional)

    throwOnError bool

    Specifies whether to throw an exception on error. (optional)

    Returns

    Task <HttpResponseMessage >

    An object that represents a response that only contains response headers.

    Exceptions

    HttpRequestException

    An object that is returned when an API call to the Webhooks service fails.

    DeleteSystemEventHookAsync(Systems, Events, string, Region, string, bool)

    Operation: Delete a Webhook

    public Task<HttpResponseMessage> DeleteSystemEventHookAsync(Systems system, Events _event, string hookId, Region region = Region.US, string accessToken = null, bool throwOnError = true)
    

    Deletes the webhook specified by its ID.

    Parameters

    system Systems

    The ID of the system the webhook applies to. For example data for Data Management. See Supported Events for a full list of supported systems and their IDs.

    _event Events

    The ID of the event the webhook monitors. See Supported Events for a full list of events.

    hookId string

    The ID of the webhook to delete.

    region Region

    Specifies the geographical location (region) of the server the request must be executed on. This also corresponds to the region where the Webhook data is stored. It is also the location of the server that will make request to your callback URL. Possible values:

    • US - (Default) Data center dedicated to serve the United States region.
    • EMEA - Data center dedicated to serve the European Union, Middle East, and Africa regions.
    • AUS - Data center dedicated to serve the Australia region.
    • CAN - Data center dedicated to serve the Canada region.
    • DEU - Data center dedicated to serve the Germany region.
    • IND - Data center dedicated to serve the India region.
    • JPN - Data center dedicated to serve the Japan region.
    • GBR - Data center dedicated to serve the United Kingdom region.

    accessToken string

    An access token obtained by a call to GetThreeLeggedTokenAsync() or GetTwoLeggedTokenAsync().(optional)

    throwOnError bool

    Specifies whether to throw an exception on error. (optional)

    Returns

    Task <HttpResponseMessage >

    An object that represents a response that only contains response headers.

    Exceptions

    HttpRequestException

    An object that is returned when an API call to the Webhooks service fails.

    DeleteTokenAsync(Region, string, bool)

    Operation: Delete Secret Token

    public Task<HttpResponseMessage> DeleteTokenAsync(Region region = Region.US, string accessToken = null, bool throwOnError = true)
    

    Removes an existing secret token from the webhooks impacted by this operation.

    The webhooks affected by this operation are determined by the type of access token you use.

    • Two-legged Access Token: Sets the secret token for all webhooks owned by calling the app.
    • Three-legged Access Token: Sets the secrety token for all webhooks owned by the calling user

    Note that there can be a delay of up to 10 minutes while the change takes effect. We recommend that your callback accept both secret token values for a period of time to allow all requests to go through.

    See the Secret Token section in API Basics for more information.

    Parameters

    region Region

    Specifies the geographical location (region) of the server the request must be executed on. This also corresponds to the region where the Webhook data is stored. It is also the location of the server that will make request to your callback URL. Possible values:

    • US - (Default) Data center dedicated to serve the United States region.
    • EMEA - Data center dedicated to serve the European Union, Middle East, and Africa regions.
    • AUS - Data center dedicated to serve the Australia region.
    • CAN - Data center dedicated to serve the Canada region.
    • DEU - Data center dedicated to serve the Germany region.
    • IND - Data center dedicated to serve the India region.
    • JPN - Data center dedicated to serve the Japan region.
    • GBR - Data center dedicated to serve the United Kingdom region.

    accessToken string

    An access token obtained by a call to GetThreeLeggedTokenAsync() or GetTwoLeggedTokenAsync().(optional)

    throwOnError bool

    Specifies whether to throw an exception on error. (optional)

    Returns

    Task <HttpResponseMessage >

    An object that represents a response that only contains response headers.

    Exceptions

    HttpRequestException

    An object that is returned when an API call to the Webhooks service fails.

    GetAppHooksAsync(Region, string, StatusFilter?, Sort?, string, bool)

    Operation: List All Webhooks for an App

    public Task<Hooks> GetAppHooksAsync(Region region = Region.US, string pageState = null, StatusFilter? status = null, Sort? sort = null, string accessToken = null, bool throwOnError = true)
    

    Retrieves a paginated list of webhooks created by the calling application. Each page includes up to 200 webhooks.

    If the pageState parameter is not provided, the first page of results is returned. Use the next value from the previous response to fetch subsequent pages.

    Note: This operation requires an access token through a Client Credentials flow (two-legged OAuth).

    Parameters

    region Region

    Specifies the geographical location (region) of the server the request must be executed on. This also corresponds to the region where the Webhook data is stored. It is also the location of the server that will make request to your callback URL. Possible values:

    • US - (Default) Data center dedicated to serve the United States region.
    • EMEA - Data center dedicated to serve the European Union, Middle East, and Africa regions.
    • AUS - Data center dedicated to serve the Australia region.
    • CAN - Data center dedicated to serve the Canada region.
    • DEU - Data center dedicated to serve the Germany region.
    • IND - Data center dedicated to serve the India region.
    • JPN - Data center dedicated to serve the Japan region.
    • GBR - Data center dedicated to serve the United Kingdom region.

    pageState string

    Base64 encoded string to fetch the next page of the list of webhooks. If you do not provide this parameter, the first page of results is returned. Use the next value from the previous response to fetch subsequent pages. (optional)

    status StatusFilter ?

    Filters retrieved webhooks by their current state. Possible values are

    • active - Successfully delivered most recent event notifications.
    • inactive - Failed to deliver most recent event notification and has been deactivated.

    If this parameter is not specified, the filter is not applied. See Event Delivery Guarantees for more information on how the state of a webhook changes. (optional)

    sort Sort ?

    Specifies the sorting order of the list of webhooks by their lastUpdatedDate attribute.

    • asc - Ascending order.
    • desc - (Default) Descending order. (optional)

    accessToken string

    An access token obtained by a call to GetThreeLeggedTokenAsync() or GetTwoLeggedTokenAsync().(optional)

    throwOnError bool

    Specifies whether to throw an exception on error. (optional)

    Returns

    Task <Hooks >

    A paginated list of webhooks.

    Exceptions

    HttpRequestException

    An object that is returned when an API call to the Webhooks service fails.

    GetHookDetailsAsync(string, string, string, Region, string, bool)

    Operation: Get Webhook Details

    public Task<HookDetails> GetHookDetailsAsync(string system, string _event, string hookId, Region region = Region.US, string accessToken = null, bool throwOnError = true)
    

    Retrieves the details of the webhook for the specified event within the specified system.

    Parameters

    system string

    The ID of the system the webhook applies to. For example data for Data Management. See Supported Events for a full list of supported systems and their IDs.

    _event string

    The ID of the event the webhook monitors. See Supported Events for a full list of events.

    hookId string

    The ID of the webhook to delete.

    region Region

    Specifies the geographical location (region) of the server the request must be executed on. This also corresponds to the region where the Webhook data is stored. It is also the location of the server that will make request to your callback URL. Possible values:

    • US - (Default) Data center dedicated to serve the United States region.
    • EMEA - Data center dedicated to serve the European Union, Middle East, and Africa regions.
    • AUS - Data center dedicated to serve the Australia region.
    • CAN - Data center dedicated to serve the Canada region.
    • DEU - Data center dedicated to serve the Germany region.
    • IND - Data center dedicated to serve the India region.
    • JPN - Data center dedicated to serve the Japan region.
    • GBR - Data center dedicated to serve the United Kingdom region.

    accessToken string

    An access token obtained by a call to GetThreeLeggedTokenAsync() or GetTwoLeggedTokenAsync().(optional)

    throwOnError bool

    Specifies whether to throw an exception on error. (optional)

    Returns

    Task <HookDetails >

    An object that represents the details of a webhook.

    Exceptions

    HttpRequestException

    An object that is returned when an API call to the Webhooks service fails.

    GetHookDetailsAsync(Systems, Events, string, Region, string, bool)

    Operation: Get Webhook Details

    public Task<HookDetails> GetHookDetailsAsync(Systems system, Events _event, string hookId, Region region = Region.US, string accessToken = null, bool throwOnError = true)
    

    Retrieves the details of the webhook for the specified event within the specified system.

    Parameters

    system Systems

    The ID of the system the webhook applies to. For example data for Data Management. See Supported Events for a full list of supported systems and their IDs.

    _event Events

    The ID of the event the webhook monitors. See Supported Events for a full list of events.

    hookId string

    The ID of the webhook to delete.

    region Region

    Specifies the geographical location (region) of the server the request must be executed on. This also corresponds to the region where the Webhook data is stored. It is also the location of the server that will make request to your callback URL. Possible values:

    • US - (Default) Data center dedicated to serve the United States region.
    • EMEA - Data center dedicated to serve the European Union, Middle East, and Africa regions.
    • AUS - Data center dedicated to serve the Australia region.
    • CAN - Data center dedicated to serve the Canada region.
    • DEU - Data center dedicated to serve the Germany region.
    • IND - Data center dedicated to serve the India region.
    • JPN - Data center dedicated to serve the Japan region.
    • GBR - Data center dedicated to serve the United Kingdom region.

    accessToken string

    An access token obtained by a call to GetThreeLeggedTokenAsync() or GetTwoLeggedTokenAsync().(optional)

    throwOnError bool

    Specifies whether to throw an exception on error. (optional)

    Returns

    Task <HookDetails >

    An object that represents the details of a webhook.

    Exceptions

    HttpRequestException

    An object that is returned when an API call to the Webhooks service fails.

    GetHooksAsync(string, StatusFilter?, Region, string, bool)

    Operation: List All Webhooks

    public Task<Hooks> GetHooksAsync(string pageState = null, StatusFilter? status = null, Region region = Region.US, string accessToken = null, bool throwOnError = true)
    

    Retrieves a paginated list of webhooks available to the provided access token within the specified region. Each page includes up to 200 webhooks.

    If the pageState parameter is not provided, the first page of results is returned. Use the next value from the previous response to fetch subsequent pages.

    Parameters

    pageState string

    Base64 encoded string to fetch the next page of the list of webhooks. If you do not provide this parameter, the first page of results is returned. Use the next value from the previous response to fetch subsequent pages. (optional)

    status StatusFilter ?

    Filters retrieved webhooks by their current state. Possible values are

    • active - Successfully delivered most recent event notifications.
    • inactive - Failed to deliver most recent event notification and has been deactivated.

    If this parameter is not specified, the filter is not applied. See Event Delivery Guarantees for more information on how the state of a webhook changes. (optional)

    region Region

    Specifies the geographical location (region) of the server the request must be executed on. This also corresponds to the region where the Webhook data is stored. It is also the location of the server that will make request to your callback URL. Possible values:

    • US - (Default) Data center dedicated to serve the United States region.
    • EMEA - Data center dedicated to serve the European Union, Middle East, and Africa regions.
    • AUS - Data center dedicated to serve the Australia region.
    • CAN - Data center dedicated to serve the Canada region.
    • DEU - Data center dedicated to serve the Germany region.
    • IND - Data center dedicated to serve the India region.
    • JPN - Data center dedicated to serve the Japan region.
    • GBR - Data center dedicated to serve the United Kingdom region.

    accessToken string

    An access token obtained by a call to GetThreeLeggedTokenAsync() or GetTwoLeggedTokenAsync().(optional)

    throwOnError bool

    Specifies whether to throw an exception on error. (optional)

    Returns

    Task <Hooks >

    A paginated list of webhooks.

    Exceptions

    HttpRequestException

    An object that is returned when an API call to the Webhooks service fails.

    GetSystemEventHooksAsync(string, string, Region, string, string, StatusFilter?, string, bool)

    Operation: List All Webhooks for an Event

    public Task<Hooks> GetSystemEventHooksAsync(string system, string _event, Region region = Region.US, string scopeName = null, string pageState = null, StatusFilter? status = null, string accessToken = null, bool throwOnError = true)
    

    Retrieves a paginated list of webhooks for the specified event. The returned list contains a subset of webhooks accessible to the provided access token within the specified region. Each page includes up to 200 webhooks.

    If the pageState parameter is not provided, the first page of results is returned. Use the next value from the previous response to fetch subsequent pages.

    Parameters

    system string

    The ID of the system the webhook applies to. For example data for Data Management. See Supported Events for a full list of supported systems and their IDs.

    _event string

    The ID of the event the webhook monitors. See Supported Events for a full list of events.

    region Region

    Specifies the geographical location (region) of the server the request must be executed on. This also corresponds to the region where the Webhook data is stored. It is also the location of the server that will make request to your callback URL. Possible values:

    • US - (Default) Data center dedicated to serve the United States region.
    • EMEA - Data center dedicated to serve the European Union, Middle East, and Africa regions.
    • AUS - Data center dedicated to serve the Australia region.
    • CAN - Data center dedicated to serve the Canada region.
    • DEU - Data center dedicated to serve the Germany region.
    • IND - Data center dedicated to serve the India region.
    • JPN - Data center dedicated to serve the Japan region.
    • GBR - Data center dedicated to serve the United Kingdom region.

    scopeName string

    Filters retrieved webhooks by the scope name used to create hook. For example : folder. If this parameter is not specified, the filter is not applied. (optional)

    pageState string

    Base64 encoded string to fetch the next page of the list of webhooks. If you do not provide this parameter, the first page of results is returned. Use the next value from the previous response to fetch subsequent pages. (optional)

    status StatusFilter ?

    Filters retrieved webhooks by their current state. Possible values are

    • active - Successfully delivered most recent event notifications.
    • inactive - Failed to deliver most recent event notification and has been deactivated.

    If this parameter is not specified, the filter is not applied. See Event Delivery Guarantees for more information on how the state of a webhook changes. (optional)

    accessToken string

    An access token obtained by a call to GetThreeLeggedTokenAsync() or GetTwoLeggedTokenAsync().(optional)

    throwOnError bool

    Specifies whether to throw an exception on error. (optional)

    Returns

    Task <Hooks >

    A paginated list of webhooks.

    Exceptions

    HttpRequestException

    An object that is returned when an API call to the Webhooks service fails.

    GetSystemEventHooksAsync(Systems, Events, Region, string, string, StatusFilter?, string, bool)

    Operation: List All Webhooks for an Event

    public Task<Hooks> GetSystemEventHooksAsync(Systems system, Events _event, Region region = Region.US, string scopeName = null, string pageState = null, StatusFilter? status = null, string accessToken = null, bool throwOnError = true)
    

    Retrieves a paginated list of webhooks for the specified event. The returned list contains a subset of webhooks accessible to the provided access token within the specified region. Each page includes up to 200 webhooks.

    If the pageState parameter is not provided, the first page of results is returned. Use the next value from the previous response to fetch subsequent pages.

    Parameters

    system Systems

    The ID of the system the webhook applies to. For example data for Data Management. See Supported Events for a full list of supported systems and their IDs.

    _event Events

    The ID of the event the webhook monitors. See Supported Events for a full list of events.

    region Region

    Specifies the geographical location (region) of the server the request must be executed on. This also corresponds to the region where the Webhook data is stored. It is also the location of the server that will make request to your callback URL. Possible values:

    • US - (Default) Data center dedicated to serve the United States region.
    • EMEA - Data center dedicated to serve the European Union, Middle East, and Africa regions.
    • AUS - Data center dedicated to serve the Australia region.
    • CAN - Data center dedicated to serve the Canada region.
    • DEU - Data center dedicated to serve the Germany region.
    • IND - Data center dedicated to serve the India region.
    • JPN - Data center dedicated to serve the Japan region.
    • GBR - Data center dedicated to serve the United Kingdom region.

    scopeName string

    Filters retrieved webhooks by the scope name used to create hook. For example : folder. If this parameter is not specified, the filter is not applied. (optional)

    pageState string

    Base64 encoded string to fetch the next page of the list of webhooks. If you do not provide this parameter, the first page of results is returned. Use the next value from the previous response to fetch subsequent pages. (optional)

    status StatusFilter ?

    Filters retrieved webhooks by their current state. Possible values are

    • active - Successfully delivered most recent event notifications.
    • inactive - Failed to deliver most recent event notification and has been deactivated.

    If this parameter is not specified, the filter is not applied. See Event Delivery Guarantees for more information on how the state of a webhook changes. (optional)

    accessToken string

    An access token obtained by a call to GetThreeLeggedTokenAsync() or GetTwoLeggedTokenAsync().(optional)

    throwOnError bool

    Specifies whether to throw an exception on error. (optional)

    Returns

    Task <Hooks >

    A paginated list of webhooks.

    Exceptions

    HttpRequestException

    An object that is returned when an API call to the Webhooks service fails.

    GetSystemHooksAsync(string, Region, StatusFilter?, string, string, bool)

    Operation: List All Webhooks for a System

    public Task<Hooks> GetSystemHooksAsync(string system, Region region = Region.US, StatusFilter? status = null, string pageState = null, string accessToken = null, bool throwOnError = true)
    

    Retrieves a paginated list of webhooks for the specified system. The returned list contains a subset of webhooks accessible to the provided access token within the specified region. Each page includes up to 200 webhooks.

    If the pageState parameter is not provided, the first page of results is returned. Use the next value from the previous response to fetch subsequent pages.

    Parameters

    system string

    The ID of the system the webhook applies to. For example data for Data Management. See Supported Events for a full list of supported systems and their IDs.

    region Region

    Specifies the geographical location (region) of the server the request must be executed on. This also corresponds to the region where the Webhook data is stored. It is also the location of the server that will make request to your callback URL. Possible values:

    • US - (Default) Data center dedicated to serve the United States region.
    • EMEA - Data center dedicated to serve the European Union, Middle East, and Africa regions.
    • AUS - Data center dedicated to serve the Australia region.
    • CAN - Data center dedicated to serve the Canada region.
    • DEU - Data center dedicated to serve the Germany region.
    • IND - Data center dedicated to serve the India region.
    • JPN - Data center dedicated to serve the Japan region.
    • GBR - Data center dedicated to serve the United Kingdom region.

    status StatusFilter ?

    Filters retrieved webhooks by their current state. Possible values are

    • active - Successfully delivered most recent event notifications.
    • inactive - Failed to deliver most recent event notification and has been deactivated.

    If this parameter is not specified, the filter is not applied. See Event Delivery Guarantees for more information on how the state of a webhook changes. (optional)

    pageState string

    Base64 encoded string to fetch the next page of the list of webhooks. If you do not provide this parameter, the first page of results is returned. Use the next value from the previous response to fetch subsequent pages. (optional)

    accessToken string

    An access token obtained by a call to GetThreeLeggedTokenAsync() or GetTwoLeggedTokenAsync().(optional)

    throwOnError bool

    Specifies whether to throw an exception on error. (optional)

    Returns

    Task <Hooks >

    A paginated list of webhooks.

    Exceptions

    HttpRequestException

    An object that is returned when an API call to the Webhooks service fails.

    GetSystemHooksAsync(Systems, Region, StatusFilter?, string, string, bool)

    Operation: List All Webhooks for a System

    public Task<Hooks> GetSystemHooksAsync(Systems system, Region region = Region.US, StatusFilter? status = null, string pageState = null, string accessToken = null, bool throwOnError = true)
    

    Retrieves a paginated list of webhooks for the specified system. The returned list contains a subset of webhooks accessible to the provided access token within the specified region. Each page includes up to 200 webhooks.

    If the pageState parameter is not provided, the first page of results is returned. Use the next value from the previous response to fetch subsequent pages.

    Parameters

    system Systems

    The ID of the system the webhook applies to. For example data for Data Management. See Supported Events for a full list of supported systems and their IDs.

    region Region

    Specifies the geographical location (region) of the server the request must be executed on. This also corresponds to the region where the Webhook data is stored. It is also the location of the server that will make request to your callback URL. Possible values:

    • US - (Default) Data center dedicated to serve the United States region.
    • EMEA - Data center dedicated to serve the European Union, Middle East, and Africa regions.
    • AUS - Data center dedicated to serve the Australia region.
    • CAN - Data center dedicated to serve the Canada region.
    • DEU - Data center dedicated to serve the Germany region.
    • IND - Data center dedicated to serve the India region.
    • JPN - Data center dedicated to serve the Japan region.
    • GBR - Data center dedicated to serve the United Kingdom region.

    status StatusFilter ?

    Filters retrieved webhooks by their current state. Possible values are

    • active - Successfully delivered most recent event notifications.
    • inactive - Failed to deliver most recent event notification and has been deactivated.

    If this parameter is not specified, the filter is not applied. See Event Delivery Guarantees for more information on how the state of a webhook changes. (optional)

    pageState string

    Base64 encoded string to fetch the next page of the list of webhooks. If you do not provide this parameter, the first page of results is returned. Use the next value from the previous response to fetch subsequent pages. (optional)

    accessToken string

    An access token obtained by a call to GetThreeLeggedTokenAsync() or GetTwoLeggedTokenAsync().(optional)

    throwOnError bool

    Specifies whether to throw an exception on error. (optional)

    Returns

    Task <Hooks >

    A paginated list of webhooks.

    Exceptions

    HttpRequestException

    An object that is returned when an API call to the Webhooks service fails.

    PatchSystemEventHookAsync(string, string, string, ModifyHookPayload, Region, string, bool)

    Operation: Update a Webhook

    public Task<HttpResponseMessage> PatchSystemEventHookAsync(string system, string _event, string hookId, ModifyHookPayload modifyHookPayload, Region region = Region.US, string accessToken = null, bool throwOnError = true)
    

    Updates the webhook specified by the hook_id parameter. Currently the only attributes you can update are:

    • filter
    • status
    • hook attribute
    • token
    • auto-reactivate hook flag
    • hook expiry
    • callbackWithEventPaylaod flag

    See the modifyHookPayload parameter documentation for more information.

    Parameters

    system string

    The ID of the system the webhook applies to. For example data for Data Management. See Supported Events for a full list of supported systems and their IDs.

    _event string

    The ID of the event the webhook monitors. See Supported Events for a full list of events.

    hookId string

    The ID of the webhook to delete.

    modifyHookPayload ModifyHookPayload

    The payload containing the modifications to be applied to the webhook.

    region Region

    Specifies the geographical location (region) of the server the request must be executed on. This also corresponds to the region where the Webhook data is stored. It is also the location of the server that will make request to your callback URL. Possible values:

    • US - (Default) Data center dedicated to serve the United States region.
    • EMEA - Data center dedicated to serve the European Union, Middle East, and Africa regions.
    • AUS - Data center dedicated to serve the Australia region.
    • CAN - Data center dedicated to serve the Canada region.
    • DEU - Data center dedicated to serve the Germany region.
    • IND - Data center dedicated to serve the India region.
    • JPN - Data center dedicated to serve the Japan region.
    • GBR - Data center dedicated to serve the United Kingdom region.

    accessToken string

    An access token obtained by a call to GetThreeLeggedTokenAsync() or GetTwoLeggedTokenAsync().(optional)

    throwOnError bool

    Specifies whether to throw an exception on error. (optional)

    Returns

    Task <HttpResponseMessage >

    An object that represents a response that only contains response headers.

    Exceptions

    HttpRequestException

    An object that is returned when an API call to the Webhooks service fails.

    PatchSystemEventHookAsync(Systems, Events, string, ModifyHookPayload, Region, string, bool)

    Operation: Update a Webhook

    public Task<HttpResponseMessage> PatchSystemEventHookAsync(Systems system, Events _event, string hookId, ModifyHookPayload modifyHookPayload, Region region = Region.US, string accessToken = null, bool throwOnError = true)
    

    Updates the webhook specified by the hook_id parameter. Currently the only attributes you can update are:

    • filter
    • status
    • hook attribute
    • token
    • auto-reactivate hook flag
    • hook expiry
    • callbackWithEventPaylaod flag

    See the modifyHookPayload parameter documentation for more information.

    Parameters

    system Systems

    The ID of the system the webhook applies to. For example data for Data Management. See Supported Events for a full list of supported systems and their IDs.

    _event Events

    The ID of the event the webhook monitors. See Supported Events for a full list of events.

    hookId string

    The ID of the webhook to delete.

    modifyHookPayload ModifyHookPayload

    The payload containing the modifications to be applied to the webhook.

    region Region

    Specifies the geographical location (region) of the server the request must be executed on. This also corresponds to the region where the Webhook data is stored. It is also the location of the server that will make request to your callback URL. Possible values:

    • US - (Default) Data center dedicated to serve the United States region.
    • EMEA - Data center dedicated to serve the European Union, Middle East, and Africa regions.
    • AUS - Data center dedicated to serve the Australia region.
    • CAN - Data center dedicated to serve the Canada region.
    • DEU - Data center dedicated to serve the Germany region.
    • IND - Data center dedicated to serve the India region.
    • JPN - Data center dedicated to serve the Japan region.
    • GBR - Data center dedicated to serve the United Kingdom region.

    accessToken string

    An access token obtained by a call to GetThreeLeggedTokenAsync() or GetTwoLeggedTokenAsync().(optional)

    throwOnError bool

    Specifies whether to throw an exception on error. (optional)

    Returns

    Task <HttpResponseMessage >

    An object that represents a response that only contains response headers.

    Exceptions

    HttpRequestException

    An object that is returned when an API call to the Webhooks service fails.

    PutTokenAsync(TokenPayload, Region, string, bool)

    Operation: Update Secret Token

    public Task<HttpResponseMessage> PutTokenAsync(TokenPayload tokenPayload, Region region = Region.US, string accessToken = null, bool throwOnError = true)
    

    Replaces an existing secret token with a new one.

    Note that there can be a delay of up to 10 minutes while the change takes effect. We recommend that your callback accept both secret token values for a period of time to allow all requests to go through.

    The webhooks affected by this operation are determined by the type of access token you use.

    • Two-legged Access Token: Sets the secret token for all webhooks owned by calling the app.
    • Three-legged Access Token: Sets the secrety token for all webhooks owned by the calling user

    Note: Use the Update Webhook operation to set a token for a specific webhook.

    See the Secret Token section in API Basics for more information.

    Parameters

    tokenPayload TokenPayload

    The payload containing the token information.

    region Region

    Specifies the geographical location (region) of the server the request must be executed on. This also corresponds to the region where the Webhook data is stored. It is also the location of the server that will make request to your callback URL. Possible values:

    • US - (Default) Data center dedicated to serve the United States region.
    • EMEA - Data center dedicated to serve the European Union, Middle East, and Africa regions.
    • AUS - Data center dedicated to serve the Australia region.
    • CAN - Data center dedicated to serve the Canada region.
    • DEU - Data center dedicated to serve the Germany region.
    • IND - Data center dedicated to serve the India region.
    • JPN - Data center dedicated to serve the Japan region.
    • GBR - Data center dedicated to serve the United Kingdom region.

    accessToken string

    An access token obtained by a call to GetThreeLeggedTokenAsync() or GetTwoLeggedTokenAsync().(optional)

    throwOnError bool

    Specifies whether to throw an exception on error. (optional)

    Returns

    Task <HttpResponseMessage >

    An object that represents a response that only contains response headers.

    Exceptions

    HttpRequestException

    An object that is returned when an API call to the Webhooks service fails.