Page tree
Skip to end of metadata
Go to start of metadata


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

Install a Module

API - InstallModule

API Parameter -

NameRequiredTypeDefaultDescription

module

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

forceDownload

OptionalBooleanfalseWhether to download a module before installing.

Query Parameter 

Query Parameters
 status
 message
 transaction_id


API Example -

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 -

NameRequiredTypeDefaultDescription

module

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

RemoveCompletely

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

Query Parameter 

Query Parameters
 status
 message
 transaction_id


API Example -

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 -

NameRequiredTypeDefaultDescription

module

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


Query Parameter 

Query Parameters
 status
 message
 transaction_id


API Example - 

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 -


NameRequiredTypeDefaultDescription

module

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


Query Parameter 

Query Parameters
 status
 message
 transaction_id


API Example - 

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 -

NameRequiredTypeDefaultDescription

module

Mandatory
String

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


Query Parameter 

Query Parameters
 status
 message
 transaction_id


API Example - 

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 -

NameRequiredTypeDefaultDescription

runReloadCommand

MandatoryBooleantrue

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

runChownCommandMandatoryBooleantrue

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


Query Parameter 

Query Parameters
 status
 message
 transaction_id


API Example - 

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 -

NameRequiredTypeDefaultDescription

module

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

Action is to either install or uninstall a module.


Query Parameter 

Query Parameters
 status
 message
 transaction_id


API Example:

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 -

NameRequiredTypeDefaultDescription

moduleName

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


Query Parameter 

Query Parameters
 status
 message
 transaction_id


API Example:

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 -

NameRequiredTypeDefaultDescription

txnId

MandatoryID
Id of the transaction you want to see the status of.
statusoptionalBoolean
Will get the status of the request performed
messageoptionalString
Response message.


Query Parameter 

Query Parameters
 status
 message


API Example:

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 Parameter 

Query Parameters
 status
 message


API Example:

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 Parameter 

Query Parameters
 status
 message


API Example:

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 Parameter 

Query Parameters
 status
 message
 asteriskStatus
 asteriskVersion
 amiStatus


API Example:

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 Parameter 

Query Parameters
 status
 message
 dbStatus


API Example:

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 Parameter 

Query Parameters
 status
 message
 guiMode


API Example:

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 Parameter 

Query Parameters
 status
 message
 systemUpdates
 moduleUpdates
 moduleSecurityUpdates


API Example:

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 Parameter 

Query Parameters
 status
 message
 autoupdates
 {
	modules
 }


API Example:

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 -

NameRequiredTypeDefaultDescription

command

MandatoryEnum
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 Parameter 

Query Parameters
 status
 message
 transaction_id


API Example - 

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 Parameter 

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


API Example:

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