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",
"params": {},
"tool_version": "0.6.0",
"data": {
"sample_interval_sec": 0.5,
"cpu": {
"cores": 4,
"usage_pct": 32.66,
"user_pct": 28.14,
"system_pct": 3.52,
"iowait_pct": 1.01,
"idle_pct": 67.34
},
"load": {
"load1": 1.79,
"load5": 1.83,
"load15": 1.67,
"runnable_procs": 7,
"total_procs": 1036
}
},
"summary": "os.overview cpu=32.66% mem=74.46% swap=not_configured oom_kill_since_boot=2 load1=1.79"
},
{
"tool": "net.tcp_ping",
"params": {
"host": "10.255.255.1",
"port": 3306
},
"tool_version": "0.1.0",
"error": {
"code": "timeout",
"message": "tool \"net.tcp_ping\" exceeded 8000ms"
}
}
]
}
}{
"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",
"params": {},
"tool_version": "0.6.0",
"data": {
"sample_interval_sec": 0.5,
"cpu": {
"cores": 4,
"usage_pct": 32.66,
"user_pct": 28.14,
"system_pct": 3.52,
"iowait_pct": 1.01,
"idle_pct": 67.34
},
"load": {
"load1": 1.79,
"load5": 1.83,
"load15": 1.67,
"runnable_procs": 7,
"total_procs": 1036
}
},
"summary": "os.overview cpu=32.66% mem=74.46% swap=not_configured oom_kill_since_boot=2 load1=1.79"
},
{
"tool": "net.tcp_ping",
"params": {
"host": "10.255.255.1",
"port": 3306
},
"tool_version": "0.1.0",
"error": {
"code": "timeout",
"message": "tool \"net.tcp_ping\" exceeded 8000ms"
}
}
]
}
}{
"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,forward_failed) appear as HTTP 200 withdata.errorset anddata.results = []. - Per-tool failures appear as HTTP 200 with
data.errorabsent andresults[i].errorpopulated — always check all three layers (outer envelopeerror,data.error, then eachresults[i].error). - The response uses sparse fields: absent means empty. On success
erroris omitted entirely rather than sent asnull; on failuredata,summaryandtruncatedare omitted. Do not key logic off placeholdernullfields, and do not expecttargetwhen the locator could not be uniquely resolved. results[i].datais the tool payload with the monit-agent result envelope already unwrapped — there is no nesteddata.data. The one-line distillation isresults[i].summary, andresults[i].truncated(carrying areason) appears only when the result was genuinely truncated.results[i].paramsechoes the params webapi received for that tool, so batched calls stay correlatable even when an individual tool fails.- 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?