Socket-based protocol example


This topic provides output that shows an example session in which a package is created and deployed, as follows:

  • An API token is used to log on to the API service.
  • The available servers and modules are queried.
  • A package is created with a single file reference.
  • That package is instantiated and deployed.

Example session

>login admin test
Mon Jan 13 08:25:18am[3164][API]: User admin connected.

<0 Ok

>bridge list

1:localhost

2:10.128.36.211

3:10.128.36.217
<0 Ok

>module list

29:asset_file
30:asset_q
31:asset_action
32:asset_null
<0 Ok
>package add 0 my_new_package
6:Added package my_new_package
<0 Ok
>package property add my_new_package VERSION 1.0a
3:Added unlocked property VERSION=1.0a
<0 Ok
>route list
1:Sample File Deploy Route
2:rt1
3:rt2
<0 Ok
>instance create package my_new_package
12:Created instance 0.0.0.2 from package my_new_package
<0 Ok
>instance list all
4:testPackage1:0.0.0.3:Ready:1:1

11:my_new_package:rt2:Ready:1:1

8:testPackage1:0.0.0.7:Ready:1:1

12:my_new_package:0.0.0.2:Ready:0:0
1:testPackage1:0.0.0.1:Ready:0:0
5:testPackage1:0.0.0.4:Error:0:0
6:testPackage1:0.0.0.5:Error:0:0
7:testPackage1:0.0.0.6:Error:0:0
2:testPackage1:0.0.0.2:Ready:1:1
3:testRepo:0.0.0.1:Ready:0:0
9:testPackage1:0.0.0.8:Ready:1:1
10:my_package:2:Ready:1:1
<0 Ok
>instance deploy my_new_package:0.0.0.2 rt2
7:Deployed instance 0.0.0.2 from my_new_package to environment Env2 in Open route rt2 with all references
<0 Ok
>quit
Mon Jan 13 08:51:25am[3164][API]: User admin disconnected.

 

Tip: For faster searching, add an asterisk to the end of your partial query. Example: cert*