list_http_requests
Analyze HTTP requests in Kubernetes and cloud environments with optional filters for method, path, workloads, and PII detection. Retrieve insights for security assessments and audits.
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' | |
| limit | No | Limit the number of items in the list | |
| offset | No | Offset to start the list from | |
| q | No | Query to filter the list of HTTP requests |
Implementation Reference
- src/operations/runtime_network.ts:31-41 (handler)The core handler function that validates input parameters using the schema and makes an API request to retrieve the list of HTTP requests from the RAD Security backend.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 schema defining the input parameters for the list_http_requests tool, including filters, offset, limit, and query options.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:257-261 (registration)Tool registration in the listTools response, defining the tool's name, description, and input schema (converted from Zod to JSON 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:644-649 (registration)Dispatch handler in the CallToolRequest switch statement that parses arguments, calls the tool handler, and formats the response.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) }], };