There are two main purposes for which scripts are used within the application. The first one is "Discover Action" and the second one is "Trigger Action". We will examine both usage purposes in detail in their respective fields. See, Automate Host Registration & Alerting
- Go to "Actions > Scripts & Webhooks" and click the plus sign next to the "Scripts" heading.
- Fill in the relevant fields in the form that opens.
Important Note: You can use both the macros you created and the embedded macros in the scripts. For more information about built-in macros, you can get help here.
# Example
curl -s -XPOST "https://api.example.com/incidents/create" -H 'accept: application/json' -d '{
"incident-id": "{ACTION.ID}",
"incident-name": "{ACTION.NAME}",
"incident-hostname": "{HOST.NAME}",
"incident-responder": "{$USER_DEFINED_MACRO}"
}'

