Skip to main content
POST
/
v2
/
data
/
scan
Scan Data (v2)
curl --request POST \
  --url https://api.example.com/v2/data/scan \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data @- <<EOF
{
  "filter": "id = '1'",
  "limit": 10,
  "projection": "id, metadata, text"
}
EOF
{
  "code": 200,
  "data": {
    "data": [
      {
        "id": "1",
        "metadata": "{\"file_name\": \"abc.pdf\"}",
        "text": "hello"
      }
    ],
    "metrics": {
      "elapsed_time": 0.5,
      "rss_peak_bytes": 52428800
    },
    "schema": {
      "fields": [
        {
          "data_type": "LargeUtf8",
          "name": "id",
          "nullable": false
        },
        {
          "data_type": "LargeUtf8",
          "name": "metadata",
          "nullable": true
        },
        {
          "data_type": "LargeUtf8",
          "name": "text",
          "nullable": true
        }
      ],
      "metadata": {}
    }
  },
  "exception": null,
  "success": true
}

Authorizations

Authorization
string
header
required

Bearer token authentication. Include the token in the Authorization header as 'Bearer '

Query Parameters

include_metrics
boolean

Include metrics in the response. Default is false.

Body

application/json

The scan condition. It includes projection, filter, and limit.

filter
string | null
default:""

SQL WHERE clause to filter the results. If not specified, no filtering will be applied.

Example:

"text like '%hello%'"

limit
integer<int32> | null
default:0

Number of rows to return in the result set. If set to 0 or not specified, returns all matching rows.

Example:

"10"

projection
string | null
default:*

Columns to include in the result set. Uses SQL projection syntax (e.g. "col1, col2"). If not specified, all columns will be returned.

Example:

"id, metadata, text"

Response

Successfully retrieved the scan results.

code
integer<int32>
required

HTTP status code.

Required range: x >= 0
success
boolean
required

Whether the request was successful.

data
object
exception
object