App data

Records owned by the application rather than by any one user — product catalogues, announcements, feature flags, pricing tables. Every user of the app sees the same rows.

API key only

App data has no per-user scoping, so there is nothing for the server to pin an API key to. Every method on this page requires an API key key and raises InsufficientScopeError (403) without one.

That means these calls belong on your server. To show app data in a browser or mobile app, read it server-side and serve it from your own endpoint.

add_app_dataAPI key only

POST /api/app/data

authix.add_app_data(*, data_category: str, data: dict) -> dict
ParamTypeRequiredDescription
data_categorystrYesA namespace — 'products', 'announcements'. Lower-cased and fixed on create.
datadictYesAny JSON-serialisable payload.

Returns: dict — the created record

Python
1record = authix.add_app_data(
2    data_category="products",
3    data={"sku": "A-1", "name": "Widget", "price": 1200},
4)

Throws: InsufficientScopeError (403) with an API key.

get_app_dataAPI key only

GET /api/app/data

authix.get_app_data(
    *, category: str | None = None,
    limit: int | None = None, cursor: str | None = None,
) -> Page
ParamTypeRequiredDescription
categorystrNoRestrict to one category.
limitintNo1–100. Defaults to 20.
cursorstrNonext_cursor from the previous page.

Returns: Page

Python
1page = authix.get_app_data(category="products", limit=100)
2
3for product in page:
4    print(product["sku"])

iter_app_dataAPI key only

GET /api/app/data (paged)

authix.iter_app_data(
    *, category: str | None = None,
    limit: int | None = None, max_pages: int | None = None,
) -> Iterator[dict]
ParamTypeRequiredDescription
categorystrNoRestrict to one category.
limitintNoPage size while iterating.
max_pagesintNoBound the traversal.

Returns: Iterator[dict]

Python
1catalogue = list(authix.iter_app_data(category="products"))

A catalogue rarely changes. Cache the result on your side rather than re-reading it on every request — a full sweep on each page load burns request quota for data that is identical each time.

get_single_app_dataAPI key only

GET /api/app/data/:dataId

authix.get_single_app_data(*, data_id: str) -> dict
ParamTypeRequiredDescription
data_idstrYesThe record id.

Returns: dict

Python
1product = authix.get_single_app_data(data_id=data_id)

Throws: NotFoundError (404) if no such record exists in this app.

search_in_app_dataAPI key only

GET /api/app/data/search

authix.search_in_app_data(
    *, q: str | None = None, category: str | None = None,
    keys: dict | None = None,
    limit: int | None = None, cursor: str | None = None,
) -> Page
ParamTypeRequiredDescription
qstrNoFree-text match.
categorystrNoRestrict to one category.
keysdictNoExact-match filter on payload fields.
limitintNo1–100.
cursorstrNoFor the next page.

Returns: Page

Python
1page = authix.search_in_app_data(
2    category="products",
3    keys={"in_stock": True},
4    q="widget",
5)

update_app_dataAPI key only

PUT /api/app/data/:dataId

authix.update_app_data(
    *, data_id: str, data: dict, version: int | None = None,
) -> dict
ParamTypeRequiredDescription
data_idstrYesWhich record.
datadictYesFields to merge in.
versionintNoThe version you read, for optimistic concurrency.

Returns: dict

Python
1authix.update_app_data(
2    data_id=data_id,
3    data={"price": 1100},
4    version=product["version"],
5)

Throws: VersionConflictError (409) if someone wrote first.

App data is more likely to be edited by several people at once than user data is — an admin panel and a sync job, for instance. Pass version here even more readily than you would elsewhere.

delete_app_dataAPI key only

DELETE /api/app/data/:dataId

authix.delete_app_data(*, data_id: str) -> dict
ParamTypeRequiredDescription
data_idstrYesWhich record.

Returns: dict

Python
1authix.delete_app_data(data_id=data_id)

Permanent, and app-wide — every user of the app stops seeing it immediately.

Related