Chapter 82: Controller: /siteworx/logs Up Part III: SiteWorx API Spec Chapter 84: Controller: /siteworx/mysql/perms 

83 Controller: /siteworx/mysql/db

Required Permissions "MYSQL"
Required Options MySQL Databases
Action: add
Added in version 4.7.0-339
Description Add a mysql database.
Input Parameters
Name Type Notes Required?
name string Yes
create_user integer Example Values
1
No
user string No
password string No
confirm_password string Help Entry
Confirm the password field by providing it again. Must match the password provided.
No
perms struct (string) Example Values
SELECT, INSERT, UPDATE, DELETE, CREATE, DROP, REFERENCES, INDEX, ALTER, CREATE TEMPORARY TABLES, LOCK TABLES, CREATE VIEW, SHOW VIEW, CREATE ROUTINE, ALTER ROUTINE, EXECUTE, EVENT, TRIGGER
Example Default Value
["SELECT","INSERT","UPDATE","DELETE","CREATE","DROP","REFERENCES","INDEX","ALTER","CREATE TEMPORARY TABLES","LOCK TABLES","CREATE VIEW","SHOW VIEW","CREATE ROUTINE","ALTER ROUTINE","EXECUTE","EVENT","TRIGGER"]
No
host string Example Default Value
%
No
Action: delete
Added in version 4.7.0-339
Description Delete a mysql database.
Input Parameters
Name Type Notes Required?
name struct (string) Example Values
mydb
Yes
confirm_action struct (integer) Example Values
1
No*
* indicates that it’s actually required, but probably already has a valid default value
Action: list
Added in version 4.7.0-339
Description List MySQL databases.
Warning This action has been deprecated as of version 4.8.0-393. 2010-12-03 use listDatabases
Sample output
array (
’status’ => 0,
’payload’ =>
array (
0 =>
array (
0 => ’mydb’,
1 => ’example_mydb’,
),
),
)
Action: listMysqlDatabases
Added in version 4.8.0-393
Description List MySQL Databases.
Sample output
array (
’status’ => 0,
’payload’ =>
array (
0 =>
array (
’name’ => ’mydb’,
’fqdn’ => ’example_mydb’,
’host’ => ’10.1.15.200’,
’storage’ => ’0.00 B’,
),
),
)
Action: listMysqlHost
Added in version 4.7.0-339
Description List the mysql host for this account (localhost, 22.33.44.55, etc).
Sample output
array (
’status’ => 0,
’payload’ => ’10.1.15.200’,
)
 Chapter 82: Controller: /siteworx/logs Up Part III: SiteWorx API Spec Chapter 84: Controller: /siteworx/mysql/perms 

(C) 2017 by InterWorx LLC