Application management

Top  Previous  Next

Applications keep REST URL of the web-server, which you are integrated with. Besides that application store another settings and data.

 

App

 

Field

Description

name

Application name

appKey

Unique identifier, which will be used in context with current app on client side.

url

REST URL for integration with Web-server over WCS RESTful API.

owner

The user, that owns the app.

mainClass

Main class for direct calls. For deep integration and server-side developers.

callbackClass

Main class for callback. For deep integration and server-side developers.

restUsername

Username for HTTP REST authentication

restPassword

User password for HTTP REST authentication

 

You can manage applications with the following instructions:

 

show apps

add app

update app

remove app

 

show apps instruction

This instruction is used for displaying apps, existing in the system. Full list of apps will be displayed only if the user, that requests instruction, belongs to supergroup. Otherwise the list, that contains apps belonging to current user, will be shown.

Parameters:

[-d | --detail] enable detailed view

Example:

show apps

show apps -d

 

add app instruction

The instruction is used for new app addition in the system. New app will belong by default to user, that created it. If a creator of an app belongs to supergroup, they can assign another user as the app owner.

Parameters:

<app name> application name, mandatory parameter

<app key> unique application key, mandatory parameter

<app url> REST URL for Web-server integration via WCS RESTful API, mandatory parameter

[-m | --m-class] main class for direct calls, optional parameter

[-c | --c-class] main class for callback, optional parameter

[-u | --u-rest] username for HTTP-authentication, optional parameter

[-p | --p-rest] user's password for HTTP-authentication, optional parameter

[-o | --owner] the user, whom application should belong to, optional parameter

Example:

add app MyApp myNewUniqueKey "http://localhost/my_app"

add app -u rest_http_user -p rest_password MyApp2 myNewKey2 "http://localhost/my_app2"

add app -o alice MyApp3 myNewKey3 "http://localhost/my_app3"

 

update app instruction

This command is used for making changes in an existing application in the system. A user is allowed to change their own application only. If a user is in the supergroup, they can change any application. An application owner can be changed by the user belonging to the supergroup only.

Parameters:

<app name> application name, mandatory parameter

[-k | --key] unique application key

[-l | --url] REST URL for Web-server integration via WCS RESTful API

[-m | --m-class] main class for direct calls

[-c | --c-class] main class for callback

[-u | --u-rest] username for HTTP-authentication

[-p | --p-rest] user's password for HTTP-authentication

[-o | --owner] the user, whom application should belong to

Example:

update app -k newAppKey -u new_rest_user -p new_rest_password MyApp

update app -o admin MyApp

update app -l "http://10.10.10.10/app" MyApp

 

remove app instruction

It is used for application removal. An application can be removed by the user owning the app or belonging to supergroup.

Parameters:

<app name>  application name, mandatory parameter

Example:

remove app MyApp

 

REST Methods

 

For every app can be listed methods, which will be called from Web-server over REST/HTTP.

Full list of methods is available via following instruction:

 

show rest-methods

 

To enable and disable REST-methods from app the following instructions are used:

 

show app-rest-methods

remove app-rest-method

add app-rest-method

 

If method is added in the app, it will be used in integration and will be called every time, when WCS-server requests it.

For example, if method ConnectionStatusEvent is added, then WCS will call REST URL http://localhost/ConnectionStatusEvent every time when new user is connected  and send to web-server data needed. For more info about REST API operation please refer to Web Call Server - Call Flow documentation.

 

If method isn't added in the app, then there will not be REST request to Web-server. For example, when new user is connected, REST URL http://localhost/ConnectionStatusEvent will not be called.

 

show app-rest-methods instruction

This command is used for application active methods displaying.

Parameters:

<app_name> application name, mandatory parameter

Example:

show app-rest-methods MyApp

 

add app-rest-method instruction

It is used for method addition to an application. Methods can be added to an application by the user owning the app only or belonging to supergroup.

Parameters:

<app name> application name, mandatory parameter

<rest method> method name (is displayed after show app-rest-methods command execution), it is mandatory parameter, except for cases when -a key is specified

[-a | --all] add to application all available methods

Example:

add app-rest-method MyApp ConnectionStatusEvent

add app-rest-method -a MyApp

 

remove app-rest-method instruction

This instruction is used for method removal from application. Methods can be removed by the user owning the app only or belonging to supergroup.

Parameters:

<app name> application name, mandatory parameter

<rest method> method name (is displayed after show app-rest-methods command execution), it is mandatory parameter, except for cases when -а key is specified

[-a | --all] remove all methods, that were added to application

Example:

remove app-rest-method MyApp ConnectionStatusEvent

remove app-rest-method -a MyApp