Backup Module GraphQL APIs
This wiki is to capture the Backup module provided GraphQL APIs.
Please find below list of APIs supported by backup module.
llapseCore module APIs are useful to create , modify , delete extensions and fetch the values of existing configured extensions.
Add Backup
Creating and running a backup into Freepbx/PBXact system.
API Name addBackup API.
API Parameters -
Name | Required | Type | Default | Description |
---|---|---|---|---|
name | Mandatory | String |
| Name for the backup |
description | Optional | String |
| Description for the backup |
backupModules | Mandatory | List |
| Modules to backup please provide the rawname. (Ex. ["amd","adv_recovery"]) or additionally you can add all Ex.(['all]) |
notificationEmail | Optional | String |
| Email address to send notifications, Multiple email addresses need to be separated by comma |
inlineLogs | Optional | String |
| When set to Yes logs will be added to the body of the email, when set to No logs will be added as an attachment, default no |
emailType | Optional | String |
| When to email default both |
storageLocation | Mandatory | List |
| Select one or more storage locations. Storage locations can be added/configured with the Filestore module. Ex. ['SSH_123_2345_214','SSH_12324_23214']. the list can be found on fetchFilestoreLocations api from file store. |
appendBackupName | Optional | Boolean | False | When set to true , Backp files will store like filestore-path/backup-job-name/backup-file and if set to false then backup file will store into filestore-path/backup-file, default false |
enableBackupSchedule | Optional | Boolean | False | Enable scheduled backups, default false |
scheduleBackup | Optional | String |
| When should this backup run. when enableBackupSchedule is set to true please provide this field. please enter a cron values. |
updatesToKeep | Optional | ID | 1 | How many updates to keep. If this number is 3, the last 3 will be kept. 0 is unlimited |
Query Parameters
status
message
id |
API Request
1. Api to add Backup
GQLAPI: /admin/api/api/gql
parameters:
mutation {
addBackup(input: {
name: "testbackup",
description: "testing backup to add a backup",
backupModules: ["all"],
storageLocation: ["dropbox_wqeqwe"]
enableBackupSchedule : true
scheduleBackup : "0 * * * *"
}) {
status
message
id
}
} |
API Response
{
"data": {
"addBackup": {
"status": true,
"message": "Backup has been performed/schedules",
"id": "d35390e8-0000-defg-abcd-6f5c7c94b1234"
}
}
} |
Update Backup
Updating and running a backup into Freepbx/PBXact system.
API Name updateBackup API.
Name | Required | Type | Default | Description |
---|---|---|---|---|
id | Mandatory | String |
| Id of the backup |
name | Mandatory | String |
| Name for the backup |
description | Optional | String |
| Description for the backup |
backupModules | Mandatory | List |
| Modules to backup please provide the rawname. (Ex. ["amd","adv_recovery"]) or additionally you can add all Ex.(['all]) |
notificationEmail | Optional | String |
| Email address to send notifications, Multiple email addresses need to be separated by comma |
inlineLogs | Optional | String |
| When set to Yes logs will be added to the body of the email, when set to No logs will be added as an attachment, default no |
emailType | Optional | String |
| When to email default both |
storageLocation | Mandatory | List |
| Select one or more storage locations. Storage locations can be added/configured with the Filestore module. Ex. ['SSH_123_2345_214','SSH_12324_23214']. the list can be found on fetchFilestoreLocations api from file store. |
appendBackupName | Optional | Boolean | False | When set to true , Backp files will store like filestore-path/backup-job-name/backup-file and if set to false then backup file will store into filestore-path/backup-file, default false |
enableBackupSchedule | Optional | Boolean | False | Enable scheduled backups, default false |
scheduleBackup | Optional | String |
| When should this backup run. when enableBackupSchedule is set to true please provide this field. please enter a cron values. |
updatesToKeep | Optional | ID | 1 | How many updates to keep. If this number is 3, the last 3 will be kept. 0 is unlimited |
Query Parameters
API Request
API Response
Delete Backup
Deleting a backup into Freepbx/PBXact system.
API Name deleteBackup API.
API Parameters -
Name | Required | Type | Default | Description |
---|---|---|---|---|
backupId | Mandatory | String |
| Id of the backup |
Query Parameters
API Request
API Response
Restore Backup
API Name restoreBackup
API Parameters -
Name | Required | Type | Default | Description |
---|---|---|---|---|
name | Mandatory | ID |
| Name of the Restore input file |
Query Parameters
API Request
API Response
Fetch All backup files
API Name : fetchAllBackups
API Parameters: none
API Parameters to query
Query Parameters
API Request
API Response
Fetch All backup Configurations
API Name : fetchAllBackupConfigurations
API Parameters: none
API Parameters to query
Query Parameters
API Request
API Response
Run Backup
running a backup into Freepbx/PBXact system.
API Name runBackup API.
API Parameters -
Name | Required | Type | Default | Description |
---|---|---|---|---|
id | Mandatory | String |
| Id of the backup |
API Parameters to query
Query Parameters
API Request
API Response