Operator API

The control plane's API for the installation's shops: create and delete them, their keys, their people and their daily usage, called with the operator key.

Base URL in the compose stack: http://127.0.0.1:8000. Every call sends the operator key, ORBSEARCH_OPERATOR_KEY, as Authorization: Bearer <key>; a shop's key never works here, and the operator key never works on a shop's routes. Conventions covers what the APIs share.

EndpointWhat it does
GET /api/v1/shopsList the shops, oldest first
POST /api/v1/shopsCreate a shop with its first secret key and its node's database role
GET /api/v1/shops/{shop}Show a shop with its keys and people
PATCH /api/v1/shops/{shop}Rename a shop
DELETE /api/v1/shops/{shop}Delete a shop and everything it owns
POST /api/v1/shops/{shop}/keysGive a shop another secret key
DELETE /api/v1/shops/{shop}/keys/{key}Revoke one of a shop's secret keys
GET /api/v1/shops/{shop}/usageShow a shop's searches, entities and index runs per day
POST /api/v1/shops/{shop}/usersLet a person work in a shop
DELETE /api/v1/shops/{shop}/users/{user}Take a person out of a shop
POST /api/v1/shops/{shop}/users/{user}/login-linkMake a link that signs a person in once and opens their shop

List the shops, oldest first

GET/api/v1/shops

A page of shops; links and meta lead to the others.

Parameters

pageintegerat least 1

The page, counted from 1. Default: 1.

per_pageinteger1 to 100

How many to a page. Default: 15.

Answers

200object

The shops.

3 fields
metaobjectRequired

Where this page stands in the whole list.

The operator key is missing or wrong, or the installation sets none.

Create a shop with its first secret key and its node's database role

POST/api/v1/shops

Makes the shop's Postgres schema with its tables, its node's database role and its first secret key, all or nothing. The answer is the only time the key and the role's password are shown: the key is kept hashed and the password not at all, so write both where the shop's node and scripts read them. The slug never changes, since it names the schema, the role and the shop's address; slugs that name a page of the panel or an address of OrbSearch, such as app or settings, are refused.

Body

A shop to create.

slugstringRequired

A shop's slug, such as acme-tires: up to 32 lowercase letters and digits, words joined by single hyphens. It never changes, since it names the shop's database schema and role and its address, <slug>.orbsearch.dev.

namestringRequired

The name people see in the panel, up to 100 characters.

query_apistringRequired

Where the control plane reaches the shop's Query API, such as https://acme.orbsearch.dev: an http or https URL of up to 255 characters, never an address that only a trusted network reaches.

Answers

201object

The shop is created.

3 fields
shopShopRequired

A shop of the installation.

keyobjectRequired

A secret key as it is issued: the only time its secret is shown.

4 fields
idintegerRequired
namestring

What it is for, as it was issued; left out for a key issued without a name.

keystringRequired

What the shop's scripts send as Authorization: Bearer <key> to the management API.

created_atstringRequired

A point in time as RFC 3339 with an offset, such as 2026-11-27T00:00:00+01:00.

nodeobjectRequired

What the shop's node needs to connect, shown only when the shop is created.

3 fields
database_rolestringRequired

The Postgres role the node connects as, the shop's database_role.

database_passwordstringRequired

The role's password; it is not kept.

node_keystringRequired

The key the control plane sends as Authorization: Bearer <key> on the calls to the node's Query API only it may make; the node's settings hold it as ORBSEARCH_NODE_KEY. The control plane keeps it encrypted.

The operator key is missing or wrong, or the installation sets none.

The slug or the name is refused, or the slug is taken.

Show a shop with its keys and people

GET/api/v1/shops/{shop}

Its keys are listed by id and age, never by their secret.

Parameters

shopstringRequired

Answers

The shop.

The operator key is missing or wrong, or the installation sets none.

There is no such shop.

Rename a shop

PATCH/api/v1/shops/{shop}

Only the name changes; the slug stays, since addresses and the database name it.

Parameters

shopstringRequired

Body

A shop's new name.

namestringRequired

Up to 100 characters.

Answers

The shop is renamed.

The operator key is missing or wrong, or the installation sets none.

There is no such shop.

The name is missing or too long.

Delete a shop and everything it owns

DELETE/api/v1/shops/{shop}

Removes the shop's kept catalogs, its schema with its tables, its node's database role, its keys and its people's membership; people keep their accounts and their other shops. Its node can no longer connect. It cannot be undone.

Parameters

shopstringRequired

Answers

The shop is deleted, as it was.

The operator key is missing or wrong, or the installation sets none.

There is no such shop.

Give a shop another secret key

POST/api/v1/shops/{shop}/keys

The key works at once beside the shop's other keys, so a key rotates without downtime: issue a new one, move the shop's scripts to it, then revoke the old one. The answer is the only time the key is shown. Its name says what it is for, as the publish history shows who published; send {} for a key without one.

Parameters

shopstringRequired

Body

A key to issue.

namestring

What the key is for, such as Nightly feed job, up to 100 characters; the publish history names the key by it.

