Search documentation
karat

+

K

User Documentation ↗

Aggregate Objects

POST/api/v1/ontologies/{ontologyRid}/objects/{objectType}/aggregate

Perform functions on object fields in the specified ontology and object type.

Third-party applications using this endpoint via OAuth2 must request the following operation scope: api:ontologies-read.

Path parameters

ontologyRid
string

The unique Resource Identifier (RID) of the Ontology that contains the objects.

objectType
string

The type of the object to aggregate on.

Request body

AggregateObjectsRequest
object
Hide children

Hide children

aggregation
list<Aggregation>
optional
Show children

Show children

Aggregation
union

Specifies an aggregation function.

Show children

Show children

approximateDistinct
object
optional

Computes an approximate number of distinct values for the provided field.

Show children

Show children

field
string

A reference to an Ontology object property with the form properties.{propertyApiName}.

name
string
optional

A user-specified alias for an aggregation metric name.

min
object
optional

Computes the minimum value for the provided field.

Show children

Show children

field
string

A reference to an Ontology object property with the form properties.{propertyApiName}.

name
string
optional

A user-specified alias for an aggregation metric name.

avg
object
optional

Computes the average value for the provided field.

Show children

Show children

field
string

A reference to an Ontology object property with the form properties.{propertyApiName}.

name
string
optional

A user-specified alias for an aggregation metric name.

max
object
optional

Computes the maximum value for the provided field.

Show children

Show children

field
string

A reference to an Ontology object property with the form properties.{propertyApiName}.

name
string
optional

A user-specified alias for an aggregation metric name.

count
object
optional

Computes the total count of objects.

Show children

Show children

name
string
optional

A user-specified alias for an aggregation metric name.

sum
object
optional

Computes the sum of values for the provided field.

Show children

Show children

field
string

A reference to an Ontology object property with the form properties.{propertyApiName}.

name
string
optional

A user-specified alias for an aggregation metric name.

query
union
optional
Show children

Show children

or
object
optional

Returns objects where at least 1 query is satisfied.

Show children

Show children

value
list<SearchJsonQuery>
optional
Show children

Show children

SearchJsonQuery
union
Show children

Show children

or
object
optional

Returns objects where at least 1 query is satisfied.

Show children

Show children

value
list<SearchJsonQuery>
optional
Show children

Show children

SearchJsonQuery
union
prefix
object
optional

Returns objects where the specified field starts with the provided value.

Show children

Show children

field
string

A reference to an Ontology object property with the form properties.{propertyApiName}.

value
string
lt
object
optional

Returns objects where the specified field is less than a value.

Show children

Show children

field
string

A reference to an Ontology object property with the form properties.{propertyApiName}.

value
any

Represents the value of a property in the following format.

TypeJSON encodingExample
Arrayarray["alpha", "bravo", "charlie"]
AttachmentJSON encoded AttachmentProperty object{"rid":"ri.blobster.main.attachment.2f944bae-5851-4204-8615-920c969a9f2e"}
Booleanbooleantrue
Bytenumber31
DateISO 8601 extended local date string"2021-05-01"
Decimalstring"2.718281828"
Doublenumber3.14159265
Floatnumber3.14159265
GeoPointgeojson{"type":"Point","coordinates":[102.0,0.5]}
GeoShapegeojson{"type":"LineString","coordinates":[[102.0,0.0],[103.0,1.0],[104.0,0.0],[105.0,1.0]]}
Integernumber238940
Longstring"58319870951433"
Shortnumber8739
Stringstring"Call me Ishmael"
TimestampISO 8601 extended offset date-time string in UTC zone"2021-01-04T05:00:00Z"

Note that for backwards compatibility, the Boolean, Byte, Double, Float, Integer, and Short types can also be encoded as JSON strings.

allTerms
object
optional

Returns objects where the specified field contains all of the whitespace separated words in any order in the provided value. This query supports fuzzy matching.

Show children

Show children

field
string

A reference to an Ontology object property with the form properties.{propertyApiName}.

value
string
fuzzy
boolean
optional

Setting fuzzy to true allows approximate matching in search queries that support it.

eq
object
optional

Returns objects where the specified field is equal to a value.

Show children

Show children

field
string

A reference to an Ontology object property with the form properties.{propertyApiName}.

value
any

Represents the value of a property in the following format.

TypeJSON encodingExample
Arrayarray["alpha", "bravo", "charlie"]
AttachmentJSON encoded AttachmentProperty object{"rid":"ri.blobster.main.attachment.2f944bae-5851-4204-8615-920c969a9f2e"}
Booleanbooleantrue
Bytenumber31
DateISO 8601 extended local date string"2021-05-01"
Decimalstring"2.718281828"
Doublenumber3.14159265
Floatnumber3.14159265
GeoPointgeojson{"type":"Point","coordinates":[102.0,0.5]}
GeoShapegeojson{"type":"LineString","coordinates":[[102.0,0.0],[103.0,1.0],[104.0,0.0],[105.0,1.0]]}
Integernumber238940
Longstring"58319870951433"
Shortnumber8739
Stringstring"Call me Ishmael"
TimestampISO 8601 extended offset date-time string in UTC zone"2021-01-04T05:00:00Z"

