diff --git a/documentations/src/views/Database.vue b/documentations/src/views/Database.vue index 53a10e7..2a71112 100644 --- a/documentations/src/views/Database.vue +++ b/documentations/src/views/Database.vue @@ -44,6 +44,183 @@
Create new JSON-based data storage database.
+api/index.php?action=db_create+ +
Payload Structure:
+{ + "name": "<database>", + "mode": "<permissions>", + "content": "<data>" +}+ + Database: Get by Name +
Fetch database permissions and stored data content by name.
+api/index.php?action=db_get_by_name+ +
Payload Structure:
+{ + "name": "<database>" +}+ + Response Data +
Array Index | +Index Content | +
---|---|
0 | +The database mode permissions; either "w", "r", "wr", or "rw". ("w" for writing permission and "r" for reading permission) | +
1 | +Base64 string that contains a JSON database | +
Set new permissions to a database by name.
+api/index.php?action=db_set_mode+ +
Payload Structure:
+{ + "name": "<database>", + "mode": "<permissions>" +}+ + Database: Get Mode +
Get designated permissions of a database by name.
+api/index.php?action=db_get_mode+ +
Payload Structure:
+{ + "name": "<database>" +}+ + Response Data +
Fetch the whole stored data from a specified database name.
+api/index.php?action=db_read+ +
Payload Structure:
+{ + "name": "<database>" +}+ + Response Data +
Overwrite the whole stored data contents of a specified database name.
+api/index.php?action=db_write+ +
Payload Structure:
+{ + "name": "<database>", + "content": "<data>" +}+ + Database: Write Content +
Overwrite the whole stored data contents of a specified database name.
+api/index.php?action=db_write+ +
Payload Structure:
+{ + "name": "<database>", + "content": "<data>" +}+ +Database: Delete +
Delete a whole database by a specified name.
+api/index.php?action=db_write+
This action cannot be reversed.
+Payload Structure:
+{ + "name": "<database>" +}+ + Database: Fetch All +
Fetch all database list of names and permissions.
+api/index.php?action=db_fetch_all+ + Example Payload +
{}
+
+ Response Data
+ Array Index | +Index Content | +
---|---|
0 | +The name of the fetched database. | +
1 | +The database mode permissions; either "w", "r", "wr", or "rw". ("w" for writing permission and "r" for reading permission) | +