Search AIRule

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

Retrieve the rules of your organization. Every member of the organization can read every rule, including the drafts written by someone else; only Owners and Designers can change them.

Four attributes describe where a rule stands, and none of them can be written directly:

  • latest_version_id points at the most recent version, i.e. the draft that is being edited. It moves every time the name or the body of the rule changes.

  • published_version_id points at the version the Agents apply, or is null when the rule is not published.

  • status is derived from published_version_id : draft while it is null , published once a version is published.

  • has_unpublished_changes is true only when a published rule has a newer version than the one it publishes, i.e. when published_version_id and latest_version_id differ.

Because status and has_unpublished_changes are stored on the rule, you can filter, search and paginate on them in a single call, and the returned count reflects the filter. The body of a rule is not an attribute of the rule: include latest_version to read the draft text and published_version to read the text the Agents apply, or query the AIRuleVersion resource directly.

Text search runs on name and published_name . name always follows the most recent version, while published_name keeps the name the rule had when it was published, so a rule that was renamed after publication matches its old name on the published tab and its new name on the drafts.

Request parametersResponse schema
count NUMBER

The number of records returned

rows ARRAY[OBJECT]
id UUID
name STRING
status STRING
has_unpublished_changes BOOLEAN
latest_version_id UUID
published_version_id UUID
published_name STRING
published_at DATETIME
organization_id UUID
user_id UUID
created_at DATETIME
updated_at DATETIME
Can be executed by:
Organization Member
Can be associated to:
latest_version
published_version
versions
linked_agents
created_by
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
{
  "count": 2,
  "rows": [
    {
      "id": "c1f4a0c2-6c9e-4f6b-9a5a-3f0d2b8f1e77",
      "name": "Pricing policy",
      "status": "published",
      "has_unpublished_changes": true,
      "latest_version_id": "2e7c8a10-4b3d-4a2f-9c1e-7d6b5a4f3e2d",
      "published_version_id": "9b1d2f34-5a6b-4c7d-8e9f-0a1b2c3d4e5f",
      "published_name": "Discount policy",
      "published_at": "2026-09-18T09:12:44.512Z",
      "organization_id": "0f2b8a6d-3c4e-4d5a-8b7c-1e2f3a4b5c6d",
      "user_id": "5ec6950f-d7bb-4554-8f6a-10ea8b68c254",
      "created_at": "2026-09-18T09:04:11.204Z",
      "updated_at": "2026-09-18T09:31:02.880Z"
    },
    {
      "id": "a4d8b3e1-0f27-4c9a-b6d5-8e1c2a7f4b30",
      "name": "Escalation policy",
      "status": "draft",
      "has_unpublished_changes": false,
      "latest_version_id": "6c5b4a39-2d1e-4f08-9a7b-3c2d1e0f9a8b",
      "published_version_id": null,
      "published_name": null,
      "published_at": null,
      "organization_id": "0f2b8a6d-3c4e-4d5a-8b7c-1e2f3a4b5c6d",
      "user_id": "5ec6950f-d7bb-4554-8f6a-10ea8b68c254",
      "created_at": "2026-09-17T14:22:05.101Z",
      "updated_at": "2026-09-17T14:22:05.101Z"
    }
  ]
}