AdminApiQueryController_edit

AdminApiQueryController_edit

Header Parameters
PubNub-Version string REQUIRED

Possible values: [2026-02-09]

Request Body REQUIRED
name string REQUIRED

Possible values: length ≤ 255

description string

Possible values: length ≤ 1000

definition object REQUIRED
version string REQUIRED
pipeline object REQUIRED
sources object[] REQUIRED
id string REQUIRED

Possible values: length ≤ 128, Value must match regular expression IDENTIFIER_PATTERN

type string REQUIRED

Possible values: [businessObject, reference]

businessObjectId string
referenceId string
timeRange object
field string REQUIRED
relative object
direction string REQUIRED

Possible values: [past, future]

value number REQUIRED

Possible values: 1 ≤ value

unit string REQUIRED

Possible values: [seconds, minutes, hours, days, weeks, months]

absolute object
start string REQUIRED
end string REQUIRED
filters object[]
field string REQUIRED
operator string REQUIRED

Possible values: [=, !=, >, <, >=, <=, in, notIn, like, between, notBetween, isNull, isNotNull, contains, notContains, startsWith, endsWith, isEmpty, isNotEmpty, minLength, maxLength]

value object
fields object[] REQUIRED
id string

PubNub-generated unique ID for the field. Required when creating metrics and decisions. Used as measureId, dimensionIds, or inputFields[].sourceId.

name string REQUIRED

Possible values: 1 ≤ length ≤ 50

Field name (1-50 characters).

source string

Possible values: [JSONPATH, DERIVED]

Field source type: JSONPATH or DERIVED.

jsonPath string

Possible values: length ≤ 200

JSON path expression for extracting data (max 200 chars). Required when source is JSONPATH and isActive is true.

jsonFieldType string

Possible values: [TEXT, TEXT_LONG, NUMERIC, TIMESTAMP, DURATION_SECONDS]

Field data type: TEXT, TEXT_LONG (character limit is 1000, limited to 5 per Business Object), NUMERIC, or TIMESTAMP. Required when source is JSONPATH.

isKeyset boolean

Boolean flag indicating if this field is part of the keyset. Informational only.

derivation object

Derivation configuration. Required when source is DERIVED.

operation string REQUIRED

Possible values: [TIME_DIFF]

Derivation operation type. Currently only TIME_DIFF is supported.

params object REQUIRED

Parameters for the derivation calculation.

startSource string REQUIRED

Possible values: [DATA_FIELD, PUBLISH_TIMETOKEN]

Start source for time difference calculation: DATA_FIELD or PUBLISH_TIMETOKEN. DATA_FIELD accepts only TIMESTAMP data type.

startFieldIndex number

Index or position of the start timestamp data field in your array. Not required if startSource is PUBLISH_TIMETOKEN.

endSource string REQUIRED

Possible values: [DATA_FIELD, PUBLISH_TIMETOKEN]

End source for time difference calculation: DATA_FIELD or PUBLISH_TIMETOKEN.

endFieldIndex number

Index or position of the end timestamp data field in your array. Not required if endSource is PUBLISH_TIMETOKEN.

transforms object[]
id string REQUIRED

Possible values: length ≤ 128, Value must match regular expression IDENTIFIER_PATTERN

type string REQUIRED

Possible values: [aggregate, window, join, dedupe, calculate, unnest, filter_join]

input string REQUIRED

Possible values: length ≤ 128, Value must match regular expression IDENTIFIER_PATTERN

aggregate object
groupBy string[] REQUIRED
aggregations object[] REQUIRED
function string REQUIRED

Possible values: [sum, count, avg, min, max, countDistinct, stddev, percentile, groupArray, groupUniqArray, any]

field string REQUIRED
alias string REQUIRED
parameter number
collectFields object[]
field string REQUIRED
function string REQUIRED

Possible values: [groupArray, groupUniqArray]

alias string REQUIRED
limit number

Possible values: 1 ≤ value

orderBy object
field string REQUIRED
direction string

Possible values: [ASC, DESC]

window object
functions object[] REQUIRED
function string REQUIRED

Possible values: [rowNumber, rank, denseRank, percentRank, lag, lead, firstValue, lastValue, sumOver, avgOver]

partitionBy string[] REQUIRED
orderBy object[] REQUIRED
field string REQUIRED
direction string

Possible values: [ASC, DESC]

alias string REQUIRED
offset number
join object
with string REQUIRED

Possible values: length ≤ 128, Value must match regular expression IDENTIFIER_PATTERN

type string REQUIRED

Possible values: [inner, left, right, full]

on object[] REQUIRED
left string REQUIRED
operator string REQUIRED

Possible values: [=, !=, >, <, >=, <=]

right string REQUIRED
dedupe object
partitionBy string[] REQUIRED
orderBy object[] REQUIRED
field string REQUIRED
direction string

