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

Save Database Aggregate

Creates or updates a saved Mongo aggregation.

An aggregate is a saved MongoDB aggregation pipeline you can run to compute, group, and summarise data. This method creates the database aggregate and returns its id.

This method is on the Hub surface (norbix.hub.database) — call it from admin tooling or IaC.

These examples assume the SDK is installed and your credentials are set as environment variables — each client reads them automatically, so the constructors below take no arguments. See Install a Norbix SDK.

import { Norbix } from '@norbix.ai/ts';
const norbix = new Norbix();

const result = await norbix.hub.database.saveDatabaseAggregate({
  schemaId: 'sch_4kX9mQvR2tYw7ZbC1dFgHj',
  displayName: 'Alice Nguyen',
  pipeline: '[{"$match":{"status":"active"}}]',
  viewId: 'view_4kX9mQvR2tYw7ZbC1dFgHj',
});
using Norbix.Sdk;
using Norbix.Sdk.Types.Hub;

using var client = new NorbixClient();

var result = await client.Database.SaveDatabaseAggregateAsync(new SaveDatabaseAggregateRequest
{
    SchemaId = "sch_4kX9mQvR2tYw7ZbC1dFgHj",
    DisplayName = "Alice Nguyen",
    Pipeline = "[{\"$match\":{\"status\":\"active\"}}]",
    ViewId = "view_4kX9mQvR2tYw7ZbC1dFgHj",
});

In the dashboard

Manage this visually in Norbix Cloud — see Database → Aggregates.

API reference

Full request and response for this endpoint: Save Database Aggregate.

Last updated