Show workflow rule
curl --request GET \
--url http://localhost:8080/api/v1/workflow-rules/{workflowRule} \
--header 'Authorization: Bearer <token>'import requests
url = "http://localhost:8080/api/v1/workflow-rules/{workflowRule}"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('http://localhost:8080/api/v1/workflow-rules/{workflowRule}', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_PORT => "8080",
CURLOPT_URL => "http://localhost:8080/api/v1/workflow-rules/{workflowRule}",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "http://localhost:8080/api/v1/workflow-rules/{workflowRule}"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("Authorization", "Bearer <token>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.get("http://localhost:8080/api/v1/workflow-rules/{workflowRule}")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("http://localhost:8080/api/v1/workflow-rules/{workflowRule}")
http = Net::HTTP.new(url.host, url.port)
request = Net::HTTP::Get.new(url)
request["Authorization"] = 'Bearer <token>'
response = http.request(request)
puts response.read_body{
"data": {
"id": "<string>",
"name": "<string>",
"provider_slug": "<string>",
"ping_target_id": "<string>",
"target_label": "<string>",
"target_host": "<string>",
"event": "<string>",
"event_label": "Speedtest run completes",
"condition_operator": "<string>",
"is_active": true,
"cooldown_minutes": 123,
"last_triggered_at": "<string>",
"conditions": [
{
"id": "<string>",
"metric": "<string>",
"operator": "<string>",
"value": "<string>",
"lookback_minutes": 123,
"sort_order": 123
}
],
"actions": [
{
"id": "<string>",
"type": "<string>",
"mail_provider_id": "<string>",
"email_template_id": "<string>",
"recipient_email": "<string>",
"webhook_id": "<string>",
"apprise_id": "<string>",
"sort_order": 123
}
],
"created_at": "<string>"
},
"success": true,
"code": 200
}{
"success": false,
"code": 401,
"message": "<string>"
}{
"success": false,
"code": 404,
"message": "<string>"
}{
"success": false,
"code": 405,
"message": "<string>"
}{
"success": false,
"code": 422,
"message": "<string>",
"errors": "<string>"
}{
"success": false,
"code": 429,
"message": "<string>"
}{
"success": false,
"code": 500,
"message": "<string>"
}Workflow Rules
Show workflow rule
Show a single workflow rule with its conditions and actions.
GET
/
v1
/
workflow-rules
/
{workflowRule}
Show workflow rule
curl --request GET \
--url http://localhost:8080/api/v1/workflow-rules/{workflowRule} \
--header 'Authorization: Bearer <token>'import requests
url = "http://localhost:8080/api/v1/workflow-rules/{workflowRule}"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('http://localhost:8080/api/v1/workflow-rules/{workflowRule}', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_PORT => "8080",
CURLOPT_URL => "http://localhost:8080/api/v1/workflow-rules/{workflowRule}",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "http://localhost:8080/api/v1/workflow-rules/{workflowRule}"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("Authorization", "Bearer <token>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.get("http://localhost:8080/api/v1/workflow-rules/{workflowRule}")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("http://localhost:8080/api/v1/workflow-rules/{workflowRule}")
http = Net::HTTP.new(url.host, url.port)
request = Net::HTTP::Get.new(url)
request["Authorization"] = 'Bearer <token>'
response = http.request(request)
puts response.read_body{
"data": {
"id": "<string>",
"name": "<string>",
"provider_slug": "<string>",
"ping_target_id": "<string>",
"target_label": "<string>",
"target_host": "<string>",
"event": "<string>",
"event_label": "Speedtest run completes",
"condition_operator": "<string>",
"is_active": true,
"cooldown_minutes": 123,
"last_triggered_at": "<string>",
"conditions": [
{
"id": "<string>",
"metric": "<string>",
"operator": "<string>",
"value": "<string>",
"lookback_minutes": 123,
"sort_order": 123
}
],
"actions": [
{
"id": "<string>",
"type": "<string>",
"mail_provider_id": "<string>",
"email_template_id": "<string>",
"recipient_email": "<string>",
"webhook_id": "<string>",
"apprise_id": "<string>",
"sort_order": 123
}
],
"created_at": "<string>"
},
"success": true,
"code": 200
}{
"success": false,
"code": 401,
"message": "<string>"
}{
"success": false,
"code": 404,
"message": "<string>"
}{
"success": false,
"code": 405,
"message": "<string>"
}{
"success": false,
"code": 422,
"message": "<string>",
"errors": "<string>"
}{
"success": false,
"code": 429,
"message": "<string>"
}{
"success": false,
"code": 500,
"message": "<string>"
}Authorizations
Bearer authentication header of the form Bearer <token>, where <token> is your auth token.
Path Parameters
The workflow rule ID
Response
WorkflowRuleResource
Hide child attributes
Hide child attributes
Available options:
Speedtest run completes, Speedtest run fails, Speedtest run is skipped, Any speedtest event, Ping result recorded Hide child attributes
Hide child attributes
⌘I