logo
logo

Generic Properties

You can query entities by generic properties of known datatypes.

To do this, use the following construct:

DATATYPE('PropertyName') OPERATOR PropertyValue

String

For instance, to query all entities with a certain Title:

GET http://<hostname>/api/entities/query?query=String('Title')=='title'

Integer

For instance, to query all entities with a certain IntProperty:

GET http://<hostname>/api/entities/query?query=Int('IntProperty')==1

Long

For instance, to query all entities with a certain LongProperty:

GET http://<hostname>/api/entities/query?query=Long('LongProperty')==5000000000

Decimal

For instance, to query all entities with a certain DecimalProperty:

GET http://<hostname>/api/entities/query?query=Decimal('DecimalProperty')==1.5

Float

For instance, to query all entities with a certain FloatProperty:

GET http://<hostname>/api/entities/query?query=Float('FloatProperty')==1.5

DateTime

For instance, to query all entities created after a certain date:

GET http://<hostname>/api/entities/query?query=DateTime('CreatedOn') gte 20141213

The DateTime representation follows the international standard ISO8601 covering the exchange of date and time-related data.

There are two formats available via the REST API itself: YYYYMMDD and YYYYMMDDTHHMMSS.

The following formats are available via the Querying API:

Basic formats

  • yyyyMMdd
  • yyyyMMddTHHmmsszzz
  • yyyyMMddTHHmmsszz
  • yyyyMMddTHHmmssZ
  • yyyyMMddTHHmmss
  • yyyy-MM-ddTHHmmss

Extended formats

  • yyyy-MM-ddTHH:mm:sszzz
  • yyyy-MM-ddTHH:mm:sszz
  • yyyy-MM-ddTHH:mm:ssZ

All of the above with reduced accuracy

  • yyyyMMddTHHmmzzz
  • yyyyMMddTHHmmzz
  • yyyyMMddTHHmmZ
  • yyyy-MM-ddTHH:mmzzz
  • yyyy-MM-ddTHH:mmzz
  • yyyy-MM-ddTHH:mmZ

Accuracy reduced to hours

  • yyyyMMddTHHzzz
  • yyyyMMddTHHzz
  • yyyyMMddTHHZ
  • yyyy-MM-ddTHHzzz
  • yyyy-MM-ddTHHzz
  • yyyy-MM-ddTHHZ

Boolean

Booleans do not support any operators, but can be negated.

For instance, to query all draft entities:

GET http://<hostname>/api/entities/query?query=Bool('IsDraft')

Can we improve this article ? Provide feedback