Note that for backwards compatibility, the Boolean, Byte, Double, Float, Integer, and Short types can also be encoded as JSON strings.

gt
object
optional

Returns objects where the specified field is greater than a value.

Show children

Show children

field
string

A reference to an Ontology object property with the form properties.{propertyApiName}.

value
any

Represents the value of a property in the following format.

TypeJSON encodingExample
Arrayarray["alpha", "bravo", "charlie"]
AttachmentJSON encoded AttachmentProperty object{"rid":"ri.blobster.main.attachment.2f944bae-5851-4204-8615-920c969a9f2e"}
Booleanbooleantrue
Bytenumber31
DateISO 8601 extended local date string"2021-05-01"
Decimalstring"2.718281828"
Doublenumber3.14159265
Floatnumber3.14159265
GeoPointgeojson{"type":"Point","coordinates":[102.0,0.5]}
GeoShapegeojson{"type":"LineString","coordinates":[[102.0,0.0],[103.0,1.0],[104.0,0.0],[105.0,1.0]]}
Integernumber238940
Longstring"58319870951433"
Shortnumber8739
Stringstring"Call me Ishmael"
TimestampISO 8601 extended offset date-time string in UTC zone"2021-01-04T05:00:00Z"

Note that for backwards compatibility, the Boolean, Byte, Double, Float, Integer, and Short types can also be encoded as JSON strings.

contains
object
optional

Returns objects where the specified array contains a value.

Show children

Show children

field
string

A reference to an Ontology object property with the form properties.{propertyApiName}.

value
any

Represents the value of a property in the following format.

TypeJSON encodingExample
Arrayarray["alpha", "bravo", "charlie"]
AttachmentJSON encoded AttachmentProperty object{"rid":"ri.blobster.main.attachment.2f944bae-5851-4204-8615-920c969a9f2e"}
Booleanbooleantrue
Bytenumber31
DateISO 8601 extended local date string"2021-05-01"
Decimalstring"2.718281828"
Doublenumber3.14159265
Floatnumber3.14159265
GeoPointgeojson{"type":"Point","coordinates":[102.0,0.5]}
GeoShapegeojson{"type":"LineString","coordinates":[[102.0,0.0],[103.0,1.0],[104.0,0.0],[105.0,1.0]]}
Integernumber238940
Longstring"58319870951433"
Shortnumber8739
Stringstring"Call me Ishmael"
TimestampISO 8601 extended offset date-time string in UTC zone"2021-01-04T05:00:00Z"

Note that for backwards compatibility, the Boolean, Byte, Double, Float, Integer, and Short types can also be encoded as JSON strings.

not
object
optional

Returns objects where the query is not satisfied.

Show children

Show children

value
union
phrase
object
optional

Returns objects where the specified field contains the provided value as a substring.

Show children

Show children

field
string

A reference to an Ontology object property with the form properties.{propertyApiName}.

value
string
and
object
optional

Returns objects where every query is satisfied.

Show children

Show children

value
list<SearchJsonQuery>
optional
Show children

Show children

SearchJsonQuery
union
isNull
object
optional

Returns objects based on the existence of the specified field.

Show children

Show children

field
string

A reference to an Ontology object property with the form properties.{propertyApiName}.

value
boolean
gte
object
optional

Returns objects where the specified field is greater than or equal to a value.

Show children

Show children

field
string

A reference to an Ontology object property with the form properties.{propertyApiName}.

value
any

Represents the value of a property in the following format.

TypeJSON encodingExample
Arrayarray["alpha", "bravo", "charlie"]
AttachmentJSON encoded AttachmentProperty object{"rid":"ri.blobster.main.attachment.2f944bae-5851-4204-8615-920c969a9f2e"}
Booleanbooleantrue
Bytenumber31
DateISO 8601 extended local date string"2021-05-01"
Decimalstring"2.718281828"
Doublenumber3.14159265
Floatnumber3.14159265
GeoPointgeojson{"type":"Point","coordinates":[102.0,0.5]}
GeoShapegeojson{"type":"LineString","coordinates":[[102.0,0.0],[103.0,1.0],[104.0,0.0],[105.0,1.0]]}
Integernumber238940
Longstring"58319870951433"
Shortnumber8739
Stringstring"Call me Ishmael"
TimestampISO 8601 extended offset date-time string in UTC zone"2021-01-04T05:00:00Z"

Note that for backwards compatibility, the Boolean, Byte, Double, Float, Integer, and Short types can also be encoded as JSON strings.

anyTerm
object
optional

Returns objects where the specified field contains any of the whitespace separated words in any order in the provided value. This query supports fuzzy matching.

Show children

Show children

field
string

A reference to an Ontology object property with the form properties.{propertyApiName}.

value
string
fuzzy
boolean
optional

Setting fuzzy to true allows approximate matching in search queries that support it.

lte
object
optional

Returns objects where the specified field is less than or equal to a value.

Show children

Show children

field
string

A reference to an Ontology object property with the form properties.{propertyApiName}.

value
any

Represents the value of a property in the following format.

