Info |
---|
Important to knowWhen making API calls via Automation for Jira, same request URL is used and 3 headers are required to be set beforehand. These headers are:
*To send a web request via Automation, you have to encode the credentials "<EMAIL>:<API_TOKEN>" with base64. This can be done through any online tool like Base64 encode. Once it's done, fill in the Value as: "Basic 'encoded <EMAIL>:<API_TOKEN>'". |
Info |
---|
To allow triggering SLA events via API, make sure "Custom Behaviour" box is checked in the SLA Agreement configuration. |
Set Automation rule
Info |
---|
You can configure various scenarios thanks to the integration between SLA PowerBox API and Automation. This page describes a basic example: |
start SLA metric |
when |
issue is assigned. SLA metric ID can be obtained by using some endpoints e.g. GET/integration/V1/metrics-state/{ticketId}/metrics |
In order to set up the Automation rule for the project, proceed to Project settings → Automation → click Create rule.
Choose a trigger for the rule: Issue comment deletedassigned.
As an action select Send web request.
2.1. Enter Web request URL: https://slaapp.almarise.com/integration/V1/sla-custom-event/add
2.2. Enter headers: emailSource-System, jiraJira-host, api-tokenHost, Authorization*.
2.3. Select HTTP method: GET or POST.
2.4. Fill in Web request body if necessary.
2.5. Check the required boxes in Wait for response section:
- Delay execution of subsequent rule actions until we've received a response for this web request.
- Continue running the rule even if the request response is not successful (i.e. non-200 response).
3. Validate your web request configuration by entering an issue key (optional).
:
Code Block |
---|
{
"ticketId": "{{issue.id}}",
"metricId": "65776249d33d8f51f757d826",
"triggerName": "metricStart",
"slaEventAction": "START"
} |
3. Click Save and select Turn it on.
4. Click Save and select Turn it on.