English Flag English Español Flag Español Deutsch Flag Deutsch Italiano Flag Italiano Polski Flag Polski Nederlands Flag Nederlands Português Flag Português Français Flag Français 中文 Flag 中文 日本語 Flag 日本語 हिन्दी Flag हिन्दी اللغة العربية Flag اللغة العربية Русский Flag Русский Українська Flag Українська עִברִית Flag עִברִית Ελληνικά Flag Ελληνικά Türk Flag Türk Latvietis Flag Latvietis Dansk Flag Dansk Norsk Flag Norsk Íslenska Flag Íslenska 한국어 Flag 한국어 Suomen Flag Suomen Gaeilge Flag Gaeilge Bahasa Melayu Flag Bahasa Melayu Svenska Flag Svenska Čeština Flag Čeština
User IconLog In
English Flag English

Log In

 

QuintaDB REST API: update and delete selected or all records, perform actions via api

About new features of QuintaDB API

In this article, you will learn about the new features of the QuintaDB API.

Below are the latest updates.

 

Get records

Our service offers a unique opportunity - getting up to 15,000 records with just one API request! This feature will greatly expand the potential of your business application.

You can find out more and see the instructions by this link.
 

Update multiple records

New query to update multiple records at once. This query will help you streamline your workflow and save a lot of api requests.

To use it, it is enough to pass the parameters dtype_ids, or json_dtype_ids (if it is necessary to pass parameters in JSON format) with the id of the records to update.

Request Body:
{rest_api_key: "API_KEY",
confirm_action: "update",
entity_id: "ENTITY_ID",
app_id: "APP_ID",
json_dtype_ids: "[\"ID1\",\"ID2\"...]",
update_id: "UPDATE_ID",
update_term: "UPDATE_TERM"}

URL
/dtypes/confirm_action/APP_ID/ENTITY_ID.json

Where:

update_id - column id to update.

update_term - the new value of the column.

Important: use the confirm_action: "update" parameter.

Method Used - POST

 

Update all records

Now you have the ability to update all records with a single request. Likewise with updating multiple records.

Request and URL example:

Request Body:
{rest_api_key: "YOUR_KEY",
confirm_action: "update_all",
entity_id: "ENTITY_ID",
app_id: "APP_ID",
update_id: "UPDATE_ID",
update_term: "UPDATE_TERM"}

URL
/dtypes/confirm_action/APP_ID/ENTITY_ID.json

Where:

update_id - column id to update.

update_term - the new value of the column.

Important: use the parameter - confirm_action: "update_all".

Method Used - POST

Deleting multiple records

Similar to updating multiple records, you can delete multiple records at once with just one query.

Parameters are used to execute the request: dtype_ids or json_dtype_ids.

Request and URL example:

Request Body:
{rest_api_key: "YOUR_KEY",
entity_id: "ENTITY_ID",
app_id: "APP_ID",
json_dtype_ids: "[\"ID1\",\"ID2\"...]"}

URL
/apps/APP_ID/dtypes/delete_multiple.json

Method Used - POST

Deleting all records

To delete all records, there is no need for additional parameters. You just need to pass the correct url and request body with your api key and form id.

Request and URL example:

Request body:

{rest_api_key: "YOUR_KEY",
entity_id: "ENTITY_ID"}

URL:

/dtypes/APP_ID/delete_all/ENTITY_ID.json

Where:

APP_ID - database id. 

ENTITY_ID - form id.

Method Used - DELETE

Perform an action

Now, using API requests, you can start the task execution from the Action field. For example, start an e-mail newsletter or update a record.

To launch an action, you need to substitute the id of your field (Action) in the URL and pass the record id in the request body.

Request and URL example:

Request Body:
{"rest_api_key":"API_KEY",
"dtype_id": "DTYPE_ID"}

URL
/actions/ACTION_PROPERTY_ID.json

Where:

DTYPE_ID - entry id. You can get it by Fetch all records request.

ACTION_PROPERTY_ID -  field id ("Action" field). You can get PROPERTY_ID by Fetch all form fields request.

Method Used - GET

Perform actions (several or all)

You can also run multiple actions on your table at once. Similar to updating and deleting multiple records, use the parameters: dtype_ids, or json_dtype_ids.

Request and URL example:

Request body:
{"rest_api_key":"API_KEY",
"dtype_ids": ["ID1","ID2"...]}

URL:
/actions/ACTION_PROPERTY_ID.json

To run all actions in a table or report at once, use the parameter - run_by_all_table_or_report: true.

Request Body:
{"rest_api_key":"API_KEY",
"run_by_all_table_or_report": true}

Where:

ACTION_PROPERTY_ID - field identifier (Action). You can get PROPERTY_ID by Fetch all database forms request.

Method Used - GET