监控与采集相关接口/监控综合
POSTMonitoring起始版本 1.0同步需要认证
验证隔离查询
校验PROM QL查询符合租户隔离边界。
调试可用性
在线调试
使用当前认证信息和示例参数提交 Mock 请求。
请求参数
请求体字段
tenantIdString必填租户ID。
示例: tenant-001-xyz
queryString必填查询语句。
示例: cpu_usage_percent{job="node"}
响应状态
请求地址
POST/api/v1/monitoring/isolation/validate
/api/v1/monitoring/isolation/validate
请求示例
curl -X POST '{host}/api/v1/monitoring/isolation/validate' -H 'Authorization: Bearer {token}' -H 'Content-Type: application/json' -d '{"tenantId":"tenant-001-xyz","query":"cpu_usage_percent{job=\"node\"}"}'
响应示例
200{
"valid": true,
"originalQuery": "cpu_usage_percent{job=\"node\"}",
"filteredQuery": "cpu_usage_percent{job=\"node\",tenant_id=\"tenant-001\"}",
"tenantId": "tenant-001-xyz",
"violations": [],
"errorCode": "INVALID_CONFIG",
"message": "Query is compliant with tenant isolation policy"
}变更历史
此 API 暂无变更历史记录。
