Skip to content

Commit ecdec5d

Browse files
Domantasclaude
andcommitted
docs(database): new Hub record, tree, list-settings, embed and bundle methods; Api find_own and merged tree
The Hub table also gains the three flex integration methods that were in the SDK but missing from the page, and both index counts are updated. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
1 parent 12dadd3 commit ecdec5d

4 files changed

Lines changed: 83 additions & 2 deletions

File tree

‎docs/api/_index.md‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
| Module | Endpoints |
44
| --- | ---: |
55
| [`ai`](./ai.md) | 16 |
6-
| [`database`](./database.md) | 18 |
6+
| [`database`](./database.md) | 22 |
77
| [`echo`](./echo.md) | 1 |
88
| [`files`](./files.md) | 10 |
99
| [`membership`](./membership.md) | 18 |

‎docs/api/database.md‎

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,8 @@ Access with `norbix.api.database`.
2424
| `replace_one` | `PUT` | `/{version}/database/collections/{collectionName}/{id}/replace` | `project` |
2525
| `update_many` | `PUT` | `/{version}/database/collections/{collectionName}/many` | `project` |
2626
| `update_one` | `PUT` | `/{version}/database/collections/{collectionName}/{id}` | `project` |
27+
| `find_merged_term_tree` | `GET` | `/{version}/database/taxonomies/{taxonomyName}/merged-tree` | `project` |
28+
| `find_own` | `GET` | `/{version}/database/collections/{collectionName}/own` | `project` |
2729

2830
## Working with terms
2931

@@ -315,3 +317,23 @@ structure = norbix.api.database.find_taxonomy_tree(include_terms=True)
315317
Now each taxonomy node's `terms` holds that taxonomy's full term tree (same shape as `find_term_tree`) — *Countries* carries its countries, *Cities* carries its cities.
316318

317319
> Every term-reading call also accepts an optional `database_integration_id` to target a non-default database.
320+
321+
---
322+
323+
### Records the caller owns
324+
325+
**Goal:** list only the records of `products` that the signed-in user is
326+
responsible for.
327+
328+
```python
329+
mine = norbix.api.database.find_own("products", pageSize=20)
330+
```
331+
332+
### A taxonomy's merged term tree
333+
334+
**Goal:** get one tree across taxonomies: the terms of `services` are the
335+
roots, and the terms of its child taxonomies nest under them.
336+
337+
```python
338+
tree = norbix.api.database.find_merged_term_tree("services")
339+
```

‎docs/hub/_index.md‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
| --- | ---: |
55
| [`account`](./account.md) | 61 |
66
| [`ai`](./ai.md) | 14 |
7-
| [`database`](./database.md) | 41 |
7+
| [`database`](./database.md) | 67 |
88
| [`echo`](./echo.md) | 1 |
99
| [`email`](./email.md) | 1 |
1010
| [`files`](./files.md) | 22 |

‎docs/hub/database.md‎

