Request

Response

    Class: WebhooksClient

    Defined in: custom-code/webhooksClient.ts:7

    Extends

    • BaseClient

    Constructors

    Constructor

    new WebhooksClient(optionalArgs?): WebhooksClient

    Defined in: custom-code/webhooksClient.ts:11

    optionalArgs?

    authenticationProvider?

    IAuthenticationProvider

    sdkManager?

    SdkManager

    Returns

    WebhooksClient

    Overrides

    BaseClient.constructor

    Accessors

    authenticationProvider

    Get Signature

    get authenticationProvider(): IAuthenticationProvider

    Defined in: node_modules/@aps_sdk/autodesk-sdkmanager/dist/src/baseClient.d.ts:4

    Returns

    IAuthenticationProvider

    Set Signature

    set authenticationProvider(value): void

    Defined in: node_modules/@aps_sdk/autodesk-sdkmanager/dist/src/baseClient.d.ts:5

    Parameters

    value

    IAuthenticationProvider

    Returns

    void

    Inherited from

    BaseClient.authenticationProvider

    Methods

    createSystemEventHook()

    Operation: Create a Webhook for an Event

    createSystemEventHook(system, event, hookPayload, optionalArgs?): Promise<void>

    Defined in: custom-code/webhooksClient.ts:43

    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

    optionalArgs?

    accessToken?

    string

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

    options?

    ApsServiceRequestConfig

    Override http request option.

    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.

    Returns

    Promise<void>

    Throws

    WebhooksApiError


    createSystemHook()

    Operation: Create Webhooks for All Events

    createSystemHook(system, hookPayload, optionalArgs?): Promise<Hook>

    Defined in: custom-code/webhooksClient.ts:74

    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

    optionalArgs?

    accessToken?

    string

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

    options?

    ApsServiceRequestConfig

    Override http request option.

    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.

    Returns

    Promise<Hook>

    Throws

    WebhooksApiError


    createToken()

    Operation: Create Secret Token

    createToken(tokenPayload, optionalArgs?): Promise<Token>

    Defined in: custom-code/webhooksClient.ts:387

    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

    optionalArgs?

    accessToken?

    string

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

    options?

    ApsServiceRequestConfig

    Override http request option.

    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.

    Returns

    Promise<Token>

    Throws

    WebhooksApiError


    deleteSystemEventHook()

    Operation: Delete a Webhook

    deleteSystemEventHook(system, event, hookId, optionalArgs?): Promise<void>

    Defined in: custom-code/webhooksClient.ts:106

    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.

    optionalArgs?

    accessToken?

    string

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

    options?

    ApsServiceRequestConfig

    Override http request option.

    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.

    Returns

    Promise<void>

    Throws

    WebhooksApiError


    deleteToken()

    Operation: Delete a Webhook

    deleteToken(optionalArgs?): Promise<void>

    Defined in: custom-code/webhooksClient.ts:420

    Deletes the webhook specified by its ID.

    optionalArgs?

    accessToken?

    string

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

    options?

    ApsServiceRequestConfig

    Override http request option.

    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.

    Returns

    Promise<void>

    Throws

    WebhooksApiError


    getAppHooks()

    Operation: List All Webhooks for an App

    getAppHooks(optionalArgs?): Promise<Hooks>

    Defined in: custom-code/webhooksClient.ts:151

    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).

    optionalArgs?

    accessToken?

    string

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

    options?

    ApsServiceRequestConfig

    Override http request option.

    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.

    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.

    sort?

    Sort

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

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

    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.

    Returns

    Promise<Hooks>

    Throws

    WebhooksApiError


    getHookDetails()

    Operation: Get Webhook Details

    getHookDetails(system, event, hookId, optionalArgs?): Promise<HookDetails>

    Defined in: custom-code/webhooksClient.ts:183

    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.

    optionalArgs?

    accessToken?

    string

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

    options?

    ApsServiceRequestConfig

    Override http request option.

    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.

    Returns

    Promise<HookDetails>

    Throws

    WebhooksApiError


    getHooks()

    Operation: List All Webhooks

    getHooks(optionalArgs?): Promise<Hooks>

    Defined in: custom-code/webhooksClient.ts:221

    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.

    optionalArgs?

    accessToken?

    string

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

    options?

    ApsServiceRequestConfig

    Override http request option.

    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.

    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.

    Returns

    Promise<Hooks>

    Throws

    WebhooksApiError


    getSystemEventHooks()

    Operation: List All Webhooks for an Event

    getSystemEventHooks(system, event, optionalArgs?): Promise<Hooks>

    Defined in: custom-code/webhooksClient.ts:263

    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.

    optionalArgs?

    accessToken?

    string

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

    options?

    ApsServiceRequestConfig

    Override http request option.

    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.

    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.

    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.

    Returns

    Promise<Hooks>

    Throws

    WebhooksApiError


    getSystemHooks()

    Operation: List All Webhooks for a System

    getSystemHooks(system, optionalArgs?): Promise<Hooks>

    Defined in: custom-code/webhooksClient.ts:303

    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.

    optionalArgs?

    accessToken?

    string

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

    options?

    ApsServiceRequestConfig

    Override http request option.

    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.

    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.

    Returns

    Promise<Hooks>

    Throws

    WebhooksApiError


    patchSystemEventHook()

    Operation: Update a Webhook

    patchSystemEventHook(system, event, hookId, modifyHookPayload, optionalArgs?): Promise<void>

    Defined in: custom-code/webhooksClient.ts:346

    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

    optionalArgs?

    accessToken?

    string

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

    options?

    ApsServiceRequestConfig

    Override http request option.

    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.

    Returns

    Promise<void>

    Throws

    WebhooksApiError


    putToken()

    Operation: Update Secret Token

    putToken(tokenPayload, optionalArgs?): Promise<void>

    Defined in: custom-code/webhooksClient.ts:460

    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

    optionalArgs?

    accessToken?

    string

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

    options?

    ApsServiceRequestConfig

    Override http request option.

    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.

    Returns

    Promise<void>

    Throws

    WebhooksApiError