NoSQL Operations
Insert
Adds one or more rows of data to a database table. Primary keys of the inserted JSON record may be supplied on insert. If a primary key is not provided, then a GUID will be generated for each record.
operation (required) - must always be
insert
database (optional) - database where the table you are inserting records into lives. The default is
data
table (required) - table where you want to insert records
records (required) - array of one or more records for insert
Body
Response: 200
Update
Changes the values of specified attributes in one or more rows in a database table as identified by the primary key. NOTE: Primary key of the updated JSON record(s) MUST be supplied on update.
operation (required) - must always be
update
database (optional) - database of the table you are updating records in. The default is
data
table (required) - table where you want to update records
records (required) - array of one or more records for update
Body
Response: 200
Upsert
Changes the values of specified attributes for rows with matching primary keys that exist in the table. Adds rows to the database table for primary keys that do not exist or are not provided.
operation (required) - must always be
upsert
database (optional) - database of the table you are updating records in. The default is
data
table (required) - table where you want to update records
records (required) - array of one or more records for update
Body
Response: 200
Delete
Removes one or more rows of data from a specified table.
operation (required) - must always be
delete
database (optional) - database where the table you are deleting records lives. The default is
data
table (required) - table where you want to deleting records
ids (required) - array of one or more primary key values, which identifies records to delete
Body
Response: 200
Search By ID
Returns data from a table for one or more primary keys.
operation (required) - must always be
search_by_id
database (optional) - database where the table you are searching lives. The default is
data
table (required) - table you wish to search
ids (required) - array of primary keys to retrieve
get_attributes (required) - define which attributes you want returned. Use
['*']
to return all attributes
Body
Response: 200
Search By Value
Returns data from a table for a matching value.
operation (required) - must always be
search_by_value
database (optional) - database where the table you are searching lives. The default is
data
table (required) - table you wish to search
search_attribute (required) - attribute you wish to search can be any attribute
search_value (required) - value you wish to search - wild cards are allowed
get_attributes (required) - define which attributes you want returned. Use
['*']
to return all attributes
Body
Response: 200
Search By Conditions
Returns data from a table for one or more matching conditions. This supports grouping of conditions to indicate order of operations as well.
operation (required) - must always be
search_by_conditions
database (optional) - database where the table you are searching lives. The default is
data
table (required) - table you wish to search
operator (optional) - the operator used between each condition -
and
,or
. The default isand
offset (optional) - the number of records that the query results will skip. The default is
0
limit (optional) - the number of records that the query results will include. The default is
null
, resulting in no limitsort optional - This is an object that indicates the sort order. It has the following properties:
attribute (required) - The attribute to sort by
descending (optional) - If true, will sort in descending order (defaults to ascending order)
next (optional) - This can define the next sort object that will be used to break ties for sorting when there are multiple records with the same value for the first attribute (follows the same structure as
sort
, and can recursive additional attributes).
get_attributes (required) - define which attributes you want returned. Use
['*']
to return all attributesconditions (required) - the array of conditions objects, specified below, to filter by. Must include one or more object in the array that are a condition or a grouped set of conditions. A condition has the following properties:
search_attribute (required) - the attribute you wish to search, can be any attribute
search_type (required) - the type of search to perform -
equals
,contains
,starts_with
,ends_with
,greater_than
,greater_than_equal
,less_than
,less_than_equal
,between
search_value (required) - case-sensitive value you wish to search. If the
search_type
isbetween
then use an array of two values to search between Or a set of grouped conditions has the following properties:operator (optional) - the operator used between each condition -
and
,or
. The default isand
conditions (required) - the array of conditions objects as described above.
Body
Response: 200
Last updated