Skip to end of metadata
Go to start of metadata

You are viewing an old version of this content. View the current version.

Compare with Current View Version History

Version 1 Current »

This section will capture the APIs related with Framework or Module admin.

Install a Module

API - InstallModule

API Parameter -

Name

Required

Type

Default

Description

module

Mandatory

String

Specify the module name. This could be full name of the module like ' core'.

forceDownload

Optional

Boolean

false

Whether to download a module before installing.

Query Parameters 

status
message
transaction_id

API Request 

mutation {
    installModule(input: {
    module: "xmpp"
    forceDownload: true }) {
        status message transaction_id
    }
}

API Response 

{
  "data": {
    "installModule": {
      "status": true,
      "message": "Action[downloadinstall] on module[xmpp] has been initiated. Please check the status using fetchApiStatus api with the returned transaction id",
      "transaction_id": "90"
    }
  }
}


Uninstall a Module

API - uninstallModule

API Parameter -

Name

Required

Type

Default

Description

module

Mandatory

String

Specify the module name. This could be full name of the module like ' core'.

RemoveCompletely

Optional

Boolean

false

After uninstalling the module, completely remove module from the filesystem as well.

Query Parameters 

status
message
transaction_id

API Request 

mutation {
    uninstallModule(input: {
    module: "xmpp"
    RemoveCompletely: true }) {
        status message transaction_id
    }
}

API Response 

{
  "data": {
    "uninstallModule": {
      "status": true,
      "message": "Action[remove] on module[xmpp] has been initiated. Please check the status using fetchApiStatus api with the returned transaction id",
      "transaction_id": "91"
    }
  }
}

Enable a Module

API:  enableModule

API Parameter -

Name

Required

Type

Default

Description

module

Mandatory

String

Specify the module name. This could be full name of the module like ' core'.

Query Parameters 

status
message
transaction_id

API Request 

mutation {
    enableModule(input: {
    module: "xmpp" }) {
        status message transaction_id
    }
}

API Response 

{
  "data": {
    "enableModule": {
      "status": true,
      "message": "Action[enable] on module[xmpp] has been initiated. Please check the status using fetchApiStatus api with the returned transaction id",
      "transaction_id": "92"
    }
  }
}

Disable a Module

API:  disableModule

API Parameter -

Name

Required

Type

Default

Description

module

Mandatory

String

Specify the module name. This could be full name of the module like ' core'.

Query Parameters 

status
message
transaction_id

API Request 

mutation {
    disableModule(input: {
    module: "xmpp" }) {
        status message transaction_id
    }
}

API Response 

{
  "data": {
    "disableModule": {
      "status": true,
      "message": "Action[disable] on module[xmpp] has been initiated. Please check the status using fetchApiStatus api with the returned transaction id",
      "transaction_id": "93"
    }
  }
}

Upgrade a Module

To upgrade a module.

API - upgradeModule

API Parameter -

Name

Required

Type

Default

Description

module

Mandatory

String

Specify the module name. This could be full name of the module like ' core'.

Query Parameters 

status
message
transaction_id

API Request 

mutation {
    upgradeModule(input: {
      module: "xmpp" }) {
        status message transaction_id
    }
}

API Response 

{
  "data": {
    "upgradeModule": {
      "status": true,
      "message": "Action[upgradeModule] on module[xmpp] has been initiated. Please check the status using fetchApiStatus api with the returned transaction id",
      "transaction_id": "95"
    }
  }
}

Upgrade All Modules

To upgrade all modules.

API - upgradeAllModules

API Parameter -

Name

Required

Type

Default

Description

runReloadCommand

Mandatory

Boolean

true

If true executes reload command after running module upgradation. By default this is true.

runChownCommand

Mandatory

Boolean

true

If true executes chown command after running module upgradation. By default this is true

Query Parameters 

status
message
transaction_id

API Request 

mutation {
    upgradeAllModules(
    input: {
      runReloadCommand:true
      runChownCommand:true
    })
    {
      status message transaction_id
    }
}

API Response 

{
  "data": {
    "upgradeAllModules": {
      "status": true,
      "message": "Action[upgradeAll] on module[] has been initiated. Please check the status using fetchApiStatus api with the returned transaction id",
      "transaction_id": "95"
    }
  }
}

Module operation

A generic API to perform all operation's e.g install/uninstall, enable/disable , delete/upgrade.

API - moduleOperation

API Parameter -

Name

Required

Type

Default

Description

module

Mandatory

String

Specify the module name. This could be full name of the module like ' core'.

action

Mandatory

String

Action is to either install or uninstall a module.

Query Parameters 

status
message
transaction_id

API Request 

mutation {
    moduleOperations(input: {
    module: "paging"
    action: "downloadinstall" }) {
        status message transaction_id
    }
}

API Response 

