Skip to content

How to Configure the HttpRequest Notifier#

Platinum

This topic provides step-by-step instructions for configuring the HttpRequest notifier in TheHive.

Notifier availability

The HttpRequest notifier is available only when you turn off the Send notification to every user in the organization toggle and use one of the following triggers: - AnyEvent
- FilteredEvent
- ActionFinished
- CaseClosed
- CaseCreated
- CaseFlagged
- CaseShared
- AlertClosed
- AlertCreated
- AlertImported
- JobFinished
- AlertObservableCreated
- CaseObservableCreated
- ObservableCreated
- TaskClosed
- TaskMandatory

Required permissions

Only users with the manageConfig permission can manage notifications in TheHive.

Procedure

  1. Go to the Organization view from the sidebar menu.

    Organization view


  2. Select the Notifications tab.

    Notifications tab


  3. Select and then Edit.


  4. Select the HttpRequest notifier.


  5. In the HttpRequest drawer, enter the following information:

    - Endpoint *

    Using HttpRequest as a notifier requires at least one endpoint.

    Select an existing endpoint. Endpoints can be local, defined at the organization level, or global, defined at the client level for one or more organizations. You can add a new local endpoint by selecting Add a new endpoint.

    - Method *

    Select an HTTP method from the dropdown list.

    - URL *

    Enter a valid URL.

    - Template *

    Enter the payload to be sent to the HTTP endpoint. Select JSON, XML, or plain text based on what your external system requirements.

    Available variables

    You can use variables in certain fields by selecting Add variable. Refer to the Variable Usage Examples topic for detailed examples.

    Conditional helpers using Mustache syntax

    Example:

    {{#if (eq object.severity 2) }}MEDIUM {{else}}Other {{/if}}
    
    Find additional supported operators in the official Handlebars documentation.

    Data formatting helpers

    The following helpers are available to format your data:

    Helper Description Usage Output
    tlpLabel Format the tlp field of the object {{ tlpLabel object.tlp }} Amber
    papLabel Format the pap field of the object {{ papLabel object.pap }} Amber
    severityLabel Format the severity field of the object {{ severityLabel object.severity }} Critical
    dateFormat Format a date field of the object using Java date time patterns {{dateFormat audit._createdAt "EEEEE dd MMMMM yyyy" "fr" }} jeudi 01 septembre 2022

    Standard string helpers can be found in the official Handlebars documentation.


  6. Turn on the Log errors toggle if you want to capture and track any errors that occur when sending the HTTP request.


  7. Select in the Headers section to add headers.

    Enter a header key and its corresponding value to include in the HTTP request. Use headers to send authentication tokens, content types, or other metadata required by the external system.


  8. In the Authentication section, select an authentication type if required.


  9. In the Proxy settings section, select the proxy settings you want to apply:

    • Default configuration
    • Disabled
    • Enabled:
      • Enter the type of protocol, either HTTP or HTTPS.
      • Enter the IP address or domain name of the proxy server.
      • Enter the port number used by the proxy server.
      • Turn on the Authentication toggle if you want to require a username and password to authenticate with the proxy server.

  10. Add a certificate authority.

    For more information about configuring SSL, refer to the Configure SSL topic.

    Use certificates only from trusted, predefined authorities for secure connections. Custom certificate authorities are not allowed.

    You can turn off the Don't check certificate authority toggle to bypass certificate validation, but this isn't recommended as it may compromise connection security.


  11. Turn on the Disable host name verification toggle if you want to bypass the verification of the server's host name against the certificate.


  12. Select Confirm.

Next steps