Records

Address records individually — fetch, upsert, or delete by id. Writes are durable, versioned, and reflected in search immediately on every region the index is deployed to.

GET /v1/indexes/{indexName}/records/{recordId}

Fetch a single record by id

Returns the full record stored under recordId from the index's currently-active version. Returns null if the record doesn't exist (e.g. it was deleted by a prior call).

Record ids are returned in search results — fetch them once, then address records by id from then on.

Parameters

NameInTypeRequiredDescription
indexNamepathstringyesThe index name.
recordIdpathstringyesThe record's id (returned in search results).

Example request

bash
curl -X GET \
  'https://api.eztype.io/v1/indexes/{indexName}/records/{recordId}'

Responses

200 — The record, or null if not found.

json
{
  "id": "x1lGy50Bcp0W2C44-Se-",
  "title": "JANE SMITH",
  "weight": 1,
  "latitude": "37.7749",
  "longitude": "-122.4194",
  "data": {
    "specialty": "Family Medicine"
  }
}

404 — Record not found.

PUT /v1/indexes/{indexName}/records/{recordId}

Upsert a single record

Insert or update a record by id. The change produces a new version (e.g. v3.42) and is reflected in search immediately on every region where the index is active.

The id field in the request body is overwritten by the URL path — the path is authoritative.

Parameters

NameInTypeRequiredDescription
indexNamepathstringyesThe index name.
recordIdpathstringyesThe record id to upsert under.

Request body

json
{
  "title": "JANE SMITH",
  "weight": 5,
  "data": {
    "specialty": "Family Medicine"
  }
}

Example request

bash
curl -X PUT \
  'https://api.eztype.io/v1/indexes/{indexName}/records/{recordId}' \
  -H 'Content-Type: application/json' \
  -d '{
  "title": "JANE SMITH",
  "weight": 5,
  "data": {
    "specialty": "Family Medicine"
  }
}'

Responses

200 — Upsert applied. Response includes the new version id.

json
{
  "resultCode": "SUCCESS",
  "message": "OK",
  "indexVersion": "3.42"
}

DELETE /v1/indexes/{indexName}/records/{recordId}

Delete a single record by id

Delete a record. The deletion is durable across all future versions of the index, and is reflected in search immediately on every region the index is deployed to.

Parameters

NameInTypeRequiredDescription
indexNamepathstringyesThe index name.
recordIdpathstringyesThe record id to delete.

Example request

bash
curl -X DELETE \
  'https://api.eztype.io/v1/indexes/{indexName}/records/{recordId}'

Responses

200 — Delete applied.

json
{
  "resultCode": "SUCCESS",
  "message": "OK",
  "indexVersion": "3.43"
}