PBX GUI - Sysadmin Module GraphQL APIs
fetchActivationStatus
- 1 Activate System
- 2 Update System License
- 3 Update Provisioning Port
- 4 Fetch System Information
- 5 Fetch Activation Status
- 6 Add Hostname
- 7 Install SSL Certificate
- 8 Update SSL Certificate
- 9 Fetch Hostname
- 10 Fetch SSL Certificates
- 11 Update Provisioning Protocols
- 11.1 Apache restart
- 12 Fetch Provisioning Protocols
- 13 Update SSL Protocol
- 14 Enable/Disable force
- 15 Fetch Port force options
This wiki is to capture the Sysadmin module provided GraphQL APIs.
Sysadmin module APIs are related with "Activating" system with given deployment id , updating license, fetch system information etc.
Activate System
Activate system using given deployment ID
API : activateSystem
API Parameters:
Name | Required | Type | Default | Description |
---|---|---|---|---|
deploymentID | Mandatory | ID |
| Deployment id to activate the system |
Query Parameters
status
message
transaction_id |
API Request
Gql Endpoint: /admin/api/api/gql
Parameters:
mutation {
activateSystem(input: { deploymentId: "1*******" }) {
status
message
transaction_id
}
} |
API Response
{
"data": {
"activateSystem": {
"status": true,
"message: "Activation process has started.Kindly check the fetchApiStatus api with the transaction id.",
transaction_id: "101"
}
}
} |
Update System License
Update the system license of existing activated system.
API - updateLicence
API Parameter - None
Query Parameters
status
message
transaction_id |
API Request
Gql Endpoint: /admin/api/api/gql
Parameters:
mutation {
updateLicence(input: { }) {
status
message
transaction_id
}
} |
API Response
{
"data": {
"updateLicence": {
"status" : true,
"message": "Licence update process has started.Kindly check the fetchApiStatus api with the transaction id.",
"transaction_id": "102"
}
}
} |
Update Provisioning Port
To update the provisioning port of various services. Applicable only if you have Commercial licensed Sysadmin module.
API - updateProvisionPort
API Parameters -
Name | Required | Type | Default | Description |
---|---|---|---|---|
adminControlPort | Optional | Integer | 80 | Specify the HTTPS port for the admin control panel (The interface). |
sslAdminControlPort | Optional | Integer | 443 | Secure Port https for administration for this system. |
userControlPort | Optional | Integer | 81 | Specify the HTTPS port for the user control panel of the system. |
sslUserControlPort | Optional | Integer | 4443 | Secure Port https for administration for user control panel of this system. |
httpProvision | Optional | Integer | 84 | Specify the HTTP Provisioning - Access to provisioning files. Default port 84. |
sslHttpProvision | Optional | Integer | 1443 | Secure Port https for HTTP Provisioning of this system. |
restApi | Optional | Integer | 83 | Specify the HTTPS port for the REST API Provisioning of this system. |
sslRestApi | Optional | Integer | 2443 | Secure Port https for REST API Provisioning of this system. |
restApps | Optional | Integer | 82 | Specify the HTTP port for RESTful Phone Apps of the system. |
sslRestApps | Optional | Integer | 3443 | Secure Port https for RESTful Phone Apps Provisioning of this system. |
letsEncryptPort | Optional | String | "disabled" | Only allows access to LetsEncrypt tokens. |
sslDefault | Optional | String | "HTTP Only" | Secure Port default HTTP Only. |
sslSangomaPhone | Optional | Integer | 6443 | Secure Port https for Sangoma Phone Desktop Client Service |
fqdn | Optional | String |
| PBX address to which the browser will be redirected when force is enabled |
Query Parameters
status
message
transactionn_id |
API Request
API Request:
Params:
mutation {
updateProvisionPort(input: {
adminControlPort: 80
sslAdminControlPort: 443
userControlPort: 81
sslUserControlPort: 4443
httpProvision: 84
sslHttpProvision: 1443
restApi: 83
sslRestApi: 2443
restApps: 82
sslRestApps: 3443
letsEncryptPort: "disabled"
sslDefault: "HTTP Only"
sslSangomaPhone: 6443
fqdn: "10.10.10.10"
}) {
status
message
transaction_id
}
} |
API Response
API Response:
{
"data": {
"updateProvisionPort": {
"status": true,
"message": "Port provisioning update has started",
"transaction_id": "105"
}
}
} |
Fetch System Information
Get all the system information like Freepbx/PBXact version, Licensed modules, Brand, deployment ID etc.
API - fetchLicenceDetails
Query Parameters
branding
frameworkVersion
deploymentId
licencedModules
pbxVersion
expires
status
message |
API Request
API /admin/api/api/gql
Parameters:
query {
fetchLicenceDetails{
branding
frameworkVersion
pbxVersion
expires
status
message
}
} |
API Response
API Response:
{
"data": {
"fetchLicenceDetails": {
"branding": "FreePBXDistro",
"frameworkVersion": "15.0.17.3",
"pbxVersion": "12.7.8-2011-5.sng7",
"expires": "07-Jul-2030",
"status": true,
"message": "Successfully found license details"
}
}
} |
Fetch Activation Status
Get all the system information like Freepbx/PBXact.
API - fetchActivationStatus
Query Parameters
status
message |
API Request
API /admin/api/api/gql
Parameters:
query {
fetchActivationStatus{
status
message
}
} |
API Response
API Response:
{
"data": {
"checkActivation": {
"status": true,
"message": "FreePBXDistro Activation Done"
}
}
} |
Add Hostname
Set hostname of the system
API : addHostname
API Parameters:
Name | Required | Type | Default | Description |
---|---|---|---|---|
hostname | Mandatory | String |
| hostname for the system |
Query Parameters
status
message
transaction_id |
API Request
Gql Endpoint: /admin/api/api/gql
Parameters:
mutation {
addHostname(input: {
hostname: "testing"
}) {
message status transaction_id
}
} |
API Response
{
"data": {
"addHostname": {
"message": "Setting Hostname process has started. Kindly check the fetchApiStatus api with the transaction id.",
"status": true,
"transaction_id" : 220
}
}
} |
Install SSL Certificate
Set hostname of the system
API : installSSLCertificate
API Parameters:
Name | Required | Type | Default | Description |
---|---|---|---|---|
cid | Mandatory | String |
| Enter the certificate ID, after fetching the SSL certificate |
Query Parameters
status
message
transaction_id |
API Request
Gql Endpoint: /admin/api/api/gql
Parameters:
mutation {
installSSLCertificate(input: {
cid : "2"
}){
message
status
transaction_id
}
} |
API Response
{
"data": {
"installSSLCertificate": {
"message": "Installing SSL certificate process is started. Kindly check the fetchApiStatus api with the transaction id.",
"status": true,
"transaction_id": "50"
}
}
} |
Update SSL Certificate
Set hostname of the system
API : updateSSLCertificate
API Parameters:
Name | Required | Type | Default | Description |
---|---|---|---|---|
cid | Mandatory | String |
| Enter the certificate ID, after fetching the SSL certificate |
Query Parameters
status
message
transaction_id |
API Request
Gql Endpoint: /admin/api/api/gql
Parameters:
mutation {
updateSSLCertificate(input: {
cid : "3"
}){
message
status
transaction_id
}
} |
API Response
{
"data": {
"updateSSLCertificate": {
"message": "Updating SSL certificate is under process. Kindly check the fetchApiStatus api with the transaction id.",
"status": true,
"transaction_id": "84"
}
}
} |
Fetch Hostname
Get all the system information like Freepbx/PBXact.
API - fetchHostname
Query Parameters
status
message
hostname |
API Request
API /admin/api/api/gql
Parameters:
{
fetchHostname {
status message hostname
}
} |
API Response
API Response:
{
"data": {
"fetchHostname": {
"status": true,
"message": "Hostname for the system",
"hostname": "testing"
}
}
} |
Fetch SSL Certificates
Get all the system information like Freepbx/PBXact.
API - fetchSSLCertificates
Query Parameters
status
message
cid
name
description
type
default |
API Request
API /admin/api/api/gql
Parameters:
query{
fetchSSLCertificates{
status
message
certificates{
cid
name
description
type
default
}
}
} |
API Response
API Response:
{
"data": {
"fetchSSLCertificates": {
"status": true,
"message": "List of SSL certificates present",
"certificates": [
{
"cid": "2",
"name": "default"
"description" : "testing "
"type" : "Self Signed"
"default" : true
}
]
}
}
} |
Update Provisioning Protocols
API - updateProvisioningProtocols
API Parameters:
Name | Required | Type | Default | Description |
---|---|---|---|---|
ftpServer | Optional | Boolean | false | FTP server enable/disable |
ftpUsername | Optional | String |
| Username that FTP client will use |
ftpPassword | Optional | String |
| Password that FTP client will use |
tftpServer | Optional | Boolean | false | TFTP server enable/disable |
httpsAuth | Optional | String |
| HTTPS Authentication. Available options are none, both, http, https. Do not add double or single quotes to the value while setting this parameter |
httpsAuthUsername | Optional | String |
| HTTPS Username. This is auto-generated if the parameter is blank |
httpsAuthPassword | Optional | String |
| HTTPS Password. This is auto-generated if the parameter is blank |
Query Parameters
status
message
transaction_id |
API Request
Gql Endpoint: /admin/api/api/gql
Parameters:
mutation {
updateProvisioningProtocols(input: {
ftpServer: true
ftpUsername: ""
ftpPassword: ""
tftpServer: true
httpsAuth: none
httpsAuthUsername: ""
httpsAuthPassword: ""
}) {
status
message
transaction_id
}
} |
API Response
{
"data": {
"updateProvisioningProtocols": {
"status": true,
"message": "updating provisional protocols process has started. Kindly check the fetchApiStatus api with the transaction id.",
"transaction_id": "4499"
}
}
} |
Apache restart
For restart Apache server, we can use same API without using any option.
API - updateProvisioningProtocols
API Example -
API Request
Gql Endpoint: /admin/api/api/gql
Parameters:
mutation {
updateProvisioningProtocols(input: {}) {
status
message
transaction_id
}
} |
API Response
{
"data": {
"updateProvisioningProtocols": {
"status": true,
"message": "updating provisional protocols process has started. Kindly check the fetchApiStatus api with the transaction id.",
"transaction_id": "34"
}
}
} |
Fetch Provisioning Protocols
Get all the provision protocols information.
API - fetchProvisioningProtocols
Query Parameters
status
message
ftpServer
ftpUsername
ftpPassword
tftpServer
httpsAuth
httpsAuthUsername
httpsAuthPassword |
API Request
API /admin/api/api/gql
Parameters:
query {
fetchProvisioningProtocols {
ftpServer
ftpUsername
ftpPassword
tftpServer
httpsAuth
httpsAuthUsername
httpsAuthPassword
message
status
}
} |
API Response
API Response:
{
"data": {
"fetchProvisioningProtocols": {
"ftpServer": "true",
"ftpUsername": "",
"ftpPassword": "",
"tftpServer": "true",
"httpsAuth": "both",
"httpsAuthUsername": "1232",
"httpsAuthPassword": "74541233376ba2dd8590",
"message": "Details found successfully",
"status": true
}
}
} |
Update SSL Protocol
Get all the SSL protocols information.
API - updateSSLProtocol
API Parameters:
Name | Required | Type | Default | Description |
---|---|---|---|---|
all | Optional | String | disable | All SSL Protocol enable/disable |
SSLV3 | Optional | String | disable | SSLV3 Protocol enable/disable |
TLSV1 | Optional | String | disable | TLSV1 Protocol enable/disable |
TLSV1_1 | Optional | String | disable | TLSV1_1 Protocol enable/disable |
TLSV1_2 | Optional | String | enable | TLSV1_2 Protocol enable/disable |
Apache restart API
Need to restart Apache then please execute updateProvisioningProtocols API after executing above API.
Query Parameters
status
message
all
SSLv3
TLSv1
TLSv1_1
TLSv1_2 |
API Request
Gql Endpoint: /admin/api/api/gql
Parameters:
mutation {
updateSSLProtocol(input: {
all:"disabled",
SSLv3:"disabled",
TLSv1:"disabled",
TLSv1_1:"enabled",
TLSv1_2:"enabled"
}) {
message status SSLProtocol
}
} |
API Response
{
"data": {
"updateSSLProtocol": {
"message": "Update SSL protocol settings in Apache",
"status": true,
"SSLProtocol": "+TLSv1.1 +TLSv1.2"
}
}
} |
Enable/Disable force
Enable/disable force for different ports
API - updateForcePort
API Parameters
Name | Required | Type | Default | Description |
---|---|---|---|---|
port | Mandatory | string |
| port for which force has to be set as enabled/disabled |
force | Mandatory | string |
| yes/no, yes will enable force no will disable force |
Query Parameters
status
message |
API Request
mutation {
updateForcePort(input: {
port: "ucp"
force: "yes"
}) {
status
message
}
} |
API Response
{
"data": {
"updateForcePort": {
"status": true,
"message": "Force option for port ucp is set to yes"
}
}
} |
Fetch Port force options
Fetch force values for the provisioning ports
API - fetchForce
Query Parameters
acp
ucp
hpro
restapi
restapps
message
status |
API Request
query {
fetchForce {
acp
ucp
hpro
restapi
restapps
message
status
}
} |
API Response
{
"data": {
"fetchForce": {
"acp": "yes",
"ucp": "yes",
"hpro": "no",
"restapi": "no",
"restapps": "no",
"message": "Details found successfully",
"status": true
}
}
} |