TypeJSON encodingExample
Arrayarray["alpha", "bravo", "charlie"]
AttachmentJSON encoded AttachmentProperty object{"rid":"ri.blobster.main.attachment.2f944bae-5851-4204-8615-920c969a9f2e"}
Booleanbooleantrue
Bytenumber31
DateISO 8601 extended local date string"2021-05-01"
Decimalstring"2.718281828"
Doublenumber3.14159265
Floatnumber3.14159265
GeoPointgeojson{"type":"Point","coordinates":[102.0,0.5]}
GeoShapegeojson{"type":"LineString","coordinates":[[102.0,0.0],[103.0,1.0],[104.0,0.0],[105.0,1.0]]}
Integernumber238940
Longstring"58319870951433"
Shortnumber8739
Stringstring"Call me Ishmael"
TimestampISO 8601 extended offset date-time string in UTC zone"2021-01-04T05:00:00Z"

Note that for backwards compatibility, the Boolean, Byte, Double, Float, Integer, and Short types can also be encoded as JSON strings.

prefix
object
optional

Returns objects where the specified field starts with the provided value.

Show children

Show children

field
string

A reference to an Ontology object property with the form properties.{propertyApiName}.

value
string
lt
object
optional

Returns objects where the specified field is less than a value.

Show children

Show children

field
string

A reference to an Ontology object property with the form properties.{propertyApiName}.

value
any

Represents the value of a property in the following format.

TypeJSON encodingExample
Arrayarray["alpha", "bravo", "charlie"]
AttachmentJSON encoded AttachmentProperty object{"rid":"ri.blobster.main.attachment.2f944bae-5851-4204-8615-920c969a9f2e"}
Booleanbooleantrue
Bytenumber31
DateISO 8601 extended local date string"2021-05-01"
Decimalstring"2.718281828"
Doublenumber3.14159265
Floatnumber3.14159265
GeoPointgeojson{"type":"Point","coordinates":[102.0,0.5]}
GeoShapegeojson{"type":"LineString","coordinates":[[102.0,0.0],[103.0,1.0],[104.0,0.0],[105.0,1.0]]}
Integernumber238940
Longstring"58319870951433"
Shortnumber8739
Stringstring"Call me Ishmael"
TimestampISO 8601 extended offset date-time string in UTC zone"2021-01-04T05:00:00Z"

Note that for backwards compatibility, the Boolean, Byte, Double, Float, Integer, and Short types can also be encoded as JSON strings.

allTerms
object
optional

Returns objects where the specified field contains all of the whitespace separated words in any order in the provided value. This query supports fuzzy matching.

Show children

Show children

field
string

A reference to an Ontology object property with the form properties.{propertyApiName}.

value
string
fuzzy
boolean
optional

Setting fuzzy to true allows approximate matching in search queries that support it.

eq
object
optional

Returns objects where the specified field is equal to a value.

Show children

Show children

field
string

A reference to an Ontology object property with the form properties.{propertyApiName}.

value
any

Represents the value of a property in the following format.

TypeJSON encodingExample
Arrayarray["alpha", "bravo", "charlie"]
AttachmentJSON encoded AttachmentProperty object{"rid":"ri.blobster.main.attachment.2f944bae-5851-4204-8615-920c969a9f2e"}
Booleanbooleantrue
Bytenumber31
DateISO 8601 extended local date string"2021-05-01"
Decimalstring"2.718281828"
Doublenumber3.14159265
Floatnumber3.14159265
GeoPointgeojson{"type":"Point","coordinates":[102.0,0.5]}
GeoShapegeojson{"type":"LineString","coordinates":[[102.0,0.0],[103.0,1.0],[104.0,0.0],[105.0,1.0]]}
Integernumber238940
Longstring"58319870951433"
Shortnumber8739
Stringstring"Call me Ishmael"
TimestampISO 8601 extended offset date-time string in UTC zone"2021-01-04T05:00:00Z"

Note that for backwards compatibility, the Boolean, Byte, Double, Float, Integer, and Short types can also be encoded as JSON strings.

gt
object
optional

Returns objects where the specified field is greater than a value.

Show children

Show children

field
string

A reference to an Ontology object property with the form properties.{propertyApiName}.

value
any

Represents the value of a property in the following format.

TypeJSON encodingExample
Arrayarray["alpha", "bravo", "charlie"]
AttachmentJSON encoded AttachmentProperty object{"rid":"ri.blobster.main.attachment.2f944bae-5851-4204-8615-920c969a9f2e"}
Booleanbooleantrue
Bytenumber31
DateISO 8601 extended local date string"2021-05-01"
Decimalstring"2.718281828"
Doublenumber3.14159265
Floatnumber3.14159265
GeoPointgeojson{"type":"Point","coordinates":[102.0,0.5]}
GeoShapegeojson{"type":"LineString","coordinates":[[102.0,0.0],[103.0,1.0],[104.0,0.0],[105.0,1.0]]}
Integernumber238940
Longstring"58319870951433"
Shortnumber8739
Stringstring"Call me Ishmael"
TimestampISO 8601 extended offset date-time string in UTC zone"2021-01-04T05:00:00Z"

Note that for backwards compatibility, the Boolean, Byte, Double, Float, Integer, and Short types can also be encoded as JSON strings.

contains
object
optional

Returns objects where the specified array contains a value.

Show children

Show children

field
string

A reference to an Ontology object property with the form properties.{propertyApiName}.

value
any

Represents the value of a property in the following format.