Answers

201object

The key is issued.

4 fields
idintegerRequired
namestring

What it is for, as it was issued; left out for a key issued without a name.

keystringRequired

What the shop's scripts send as Authorization: Bearer <key> to the management API.

created_atstringRequired

A point in time as RFC 3339 with an offset, such as 2026-11-27T00:00:00+01:00.

The operator key is missing or wrong, or the installation sets none.

There is no such shop.

The name is too long.

Revoke one of a shop's secret keys

DELETE/api/v1/shops/{shop}/keys/{key}

Calls with the key answer 401 from then on; the shop's other keys keep working.

Parameters

shopstringRequired
keystringRequired

Answers

The key is revoked.

The operator key is missing or wrong, or the installation sets none.

There is no such shop, or no such key of it.

Show a shop's searches, entities and index runs per day

GET/api/v1/shops/{shop}/usage

One entry per UTC day from from to to, both included, leaving out days before the shop existed and days after today. Counts come from the search log's daily rollups and the index runs. A day is settled once it was rolled up after event_hours plus 15 minutes past its end in UTC, when no search or click for it can arrive any more; the roll-up runs every minute, so a day settles within a minute of that. A settled day's numbers never change, so it can be billed once and never corrected; a day that is not settled yet may still grow.

Parameters

shopstringRequired
fromstringRequired

The first UTC day.

tostringRequired

The last UTC day, at most 365 days after from.

Answers

200object

The shop's usage.

1 field
daysarray of objectsRequired

One UTC day of a shop's usage.

5 fields
daystringRequired

A UTC day, such as 2026-10-09.

settledbooleanRequired

Whether the day's numbers are final: they never change once it is settled, as showUsage says.

searchesintegerRequired

The first pages the Query API answered shoppers on every surface: the search page with words typed, category pages and autocomplete. Later pages of an answer, the search page without words that storefronts ask for their rails, previews, tests, benchmarks and bots are not counted.

entitiesintegerRequired

The entities searchable at the day's end, products and every other type, as the index run live then counted them; 0 before the first run went live.

index_runsintegerRequired

The index runs that finished on the day, whether they went live or failed.

The operator key is missing or wrong, or the installation sets none.

There is no such shop.

A day is missing, malformed or out of order, or the range spans more than 366 days.

Let a person work in a shop

POST/api/v1/shops/{shop}/users

With an email that already has an account, that person joins the shop as they are; their name stays. Otherwise a new account is made with the name and email, marked verified, since the operator vouches for it, and without a password that anyone knows: the person signs in by a login link, or sets a password through the panel's password reset.

Parameters

shopstringRequired

Body

A person to let into a shop.

namestringRequired

Up to 255 characters; kept for a new account only.

emailstringRequired

The person's account, or a new one for it.

Answers

The person was already in the shop.

The person joined the shop.

The operator key is missing or wrong, or the installation sets none.

There is no such shop.

The name or the email is missing or malformed.

Take a person out of a shop

DELETE/api/v1/shops/{shop}/users/{user}

The person can no longer open the shop; their account and their other shops stay, and links made for this shop stop working.

Parameters

shopstringRequired
userstringRequired

Answers

The person is out of the shop.

The operator key is missing or wrong, or the installation sets none.

There is no such shop, or the person does not work in it.

POST/api/v1/shops/{shop}/users/{user}/login-link

The link opens the panel's page that asks to continue as the person into the shop; only confirming there signs in, so a mail scanner that opens the link does not use it up. It signs in once, within 10 minutes, without a password or second factor, and lands in the shop at /<slug>/. A used or expired link shows that and leads to the sign-in page.

Parameters

shopstringRequired
userstringRequired

Answers

201object

The link.

2 fields
urlstringRequired

On the panel's address, such as https://app.orbsearch.dev/login-links/....

expires_atstringRequired

A point in time as RFC 3339 with an offset, such as 2026-11-27T00:00:00+01:00.

The operator key is missing or wrong, or the installation sets none.

There is no such shop, or the person does not work in it.

Guide: Manage shops from a script

Person

A person with an account who works in a shop.

idintegerRequired
namestringRequired
emailstringRequired

Shop

A shop of the installation.

slugstringRequired

A shop's slug, such as acme-tires: up to 32 lowercase letters and digits, words joined by single hyphens. It never changes, since it names the shop's database schema and role and its address, <slug>.orbsearch.dev.

namestringRequired
database_rolestringRequired

The Postgres role the shop's node connects as; its search_path is the shop's schema.

query_apistringRequired

Where the control plane reaches the shop's Query API.

Oldest first.

The people who work in it, by name.

created_atstringRequired

A point in time as RFC 3339 with an offset, such as 2026-11-27T00:00:00+01:00.

ShopKey

One of a shop's secret keys, without its secret.

idintegerRequired
namestring

What it is for, as it was issued; left out for a key issued without a name.

created_atstringRequired

A point in time as RFC 3339 with an offset, such as 2026-11-27T00:00:00+01:00.