com.innovaphone.manager (AP Manager API)

This API is used to add APs (App Platforms) to a PBX and when the PBX is added, it allows to find the App Instances provided by the AP and to configure the PBX to use these App Instances. It consists of the following functional blocks.

AP Domain Management
A mechanism to add a new AP to a PBX. For this a random password is set for the domain of the PBX inside the Manager, so that a AP object using this password can be installed on the PBX. For this an AppWebsocket connection with a default (dummy) password is established. A new domain can be created. An email verification mechanism is used, so that a valid email address can be used to reset the password for the domain.
AP Instance Management
The AP object in the PBX provides an API as hidden App for other Apps within the client. This API is used to announce all the App Instances available for the domain and provides functions to configure domain passwords on a given App Instance.

AP Domain Management

An AppWebsocket connnection with a default password "-" is used for this interface.

Login

Normal AppWebsocket Login is used.

url
ws(s)://<AP host address>/manager/manager-domain
password
"-"
domain
The PBX domain

RegisterDomain

{
    "mt": "RegisterDomain",
    "pwd": string
    "email": string
}

With this message a new domain is registered on the AP. An email confirmation is sent. Only after the user clicks the link in the confirmation email, the domain is registered. If the domain already exists, with the click on the link in the confirmation email the password is set to the new one.
The domain is the domain used for the login.

pwd
Password to be set
email:
E-Mail adderess for the confirmation

RegisterDomainResult

{
    "mt": "RegisterDomainResult"
}

Message sent by the AP as response to RegisterDomain

Instance Management

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.

ManagerControls

{
    "mt": "ManagerControls"
}

The ManagerControls message is used to read the list of PBX Manager plugins available on the given domain

ManagerControlsResult

{
    "mt": "ManagerControlsResult",
    "protocol": string,
    "ap": string,
    "apDn": string,
    "host": string,
    "controls": [<Control>,...]
}

With this message the list of available PBX Manager plugins is returned

protocol
http: or https:
ap
SIP URI user part of the AP object
apDn
Display name of the AP object
host
Host address of the AP
controls
Array of objects of type Control

Objects

Control
{
    "api": [string,...]
    "uri": string,
    "png": string,
    "lang": string
}

Description of an PBX Manager plugin control

uri
The relative URI of the plugin (.js)
png
The relatiive URI of the plugin icon (.png)
lang
The relative URI of a language file, with the reserved property "pluginTitle" for the title of the plugin.

InstanceDomain

{
    "mt": "InstanceDomain",
    "path": string,
    "pwd": string,
}

Used to set a domain on an App Instance, which may be used by multiple domains. As domain the domain used for the login to the AP is used.

path
The webserver path as configured for the instance. This is used to identify the instance to which this request should be forwarded.
pwd
Password to be used.

InstanceDomainResult

{
    "mt": "InstanceDomainResult",
    "error": string
}

Returns the result for SetInstanceDomain

error
If present the operation was not successful

SetInstancePassword

{
    "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.

path
The webserver path used to identify the instance
pwd
The new password of the instance

SetInstancePasswordResult

{
    "mt": "SetInstancePasswordResult",
    "error": string
}

Returns the result for SetInstancePassword

error
If present the operation was not successful

GetInstanceLogin

{
    "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.

path
The webserver path as configured for the instance. This is used to identify the instance for which a login is requested.
app
An App object name used for the login. Usually this has no meaning.
challenge
The challenge received from the instance to which a login is requested. This is received as argument of the fgetlogin callback of the AppWebsocket library.

GetInstanceLoginResult

{
    "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.