TypeJSON encodingExample
Arrayarray["alpha", "bravo", "charlie"]
AttachmentJSON encoded AttachmentProperty object{"rid":"ri.blobster.main.attachment.2f944bae-5851-4204-8615-920c969a9f2e"}
Booleanbooleantrue
Bytenumber31
DateISO 8601 extended local date string"2021-05-01"
Decimalstring"2.718281828"
Doublenumber3.14159265
Floatnumber3.14159265
GeoPointgeojson{"type":"Point","coordinates":[102.0,0.5]}
GeoShapegeojson{"type":"LineString","coordinates":[[102.0,0.0],[103.0,1.0],[104.0,0.0],[105.0,1.0]]}
Integernumber238940
Longstring"58319870951433"
Shortnumber8739
Stringstring"Call me Ishmael"
TimestampISO 8601 extended offset date-time string in UTC zone"2021-01-04T05:00:00Z"

Note that for backwards compatibility, the Boolean, Byte, Double, Float, Integer, and Short types can also be encoded as JSON strings.

not
object
optional

Returns objects where the query is not satisfied.

Show children

Show children

value
union
Show children

Show children

or
object
optional

Returns objects where at least 1 query is satisfied.

Show children

Show children

value
list<SearchJsonQuery>
optional
Show children

Show children

SearchJsonQuery
union
prefix
object
optional

Returns objects where the specified field starts with the provided value.

Show children

Show children

field
string

A reference to an Ontology object property with the form properties.{propertyApiName}.

value
string
lt
object
optional

Returns objects where the specified field is less than a value.

Show children

Show children

field
string

A reference to an Ontology object property with the form properties.{propertyApiName}.

value
any

Represents the value of a property in the following format.

TypeJSON encodingExample
Arrayarray["alpha", "bravo", "charlie"]
AttachmentJSON encoded AttachmentProperty object{"rid":"ri.blobster.main.attachment.2f944bae-5851-4204-8615-920c969a9f2e"}
Booleanbooleantrue
Bytenumber31
DateISO 8601 extended local date string"2021-05-01"
Decimalstring"2.718281828"
Doublenumber3.14159265
Floatnumber3.14159265
GeoPointgeojson{"type":"Point","coordinates":[102.0,0.5]}
GeoShapegeojson{"type":"LineString","coordinates":[[102.0,0.0],[103.0,1.0],[104.0,0.0],[105.0,1.0]]}
Integernumber238940
Longstring"58319870951433"
Shortnumber8739
Stringstring"Call me Ishmael"
TimestampISO 8601 extended offset date-time string in UTC zone"2021-01-04T05:00:00Z"

Note that for backwards compatibility, the Boolean, Byte, Double, Float, Integer, and Short types can also be encoded as JSON strings.

allTerms
object
optional

Returns objects where the specified field contains all of the whitespace separated words in any order in the provided value. This query supports fuzzy matching.

Show children

Show children

field
string

A reference to an Ontology object property with the form properties.{propertyApiName}.

value
string
fuzzy
boolean
optional

Setting fuzzy to true allows approximate matching in search queries that support it.

eq
object
optional

Returns objects where the specified field is equal to a value.

Show children

Show children

field
string

A reference to an Ontology object property with the form properties.{propertyApiName}.

value
any

Represents the value of a property in the following format.

TypeJSON encodingExample
Arrayarray["alpha", "bravo", "charlie"]
AttachmentJSON encoded AttachmentProperty object{"rid":"ri.blobster.main.attachment.2f944bae-5851-4204-8615-920c969a9f2e"}
Booleanbooleantrue
Bytenumber31
DateISO 8601 extended local date string"2021-05-01"
Decimalstring"2.718281828"
Doublenumber3.14159265
Floatnumber3.14159265
GeoPointgeojson{"type":"Point","coordinates":[102.0,0.5]}
GeoShapegeojson{"type":"LineString","coordinates":[[102.0,0.0],[103.0,1.0],[104.0,0.0],[105.0,1.0]]}
Integernumber238940
Longstring"58319870951433"
Shortnumber8739
Stringstring"Call me Ishmael"
TimestampISO 8601 extended offset date-time string in UTC zone"2021-01-04T05:00:00Z"

Note that for backwards compatibility, the Boolean, Byte, Double, Float, Integer, and Short types can also be encoded as JSON strings.

gt
object
optional

Returns objects where the specified field is greater than a value.

Show children

Show children

field
string

A reference to an Ontology object property with the form properties.{propertyApiName}.

value
any

Represents the value of a property in the following format.

TypeJSON encodingExample
Arrayarray["alpha", "bravo", "charlie"]
AttachmentJSON encoded AttachmentProperty object{"rid":"ri.blobster.main.attachment.2f944bae-5851-4204-8615-920c969a9f2e"}
Booleanbooleantrue
Bytenumber31
DateISO 8601 extended local date string"2021-05-01"
Decimalstring"2.718281828"
Doublenumber3.14159265
Floatnumber3.14159265
GeoPointgeojson{"type":"Point","coordinates":[102.0,0.5]}
GeoShapegeojson{"type":"LineString","coordinates":[[102.0,0.0],[103.0,1.0],[104.0,0.0],[105.0,1.0]]}
Integernumber238940
Longstring"58319870951433"
Shortnumber8739
Stringstring"Call me Ishmael"
TimestampISO 8601 extended offset date-time string in UTC zone"2021-01-04T05:00:00Z"

