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 '
{
  "log_ids": [
    "<string>"
  ],
  "expression": "<string>",
  "search_mode": "literal",
  "include_matches": true,
  "case_sensitive": true,
  "context_lines": 123,
  "file_pattern": "<string>",
  "max_matches": 123
}
'
{
  "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",
  "progress": {
    "logs_total": 123,
    "logs_completed": 123,
    "files_total": 123,
    "files_scanned": 123,
    "percent": 123,
    "updated_at": "2023-11-07T05:31:56Z"
  },
  "summary": {
    "files_total": 123,
    "files_scanned": 123,
    "files_matched": 123,
    "matches": 123,
    "duration_ms": 123,
    "bytes_scanned": 123,
    "timeouts": 123,
    "budget_exceeded": true,
    "truncated": true
  },
  "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": {
        "pre": [
          "<string>"
        ],
        "line": "<string>",
        "post": [
          "<string>"
        ],
        "truncated": true
      },
      "extra": {}
    }
  ],
  "limits": {
    "max_matches": 123,
    "max_file_size_bytes": 123,
    "byte_budget_bytes": 123,
    "max_context_lines": 123,
    "job_ttl_seconds": 123,
    "max_log_ids": 123,
    "max_expression_length": 123
  },
  "next_poll_after_ms": 123
}

Documentation Index

Fetch the complete documentation index at: https://docs.oathnet.org/llms.txt

Use this file to discover all available pages before exploring further.

Creates an asynchronous search job across one or more victim logs.
The successful response is a raw job snapshot, not a {success, data} envelope. Poll Get File Search Status until status is completed.

Authorizations

x-api-key
string
header
required

API key for authentication (lowercase header name)

Body

application/json
log_ids
string[]
expression
string
search_mode
enum<string>
Available options:
literal,
regex,
wildcard
include_matches
boolean
case_sensitive
boolean
context_lines
integer
file_pattern
string
max_matches
integer

Response

200 - application/json

Raw file-search job snapshot

job_id
string
status
enum<string>
Available options:
queued,
running,
completed,
canceled
created_at
string<date-time>
started_at
string<date-time>
completed_at
string<date-time>
expires_at
string<date-time>
progress
object
summary
object
matches
object[]
limits
object
next_poll_after_ms
integer