Lines changed: 59 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -45,3 +45,62 @@ Access with `norbix.hub.database`.
4545
| `get_database_aggregates` | `GET` | `/{version}/database/aggregates` | `project` |
4646
| `save_database_aggregate` | `POST` | `/{version}/database/aggregates` | `project` |
4747
| `test_database_aggregate` | `POST` | `/{version}/database/aggregates/test` | `project` |
48+
| `get_allowed_flex_tiers` | `GET` | `/{version}/database/integrations/flex-tiers` | `project` |
49+
| `test_database_integration` | `POST` | `/{version}/database/integrations/test` | `project` |
50+
| `reveal_managed_flex_connection_string` | `GET` | `/{version}/database/integrations/{Id}/connection-string` | `project` |
51+
| `get_database_taxonomy_tree` | `GET` | `/{version}/database/taxonomies/tree` | `project` |
52+
| `get_database_merged_term_tree` | `GET` | `/{version}/database/taxonomies/{TaxonomyName}/merged-tree` | `project` |
53+
| `get_database_taxonomy_term_tree` | `GET` | `/{version}/database/taxonomies/{TaxonomyName}/terms/tree` | `project` |
54+
| `apply_database_schema_bundle` | `POST` | `/{version}/database/schemas/apply-bundle` | `project` |
55+
| `get_database_schema_list_settings` | `GET` | `/{version}/database/schemas/{Id}/list-settings` | `project` |
56+
| `update_database_schema_list_settings` | `PUT` | `/{version}/database/schemas/{Id}/list-settings` | `project` |
57+
| `update_database_schema_embed` | `PUT` | `/{version}/database/schemas/{Id}/embed` | `project` |
58+
| `aggregate_records` | `POST` | `/{version}/database/collections/{collectionName}/aggregate` | `project` |
59+
| `change_record_responsibility` | `PUT` | `/{version}/database/collections/{collectionName}/{id}/responsibility` | `project` |
60+
| `count_records` | `GET` | `/{version}/database/collections/{collectionName}/count` | `project` |
61+
| `delete_many_records` | `DELETE` | `/{version}/database/collections/{collectionName}/many` | `project` |
62+
| `delete_record` | `DELETE` | `/{version}/database/collections/{collectionName}/{id}` | `project` |
63+
| `distinct_record_values` | `GET` | `/{version}/database/collections/{collectionName}/distinct` | `project` |
64+
| `execute_records_aggregate` | `POST` | `/{version}/database/collections/{collectionName}/aggregates/{aggregateId}/execute` | `project` |
65+
| `find_records` | `GET` | `/{version}/database/collections/{collectionName}` | `project` |
66+
| `find_one_record` | `GET` | `/{version}/database/collections/{collectionName}/{id}` | `project` |
67+
| `get_collection_indexes` | `GET` | `/{version}/database/collections/{collectionName}/indexes` | `project` |
68+
| `insert_many_records` | `POST` | `/{version}/database/collections/{collectionName}/many` | `project` |
69+
| `insert_record` | `POST` | `/{version}/database/collections/{collectionName}` | `project` |
70+
| `replace_record` | `PUT` | `/{version}/database/collections/{collectionName}/{id}/replace` | `project` |
71+
| `seed_collection_records` | `POST` | `/{version}/database/collections/seed` | `project` |
72+
| `update_many_records` | `PUT` | `/{version}/database/collections/{collectionName}/many` | `project` |
73+
| `update_one_record` | `PUT` | `/{version}/database/collections/{collectionName}/{id}` | `project` |
74+
75+
## Working with records (Hub)
76+
77+
The Hub record methods are the admin side of collections: they act on every
78+
record in the project, not only the records the caller owns (for that, use
79+
`norbix.api.database.find_own`). Values go in as keyword arguments, the same
80+
way as every other method in this SDK: on a `GET` they become query values, on
81+
a write they become the JSON body. Filters, documents and updates are MongoDB
82+
extended-JSON **strings**.
83+
84+
```python
85+
products = norbix.hub.database.find_records("products", filter='{"status": "active"}', pageSize=20)
86+
one = norbix.hub.database.find_one_record("products", "rec_1")
87+
created = norbix.hub.database.insert_record("products", document='{"title": "Lamp", "price": 12}')
88+
norbix.hub.database.update_one_record("products", "rec_1", update='{"$set": {"price": 10}}')
89+
norbix.hub.database.delete_record("products", "rec_1")
90+
total = norbix.hub.database.count_records("products", filter='{"status": "active"}')
91+
indexes = norbix.hub.database.get_collection_indexes("products")
92+
```
93+
94+
## Trees, list settings, embed and bundles
95+
96+
- `get_database_taxonomy_tree()` — the taxonomy structure as a tree.
97+
- `get_database_taxonomy_term_tree("services")` — one taxonomy's terms as a tree.
98+
- `get_database_merged_term_tree("services")` — one tree across taxonomies: the
99+
terms of `services` are the roots, and the terms of its child taxonomies nest
100+
under them.
101+
- `get_database_schema_list_settings(id)` / `update_database_schema_list_settings(id, settings={...})`
102+
— how the record list shows a schema (the update replaces the whole settings object).
103+
- `update_database_schema_embed(id, ...)` — the schema's embed settings.
104+
- `apply_database_schema_bundle(...)` — apply a bundle of schemas in one call.
105+
106+
The async client (`AsyncNorbix`) has the same methods; `await` them.

0 commit comments

Comments
 (0)