Associate Formula

LLM-friendly URL
POST
https://api.luzmo.com/0.1.0/formula
API call form
Examples

Associate a formula to a dataset.

Use the Tenants role to assign a formula to a tenant . Only main-organization users with modify rights on the formula's dataset can manage tenant assignments. To assign many formulas at once, use the assignments array of Associate Tenant .

Request parametersResponse schema
id UUID

The unique identifier of the entity

name Multilingual string

Internationalized name of the formula.

description Multilingual string

Internationalized description of the formula.

ai_context STRING

Plain-text AI context for this formula. Luzmo IQ uses this field as additional business context when answering questions or generating charts. It enriches, but does not replace, the formula name, description, and expression. This field is shared across all languages and is not internationalized. Set it to null to clear previously stored AI context. The API stores and returns the full value; long values may be truncated only when rendered into AI prompts.

expression STRING
No description available
type STRING
No description available
subtype STRING
No description available
format STRING
No description available
informat STRING
No description available
lowestLevel NUMBER
No description available
currency_id STRING

Currency ID for this column. The currency_id is expected in the form of an ISO 4217 currency code , for example: EUR or USD .

custom_metadata OBJECT

Custom metadata attached to this formula. Must be a valid JSON object with a maximum size of 65536 bytes. Set to null to clear previously stored metadata.

created_at DATETIME

RFC 3339 date time string indicating when the resource was created

updated_at DATETIME

RFC 3339 date time string indicating when the resource was last updated

user_id STRING

ID of the user that owns this formula.

Can be executed by:
Dataset Modifier
&
Dataset Modifier
(For: Dataset)
Dataset Modifier
&
Dataset Modifier
(For: Currency)
Dataset Modifier
&
Organization Member (main organization)
(For: Tenants)
Can be associated to:
Currency
Dataset
User
Tenants
Did this page help you?
Yes No
Language
Shell
Node
Java
.NET
Python
PHP
Install
npm install @luzmo/nodejs-sdk
Example Response
200
400
500
{
  "id": "b3ad615a-5199-4e58-8e0e-73dceba18af0",
  "currency_id": null,
  "description": {
    "en": "Calculated average of unique ID"
  },
  "ai_context": "Average unique ID is a synthetic quality metric. Use it for internal data checks only, not revenue reporting.",
  "expression": "AVG({69c36023-f791-4225-a6cb-b093ac598a70:6a71afc0-c95c-4d8b-8a99-c9c568d83f53})",
  "format": ",.2af",
  "informat": "numeric",
  "lowestLevel": 0,
  "name": {
    "en": "avg_uniq_id"
  },
  "subtype": null,
  "type": "numeric",
  "created_at": "2024-05-20T12:44:23.163Z",
  "updated_at": "2024-05-20T13:29:37.273Z",
  "custom_metadata": null,
  "user_id": "34b22f36-4904-497f-8acf-b0ba1d7e83cb"
}