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

Test Database Aggregate

Test-run an aggregation pipeline with caller-supplied tokens.

An aggregate is a saved MongoDB aggregation pipeline you can run to compute, group, and summarise data.

Tests the database aggregate.

Test-run an aggregation pipeline with caller-supplied tokens

post
Authorizations
HTTPRequired

JWT Bearer Authorization

Path parameters
versionstring · nullableRequired

The CodeMash API version used to fetch data from the API. If not specified, the last version will be used. E.g.: v3

Body

Test-run an aggregation pipeline with caller-supplied tokens

correlationIdstring · nullableOptional

CorrelationId for each request

cultureCodestring · nullableOptional

Specify culture code when your response from the API should be localised. E.g.: en

timeZoneIdstring · nullableOptional

TimeZone

envstring · nullableOptional

Target environment for this request (e.g. TEST, STAGING). Optional — when omitted the request runs against PROD. Can be passed in a header as norbix-env.

projectIdstringRequired

ID of your project. Can be passed in a header as norbix-project-id.

collectionNamestringRequired

Name of the collection (schema) to run the aggregation against.

databaseIntegrationIdstring · nullableOptional

Optional database integration id. When omitted, the project's default database integration is used.

pipelinestringRequired

MongoDB aggregation pipeline JSON, optionally containing {TokenKey} placeholders to be substituted from tokens.

Responses
200

OK

application/json
post/{version}/database/aggregates/test
POST /{version}/database/aggregates/test HTTP/1.1
Host: hub.norbix.ai
Authorization: Bearer YOUR_SECRET_TOKEN
Content-Type: multipart/form-data
Accept: */*
Content-Length: 214

{
  "correlationId": "text",
  "cultureCode": "text",
  "timeZoneId": "text",
  "env": "text",
  "projectId": "text",
  "collectionName": "text",
  "databaseIntegrationId": "text",
  "pipeline": "text",
  "tokens": {
    "ANY_ADDITIONAL_PROPERTY": "text"
  }
}
200

OK

{
  "responseStatus": {
    "isSuccess": true
  },
  "result": []
}

In the dashboard

Manage this visually in Norbix Cloud — see Database.

Use it from code

Every Norbix SDK exposes this endpoint as a method — see Test Database Aggregate in the SDK reference, with examples in every language.

Last updated