Distribution contexts

A distribution context describes the configuration of a distribution associated to a host. Settings may be associated to a distribution context, in particular for template rendering.

Representation

The following elements are defined as part of a distribution context representation:

  • distribution: The name of the distribution. 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 name of associated host. This field is read-only.
  • versionStamp: The version number of the distribution at association time. This field is read-only.
  • settings: The list of settings defined for this distribution. This field is read-only.

Example

{
    "distribution": "co6-Hyp3",
    "organization": "Guardis Test",
    "environment": "Test Environment",
    "host": "test-host-on-Hyp3",
    "versionStamp": 1,
    "settings": []
}

Methods

Entity

/organizations/{org_name}/environments/{env_name}/hosts/{host_name}/distribution
  • GET: returns the distribution context of the host.
  • POST: sets the distribution context.

Other

File rendering

/organizations/{org_name}/environments/{env_name}/hosts/{host_name}/distribution/files/{file_name}
  • GET: renders a distribution’s file in the context of a host.

One-time URL

/organizations/{org_name}/environments/{env_name}/hosts/{host_name}/distribution/files/{file_name}/link?short=[true|false]
  • GET: provides a one-time URL to rendered distribution’s file; short parameters enables to generate shorter (therefore, more “human-handeable”) one-time URLs.

Sub-collections