Note that for backwards compatibility, the Boolean, Byte, Double, Float, Integer, and Short types can also be encoded as JSON strings.

contains
object
optional

Returns objects where the specified array contains a value.

Show children

Show children

field
string

A reference to an Ontology object property with the form properties.{propertyApiName}.

value
any

Represents the value of a property in the following format.

TypeJSON encodingExample
Arrayarray["alpha", "bravo", "charlie"]
AttachmentJSON encoded AttachmentProperty object{"rid":"ri.blobster.main.attachment.2f944bae-5851-4204-8615-920c969a9f2e"}
Booleanbooleantrue
Bytenumber31
DateISO 8601 extended local date string"2021-05-01"
Decimalstring"2.718281828"
Doublenumber3.14159265
Floatnumber3.14159265
GeoPointgeojson{"type":"Point","coordinates":[102.0,0.5]}
GeoShapegeojson{"type":"LineString","coordinates":[[102.0,0.0],[103.0,1.0],[104.0,0.0],[105.0,1.0]]}
Integernumber238940
Longstring"58319870951433"
Shortnumber8739
Stringstring"Call me Ishmael"
TimestampISO 8601 extended offset date-time string in UTC zone"2021-01-04T05:00:00Z"

Note that for backwards compatibility, the Boolean, Byte, Double, Float, Integer, and Short types can also be encoded as JSON strings.

not
object
optional

Returns objects where the query is not satisfied.

Show children

Show children

value
union
phrase
object
optional

Returns objects where the specified field contains the provided value as a substring.

Show children

Show children

field
string

A reference to an Ontology object property with the form properties.{propertyApiName}.

value
string
and
object
optional

Returns objects where every query is satisfied.

Show children

Show children

value
list<SearchJsonQuery>
optional
Show children

Show children

SearchJsonQuery
union
isNull
object
optional

Returns objects based on the existence of the specified field.

Show children

Show children

field
string

A reference to an Ontology object property with the form properties.{propertyApiName}.

value
boolean
gte
object
optional

Returns objects where the specified field is greater than or equal to a value.

Show children

Show children

field
string

A reference to an Ontology object property with the form properties.{propertyApiName}.

value
any

Represents the value of a property in the following format.

TypeJSON encodingExample
Arrayarray["alpha", "bravo", "charlie"]
AttachmentJSON encoded AttachmentProperty object{"rid":"ri.blobster.main.attachment.2f944bae-5851-4204-8615-920c969a9f2e"}
Booleanbooleantrue
Bytenumber31
DateISO 8601 extended local date string"2021-05-01"
Decimalstring"2.718281828"
Doublenumber3.14159265
Floatnumber3.14159265
GeoPointgeojson{"type":"Point","coordinates":[102.0,0.5]}
GeoShapegeojson{"type":"LineString","coordinates":[[102.0,0.0],[103.0,1.0],[104.0,0.0],[105.0,1.0]]}
Integernumber238940
Longstring"58319870951433"
Shortnumber8739
Stringstring"Call me Ishmael"
TimestampISO 8601 extended offset date-time string in UTC zone"2021-01-04T05:00:00Z"

Note that for backwards compatibility, the Boolean, Byte, Double, Float, Integer, and Short types can also be encoded as JSON strings.

anyTerm
object
optional

Returns objects where the specified field contains any of the whitespace separated words in any order in the provided value. This query supports fuzzy matching.

Show children

Show children

field
string

A reference to an Ontology object property with the form properties.{propertyApiName}.

value
string
fuzzy
boolean
optional

Setting fuzzy to true allows approximate matching in search queries that support it.

lte
object
optional

Returns objects where the specified field is less than or equal to a value.

Show children

Show children

field
string

A reference to an Ontology object property with the form properties.{propertyApiName}.

value
any

Represents the value of a property in the following format.

TypeJSON encodingExample
Arrayarray["alpha", "bravo", "charlie"]
AttachmentJSON encoded AttachmentProperty object{"rid":"ri.blobster.main.attachment.2f944bae-5851-4204-8615-920c969a9f2e"}
Booleanbooleantrue
Bytenumber31
DateISO 8601 extended local date string"2021-05-01"
Decimalstring"2.718281828"
Doublenumber3.14159265
Floatnumber3.14159265
GeoPointgeojson{"type":"Point","coordinates":[102.0,0.5]}
GeoShapegeojson{"type":"LineString","coordinates":[[102.0,0.0],[103.0,1.0],[104.0,0.0],[105.0,1.0]]}
Integernumber238940
Longstring"58319870951433"
Shortnumber8739
Stringstring"Call me Ishmael"
TimestampISO 8601 extended offset date-time string in UTC zone"2021-01-04T05:00:00Z"

Note that for backwards compatibility, the Boolean, Byte, Double, Float, Integer, and Short types can also be encoded as JSON strings.

phrase
object
optional

Returns objects where the specified field contains the provided value as a substring.

Show children

Show children

field
string

A reference to an Ontology object property with the form properties.{propertyApiName}.

value
string
and
object
optional

Returns objects where every query is satisfied.

Show children

Show children

