API reference

Linked namespaces

Indexes linked by reference.

Kept in this tab only and sent only to api.skimmerdb.com. Requests run against your account and count as usage. Make a key.

Ids by segment and number

POST /v1/namespaces/{name}/names metered: query

A linked namespace's document ids by place: each [segment, number] (as a linked search's hits give them in seg and n) read back as the document's id, "" for one that isn't there. Up to 10,000 a request. One query for limits and metering.

Parameters

namestring · pathrequiredThe namespace's name.

Body application/json

docs[][]required

Answer

namespacestring
namesstring[]

Status codes

200OK
401No key, or an unknown or revoked one.
403The key's scope or namespaces don't allow it, or the tenant is suspended.
404No such namespace, document, key or tenant (or one this key may not see: the same answer).
422Invalid: the message says why (code invalid with fields: which input fields; query_timeout: past the plan's time limit; scan_refused: send scan: true).
429Over the tenant's or the key's rate, concurrency or cap, or writes arriving faster than the namespace commits them (code write_busy): retry after Retry-After seconds.
503Object storage failed: retry (nothing was written, unless the code is write_unknown: then it may have been; retrying a write is safe).
curl -s https://api.skimmerdb.com/v1/namespaces/support/names \
  -H "Authorization: Bearer $KEY" \
  -d '{"docs":[["seg-000123",5],["seg-000124",0]]}'
from skimmerdb import SkimmerDB
from skimmerdb._api.api.linked_namespaces import linked_names

db = SkimmerDB()  # SKIMMERDB_KEY
answer = linked_names.sync("support", client=db.api)
import { SkimmerDB } from "skimmerdb";
import { linkedNames } from "skimmerdb/api";

const db = new SkimmerDB(); // SKIMMERDB_KEY
const { data } = await linkedNames({ client: db.client, path: { name: "support" }, body: {"docs":[["seg-000123",5],["seg-000124",0]]} });

List a linked namespace's sidecar files

GET /v1/namespaces/{name}/sidecars

Per-segment files carried with an index linked by reference (an operator links one). Other namespaces have none.

Parameters

namestring · pathrequiredThe namespace's name.

Answer

namespacestring
sidecarsSidecar[]
sidecars[].segstring
sidecars[].namestring
sidecars[].sizeinteger

Status codes

200OK
401No key, or an unknown or revoked one.
404No such namespace, document, key or tenant (or one this key may not see: the same answer).
422Invalid: the message says why (code invalid with fields: which input fields; query_timeout: past the plan's time limit; scan_refused: send scan: true).
429Over the tenant's or the key's rate, concurrency or cap, or writes arriving faster than the namespace commits them (code write_busy): retry after Retry-After seconds.
curl -s https://api.skimmerdb.com/v1/namespaces/support/sidecars \
  -H "Authorization: Bearer $KEY"
from skimmerdb import SkimmerDB
from skimmerdb._api.api.linked_namespaces import list_sidecars

db = SkimmerDB()  # SKIMMERDB_KEY
answer = list_sidecars.sync("support", client=db.api)
import { SkimmerDB } from "skimmerdb";
import { listSidecars } from "skimmerdb/api";

const db = new SkimmerDB(); // SKIMMERDB_KEY
const { data } = await listSidecars({ client: db.client, path: { name: "support" } });
200 answer
{
  "namespace": "web",
  "sidecars": [
    {
      "seg": "seg-000123",
      "name": "tags",
      "size": 81234
    }
  ]
}

Read a sidecar file

GET /v1/namespaces/{name}/sidecars/{seg}/{file} metered: query

Its bytes (at most 64 MB a call). Counts as one query (metered; see Usage).

Parameters

namestring · pathrequiredThe namespace's name.
segstring · pathrequired
filestring · pathrequired
offinteger · queryOffset.
ninteger · queryBytes (0: to the end).

Status codes

200OK
401No key, or an unknown or revoked one.
404No such namespace, document, key or tenant (or one this key may not see: the same answer).
422Invalid: the message says why (code invalid with fields: which input fields; query_timeout: past the plan's time limit; scan_refused: send scan: true).
429Over the tenant's or the key's rate, concurrency or cap, or writes arriving faster than the namespace commits them (code write_busy): retry after Retry-After seconds.
curl -s https://api.skimmerdb.com/v1/namespaces/support/sidecars/seg/file \
  -H "Authorization: Bearer $KEY"
from skimmerdb import SkimmerDB
from skimmerdb._api.api.linked_namespaces import get_sidecar

db = SkimmerDB()  # SKIMMERDB_KEY
answer = get_sidecar.sync("support", "seg", "file", client=db.api)
import { SkimmerDB } from "skimmerdb";
import { getSidecar } from "skimmerdb/api";

const db = new SkimmerDB(); // SKIMMERDB_KEY
const { data } = await getSidecar({ client: db.client, path: { name: "support", seg: "seg", file: "file" } });