list_http_requests
Analyze HTTP request insights in Kubernetes environments with filtering by method, path, workloads, and PII detection to identify security patterns and potential risks.
Instructions
List HTTP requests insights with optional filtering by method, path, source and destination workloads, and PII detection
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
| filters | No | Filter string for filtering results. Filter options: method, path, cluster_id, scheme, source_workload_name, source_workload_namespace, destination_workload_name, destination_workload_namespace,has_pii. Example: 'method:GET,path:/api/v1/users,scheme:https,source_workload_name:my-workload,source_workload_namespace:my-namespace,destination_workload_name:my-workload,destination_workload_namespace:my-namespace,has_pii:true' | |
| offset | No | Offset to start the list from | |
| limit | No | Limit the number of items in the list | |
| q | No | Query to filter the list of HTTP requests |
Implementation Reference
- src/operations/runtime_network.ts:31-41 (handler)Handler function that executes the list_http_requests tool. Validates input params using the schema and makes an API request to fetch HTTP requests insights.export async function listHttpRequests( client: RadSecurityClient, params: z.infer<typeof listHttpRequestsSchema> ): Promise<any> { const validatedParams = listHttpRequestsSchema.parse(params); const response = await client.makeRequest( `/accounts/${client.getAccountId()}/container_runtime_insights/http_requests`, validatedParams ); return response; }
- Zod input schema defining parameters for the list_http_requests tool: filters, offset, limit, q.export const listHttpRequestsSchema = z.object({ filters: z.string().optional().describe("Filter string for filtering results. Filter options: method, path, cluster_id, " + "scheme, source_workload_name, source_workload_namespace, destination_workload_name, destination_workload_namespace," + "has_pii. Example: 'method:GET,path:/api/v1/users,scheme:https,source_workload_name:my-workload,source_workload_namespace:my-namespace,destination_workload_name:my-workload,destination_workload_namespace:my-namespace,has_pii:true'"), offset: z.number().optional().describe("Offset to start the list from"), limit: z.number().optional().default(20).describe("Limit the number of items in the list"), q: z.string().optional().describe("Query to filter the list of HTTP requests"), });
- src/index.ts:388-394 (registration)Tool registration in the listTools handler, defining the tool name, description, and input schema.name: "list_http_requests", description: "List HTTP requests insights with optional filtering by method, path, source and destination workloads, and PII detection", inputSchema: zodToJsonSchema( runtimeNetwork.listHttpRequestsSchema ), },
- src/index.ts:1179-1191 (registration)Tool execution handler in the callTool request handler switch statement, parses args and calls the handler function.case "list_http_requests": { const args = runtimeNetwork.listHttpRequestsSchema.parse( request.params.arguments ); const response = await runtimeNetwork.listHttpRequests( client, args ); return { content: [ { type: "text", text: JSON.stringify(response, null, 2) }, ], };