WizarView OpenAPI Document V4.8
Version History
Version
Date
Author
Description
Add Function supported table.
Add query terminal state interface.
Update interface url error.
Update interfaces. Add 9.2. pushNotification interfaces. Add 3.4. installAppList interfaces. Add 3.5. installAppCount interfaces. Add 3.6. healthState interfaces. Add 3.7. uninstallApp interfaces.
Update the 9.1 Push interface URL.
Update api/third to openapi.
1. Interfaces Introduction
1.1. Http invocations
The developer gets the userid and user token from the wizarView administrator to access interface, and then each interface invoking, the data passed to wizarView will use the token as signature.
Developers should provide:
Basic I.D. (name, company, email), used to mark new developer users in wizarView.
Required access rights, indicates the interface to access.
Developer will get:
developer id and access token.
1.1.1. Usage of token
Token is a security code that is negotiated in advance between wizarView and the third-party interfaces, which is used to participate in the hash calculation of the message to ensure the security of the communication message. Both the wizarView and the third-party interfaces should keep the token properly to avoid leaks.
Token using steps:
Convert the body in the request message to a json string (a).
Attach the token to the beginning of the JSON string (a) converted by the body, and attach Time-Token coverted by the HTTP Header. namely, b = token + a + Time-Token.
The new composition contains token strings is computed by sha256, and the result is encoded by base64, namely, hash = base64(sha256(b)).
Add the hash to the request header and start the communication.
The example:
HTTP Header:
Time-Token: 1629107790765
HTTP Body: {"name":"group_01","createTime":"1629107790765"}
The response message does not calculate the hash and no signature.
HTTP Body: {"status":1,"message":"success","body":{....}}
1.4. Request example
2. Group interface
2.1. Query country
2.1.1. Request address
https://www.wizarviw.com/wizarView/openapi/country/list
2.1.2. Request message
Example:
2.1.3. Response message
Example:
Response message are in json format, meaning as follows:
2.2. Query states
2.2.1. Request address
https://www.wizarviw.com/wizarView/openapi/country/listStates
2.2.2. Request message
Example:
2.2.3. Response message
Example:
Response message are in json format, meaning as follows:
2.3. Query group types
2.3.1. Request address
https://www.wizarviw.com/wizarView/openapi/group/listTypes
2.3.2. Request message
Example:
2.3.3. Response message
Example:
Response message are in json format, meaning as follows:
2.4. Query group
2.4.1. Request address
https://www.wizarviw.com/wizarView/openapi/group/list
2.4.2. Request message
Example:
The message is in json format, meaning as follows:
GTL_id: Group id. If want to cache data, the value may be cached the max id.
2.4.3. Response message
Example:
Response message are in json format, meaning as follows:
parentGroupId: Parent group id
parentGroupName: Parent group name
typeName: Group type name
countryName: Country name
stateName: State name/province name
inheritDefaultApp: Whether inherit group default App
2.5. Add & Update group
2.5.1. Request address
https://www.wizarviw.com/wizarView/openapi/group/save
2.5.2. Request message
Example:
The message is in json format, meaning as follows:
id: Group id. If add operation, this field is required. Otherwise is optional.
parentGroupId: Parent group id
stateId: State id/province id
description: Group description
inheritDefaultApp: Whether inherit group default App
2.5.3. Response message
Example:
2.6. Delete group
2.6.1. Request address
https://www.wizarviw.com/wizarView/openapi/group/delete
2.6.2. Request message
Example:
The message is in json format, meaning as follows:
2.6.3. Response message
Example:
3. Terminal interface
3.1. Query terminal
3.1.1. Request address
https://www.wizarviw.com/wizarView/openapi/terminal/list
3.1.2. Request message
Example:
The message is in json format, meaning as follows:
groupIds: Group id list, which are seperate with ','
3.1.3. Response message
Example:
Response message are in json format, meaning as follows:
terminalModelName: Terminal model name
imeiNo1: Terminal IMEI NO 1
imeiNo2: Terminal IMEI NO 2
description: Terminal description
registerTime: Register time
networkType: Network type
gps: Terminal GPS (latitude/longitude)
3.2. Query terminal state
3.2.1. Request address
https://www.wizarviw.com/wizarView/openapi/terminal/state
3.2.2. Request message
Example:
The parameter is json format, meaning as follows:
sn: Terminal sequence number
3.2.3. Response message
Example:
The parameters meaning:
sn: Terminal sequence number
registerTime: Register time
systemVersion: System version
kernelVersion: Kernel version
splashVersion: Splash version
safeModuleVersion: Safe module version
bootloaderVersion: Bootloader version
basebandVersion: Baseband version
bluetoothMac: Bluetooth Mac
status: Online state. 1 Online, 0 Offline
networkType: Network type
appCount: Terminal application count
lastUpdateTime: Last update time
3.3. Update terminal
3.3.1. Request address
https://www.wizarviw.com/wizarView/openapi/terminal/save
Example:
The message is in json format, meaning as follows:
id: terminal id to be updated
description: terminal description
inheritDefaultApp: whether inherit default App
3.3.2. Response message
Example:
3.4. Query terminal install App list
3.4.1. Request address
https://www.wizarviw.com/wizarView/openapi/terminal/installAppList
3.4.2. Request message
Example:
The message is in json format, meaning as follows:
packageName: Package name
system: Whether system applications are included
groupIds: Group id list, which are seperate with ','
3.4.3. Response message
Example:
Response message are in json format, meaning as follows:
appLabel: Application tag
description: desktop:true indicates desktop display. desktop:false indicates that it is not displayed on the desktop.
installed: Installation time
memory: Memory used by the application
signature: Application certificate subject
system: Whether system applications are included
versionCode: Application version number
versionName: Application version name
3.5. Query terminal install App count
3.5.1. Request address
https://www.wizarviw.com/wizarView/openapi/terminal/installAppCount
3.5.2. Request message
Example:
The message is in json format, meaning as follows:
packageName: Package name
system: Whether system applications are included
groupIds: Group id list, which are seperate with ','
3.5.3. Response message
Example:
Response message are in json format, meaning as follows:
3.6. Query terminal health State
3.6.1. Request address
https://www.wizarviw.com/wizarView/openapi/terminal/healthState
3.6.2. Request message
Example:
The message is in json format, meaning as follows:
type: 10-History, 20-Real-time
3.6.3. Response message
Example:
Response message are in json format, meaning as follows:
adapter: Whether to connect the power adapter
agentVersion: Agent version code
agentVersionName: Agent version name
basebandVersion: Baseband version
bluetoothMac: Bluetooth mac
bootloaderVer: Bootloader version
communicationType: Communication type
ethernetCable: Whether to connect to Ethernet
externalMemory: External memory
fingerprintType: Whether the fingerprint module exists
internalMemoryJttFs2: Internal memory JttFs2
internalMemorySysUse: Internal memory sys use
kernelVer: Kernel version
paperStatus: Whether the printer is out of paper
printer: Is there a printer
safeModuleVer: Safe Module version
splashVersion: Splash version
systemMemory: System memory
systemVer: System version
3.7. Terminal uninstall App
3.7.1. Request address
https://www.wizarviw.com/wizarView/openapi/terminal/uninstallApp
Example:
The message is in json format, meaning as follows:
packageName: Package name
3.7.2. Response message
Example:
4. Application interface
4.1. Query application
4.1.1. Request address
https://www.wizarviw.com/wizarView/openapi/app/list
4.1.2. Request message
Example:
The message is in json format, meaning as follows:
groupName: application group name
4.1.3. Response message
Example:
The message is in json format, meaning as follows:
packageName: Apk package name
groupId: Application group id
groupName: Application group name
enabled: Application is enabled
restartPortal: Restart app portal class when upgrade app
snRegex: Terminal sn regex
firmwareExpr: Terminal firmware expression
createTime: Application create time
operator: The user of operate application
appVersionId: The application version which is using
4.2. Add application
4.2.1. Request address
https://www.wizarviw.com/wizarView/openapi/app/save
4.2.2. Request message
Example:
The message is in json format, meaning as follows:
id: Application id. Optional. If create application, this field should be none. If update, must have value.
groupId: application group id
appTypeName: application type name
snRegex: Terminal SN regex
firmwareExpr: Terminal firmware expression
restartPortal: The application on terminal restart portal - a class name with package name.
4.2.3. Response message
Example:
4.3. Delete application
4.3.1. Request address
https://www.wizarviw.com/wizarView/openapi/app/delete
4.3.2. Request message
Example:
The message is in json format, meaning as follows:
id: application id to be deleted
4.3.3. Response message
Example:
5. Application version interface
5.1. Query application version
5.1.1. Request address
https://www.wizarviw.com/wizarView/openapi/app/version/list
5.1.2. Request message
Example:
The message is in json format, meaning as follows:
name: application version name
appName: application name
groupName: Application group name, if set, to find the terminal in the terminal group and sub-terminal group, otherwise in the own terminal group and sub-terminal group by default
5.1.3. Response message
Example:
The message is in json format, meaning as follows:
Id: application version id
name: application version name
appName: application name
5.2. Add application version
5.2.1. Request address
https://www.wizarviw.com/wizarView/openapi/app/version/save
5.2.2. Request message
Example:
The file stream of the application version is written to body, and other properties are written after url. The following properties are shown as follows:
versionCode: application version code, valid only when param is uploaded
versionName: Application version name, valid only when param is uploaded
paramType: param type, optional value: other, valid only when param is uploaded
5.2.3. Response message
Example:
5.3. Delete application version
5.3.1. Request address
https://www.wizarviw.com/wizarView/openapi/app/version/delete
5.3.2. Request message
Example:
The message is in json format, meaning as follows:
id: application version id to be deleted
5.3.3. Response message
Example:
6.1. Add terminal default application
6.1.1. Request address
https://www.wizarview.com/wizarView/openapi/app/terminal/add
6.1.2. Request message
Example:
The message is in json format, meaning as follows:
flag: 0 Market, 1 Prompt, 2 Silent
6.1.3. Response message
Example:
6.2. Delete terminal default application
6.2.1. Request address
https://www.wizarview.com/wizarView/openapi/app/terminal/delete
6.2.2. Request message
Example:
The message is in json format, meaning as follows:
6.2.3. Response message
Example:
7.1. Add group default application
7.1.1. Request address
https://www.wizarview.com/wizarView/openapi/app/owner/add
7.1.2. Request message
Example:
The message is in json format, meaning as follows:
flag: 0 Market, 1 Prompt, 2 Silent
7.1.3. Response message
Example:
7.2. Delete group default application
7.2.1. Request address
https://www.wizarview.com/wizarView/openapi/app/owner/delete
7.2.2. Request message
Example:
The message is in json format, meaning as follows:
GTL_id: username group id
7.2.3. Response message
Example:
8. Audit log interface
8.1. Query logs
8.1.1. Request address
https://www.wizarview.com/wizarView/openapi/auditlog/list
8.1.2. Request message
Example:
The message is in json format, meaning as follows:
GTL_id: The log unique identifier. If contain this field, the output message will order by id desc. Otherwise asc. Optional Long
username: Operator name. Optional String
target: Operate object. Optional String
8.1.3. Response message
Example:
Response message are in json format, meaning as follows:
actionType: Action type id
targetObjectName: The target of action
groupName: User group name
9. Push message interface
The third-party customers can push message to terminal by wizarView.
9.1. Push message
9.1.1. Request address
https://www.wizarview.com/wizarView/openapi/push/
9.1.2. Request message
Example:
9.1.3. Response message
Example:
9.2. Push notification
9.2.1. Request address
https://www.wizarview.com/wizarView/openapi/push/pushNotification
9.2.2. Request message
Example:
The message is in json format, meaning as follows:
pushRange: Push range: 10-Terminal, 20-Group, 30-Tag, 40-Application. Optional Integer
ids: Different ids are passed according to the push range value, multiple ids are separated by ",". Optional String
evtType: Push event name. Terminal: evtApp (Application push), evtInstalledApp (Get the latest applications), evtLog (Log update), evtEvent (Latest event), evtImportantEvent (Submit critical system events), evtGps (Latest location), evtExitFullScreen (Exit screen). Group: evtInstalledApp (Upload the installed application), evtEvent (Latest event), evtSysParam (Download system parameters). Tag: evtApp (Applicattion push). Application: evtApp (Applicattion push). Optional String
logLevel: Log level (0-novice/2-advanced), this parameter is passed when the push range is terminal and the event name is evtLog. Optional Integer
9.2.3. Response message
Example:
10.1. Status Code
Status code 1 is success. Others are failures.
No the open API interface configuration
Invalid message, HASH validation is not passed
No permission to operate group
Non-existent group parent
Non-existent country name
No permission to operate terminal
Non-existent terminal model
Sn that doesn't fit the rules
Non-existent application type
No permission to operate application
Non-existent application id
No permission to operate application version
Use http mode, but no certificate
Issuer certificate not found
Certificate validation is not passed
Not supported application type, APK PARAM is currently supported only.
Verify application failed
Terminal not in group [NEW], cannot be added
Terminal not in group [NEW], cannot be added
Non-existent parameter file
Terminal and application parameter is not match
Terminal doesn’t have permission to configure this parameter template
10.2. The functions supported table
Application Provider Query
Application Version Query
Terminal Install Apps Query