value
list<SearchJsonQuery>
optional
Show children

Show children

SearchJsonQuery
union
Show children

Show children

or
object
optional

Returns objects where at least 1 query is satisfied.

Show children

Show children

value
list<SearchJsonQuery>
optional
Show children

Show children

SearchJsonQuery
union
prefix
object
optional

Returns objects where the specified field starts with the provided value.

Show children

Show children

field
string

A reference to an Ontology object property with the form properties.{propertyApiName}.

value
string
lt
object
optional

Returns objects where the specified field is less than a value.

Show children

Show children

field
string

A reference to an Ontology object property with the form properties.{propertyApiName}.

value
any

Represents the value of a property in the following format.

TypeJSON encodingExample
Arrayarray["alpha", "bravo", "charlie"]
AttachmentJSON encoded AttachmentProperty object{"rid":"ri.blobster.main.attachment.2f944bae-5851-4204-8615-920c969a9f2e"}
Booleanbooleantrue
Bytenumber31
DateISO 8601 extended local date string"2021-05-01"
Decimalstring"2.718281828"
Doublenumber3.14159265
Floatnumber3.14159265
GeoPointgeojson{"type":"Point","coordinates":[102.0,0.5]}
GeoShapegeojson{"type":"LineString","coordinates":[[102.0,0.0],[103.0,1.0],[104.0,0.0],[105.0,1.0]]}
Integernumber238940
Longstring"58319870951433"
Shortnumber8739
Stringstring"Call me Ishmael"
TimestampISO 8601 extended offset date-time string in UTC zone"2021-01-04T05:00:00Z"

Note that for backwards compatibility, the Boolean, Byte, Double, Float, Integer, and Short types can also be encoded as JSON strings.

allTerms
object
optional

Returns objects where the specified field contains all of the whitespace separated words in any order in the provided value. This query supports fuzzy matching.

Show children

Show children

field
string

A reference to an Ontology object property with the form properties.{propertyApiName}.

value
string
fuzzy
boolean
optional

Setting fuzzy to true allows approximate matching in search queries that support it.

eq
object
optional

Returns objects where the specified field is equal to a value.

Show children

Show children

field
string

A reference to an Ontology object property with the form properties.{propertyApiName}.

value
any

Represents the value of a property in the following format.

TypeJSON encodingExample
Arrayarray["alpha", "bravo", "charlie"]
AttachmentJSON encoded AttachmentProperty object{"rid":"ri.blobster.main.attachment.2f944bae-5851-4204-8615-920c969a9f2e"}
Booleanbooleantrue
Bytenumber31
DateISO 8601 extended local date string"2021-05-01"
Decimalstring"2.718281828"
Doublenumber3.14159265
Floatnumber3.14159265
GeoPointgeojson{"type":"Point","coordinates":[102.0,0.5]}
GeoShapegeojson{"type":"LineString","coordinates":[[102.0,0.0],[103.0,1.0],[104.0,0.0],[105.0,1.0]]}
Integernumber238940
Longstring"58319870951433"
Shortnumber8739
Stringstring"Call me Ishmael"
TimestampISO 8601 extended offset date-time string in UTC zone"2021-01-04T05:00:00Z"

Note that for backwards compatibility, the Boolean, Byte, Double, Float, Integer, and Short types can also be encoded as JSON strings.

gt
object
optional

Returns objects where the specified field is greater than a value.

Show children

Show children

field
string

A reference to an Ontology object property with the form properties.{propertyApiName}.

value
any

Represents the value of a property in the following format.

TypeJSON encodingExample
Arrayarray["alpha", "bravo", "charlie"]
AttachmentJSON encoded AttachmentProperty object{"rid":"ri.blobster.main.attachment.2f944bae-5851-4204-8615-920c969a9f2e"}
Booleanbooleantrue
Bytenumber31
DateISO 8601 extended local date string"2021-05-01"
Decimalstring"2.718281828"
Doublenumber3.14159265
Floatnumber3.14159265
GeoPointgeojson{"type":"Point","coordinates":[102.0,0.5]}
GeoShapegeojson{"type":"LineString","coordinates":[[102.0,0.0],[103.0,1.0],[104.0,0.0],[105.0,1.0]]}
Integernumber238940
Longstring"58319870951433"
Shortnumber8739
Stringstring"Call me Ishmael"
TimestampISO 8601 extended offset date-time string in UTC zone"2021-01-04T05:00:00Z"

Note that for backwards compatibility, the Boolean, Byte, Double, Float, Integer, and Short types can also be encoded as JSON strings.

contains
object
optional

Returns objects where the specified array contains a value.

Show children

Show children

field
string

A reference to an Ontology object property with the form properties.{propertyApiName}.

value
any

Represents the value of a property in the following format.

TypeJSON encodingExample
Arrayarray["alpha", "bravo", "charlie"]
AttachmentJSON encoded AttachmentProperty object{"rid":"ri.blobster.main.attachment.2f944bae-5851-4204-8615-920c969a9f2e"}
Booleanbooleantrue
Bytenumber31
DateISO 8601 extended local date string"2021-05-01"
Decimalstring"2.718281828"
Doublenumber3.14159265
Floatnumber3.14159265
GeoPointgeojson{"type":"Point","coordinates":[102.0,0.5]}
GeoShapegeojson{"type":"LineString","coordinates":[[102.0,0.0],[103.0,1.0],[104.0,0.0],[105.0,1.0]]}
Integernumber238940
Longstring"58319870951433"
Shortnumber8739
Stringstring"Call me Ishmael"
TimestampISO 8601 extended offset date-time string in UTC zone"2021-01-04T05:00:00Z"

