curl --request POST \
--url 'https://api.flashcat.cloud/monit/tools/invoke?app_key=' \
--header 'Content-Type: application/json' \
--data '
{
"account_id": 10001,
"target_locator": "web-01",
"tools": [
{
"tool": "os.overview",
"params": {}
},
{
"tool": "net.tcp_ping",
"params": {
"host": "10.0.0.10",
"port": 3306
}
}
]
}
'import requests
url = "https://api.flashcat.cloud/monit/tools/invoke?app_key="
payload = {
"account_id": 10001,
"target_locator": "web-01",
"tools": [
{
"tool": "os.overview",
"params": {}
},
{
"tool": "net.tcp_ping",
"params": {
"host": "10.0.0.10",
"port": 3306
}
}
]
}
headers = {"Content-Type": "application/json"}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {'Content-Type': 'application/json'},
body: JSON.stringify({
account_id: 10001,
target_locator: 'web-01',
tools: [
{tool: 'os.overview', params: {}},
{tool: 'net.tcp_ping', params: {host: '10.0.0.10', port: 3306}}
]
})
};
fetch('https://api.flashcat.cloud/monit/tools/invoke?app_key=', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.flashcat.cloud/monit/tools/invoke?app_key=",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'account_id' => 10001,
'target_locator' => 'web-01',
'tools' => [
[
'tool' => 'os.overview',
'params' => [
]
],
[
'tool' => 'net.tcp_ping',
'params' => [
'host' => '10.0.0.10',
'port' => 3306
]
]
]
]),
CURLOPT_HTTPHEADER => [
"Content-Type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://api.flashcat.cloud/monit/tools/invoke?app_key="
payload := strings.NewReader("{\n \"account_id\": 10001,\n \"target_locator\": \"web-01\",\n \"tools\": [\n {\n \"tool\": \"os.overview\",\n \"params\": {}\n },\n {\n \"tool\": \"net.tcp_ping\",\n \"params\": {\n \"host\": \"10.0.0.10\",\n \"port\": 3306\n }\n }\n ]\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://api.flashcat.cloud/monit/tools/invoke?app_key=")
.header("Content-Type", "application/json")
.body("{\n \"account_id\": 10001,\n \"target_locator\": \"web-01\",\n \"tools\": [\n {\n \"tool\": \"os.overview\",\n \"params\": {}\n },\n {\n \"tool\": \"net.tcp_ping\",\n \"params\": {\n \"host\": \"10.0.0.10\",\n \"port\": 3306\n }\n }\n ]\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.flashcat.cloud/monit/tools/invoke?app_key=")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Content-Type"] = 'application/json'
request.body = "{\n \"account_id\": 10001,\n \"target_locator\": \"web-01\",\n \"tools\": [\n {\n \"tool\": \"os.overview\",\n \"params\": {}\n },\n {\n \"tool\": \"net.tcp_ping\",\n \"params\": {\n \"host\": \"10.0.0.10\",\n \"port\": 3306\n }\n }\n ]\n}"
response = http.request(request)
puts response.read_body{
"request_id": "01HK8XQE3Z7JM2NTFQ5YJ8P9R4",
"data": {
"target": {
"kind": "host",
"locator": "web-01"
},
"results": [
{
"tool": "os.overview",
"tool_version": "0.5.0",
"data": {
"data": {
"sample_interval_sec": 3,
"degraded": false,
"degradation_reasons": []
},
"summary": "os.overview ...",
"truncated": {
"truncated": false
}
},
"error": null,
"agent_elapsed_ms": 3120,
"e2e_elapsed_ms": 3188
},
{
"tool": "net.tcp_ping",
"tool_version": "0.5.0",
"data": null,
"error": {
"code": "target_unreachable",
"message": "dial tcp 10.0.0.10:3306: i/o timeout"
},
"agent_elapsed_ms": 0,
"e2e_elapsed_ms": 2008
}
],
"error": null
}
}{
"request_id": "01HK8XQE3Z7JM2NTFQ5YJ8P9R4",
"error": {
"code": "InvalidParameter",
"message": "The specified parameter is not valid."
}
}{
"request_id": "01HK8XQE3Z7JM2NTFQ5YJ8P9R4",
"error": {
"code": "Unauthorized",
"message": "You are unauthorized."
}
}{
"request_id": "01HK8XQE3Z7JM2NTFQ5YJ8P9R4",
"error": {
"code": "RequestTooFrequently",
"message": "Request too frequently."
}
}{
"request_id": "01HK8XQE3Z7JM2NTFQ5YJ8P9R4",
"error": {
"code": "InternalError",
"message": "We encountered an internal error, and it has been reported. Please try again later."
}
}Invoke target tools
Invoke up to 8 monit-agent tools concurrently on a single target. Results come back in the order of the input tools array. Long-running — individual tools have per-tool timeouts on the agent and the whole request may take tens of seconds.
curl --request POST \
--url 'https://api.flashcat.cloud/monit/tools/invoke?app_key=' \
--header 'Content-Type: application/json' \
--data '
{
"account_id": 10001,
"target_locator": "web-01",
"tools": [
{
"tool": "os.overview",
"params": {}
},
{
"tool": "net.tcp_ping",
"params": {
"host": "10.0.0.10",
"port": 3306
}
}
]
}
'import requests
url = "https://api.flashcat.cloud/monit/tools/invoke?app_key="
payload = {
"account_id": 10001,
"target_locator": "web-01",
"tools": [
{
"tool": "os.overview",
"params": {}
},
{
"tool": "net.tcp_ping",
"params": {
"host": "10.0.0.10",
"port": 3306
}
}
]
}
headers = {"Content-Type": "application/json"}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {'Content-Type': 'application/json'},
body: JSON.stringify({
account_id: 10001,
target_locator: 'web-01',
tools: [
{tool: 'os.overview', params: {}},
{tool: 'net.tcp_ping', params: {host: '10.0.0.10', port: 3306}}
]
})
};
fetch('https://api.flashcat.cloud/monit/tools/invoke?app_key=', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.flashcat.cloud/monit/tools/invoke?app_key=",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'account_id' => 10001,
'target_locator' => 'web-01',
'tools' => [
[
'tool' => 'os.overview',
'params' => [
]
],
[
'tool' => 'net.tcp_ping',
'params' => [
'host' => '10.0.0.10',
'port' => 3306
]
]
]
]),
CURLOPT_HTTPHEADER => [
"Content-Type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://api.flashcat.cloud/monit/tools/invoke?app_key="
payload := strings.NewReader("{\n \"account_id\": 10001,\n \"target_locator\": \"web-01\",\n \"tools\": [\n {\n \"tool\": \"os.overview\",\n \"params\": {}\n },\n {\n \"tool\": \"net.tcp_ping\",\n \"params\": {\n \"host\": \"10.0.0.10\",\n \"port\": 3306\n }\n }\n ]\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://api.flashcat.cloud/monit/tools/invoke?app_key=")
.header("Content-Type", "application/json")
.body("{\n \"account_id\": 10001,\n \"target_locator\": \"web-01\",\n \"tools\": [\n {\n \"tool\": \"os.overview\",\n \"params\": {}\n },\n {\n \"tool\": \"net.tcp_ping\",\n \"params\": {\n \"host\": \"10.0.0.10\",\n \"port\": 3306\n }\n }\n ]\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.flashcat.cloud/monit/tools/invoke?app_key=")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Content-Type"] = 'application/json'
request.body = "{\n \"account_id\": 10001,\n \"target_locator\": \"web-01\",\n \"tools\": [\n {\n \"tool\": \"os.overview\",\n \"params\": {}\n },\n {\n \"tool\": \"net.tcp_ping\",\n \"params\": {\n \"host\": \"10.0.0.10\",\n \"port\": 3306\n }\n }\n ]\n}"
response = http.request(request)
puts response.read_body{
"request_id": "01HK8XQE3Z7JM2NTFQ5YJ8P9R4",
"data": {
"target": {
"kind": "host",
"locator": "web-01"
},
"results": [
{
"tool": "os.overview",
"tool_version": "0.5.0",
"data": {
"data": {
"sample_interval_sec": 3,
"degraded": false,
"degradation_reasons": []
},
"summary": "os.overview ...",
"truncated": {
"truncated": false
}
},
"error": null,
"agent_elapsed_ms": 3120,
"e2e_elapsed_ms": 3188
},
{
"tool": "net.tcp_ping",
"tool_version": "0.5.0",
"data": null,
"error": {
"code": "target_unreachable",
"message": "dial tcp 10.0.0.10:3306: i/o timeout"
},
"agent_elapsed_ms": 0,
"e2e_elapsed_ms": 2008
}
],
"error": null
}
}{
"request_id": "01HK8XQE3Z7JM2NTFQ5YJ8P9R4",
"error": {
"code": "InvalidParameter",
"message": "The specified parameter is not valid."
}
}{
"request_id": "01HK8XQE3Z7JM2NTFQ5YJ8P9R4",
"error": {
"code": "Unauthorized",
"message": "You are unauthorized."
}
}{
"request_id": "01HK8XQE3Z7JM2NTFQ5YJ8P9R4",
"error": {
"code": "RequestTooFrequently",
"message": "Request too frequently."
}
}{
"request_id": "01HK8XQE3Z7JM2NTFQ5YJ8P9R4",
"error": {
"code": "InternalError",
"message": "We encountered an internal error, and it has been reported. Please try again later."
}
}Restrictions
| Aspect | Value |
|---|---|
| Rate limits | 600 requests/minute; 10 requests/second per account |
| Permissions | Any valid app_key (read-only; not gated by a specific permission class) |
Usage
- Up to 8 tools per call (
MaxToolsPerInvoke); larger batches must be split client-side. The 8-tool cap aligns with the per-target agent concurrency. - Tools execute in parallel on the agent; webapi returns
results[]aligned with the requesttools[]order. - Long-running: set client timeouts to at least 35 s. The endpoint is intended for AI-SRE / human-RCA flows, not interactive UI.
- Request-level errors (
target_unavailable,ambiguous_target_kind,unknown_toolset_hash,forward_failed) appear as HTTP 200 withdata.errorset anddata.results = []. - Per-tool failures appear as HTTP 200 with
data.error = nullandresults[i].errorpopulated — always check all three layers (outer envelopeerror,data.error, then eachresults[i].error). - Each result carries two latency fields:
agent_elapsed_ms(agent-self-reported, excludes network) ande2e_elapsed_ms(webapi-observed end-to-end). A large gap between them indicates network / edge slowness rather than slow tool execution. - Construct
tools[].paramsagainst theinput_schemareturned by/monit/tools/catalog. For no-arg tools always passparams: {}explicitly.
Authorizations
App key issued from the Flashduty console under Account → APP Keys. Required on every public API call. Keep it secret — it grants the same access as the owning account.
Body
Target identifier. Same validation rules as /monit/tools/catalog.
Up to 8 tool calls; webapi executes them concurrently and returns results in input order.
1 - 8 elementsShow child attributes
Show child attributes
Optional consistency check. Must equal the authenticated account when supplied.
Optional target kind; auto-inferred when omitted.
Response
Success
Success response envelope. On every 2xx response, request_id identifies the call (also mirrored in the Flashcat-Request-Id header) and data holds the endpoint-specific payload. Failure responses use a different shape — see ErrorResponse.
Was this page helpful?