Skip to main content
GET
/
storage
/
search
/
{index}
Search an index
curl --request GET \
  --url https://api.quiva.ai/storage/search/{index} \
  --header 'Authorization: Bearer <token>'
{
  "body": {
    "results": [
      {
        "id": "usr_abc123",
        "stream": "user-events",
        "subject": "users.profiles",
        "fields": {
          "name": "John Doe",
          "email": "[email protected]",
          "age": 32,
          "department": "Engineering"
        },
        "score": 0.98,
        "partition": 0,
        "sequence": 1542,
        "timestamp": 1710512400
      },
      {
        "id": "usr_def456",
        "stream": "user-events",
        "subject": "users.profiles",
        "fields": {
          "name": "Johnny Smith",
          "email": "[email protected]",
          "age": 28,
          "department": "Marketing"
        },
        "score": 0.85,
        "partition": 1,
        "sequence": 2103,
        "timestamp": 1710598800
      }
    ],
    "results_total": 2
  },
  "metadata": {
    "field": "name",
    "search": "John",
    "index_name": "users-index",
    "index_duration": "5ms",
    "index_hits": 2,
    "index_partitions": 4
  }
}

Authorizations

Authorization
string
header
required

Bearer authentication header of the form Bearer <token>, where <token> is your auth token.

Path Parameters

index
string
required

Name of the index to search

Query Parameters

field
string
required

Field to search in

Search term

search_type
enum<string>

Type of search to perform

Available options:
exact,
fuzzy,
prefix,
range
min
number

Minimum value for range searches

max
number

Maximum value for range searches

limit
integer
default:10

Maximum number of results to return

Required range: 1 <= x <= 1000
sortBy
string

Field to sort results by

Response

Search results

body
object
metadata
object