Note that for backwards compatibility, the Boolean, Byte, Double, Float, Integer, and Short types can also be encoded as JSON strings.

not
object
optional

Returns objects where the query is not satisfied.

Show children

Show children

value
union
phrase
object
optional

Returns objects where the specified field contains the provided value as a substring.

Show children

Show children

field
string

A reference to an Ontology object property with the form properties.{propertyApiName}.

value
string
and
object
optional

Returns objects where every query is satisfied.

Show children

Show children

value
list<SearchJsonQuery>
optional
Show children

Show children

SearchJsonQuery
union
isNull
object
optional

Returns objects based on the existence of the specified field.

Show children

Show children

field
string

A reference to an Ontology object property with the form properties.{propertyApiName}.

value
boolean
gte
object
optional

Returns objects where the specified field is greater than or equal to a value.

Show children

Show children

field
string

A reference to an Ontology object property with the form properties.{propertyApiName}.

value
any

Represents the value of a property in the following format.

TypeJSON encodingExample
Arrayarray["alpha", "bravo", "charlie"]
AttachmentJSON encoded AttachmentProperty object{"rid":"ri.blobster.main.attachment.2f944bae-5851-4204-8615-920c969a9f2e"}
Booleanbooleantrue
Bytenumber31
DateISO 8601 extended local date string"2021-05-01"
Decimalstring"2.718281828"
Doublenumber3.14159265
Floatnumber3.14159265
GeoPointgeojson{"type":"Point","coordinates":[102.0,0.5]}
GeoShapegeojson{"type":"LineString","coordinates":[[102.0,0.0],[103.0,1.0],[104.0,0.0],[105.0,1.0]]}
Integernumber238940
Longstring"58319870951433"
Shortnumber8739
Stringstring"Call me Ishmael"
TimestampISO 8601 extended offset date-time string in UTC zone"2021-01-04T05:00:00Z"

Note that for backwards compatibility, the Boolean, Byte, Double, Float, Integer, and Short types can also be encoded as JSON strings.

anyTerm
object
optional

Returns objects where the specified field contains any of the whitespace separated words in any order in the provided value. This query supports fuzzy matching.

Show children

Show children

field
string

A reference to an Ontology object property with the form properties.{propertyApiName}.

value
string
fuzzy
boolean
optional

Setting fuzzy to true allows approximate matching in search queries that support it.

lte
object
optional

Returns objects where the specified field is less than or equal to a value.

Show children

Show children

field
string

A reference to an Ontology object property with the form properties.{propertyApiName}.

value
any

Represents the value of a property in the following format.

TypeJSON encodingExample
Arrayarray["alpha", "bravo", "charlie"]
AttachmentJSON encoded AttachmentProperty object{"rid":"ri.blobster.main.attachment.2f944bae-5851-4204-8615-920c969a9f2e"}
Booleanbooleantrue
Bytenumber31
DateISO 8601 extended local date string"2021-05-01"
Decimalstring"2.718281828"
Doublenumber3.14159265
Floatnumber3.14159265
GeoPointgeojson{"type":"Point","coordinates":[102.0,0.5]}
GeoShapegeojson{"type":"LineString","coordinates":[[102.0,0.0],[103.0,1.0],[104.0,0.0],[105.0,1.0]]}
Integernumber238940
Longstring"58319870951433"
Shortnumber8739
Stringstring"Call me Ishmael"
TimestampISO 8601 extended offset date-time string in UTC zone"2021-01-04T05:00:00Z"

Note that for backwards compatibility, the Boolean, Byte, Double, Float, Integer, and Short types can also be encoded as JSON strings.

isNull
object
optional

Returns objects based on the existence of the specified field.

Show children

Show children

field
string

A reference to an Ontology object property with the form properties.{propertyApiName}.

value
boolean
gte
object
optional

Returns objects where the specified field is greater than or equal to a value.

Show children

Show children

field
string

A reference to an Ontology object property with the form properties.{propertyApiName}.

value
any

Represents the value of a property in the following format.

TypeJSON encodingExample
Arrayarray["alpha", "bravo", "charlie"]
AttachmentJSON encoded AttachmentProperty object{"rid":"ri.blobster.main.attachment.2f944bae-5851-4204-8615-920c969a9f2e"}
Booleanbooleantrue
Bytenumber31
DateISO 8601 extended local date string"2021-05-01"
Decimalstring"2.718281828"
Doublenumber3.14159265
Floatnumber3.14159265
GeoPointgeojson{"type":"Point","coordinates":[102.0,0.5]}
GeoShapegeojson{"type":"LineString","coordinates":[[102.0,0.0],[103.0,1.0],[104.0,0.0],[105.0,1.0]]}
Integernumber238940
Longstring"58319870951433"
Shortnumber8739
Stringstring"Call me Ishmael"
TimestampISO 8601 extended offset date-time string in UTC zone"2021-01-04T05:00:00Z"

