Publishing data to an external endpoint using custom destination

About this task

This use case explains how to publish data to a REST endpoint using custom destination.

Ensure that you have the external endpoint URL to which the data must be published.

Procedure

  1. Open the menu options and select Administration.
  2. Select Destinations.
  3. Select Custom destinations from the left navigation pane.
  4. Click + Add custom destination.
  5. Provide the name of the custom destination in the Name field.

    The name must be unique and must not be the name of any pre-defined webMethods API Gateway destinations such as Elasticsearch.

  6. To configure conditions that determine the data to be published in the specified destination, to do the following steps in the Conditions section.
    • Select one of the following options in the Condition type field.
      • And. To publish data that satisfies all your conditions.
      • Or. To publish data that satisfies one of your conditions.
    • Click + Add condition.

      Provide the following details for your condition:

      • Variable. Name of the variable based on which you want to validate your condition. This field supports the variables that are available in the Variable framework. For details about the list of variables available, see Variable Framework.
      • Operator. The operator to use to relate the variable and the value.
      • Value. The value of the variable that must be matched to satisfy the condition.
      • Click Add.

    The condition appears in the grid.

    Repeat this process to add the number of conditions. Click a condition to edit it and click the deleted icon next to a condition to delete it.

  7. Select External endpoint in the Type field.
  8. Provide the following information in the External Endpoint section:
    Property Description
    Endpoint URI Provide the REST endpoint of the destination to publish the specified events. For example, http://localhost:9292/rest_endpoint/.
    Method Specify the method exposed by the API. Available values are GET, POST, PUT, DELETE, HEAD, and CUSTOM.
    SSL Configuration Specifies the SSL configuration details of the external endpoint. Provide the following information:
    • Keystore Alias. Specifies the keystore alias. For details on keystore configuration, see Configuring keystore information.
    • Key Alias. Specifies the alias for the private key, which must be stored in the keystore that is specified by the keystore alias.
    • Truststore Alias. Specifies the alias for the truststore. For details on Truststore configuration, see Configuring truststore information .
    • HTTP Connection Timeout (seconds). Specifies the time interval (in seconds) after which a connection attempt to the external endpoint URL times out.
    • Read Timeout (seconds). Specifies the time interval (in seconds) after which a socket read attempt times out.
    Path Parameters Specifies the path parameter that you want to configure to your custom extension. Provide the following information:
    • Path Parameter Name. Specifies the name of the path parameter that you want to configure in your custom extension. This path parameter name must be present in the endpoint URL enclosed with {} to be replaced at run time. For example, define an external URL as http://host/authors/{id}/ books and provide ID as path parameter name with the value you need to populate at run time.
    • Path Parameter Value. Specifies the value for the path parameter specified.
  9. Configure the custom properties of the custom extension.

    For details about the custom extension properties and their descriptions, see Custom extension properties.

  10. From the Events section, select the data that you want to publish to the configured destination. The options available are
    • Event types. Type of events to publish to the specified destination. The available event types are
      • Error Occurs each time an API invocation results in an error.
      • Lifecycle Occurs each time webMethods API Gateway is started or shut down.
      • Policy violation Occurs each time an API invocation violates the policy enforcement that was set for the API.
    • Performance metrics data. To publish to the specified destination.

      In the Publish interval of performance metrics data field, enter a time interval (in minutes) to specify how often webMethods API Gateway must publish performance metrics. Provide a value from 1 through 60. The default is 60 minutes.

    • Events. webMethods API Gateway modules for which the audit logs are published to the specified destination.
  11. Click Add.

    The custom destination is created successfully and appears in the Custom destinations page. The configured events are published in the specified destination.

    Note: To edit a custom destination, you can click the custom destination, make changes, and click Update. To delete a custom destination, click the Delete icon next to the custom destination. You cannot delete a custom destination that is associated with an API.