This API is used to add APs (App Platforms) to a PBX. When the AP is added, it allows to find the App Instances provided by the AP and to configure the PBX to use these
App Instances.
In addition to that, a plugin for the AP Manager (app installer) is available where new apps can be installed, updated or uninstalled.
The API consists of the following functional blocks.
An AppWebsocket connnection with a default password "-" is used for this interface.
Normal AppWebsocket Login is used.
{
"mt": "RegisterDomain",
"pwd": string
"managerPwd": string
}
With this message a new domain is registered on the AP. For security reasons, the AP Manager password must be provided so that the domian is added.
The domain is the domain used for the login.
{
"mt": "RegisterDomainResult"
}
Message sent by the AP as response to RegisterDomain
Instance management is done through myApps API com.innovaphone.manager. This API is provided by a hidden App provided to the PBX when the Websocket Connection to http(s)://<AP host address>/manager/manager-domain-api is opened from the AP object in the PBX.
{
"mt": "ManagerControls"
}
The ManagerControls message is used to read the list of PBX Manager plugins available on the given domain
{
"mt": "ManagerControlsResult",
"protocol": string,
"ap": string,
"apDn": string,
"host": string,
"controls": [<Control>,...]
}
With this message the list of available PBX Manager plugins is returned
{
"api": [string,...]
"uri": string,
"png": string,
"lang": string
}
Description of an PBX Manager plugin control
{
"mt": "SetInstancePassword",
"path": string,
"pwd": string
}
Used to set the password of an instance. On success, the instance is edited with the new password and an AppWebsocket connection can then be established.
{
"mt": "SetInstancePasswordResult",
"error": string
}
Returns the result for SetInstancePassword
{
"mt": "GetInstanceLogin",
"path": string,
"app": string,
"challenge": string,
}
Used to get a login for a given instance. This maybe used in the fgetlogin callback of the AppWebsocket connection. With this it is possible to authenticate at instances without an App Object present in the PBX, just by having access to the App Platform Manager.
{
"mt": "GetInstanceLoginResult",
"app": string,
"sip": string,
"domain": string,
"guid": string,
"dn": string,
"digest": string
}
The login, which can be used for the App Instance. This object can directly passed to the login function of the AppWebsocket library.
The app installer plugin facilitates the management of apps and the configuration of the instances on the PBX.
{
"mt": "GetManagerInfo"
}
The GetManagerInfo message is used to retrieve information about the App Platform and AP Manager
{
"mt": "GetManagerInfoResult",
"platform": string,
"platformLabel": string,
"build": string,
"version": string,
"label": string,
}
{
"mt": "AcceptUserAgreement",
"accept": boolean,
"user": string
}
The AcceptUserAgreement message is needed to accept the AP Manager appstore user agreement and get access to the appstore.
{
"mt": "AcceptUserAgreementResult",
"accepted": boolean
}
{
"mt": "CheckUserAgreement"
}
The CheckUserAgreement message checks if the user agreement of the AP Manager appstore is accepted or not.
{
"mt": "CheckUserAgreementResult",
"accepted": boolean
}
{
"mt": "RequestAppStore"
}
The RequestAppStore message requests all the apps available on the configured app store in the AP Manager
{
"mt": "AppStoreServiceAdded",
"id": string,
"folder": string,
"title": string,
"manufacturer": string,
"infourl": string,
"logo": string,
"versions": [],
"state": {},
"support": string,
"requirement": string,
"licenseInfo": string,
"licenseType": string,
"eula": string,
"langs": [],
"categories": [],
"apps": []
}
{
"mt": "AppStoreResult"
}
{
"mt": "InstallService",
"appServiceID": string,
"title": string,
"folder": string,
"binary": string,
"manufacturer": string,
"copy": [],
"version": {
"build": string,
"label": string,
"id": string,
"compatibilty": string
},
"userAgreementAccepted": boolean,
"domain": string
}
The InstallService message is used to install a new service on the AP. On success, a new instance with the same domain is implicitly added and started.
The instance can be configured on the PBX through its corresponding PBX Manager plugin.
{
"mt": "ServiceInstalled",
"filename": string,
"appServiceID": string,
"title": string,
"initilaStatus": boolean,
"currentStatus": boolean,
"manufacturere": string,
"startTime": ulong64,
"versions": []
}
{
"mt": "InstallServiceResult",
"error": string
}
Indicates whether an app service was successfully installed or not.
{
"mt": "InstallService",
"appServiceID": string,
"title": string,
"folder": string,
"binary": string,
"manufacturer": string,
"copy": [],
"version": {
"build": string,
"label": string,
"id": string,
"compatibilty": string
},
"domain": string
}
The UpdateService message is used to update a service to any avialable version.
The update would not be possible (through this plugin) if a service have multiple instances with different domains.
Updating the AP Manager and the Webserver app is also not possible.
{
"mt": "ServiceInstalled",
"filename": string,
"appServiceID": string,
"title": string,
"initilaStatus": boolean,
"currentStatus": boolean,
"manufacturere": string,
"startTime": ulong64,
"versions": []
}
{
"mt": "UpdateServiceResult",
"error": string
}
Indicates whether an app service was successfully updated or not.
{
"mt": "InstallService",
"appServiceID": string,
"domain": string
}
The RemoveService message is used to uninstall a service.
The uninstall would only remove the corresponding instance with the specified domain. If no other instances are present, then the whole service is uninstalled.
{
"mt": "ServiceInstalled",
"filename": string,
"appServiceID": string
}
{
"mt": "RemoveServiceResult",
"error": string
}
Indicates whether an app service was successfully uninstalled or not.