Possible values: [ASC, DESC]

keep string REQUIRED

Possible values: [first, last]

calculate object
expressions object[] REQUIRED
expression object REQUIRED
alias string REQUIRED

Possible values: length ≤ 128, Value must match regular expression IDENTIFIER_PATTERN

type string REQUIRED

Possible values: [dimension, measure]

unnest object
arrayField string REQUIRED
alias string
filter_join object
criteriaAggregate object REQUIRED
groupBy string[] REQUIRED
aggregations object[] REQUIRED
function string REQUIRED

Possible values: [sum, count, avg, min, max, countDistinct, stddev, percentile, groupArray, groupUniqArray, any]

field string REQUIRED
alias string REQUIRED
parameter number
collectFields object[]
field string REQUIRED
function string REQUIRED

Possible values: [groupArray, groupUniqArray]

alias string REQUIRED
limit number

Possible values: 1 ≤ value

orderBy object
field string REQUIRED
direction string

Possible values: [ASC, DESC]

criteriaFilters object[]
field string REQUIRED
operator string REQUIRED

Possible values: [=, !=, >, <, >=, <=, in, notIn, like, between, notBetween, isNull, isNotNull, contains, notContains, startsWith, endsWith, isEmpty, isNotEmpty, minLength, maxLength]

value object
joinFields string[] REQUIRED
filters object[]
field string REQUIRED
operator string REQUIRED

Possible values: [=, !=, >, <, >=, <=, in, notIn, like, between, notBetween, isNull, isNotNull, contains, notContains, startsWith, endsWith, isEmpty, isNotEmpty, minLength, maxLength]

value object
output object REQUIRED
from string REQUIRED

Possible values: length ≤ 128, Value must match regular expression IDENTIFIER_PATTERN

select object[] REQUIRED
field string REQUIRED
alias string
id string
orderBy object[]
field string REQUIRED
direction string

Possible values: [ASC, DESC]

limit number

Possible values: 1 ≤ value ≤ 500

offset number
meta object
Responses
200
Schema OPTIONAL
createdAt date-time OPTIONAL

Creation timestamp (ISO 8601, UTC).

updatedAt date-time OPTIONAL

Last update timestamp (ISO 8601, UTC).

createdBy string OPTIONAL

Email of the creator.

updatedBy string OPTIONAL

Email of the last updater.

decisions (circular)[] OPTIONAL
customer object OPTIONAL
id string

Your unique customer ID for OEM partners (requires Partner Portal).

name string

Customer name.

businessObjects (circular)[] OPTIONAL
id string
name string
description string OPTIONAL
definition object
version string
pipeline object
sources object[]
id string

Possible values: length ≤ 128, Value must match regular expression IDENTIFIER_PATTERN

type string

Possible values: [businessObject, reference]

businessObjectId string OPTIONAL
referenceId string OPTIONAL
timeRange object OPTIONAL
field string
relative object OPTIONAL
direction string

Possible values: [past, future]

value number

Possible values: 1 ≤ value

unit string

Possible values: [seconds, minutes, hours, days, weeks, months]

absolute object OPTIONAL
start string
end string
filters object[] OPTIONAL
field string
operator string

Possible values: [=, !=, >, <, >=, <=, in, notIn, like, between, notBetween, isNull, isNotNull, contains, notContains, startsWith, endsWith, isEmpty, isNotEmpty, minLength, maxLength]

value object OPTIONAL
fields object[]
id string OPTIONAL

PubNub-generated unique ID for the field. Required when creating metrics and decisions. Used as measureId, dimensionIds, or inputFields[].sourceId.

name string

Possible values: 1 ≤ length ≤ 50

Field name (1-50 characters).

source string OPTIONAL

Possible values: [JSONPATH, DERIVED]

Field source type: JSONPATH or DERIVED.

jsonPath string OPTIONAL

Possible values: length ≤ 200

JSON path expression for extracting data (max 200 chars). Required when source is JSONPATH and isActive is true.

jsonFieldType string OPTIONAL

Possible values: [TEXT, TEXT_LONG, NUMERIC, TIMESTAMP, DURATION_SECONDS]

Field data type: TEXT, TEXT_LONG (character limit is 1000, limited to 5 per Business Object), NUMERIC, or TIMESTAMP. Required when source is JSONPATH.

isKeyset boolean OPTIONAL

Boolean flag indicating if this field is part of the keyset. Informational only.

derivation object OPTIONAL

Derivation configuration. Required when source is DERIVED.

operation string

Possible values: [TIME_DIFF]

Derivation operation type. Currently only TIME_DIFF is supported.

params object

Parameters for the derivation calculation.

startSource string

Possible values: [DATA_FIELD, PUBLISH_TIMETOKEN]

Start source for time difference calculation: DATA_FIELD or PUBLISH_TIMETOKEN. DATA_FIELD accepts only TIMESTAMP data type.

