Skip to main content
POST
/
monit
/
tools
/
invoke
Invoke target tools
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
      }
    }
  ]
}
'
{
  "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
  }
}

Restrictions

AspectValue
Rate limits600 requests/minute; 10 requests/second per account
PermissionsAny 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 request tools[] 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 with data.error set and data.results = [].
  • Per-tool failures appear as HTTP 200 with data.error = null and results[i].error populated — always check all three layers (outer envelope error, data.error, then each results[i].error).
  • Each result carries two latency fields: agent_elapsed_ms (agent-self-reported, excludes network) and e2e_elapsed_ms (webapi-observed end-to-end). A large gap between them indicates network / edge slowness rather than slow tool execution.
  • Construct tools[].params against the input_schema returned by /monit/tools/catalog. For no-arg tools always pass params: {} explicitly.

Authorizations

app_key
string
query
required

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

application/json
target_locator
string
required

Target identifier. Same validation rules as /monit/tools/catalog.

tools
object[]
required

Up to 8 tool calls; webapi executes them concurrently and returns results in input order.

Required array length: 1 - 8 elements
account_id
integer<int64>

Optional consistency check. Must equal the authenticated account when supplied.

target_kind
string

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.

request_id
string
required

Unique ID for this request. Mirrored in the Flashcat-Request-Id response header. Include it when reporting issues.

Example:

"01HK8XQE3Z7JM2NTFQ5YJ8P9R4"

data
object
required

Endpoint-specific payload. See each operation's 200 response schema.