Skip to main content
POST
/
service
/
v2
/
file-search
Create File Search Job
curl --request POST \
  --url https://oathnet.org/api/service/v2/file-search \
  --header 'Content-Type: application/json' \
  --header 'x-api-key: <api-key>' \
  --data '
{
  "expression": "<string>",
  "log_ids": [
    "<string>"
  ],
  "search_mode": "literal",
  "include_matches": true,
  "case_sensitive": false,
  "context_lines": 2,
  "file_pattern": "<string>",
  "max_matches": 100
}
'
{
  "success": true,
  "message": "<string>",
  "data": {
    "job_id": "<string>",
    "status": "queued",
    "created_at": "2023-11-07T05:31:56Z",
    "started_at": "2023-11-07T05:31:56Z",
    "completed_at": "2023-11-07T05:31:56Z",
    "expires_at": "2023-11-07T05:31:56Z",
    "next_poll_after_ms": 123,
    "limits": {
      "byte_budget_bytes": 123,
      "job_ttl_seconds": 123,
      "max_context_lines": 123,
      "max_expression_length": 123,
      "max_file_size_bytes": 123,
      "max_log_ids": 123,
      "max_matches": 123
    },
    "summary": {
      "files_scanned": 123,
      "files_total": 123,
      "files_matched": 123,
      "matches": 123,
      "bytes_scanned": 123,
      "duration_ms": 123,
      "budget_exceeded": true,
      "truncated": true,
      "timeouts": 123
    },
    "matches": [
      {
        "log_id": "<string>",
        "file_id": "<string>",
        "file_name": "<string>",
        "relative_path": "<string>",
        "size_bytes": 123,
        "match_text": "<string>",
        "line_number": 123,
        "column_range": {
          "start": 123,
          "end": 123
        },
        "snippet": {
          "line": "<string>",
          "pre": [
            "<string>"
          ],
          "post": [
            "<string>"
          ],
          "truncated": true
        }
      }
    ],
    "progress": {},
    "_meta": {
      "user": {
        "plan": "Pro",
        "plan_type": "pro",
        "is_plan_active": true
      },
      "lookups": {
        "used_today": 5,
        "left_today": 995,
        "daily_limit": 1000,
        "is_unlimited": false
      },
      "service": {
        "name": "Service Name",
        "id": "service-id",
        "category": "general",
        "is_premium": false,
        "is_available": true,
        "session_quota": 10
      },
      "performance": {
        "duration_ms": 111.47,
        "timestamp": "2026-01-06T00:44:08.191547"
      }
    }
  }
}

Authorizations

x-api-key
string
header
required

API key for authentication (lowercase header name)

Body

application/json
expression
string
required

Search expression

log_ids
string[]

Victim log IDs to search (optional, defaults to all)

search_mode
enum<string>
default:literal
Available options:
literal,
regex,
wildcard
include_matches
boolean
default:true
case_sensitive
boolean
default:false
context_lines
integer
default:2
Required range: 0 <= x <= 5
file_pattern
string

Glob pattern for file filtering

max_matches
integer
default:100

Response

200 - application/json

Job created

success
boolean
message
string
data
object