How does the Database Connection API work? | Aquro Help Center

/Cloud/DatabaseConnection/TableView
Returns all the data from a table in the database

Permission
Depending on the permissions set on the service and how the table is configured in the database connection.

Arguments
Service - The name of the database connection to use
Table - The name of the table


/Cloud/DatabaseConnection/TableInsert
Inserts a new row in a database table.

Permission
Depending on the permissions set on the service and how the table is configured in the database connection.

Arguments
Service - The name of thedatabase connection to use
Table - The name of the table
Object - Object that should be inserted in the database


The Object argument should be in a key value form, eg.

{"Argument1" : "Value1","Argument2" : "Value2"}

If the table is mapped to a data model the Object argument should be a object of that data model. If not the Object argument should contains the columns names of the table.

/Cloud/DatabaseConnection/TableUpdate
Updates one or more row(s) in a database table.

Permission
Depending on the permissions set on the service and how the table is configured in the database connection.

Arguments
Service - The name of the database connection to use
Table - The name of the table
Object - Object that should replace matching rows in the database
IDField - Name of the field that will be used to identify which rows to update
IDValue - Value of the IDField that will be used to identify which rows to update


The object argument should have the same form as described for the TableInsert action.


/Cloud/DatabaseConnection/TableDelete
Removes one or more row(s) in a database table.

Permission
Depending on the permissions set on the service and how the table is configured in the database connection.

Arguments
Service - The name of the database connection to use
Table - The name of the table
IDField - Name of the field that will be used to identify which rows to remove
IDValue - Value of the IDField that will be used to identify which rows to remove

/Cloud/DatabaseConnection/Query
Executes a custom query in the database and returns a list of the rows returned by the query.

Permission
Depending on the permissions set on the service.

Arguments
Service - The name of the database connection to use
Query - The name of the query
Arguments - Object with the arguments in the query

The Arguments argument should be in a key value form, eg.

{"Argument1" : "Value1","Argument2" : "Value2"}

/Cloud/DatabaseConnection/QueryOne
Executes a custom query in the database and returns the first object returned by the query.

Permission
Depending on the permissions set on the service.

Arguments
Service - The name of the database connection to use
Query - The name of the query
Arguments - Object with the arguments in the query

The Arguments argument should be in a key value form, eg.

{"Argument1" : "Value1","Argument2" : "Value2"}