Query Objects
Last updated
Last updated
This function allows you to retrieve a list of objects matching specified criteria.
/api/v4/
backend-deployment-id
/objects/
model
.json?query[
field
]=
value
GET
/api/v4/
backend-deployment-id
/objects/
model
.json?q[
field
]=
value
GET
/api/v4/
backend-deployment-id
/objects/
model
.json?query[
field
]=
value1
&query[
other_field
]=
value2
GET
Query parameters are specified as a URL-encoded query
or q
hash. Valid keys for this hash are the names of the fields in that model. The format for the values is the same as for creating objects. Please refer to the same section at
You can specify your criteria with logic such as 'equals', 'not equal to', 'greater than', 'less than', etc. as follows:
Equals
query[
field
]=
value
is Not Equal To
query[
field
.ne]=
value
is Less Than
query[
field
.lt]=
value
is Less Than or Equal To
query[
field
.lte]=
value
is Greater Than
query[
field
.gt]=
value
is Greater Than or Equal To
query[
field
.gte]=
value
Contains
query[
field
.contains]=
value
is Null (or Not Null)
query[
field
.null]=
value
Specify true
for the value to check for "Is Null" or false
to check for "Is Not Null"
When using curl with queries you have to either escape the square brackets with a backslash \
or add the -g
option to turn off curl's globbing functionality.
datetime
in ISO8601 format:You can also search through all the fields of all objects of a given type for a partial text match. This can be useful for implementing basic search functions.
/api/v4/
backend-deployment-id
/objects/
model
/search.json
POST
The search text must be specified as a URL-encoded parameter named query
.
task
objects for the text "site":The response includes a list of all the objects of the given type which match all of the query criteria. The format of the objects is the same as for listing all objects (please refer to the section.)
The below examples contain a BASE-URL
placeholder. Please refer to the section to get the base URL relevant to your deployment.
The below examples contain a BASE-URL
placeholder. Please refer to the section to get the base URL relevant to your deployment.