startFieldIndex number OPTIONAL

Index or position of the start timestamp data field in your array. Not required if startSource is PUBLISH_TIMETOKEN.

endSource string

Possible values: [DATA_FIELD, PUBLISH_TIMETOKEN]

End source for time difference calculation: DATA_FIELD or PUBLISH_TIMETOKEN.

endFieldIndex number OPTIONAL

Index or position of the end timestamp data field in your array. Not required if endSource is PUBLISH_TIMETOKEN.

transforms object[] OPTIONAL
id string

Possible values: length ≤ 128, Value must match regular expression IDENTIFIER_PATTERN

type string

Possible values: [aggregate, window, join, dedupe, calculate, unnest, filter_join]

input string

Possible values: length ≤ 128, Value must match regular expression IDENTIFIER_PATTERN

aggregate object OPTIONAL
groupBy string[]
aggregations object[]
function string

Possible values: [sum, count, avg, min, max, countDistinct, stddev, percentile, groupArray, groupUniqArray, any]

field string
alias string
parameter number OPTIONAL
collectFields object[] OPTIONAL
field string
function string

Possible values: [groupArray, groupUniqArray]

alias string
limit number OPTIONAL

Possible values: 1 ≤ value

orderBy object OPTIONAL
field string
direction string OPTIONAL

Possible values: [ASC, DESC]

window object OPTIONAL
functions object[]
function string

Possible values: [rowNumber, rank, denseRank, percentRank, lag, lead, firstValue, lastValue, sumOver, avgOver]

partitionBy string[]
orderBy object[]
field string
direction string OPTIONAL

Possible values: [ASC, DESC]

alias string
offset number OPTIONAL
join object OPTIONAL
with string

Possible values: length ≤ 128, Value must match regular expression IDENTIFIER_PATTERN

type string

Possible values: [inner, left, right, full]

on object[]
left string
operator string

Possible values: [=, !=, >, <, >=, <=]

right string
dedupe object OPTIONAL
partitionBy string[]
orderBy object[]
field string
direction string OPTIONAL

Possible values: [ASC, DESC]

keep string

Possible values: [first, last]

calculate object OPTIONAL
expressions object[]
expression object
alias string

Possible values: length ≤ 128, Value must match regular expression IDENTIFIER_PATTERN

type string

Possible values: [dimension, measure]

unnest object OPTIONAL
arrayField string
alias string OPTIONAL
filter_join object OPTIONAL
criteriaAggregate object
groupBy string[]
aggregations object[]
function string

Possible values: [sum, count, avg, min, max, countDistinct, stddev, percentile, groupArray, groupUniqArray, any]

field string
alias string
parameter number OPTIONAL
collectFields object[] OPTIONAL
field string
function string

Possible values: [groupArray, groupUniqArray]

alias string
limit number OPTIONAL

Possible values: 1 ≤ value

orderBy object OPTIONAL
field string
direction string OPTIONAL

Possible values: [ASC, DESC]

criteriaFilters object[] OPTIONAL
field string
operator string

Possible values: [=, !=, >, <, >=, <=, in, notIn, like, between, notBetween, isNull, isNotNull, contains, notContains, startsWith, endsWith, isEmpty, isNotEmpty, minLength, maxLength]

value object OPTIONAL
joinFields string[]
filters object[] OPTIONAL
field string
operator string

Possible values: [=, !=, >, <, >=, <=, in, notIn, like, between, notBetween, isNull, isNotNull, contains, notContains, startsWith, endsWith, isEmpty, isNotEmpty, minLength, maxLength]

value object OPTIONAL
output object
from string

Possible values: length ≤ 128, Value must match regular expression IDENTIFIER_PATTERN

select object[]
field string
alias string OPTIONAL
id string OPTIONAL
orderBy object[] OPTIONAL
field string
direction string OPTIONAL

Possible values: [ASC, DESC]

limit number OPTIONAL

Possible values: 1 ≤ value ≤ 500

offset number OPTIONAL
meta object OPTIONAL
template string OPTIONAL
accountId string
404
* required
PubNub-Version*
Type: string
Possible values: [2026-02-09]
* required
name*
Type: string
≤ 255 chars
description
Type: string
≤ 1000 chars
definition*
Type: object
createdAt
Type: string
Creation timestamp (ISO 8601, UTC).
Format: date-time
updatedAt
Type: string
Last update timestamp (ISO 8601, UTC).
Format: date-time
createdBy
Type: string
nullableEmail of the creator.
updatedBy
Type: string
nullableEmail of the last updater.
decisions
Type: array
Array items:
items
Type: any
customer
Type: object
nullable
businessObjects
Type: array
Array items:
items
Type: any
id
Type: string
name
Type: string
description
Type: string
definition
Type: object
template
Type: string
accountId
Type: string