For the complete documentation index, see llms.txt. This page is also available as Markdown.

Collections

Database → Collections endpoints.

Collections hold your records. Norbix generates a full CRUD + query API over each collection from its schema, with record-level ownership and triggers.

Endpoint
Method

POST collections/{collectionName}/aggregate

PUT collections/{collectionName}/{id}/responsibility

GET collections/{collectionName}/count

DELETE collections/{collectionName}/many

DELETE collections/{collectionName}/{id}

GET collections/{collectionName}/distinct

POST collections/{collectionName}/aggregates/{aggregateId}/execute

GET collections/{collectionName}

GET collections/{collectionName}/{id}

GET collections/{collectionName}/own

POST collections/{collectionName}/many

POST collections/{collectionName}

PUT collections/{collectionName}/{id}/replace

PUT collections/{collectionName}/many

PUT collections/{collectionName}/{id}

POST collections/{collectionName}/aggregate

PUT collections/{collectionName}/{id}/responsibility

GET collections/{collectionName}/count

DELETE collections/{collectionName}/many

DELETE collections/{collectionName}/{id}

GET collections/{collectionName}/distinct

POST collections/{collectionName}/aggregates/{aggregateId}/execute

GET collections/{collectionName}/{id}

GET collections/{collectionName}

GET collections/{collectionName}/indexes

POST collections/{collectionName}/many

POST collections/{collectionName}

PUT collections/{collectionName}/{id}/replace

POST collections/seed

PUT collections/{collectionName}/many

PUT collections/{collectionName}/{id}

Hub only (developer / admin plane):

Endpoint
Method

the same record routes as above, on the Hub

POST collections/seed

GET collections/{collectionName}/indexes

Rules for every record endpoint

  • filter, document, update and pipeline are JSON strings.

  • Inserts and updates (Update One, Update Many) are validated against the collection's published schema.

  • A filter or pipeline with $where, $function or $accumulator, or a read pipeline with $out / $merge, is refused with CM-ERRORS-DATABASE-031.

  • Without databaseIntegrationId the default database integration of the request's environment is used.

  • Bulk writes need a real filter. Update Many and Delete Many refuse an empty filter {} (or no filter) with CM-ERRORS-DATABASE-037. To change or delete every record on purpose, send allRecords: true (AllRecords in .NET) with the empty filter.

  • Soft-deleted records are not written. Update One / Update Many / Replace One / Change Responsibility skip records that are soft-deleted — for a write they are "not found", just as reads do not return them.

  • Updates take bare fields only. An update body with MongoDB operators at the top level ({"$inc": {"stock": 1}}, $set, $unset, …) is refused with CM-ERRORS-DATABASE-035, one error per operator. Send {"stock": 5}; the server applies it with $set.

  • A broken record body has its own error. A document / replacement that is not a JSON object (or an Insert Many item that is not an object) answers CM-ERRORS-DATABASE-036, with the index of the bad item; CM-ERRORS-DATABASE-005 is only for a broken filter.

  • Own scope works for bulk operations. A caller with only own-record rights may call Insert Many (createAsUser — every record gets the caller as owner, even if the document names someone else), Update Many (updateOwn) and Delete Many (deleteOwn) — the filter is narrowed to the caller's own records. Changing the owner in an own-scope Update Many is refused (that needs full database:update).

  • The new owner must be a project user. Change Responsibility checks the new owner in the users of the environment's default database integration and answers CM-ERRORS-MEMBERSHIP-USERS-012 when there is no such user — nothing is written.

In Cloud: Records.

Last updated

Was this helpful?