PBX GUI - Filestore Module GraphQL APIs
This section will capture the APIs related with Filestore Module.
Create FTP instance
Creating an FTP instance into Freepbx/PBXact system.
API - addFTPInstance
API Parameter:
Name | Required | Type | Default | Description |
---|---|---|---|---|
serverName | Mandatory | String |
| Name for the FTP connection |
hostName | Mandatory | String |
| Name for the FTP host |
userName | Mandatory | String |
| Set FTP instance username |
password | Mandatory | String |
| Set FTP instance password |
port | Optional | Number | 22 | FTP Port default is "22" |
path | Optional | String |
| Path on remote server. This must be a COMPLETE PATH, starting with a / - for example, /home/backups/freepbx. |
transferMode | Optional | String |
| This defaults to "Passive". If your FTP server is behind a separate NAT or Firewall to this VoIP server, you should select |
timeout | Optional | Number | 30 | Timeout on remote server, default is 30 |
description | Optional | String |
| Enter a description for this connection. |
fileStoreType | Optional | String |
| The FTP Servers file system type. If you are unsure set this to Auto |
Query Parameters
status
message
id |
API Request
mutation{
addFTPInstance(input : {
serverName: "testGql"
hostName: "100.100.100.100"
userName: "testGql"
password: "testGql"
}){
status message id
}
} |
API Response
{
"data": {
"addFTPInstance": {
"status": true,
"message": "FTP Instance is created successfully",
"id": "12345678-1234-1234-1234-12345678"
}
}
} |
Update FTP instance
Updating an FTP instance into Freepbx/PBXact system.
API - updateFTPInstance
API Parameter:
Name | Required | Type | Default | Description |
---|---|---|---|---|
id | Mandatory | String |
| Id of FTP |
serverName | Mandatory | String |
| Name for the FTP connection |
hostName | Mandatory | String |
| Name for the FTP host |
userName | Mandatory | String |
| Set FTP instance username |
password | Mandatory | String |
| Set FTP instance password |
port | Optional | Number | 22 | FTP Port default is "22" |
path | Optional | String |
| Path on remote server. This must be a COMPLETE PATH, starting with a / - for example, /home/backups/freepbx. |
transferMode | Optional | String |
| This defaults to "Passive". If your FTP server is behind a separate NAT or Firewall to this VoIP server, you should select |
timeout | Optional | Number | 30 | Timeout on remote server, default is 30 |
description | Optional | String |
| Enter a description for this connection. |
fileStoreType | Optional | String |
| The FTP Servers file system type. If you are unsure set this to Auto |
Query Parameters
status
message |
API Request
mutation{
updateFTPInstance(input : {
id:"12345"
serverName: "testGql"
hostName: "100.100.100.100"
userName: "testGql"
password: "testGql"
}){
status message
}
} |
API Response
{
"data": {
"updateFTPInstance": {
"status": true,
"message": "FTP_12345 Instance is updated successfully"
}
}
} |
Delete FTP instance
Delete an FTP instance into Freepbx/PBXact system.
API - deleteFTPInstance
API Parameter:
Name | Required | Type | Default | Description |
---|---|---|---|---|
id | Mandatory | String |
| Id of FTP |
Query Parameters
status
message |
API Request
mutation{
deleteFTPInstance(input : {
id:"FTP_12345"
}){
status message
}
} |
API Response
{
"data": {
"deleteFTPInstance": {
"status": true,
"message": "Successfully deleted FTP instance"
}
}
} |
Create S3 instance
Creating an S3 instance into Freepbx/PBXact system.
API - addS3Bucket
API Parameter:
Name | Required | Type | Default | Description |
---|---|---|---|---|
name | Mandatory | String |
| Display name for the S3 instance |
bucketName | Mandatory | String |
| AWS bucket name |
AWSRegion | Mandatory | String |
| Add AWS region |
AWSAccessKey | Mandatory | String |
| Set AWS access key |
AWSSecret | Mandatory | String |
| Set AWS password |
Query Parameters
status
message
id |
API Request
mutation{
addS3Bucket(input : {
name: "testGql"
bucketName: "100.100.100.100"
AWSRegion: "us-east-2"
AWSAccessKey: "testGql"
AWSSecret: "12345"
}){
status message id
}
} |
API Response
{
"data": {
"addS3Bucket": {
"status": true,
"message": "S3 Instance is created successfully",
"id": "12345678-1234-1234-1234-12345678"
}
}
} |
Fetch Filestore Types
Fetch File store into Freepbx/PBXact system.
API - fetchFilestoreTypes
API Parameter- none
Query Parameters
status
message
types |
API Request
query{
fetchFilestoreTypes{
status message types
}
} |
API Response
{
"data": {
"fetchFilestoreTypes": {
"status": true,
"message": "List of filestore types",
"types": "[\"FTP\",\"Local\"]"
}
}
} |
Fetch Filestore Locations
Fetch File store locations into Freepbx/PBXact system.
API - fetchFilestoreLocations
API Parameter- none
Query Parameters
status
message
locations |
API Request
query{
fetchFilestoreLocations{
status message locations
}
} |
API Response
{
"data": {
"fetchFilestoreLocations": {
"status": true,
"message": "List of filestore locations",
"locations":["Email_123456789","SSH_987654321","SSH_1122334455"]
}
}
} |
Fetch AWS regions
Fetch AWS region into Freepbx/PBXact system.
API - fetchAWSRegion
API Parameter- none
Query Parameters
status
message
regions |
API Request
query{
fetchAWSRegion{
status message regions
}
} |
API Response
{
"data": {
"fetchAWSRegion": {
"status": true,
"message": "List of AWS Storage",
"regions": "[\"us-east-1\",\"us-west-1\",\"sa-east-1\"]"
}
}
} |
Fetch All File Stores
Fetch all file store into Freepbx/PBXact system.
API - fetchAllFilestores
API Parameter- none
Query Parameters
status
message
filestores{
id
name
description
filestoreType
} |
API Request
query{
fetchAllFilestores{
status message filestores{
id
name
description
filestoreType
}
}
} |
API Response
{
"data": {
"fetchAllFilestores": {
"status": true,
"message": "List of all filestores",
"filestores": [
{
"id": "Dropbox_1233424234-42342234",
"name": "Testing",
"description": "Testing Data",
"filestoreType": "Dropbox"
}
]
}
}
} |