{
{
  "data": {
    "moduleOperations": {
      "status": true,
      "message": "Action[downloadinstall] on module[paging] has been initiated. Please check the status using fetchApiStatus api with the returned transaction id",
      "transaction_id": "97"
    }
  }
}

Fetch module status

An API to fetch the module status.

API - fetchModuleStatus

API Parameter -

Name

Required

Type

Default

Description

moduleName

Mandatory

String

Specify the module name. This could be full name of the module like ' core'.

Query Parameters 

status
message
transaction_id

API Request 

{
  fetchModuleStatus(moduleName:"zulu"){
    status
    module
    message
  }
}

API Response 

{
  "data": {
    "fetchModuleStatus": {
      "status": true,
      "module": "needUpgrade",
      "message": "Module status found successfully"
    }
  }
}

Asynchronous API Status

An API to check for the long-running api status

API - fetchApiStatus

API Parameter -

Name

Required

Type

Default

Description

txnId

Mandatory

ID

Id of the transaction you want to see the status of.

status

optional

Boolean

Will get the status of the request performed

message

optional

String

Response message.

Query Parameters 

status
message

API Request 

query {
    fetchApiStatus( txnId: 97) {
        status message
    }
}

API Response 

{
  "data": {
    "fetchApiStatus": {
      "status": true,
      "message": "Executed"
    }
  }
}

Check if reload required

An API to check for if reload is required

API - fetchNeedReload

API Parameter - none

Query Parameters 

status
message

API Request 

query {
  fetchNeedReload{
    message status
  }
}

API Response 

{
  "data": {
    "fetchNeedReload": {
      "message": "Doreload is not required",
      "status": true
    }
  }
}


Perform reload

An API to perform reload

API - doreload

API Parameter - none

Query Parameters 

status
message

API Request 

mutation {
  doreload(input: {}) {
    message
    status
    transaction_id
  }
}

API Response 

{
  "data": {
    "doreload": {
      "message": "Doreload/apply config has been initiated. Please check the status using fetchApiStatus api with the returned transaction id",
      "status": true,
      "transaction_id": "1299"
    }
  }
}

Fetch Asterisk Details

An API to fetch the asterisk details.

API - fetchAsteriskDetails

API Parameter: none

Query Parameters 

status
message
asteriskStatus
asteriskVersion
amiStatus

API Request 

query {
    fetchAsteriskDetails {
        status
        message
        asteriskStatus
        asteriskVersion
        amiStatus
    }
}

API Response 

{
    "data": {
        "fetchAsteriskDetails": {
            "status": true,
            "message": "Asterisk Details",
            "asteriskStatus": "Running",
            "asteriskVersion": "16.0",
            "amiStatus": "Connected"
        }
    }
}

Fetch DB Status

An API to fetch the database details.

API -fetchDBStatus

API Parameter: none

Query Parameters 

status
message
dbStatus

API Request 

query {
    fetchDBStatus {
        status
        message
        dbStatus
    }
}

API Response 

{
    "data": {
        "fetchDBStatus": {
            "status": true,
            "message": "Database Status",
            "dbStatus": "Connected"
        }
    }
}

Fetch GUI Mode

An API to fetch the GUI mode.

API -fetchGUIMode

API Parameter: none

Query Parameters 

status
message
guiMode

API Request 

query {
    fetchGUIMode {
        status
        message
        guiMode
    }
}

API Response 

{
    "data": {
        "fetchGUIMode": {
            "status": true,
            "message": "GUI Mode details",
            "guiMode": "advanced"
        }
    }
}

Fetch Automatic updates

An API to fetch the automatic update details.

API- fetchAutomaticUpdate

API Parameter: none

Query Parameters 

status
message
systemUpdates
moduleUpdates
moduleSecurityUpdates

API Request 

query {
    fetchAutomaticUpdate {
        status
        message
        systemUpdates
        moduleUpdates
        moduleSecurityUpdates
    }
}

API Response 

{
    "data": {
        "fetchAutomaticUpdate": {
            "status": true,
            "message": "Automatic update status",
            "systemUpdates": "disabled",
            "moduleUpdates": "enabled",
            "moduleSecurityUpdates": "enabled"
        }
    }
}

Fetch Setup Wizard

An API to fetch the  setup wizard details.

API- fetchSetupWizard

API Parameter: none

Query Parameters 

status
message
autoupdates
{
   modules
}

API Request 

query {
    fetchSetupWizard {
        status
        message
        autoupdates {
            modules
        }
    }
}

API Response 

{
    "data": {
        "fetchSetupWizard": {
            "status": true,
            "message": "List up moduels setup wizard is run for",
            "autoupdates": [{
                "modules": "{\"framework\":\"framework\"}"
            }]
        }
    }
}

Run fwconsole command

API:  fwconsoleCommand

API Parameter -

Name

Required

Type

Default

Description

command

Mandatory

Enum

Specify the command. The possible commands which can be given are r, reload, restart and chown. These commands should be passed as an input without double quotes or single quotes

Query Parameters 

status
message
transaction_id

API Request 

mutation {
    fwconsoleCommand(
        input: {
           command: reload
        })
        {
           status message transaction_id
        }
    }

API Response 

{
  "data": {
    "fwconsoleCommand": {
      "status": true,
      "message": "Command has been initiated. Please check the status using fetchApiStatus api with the returned transaction id",
      "transaction_id": "123"
    }
  }
}

Fetch Installed Modules

An API to fetch all the installed modules.

API - fetchInstalledModules 

API Parameter: none

Query Parameters 

status
message
modules{
         name,
         state,
         version,
         license
      }

API Request 

query {
    fetchInstalledModules {
        status
        message
        modules{
           name,
           state,
           version,
           license
        }
    }
}

API Response 

{
  "data": {
    "fetchInstalledModules": {
      "status": true,
      "message": "Installed modules list loaded successfully ",
      "modules": [
        {
          "name": "accountcodepreserve",
          "state": "Enabled",
          "version": "13.0.2.2",
          "license": "GPLv2"
        },
        {
          "name": "adv_recovery",
          "state": "Enabled",
          "version": "15.0.41",
          "license": "Commercial"
        },
        {
          "name": "amd",
          "state": "Enabled",
          "version": "15.0.3",
          "license": "GPLv3+"
        }
      ]
    }
  }
}
  • No labels