{ "$schema": "https://json-schema.org/draft/2020-12/schema", "$id": "#/components/schemas/SearchJobCreateRequest", "title": "SearchJobCreateRequest", "type": "object", "required": [ "search" ], "properties": { "search": { "type": "string", "description": "The SPL search query to execute", "examples": [ "search index=main sourcetype=syslog | head 100" ] }, "earliest_time": { "type": "string", "description": "Earliest time for the search using relative or absolute time format", "examples": [ "-24h@h", "2024-01-01T00:00:00.000Z" ] }, "latest_time": { "type": "string", "description": "Latest time for the search", "examples": [ "now" ] }, "search_mode": { "type": "string", "description": "The search mode", "enum": [ "normal", "realtime" ], "default": "normal", "example": "normal" }, "exec_mode": { "type": "string", "description": "Execution mode. Normal runs asynchronously, oneshot runs synchronously, blocking waits for completion.", "enum": [ "normal", "blocking", "oneshot" ], "default": "normal", "example": "normal" }, "max_count": { "type": "integer", "description": "Maximum number of results to return", "default": 10000, "example": 10 }, "max_time": { "type": "integer", "description": "Maximum time in seconds before the search is finalized", "default": 0, "example": 10 }, "timeout": { "type": "integer", "description": "Number of seconds to keep the search after processing has stopped", "default": 86400, "example": 10 }, "rf": { "type": "string", "description": "Comma-separated list of required fields to include in results", "example": "example_value" }, "namespace": { "type": "string", "description": "Application namespace for the search", "example": "example_value" }, "id": { "type": "string", "description": "Optional custom search ID. If not specified, Splunk generates one automatically.", "example": "abc123" }, "status_buckets": { "type": "integer", "description": "Number of status buckets to generate for the search timeline. Set to a value greater than 0 to enable timeline.", "default": 0, "example": 10 }, "auto_cancel": { "type": "integer", "description": "Seconds of inactivity after which the search is automatically cancelled. 0 means never auto-cancel.", "default": 0, "example": 10 }, "auto_finalize_ec": { "type": "integer", "description": "Auto-finalize the search after this number of events have been processed. 0 disables auto-finalize.", "default": 0, "example": 10 }, "auto_pause": { "type": "integer", "description": "Seconds of inactivity after which the search is automatically paused. 0 means never auto-pause.", "default": 0, "example": 10 }, "enable_lookups": { "type": "boolean", "description": "Whether to enable lookups during the search", "default": true, "example": true }, "reload_macros": { "type": "boolean", "description": "Whether to reload macro definitions before the search", "default": true, "example": true }, "reduce_freq": { "type": "integer", "description": "How frequently to invoke the reduce phase (seconds)", "default": 0, "example": 10 }, "spawn_process": { "type": "boolean", "description": "Whether to run the search in a separate process", "default": true, "example": true } } }