Illuminate REST API

The Illuminate REST API gives programmatic access to create and manage Business Objects, Metrics, Decisions, Dashboards, and Queries. It is accessed through the PubNub Admin API.

For full per-endpoint request and response schemas, see the Admin API reference.

Authentication​

Illuminate REST endpoints use Admin API key authentication. Session-based authentication is not used.

Base URL: https://admin-api.pubnub.com/v2/illuminate/

Required headers​

Include these headers on every request:

HeaderValue
AuthorizationYour Admin API key
PubNub-Version2026-02-09
Content-Typeapplication/json

Authentication example​

curl --request GET \
--url 'https://admin-api.pubnub.com/v2/illuminate/<resource>' \
-H "Authorization: YOUR_API_KEY_HERE" \
-H "PubNub-Version: 2026-02-09" \
-H "Content-Type: application/json"

Conventions​

IDs​

Every create response returns stable IDs (for example, businessObjectId, metricId, decisionId). Use them to create dependent resources and when updating rules.

  • fields[].id from a Business Object response is reused as measureId, dimensionIds, and inputFields[].sourceId in Metrics and Decisions.
  • actions[].id from a Decision response is required when configuring rules and resetting execution limits.

Timestamps​

All timestamps are ISO 8601 in UTC, for example 2025-08-21T19:27:01Z. The time component is optional when specifying date ranges.

Cascading deletion​

Deleting a Business Object also permanently deletes its Metrics, Decisions, and Dashboard charts.

Business Object activation​

A Business Object can be created with isActive: false without subscribe keys. To activate it (isActive: true), at least one subscribe key must be included in subkeys.

Endpoint index​

ResourceOperationMethodEndpoint
Business ObjectsCreatePOST/business-objects
ListGET/business-objects
GetGET/business-objects/{id}
UpdatePUT/business-objects/{id}
DeleteDELETE/business-objects/{id}
MetricsCreatePOST/metrics
ListGET/metrics
GetGET/metrics/{id}
UpdatePUT/metrics/{id}
DeleteDELETE/metrics/{id}
DecisionsCreatePOST/decisions
ListGET/decisions
GetGET/decisions/{id}
UpdatePUT/decisions/{id}
DeleteDELETE/decisions/{id}
Reset action limitsPOST/decisions/{id}/action-limit-reset
Retrieve action logGET/decisions/{id}/action-log
DashboardsCreatePOST/dashboards
ListGET/dashboards
GetGET/dashboards/{id}
UpdatePUT/dashboards/{id}
DeleteDELETE/dashboards/{id}
QueriesExecute ad-hocPOST/queries/execute
CreatePOST/queries
ListGET/queries
GetGET/queries/{id}
UpdatePUT/queries/{id}
DeleteDELETE/queries/{id}
Execute savedPOST/queries/{id}/execute
Get fieldsGET/queries/{id}/fields
Create predefined DecisionPOST/queries/{id}/predefined-decisions

Data types​

Business Object field types​

FieldjsonFieldType valueNotes
Short textTEXT
Long textTEXT_LONGA String (Max) field holds text up to 1,000 characters long. A Business Object can include up to 5 String (Max) fields.
NumberNUMERICUsed as a measure in metrics.
TimestampTIMESTAMPISO 8601 format, for example 2025-08-21T19:27:01Z.
Derived (duration)NUMERIC (derived)Computed from two timestamp fields using TIME_DIFF.

Business Object field sources​

source valueDescription
JSONPATHValue extracted from a JSON path in the message payload.
DERIVEDValue computed from other fields. Supports TIME_DIFF only.

Dimensions and measures​

When creating Metrics, fields are used in two roles:

RoleField typeUsed as
MeasureNUMERICThe value being aggregated (sum, average, etc.)
DimensionTEXTThe grouping or filtering field

Metric functions​

function valueDescriptionmeasureId required
COUNTCount of recordsNo. Omit measureId.
COUNT_DISTINCTCount of distinct valuesYes
SUMSum of a numeric fieldYes
AVGAverage of a numeric fieldYes
MINMinimum value of a numeric fieldYes
MAXMaximum value of a numeric fieldYes

Metric filter operations​

Filters apply to dimension (TEXT) fields only. Matching is case-sensitive.

operation valueDescription
STRING_EQUALSExact match
STRING_NOT_EQUALDoes not match
STRING_CONTAINSContains the argument
STRING_NOT_CONTAINSDoes not contain the argument
STRING_IS_EMPTYField is empty
STRING_IS_NOT_EMPTYField is not empty
STRING_STARTS_WITHStarts with the argument
STRING_ENDS_WITHEnds with the argument

Evaluation windows​

The evaluationWindow field in Metric requests accepts these values (in seconds):

ValueDuration
601 minute
3005 minutes
60010 minutes
90015 minutes
180030 minutes
36001 hour
864001 day

Action types​

The following actionType values are supported in Decisions:

actionType valueDescription
PUBNUB_PUBLISHPublish a message to a PubNub channel
WEBHOOK_EXECUTIONMake an HTTP request to an external endpoint
APPCONTEXT_SET_USER_METADATAUpdate PubNub App Context user metadata
APPCONTEXT_SET_CHANNEL_METADATAUpdate PubNub App Context channel metadata
APPCONTEXT_SET_MEMBERSHIP_METADATAUpdate PubNub App Context membership metadata

Execution limit types​

The executionLimitType field on Decision actions accepts these values:

executionLimitType valueDescription
ALWAYSThe action fires every time the rule matches
ONCE_PER_INTERVALThe action fires once within the evaluation interval
ONCE_PER_INTERVAL_PER_CONDITIONThe action fires once per unique condition value within the interval
ONCE_PER_INTERVAL_PER_CONDITION_GROUPThe action fires once per unique combination of all condition values within the interval

Creating a Decision through the API requires multiple dependent IDs. Follow this sequence:

  1. Create the Business Object with isActive: false.
  2. Use the fields[].id values from the response to create a Metric.
  3. Create the Decision with isEnabled: false. Add input fields and actions.
  4. Read the Decision response. Use the returned actions[].id and inputFields[].id values to build rules.
  5. Update the Decision with your rules.
  6. Enable the Decision by setting isEnabled: true.

Error codes​

CodeMeaning
200Success
201Created
400Bad request. Check your request parameters.
401Unauthorized. Include a valid Authorization header.
403Forbidden. Your account does not have access to this resource.
404Not found. The resource ID does not exist.
422Unprocessable entity. Too many records found.
500Internal server error.

Was this page useful?

Last updated on