System Commands

System commands describe commands that can be sent to Downstream Systems. To execute a system command, create a System Command Jobs.

Command Types

There is currently only one type of command, an https_request command, which describes a command executed by sending an HTTP request to the associated downstream system.

HTTP Commands

HTTP commands are described by defining the important parts of an http request:

  • protocol, for example https
  • host, in the form of api.sitename.com
  • path_template, which describes the path of the request, including templated variables. For example:
/widgets/{{.id}}
  • body_template, which describes an optional body to be sent with the request, including templated variables. Note that the command API does not place any restriction or do any validation on the contents of the body template. For example, a JSON "widget" object with a template variable for "name":
{ "widget" : { "name":"{{.name}}" }}
  • header_template, which contains the templated contents of the HTTP headers, for example:
Authorization: {{.token}}
  • output_variable_templates, which define a set of named variables and templates to extract values from the response. The system will apply each of the templates to the parsed response body and the results will be stored in the system command job once complete. The templates need to start with the . notation, and may be arbitrarily deep.
{
	"api_token": ".token",
	"foo": ".bar.baz"
}