curl --request POST \
--url 'https://api.flashcat.cloud/monit/datasource/tools/invoke?app_key=' \
--header 'Content-Type: application/json' \
--data '
{
"datasource_id": 10,
"params": {},
"tool": "mysql.overview"
}
'{
"data": {
"data": {
"version": "8.0.36"
},
"datasource_id": 10,
"summary": "MySQL overview",
"tool": "mysql.overview"
},
"request_id": "01HK8XQE3Z7JM2NTFQ5YJ8P9R4"
}Invoke datasource tool
Execute one deterministic diagnostic or query tool against a configured datasource.
curl --request POST \
--url 'https://api.flashcat.cloud/monit/datasource/tools/invoke?app_key=' \
--header 'Content-Type: application/json' \
--data '
{
"datasource_id": 10,
"params": {},
"tool": "mysql.overview"
}
'{
"data": {
"data": {
"version": "8.0.36"
},
"datasource_id": 10,
"summary": "MySQL overview",
"tool": "mysql.overview"
},
"request_id": "01HK8XQE3Z7JM2NTFQ5YJ8P9R4"
}Restrictions
| Aspect | Value |
|---|---|
| Rate limits | 2,000 requests/minute; 32 requests/second per account |
| Permissions | Datasources Read (monit) |
/monit/datasource/list. Disabled datasources return datasource_disabled; alerting_enabled=false does not block tools. Errors use non-2xx HTTP status and error.code, error.message, error.reason. tool_not_supported indicates the selected executor does not provide this tool; it is not a vendor permission error. Never retry through another Edge or the legacy diagnose endpoint automatically.
Usage
- The caller needs query access to the datasource (see
readonly_team_idson the datasource); without it the call fails with 403access_denied. A datasource in another account returns 404datasource_not_found. - Diagnostic tools exist only for datasource types
mysql,postgres,redis_node,redis_sentinel,mongodb_mongod,mongodb_mongos,kafka,elasticsearch,prometheus,lokiandvictorialogs;oracle,clickhouse,slsandtencent_clssupport only their<type>.querytool. Other combinations fail withinvalid_request. - Two tool families share this entry: diagnostic tools defined by the executing Edge (e.g.
mysql.overview,prometheus.metric_trends) and query tools named<type>.query. The tool prefix must match the datasource type. - Query tools require the Edge cluster to support Explore queries (protocol milestone v0.68.0); diagnostic tools require the v0.71.0 base invoke protocol. Unsupported clusters fail with
edge_upgrade_required,mixed_edge_versions, oredge_version_unknown; never fall back to/monit/query/dataor another endpoint automatically. - For query tools,
paramsfollows the per-datasource schema named in thetoolfield description.exprandexecutionare always required.limit/directiononly bound raw-log retrieval, never SQL rows or scanned data. Unknown extension fields are tolerated but never executed or forwarded. - Query
datais the complete Explore result:formatisexplore_result.v1andresult.kindissamples,frames, orlogs; log results keepapplied_limitandhas_more. Query results never synthesizesummaryortruncated. - Request body limit 128 KiB; complete success response limit 10 MiB for both families; diagnostic tool timeout at most 25 seconds.
Authorizations
APP Key created in the Flashduty console under My → APP Key. Send it as the app_key query parameter or in the Fd-App-Key request header. Its effective access is the intersection of the key's permission scope and the creator's current role permissions. Keep it secret.
Body
ID of the datasource to run the tool against, from /monit/datasource/list. The caller needs query access to it. For query tools (<type>.query) the ID must not exceed 9007199254740991.
x >= 1Single tool name prefixed by the datasource type. Diagnostic tools are defined by the executing Edge (e.g. mysql.overview). Query tools are <type>.query where <type> is one of prometheus, mysql, postgres, oracle, clickhouse, elasticsearch, loki, victorialogs, sls, tencent_cls; their params follow PrometheusQueryParams, MySQLQueryParams, PostgresQueryParams, OracleQueryParams, ClickHouseQueryParams, ElasticsearchQueryParams, LokiQueryParams, VictoriaLogsQueryParams, SLSQueryParams, or TencentCLSQueryParams respectively.
1 - 128Optional consistency check; must equal the authenticated account.
Tool-specific JSON parameters; omitted means {}. Explicit null is invalid. Query tools (<type>.query) use the per-datasource params schemas named in the tool description.
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.
Unique ID for this request. Mirrored in the Flashcat-Request-Id response header. Include it when reporting issues.
"01HK8XQE3Z7JM2NTFQ5YJ8P9R4"
Operation-specific payload, documented in each operation's 200 response. Operations without a payload return {} or omit data entirely.
Show child attributes
Show child attributes
Was this page helpful?