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.
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):
the same record routes as above, on the Hub
POST collections/seed
GET collections/{collectionName}/indexes
Rules for every record endpoint
filter,document,updateandpipelineare JSON strings.Inserts and updates (
Update One,Update Many) are validated against the collection's published schema.A filter or pipeline with
$where,$functionor$accumulator, or a read pipeline with$out/$merge, is refused withCM-ERRORS-DATABASE-031.Without
databaseIntegrationIdthe default database integration of the request's environment is used.Bulk writes need a real filter.
Update ManyandDelete Manyrefuse an empty filter{}(or no filter) withCM-ERRORS-DATABASE-037. To change or delete every record on purpose, sendallRecords: true(AllRecordsin .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 withCM-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/replacementthat is not a JSON object (or an Insert Many item that is not an object) answersCM-ERRORS-DATABASE-036, with the index of the bad item;CM-ERRORS-DATABASE-005is 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 fulldatabase: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-012when there is no such user — nothing is written.
In Cloud: Records.
Last updated
Was this helpful?