Note that for backwards compatibility, the Boolean, Byte, Double, Float, Integer, and Short types can also be encoded as JSON strings.

anyTerm
object
optional

Returns objects where the specified field contains any of the whitespace separated words in any order in the provided value. This query supports fuzzy matching.

Show children

Show children

field
string

A reference to an Ontology object property with the form properties.{propertyApiName}.

value
string
fuzzy
boolean
optional

Setting fuzzy to true allows approximate matching in search queries that support it.

lte
object
optional

Returns objects where the specified field is less than or equal to a value.

Show children

Show children

field
string

A reference to an Ontology object property with the form properties.{propertyApiName}.

value
any

Represents the value of a property in the following format.

TypeJSON encodingExample
Arrayarray["alpha", "bravo", "charlie"]
AttachmentJSON encoded AttachmentProperty object{"rid":"ri.blobster.main.attachment.2f944bae-5851-4204-8615-920c969a9f2e"}
Booleanbooleantrue
Bytenumber31
DateISO 8601 extended local date string"2021-05-01"
Decimalstring"2.718281828"
Doublenumber3.14159265
Floatnumber3.14159265
GeoPointgeojson{"type":"Point","coordinates":[102.0,0.5]}
GeoShapegeojson{"type":"LineString","coordinates":[[102.0,0.0],[103.0,1.0],[104.0,0.0],[105.0,1.0]]}
Integernumber238940
Longstring"58319870951433"
Shortnumber8739
Stringstring"Call me Ishmael"
TimestampISO 8601 extended offset date-time string in UTC zone"2021-01-04T05:00:00Z"

Note that for backwards compatibility, the Boolean, Byte, Double, Float, Integer, and Short types can also be encoded as JSON strings.

groupBy
list<AggregationGroupBy>
optional
Show children

Show children

AggregationGroupBy
union

Specifies a grouping for aggregation results.

Show children

Show children

duration
object
optional

Divides objects into groups according to an interval. Note that this grouping applies only on date types. The interval uses the ISO 8601 notation. For example, "PT1H2M34S" represents a duration of 3754 seconds.

Show children

Show children

field
string

A reference to an Ontology object property with the form properties.{propertyApiName}.

duration
string

An ISO 8601 formatted duration.

fixedWidth
object
optional

Divides objects into groups with the specified width.

Show children

Show children

field
string

A reference to an Ontology object property with the form properties.{propertyApiName}.

fixedWidth
integer
ranges
object
optional

Divides objects into groups according to specified ranges.

Show children

Show children

field
string

A reference to an Ontology object property with the form properties.{propertyApiName}.

ranges
list<AggregationRange>
optional
Show children

Show children

AggregationRange
object

Specifies a date range from an inclusive start date to an exclusive end date.

Show children

Show children

lt
any
optional

Exclusive end date.

lte
any
optional

Inclusive end date.

gt
any
optional

Exclusive start date.

gte
any
optional

Inclusive start date.

exact
object
optional

Divides objects into groups according to an exact value.

Show children

Show children

field
string

A reference to an Ontology object property with the form properties.{propertyApiName}.

maxGroupCount
integer
optional

Response body

AggregateObjectsResponse
object

Success response.

Hide children

Hide children

excludedItems
integer
optional
nextPageToken
string
optional

The page token indicates where to start paging. This should be omitted from the first page's request. To fetch the next page, clients should take the value from the nextPageToken field of the previous response and populate the next request's pageToken field with it.

data
list<AggregateObjectsResponseItem>
optional
Show children

Show children

AggregateObjectsResponseItem
object
Show children

Show children

group
map<AggregationGroupKey, AggregationGroupValue>
optional
Show children

Show children

AggregationGroupKey
string
AggregationGroupValue
any
metrics
list<AggregationMetricResult>
optional
Show children

Show children

AggregationMetricResult
object
Show children

Show children

name
string
value
number
optional

TBD

Examples

Request

Copied!
1 2 3 4 5 curl -X POST \ -H "Content-type: application/json" \ -H "Authorization: Bearer $TOKEN" \ "https://$HOSTNAME/api/v1/ontologies/ri.ontology.main.ontology.c61d9ab5-2919-4127-a0a1-ac64c0ce6367/objects/employee/aggregate" \ -d '{"aggregation":[{"type":"min","field":"properties.tenure","name":"min_tenure"},{"type":"avg","field":"properties.tenure","name":"avg_tenure"}],"query":{"not":{"field":"properties.name","eq":"john"}},"groupBy":[{"field":"properties.startDate","type":"range","ranges":[{"gte":"2020-01-01","lt":"2020-06-01"}]},{"field":"properties.city","type":"exact"}]}'

Response

Copied!
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 { "data": [ { "metrics": [ { "name": "min_tenure", "value": 1 }, { "name": "avg_tenure", "value": 3 } ], "group": { "properties.startDate": { "gte": "2020-01-01", "lt": "2020-06-01" }, "properties.city": "New York City" } }, { "metrics": [ { "name": "min_tenure", "value": 2 }, { "name": "avg_tenure", "value": 3 } ], "group": { "properties.startDate": { "gte": "2020-01-01", "lt": "2020-06-01" }, "properties.city": "San Francisco" } } ] }