Application contexts
An application context describes the configuration of an application
installed on a host. Settings may be associated to an application
context, in particular for template rendering.
Representation
The following elements are defined as part of an application context representation:
- application: The name of the application. This field is read-only.
- organization: The organization of associated host. This field is read-only.
- environment: The environment of associated host. This field is read-only.
- host: The associated host. This field is read-only.
- position: A number allowing to sort contexts in the order of application
installations. For example, if application a was installed after application b then
position of a is greater than position of b. This field is read-only.
- versionStamp: The version number of the application at install time. This field is read-only.
- settings: The list of settings defined for this application. This field is read-only.
Example
{
"application": "WebServer",
"environment": "Test Environment",
"host": "test-host-on-Hyp3",
"organization": "Guardis Test",
"position": 1,
"settings": [],
"versionStamp": 1
}
Methods
Collection
/organizations/{org_name}/environments/{env_name}/hosts/{host_name}/applications
- GET: returns all application contexts of the host.
- POST: installs an application on host.
Entity
/organizations/{org_name}/environments/{env_name}/hosts/{host_name}/applications/{app_name}
- GET: returns the application context.
- DELETE: uninstalls the application.
Other
File rendering
/organizations/{org_name}/environments/{env_name}/hosts/{host_name}/applications/{app_name}/files/{file_name}
- GET: renders an application’s file.
One-time URL
/organizations/{org_name}/environments/{env_name}/hosts/{host_name}/applications/{app_name}/files/{file_name}/link?short=[true|false]
- GET: provides a one-time URL to rendered application’s file;
short parameter enables to generate shorter (therefore, more “human-handeable”)
one-time URLs.
File update
/organizations/{org_name}/environments/{env_name}/hosts/{host_name}/applications/{app_name}/files/{file_name}/_update
- PUT: updates an application’s file on host’s instance i.e. the VM or physical host.
This may solve compliance errors and therefore bring host back in compliance.
Package install
/organizations/{org_name}/environments/{env_name}/hosts/{host_name}/applications/{app_name}/packages/{pkg_name}/_install
- PUT: installs an application’s package on host’s instance i.e. the VM or physical host.
This may solve compliance errors and therefore bring host back in compliance.
Service restart
/organizations/{org_name}/environments/{env_name}/hosts/{host_name}/applications/{app_name}/services/{svc_file_name}/_restart
- PUT: restarts an application’s service on host’s instance i.e. the VM or physical host.
This may solve compliance errors and therefore bring host back in compliance.
Sub-collections