Skip to main content

Webhooks Definition

Webhook types

The three webhook types share most of their configuration options.

  • upload
  • callback
  • error

priint:cloud configurations are stored in /config.ion files for each application type (some of renderpdf, upload, etc.).

ion is a data format originally defined by Amazon AWS and essentially compatible with JSON-5, i.e. a lax variant of JSON. Every valid JSON file is also a valid ION file. In addition to standard JSON syntax we can use JavaScript like comments or omit the quotes around keys that contain no special characters.

Most configuration options allow detailed control about the processes backing the rendering. E.g. whether an input XML is allowed to contain data for more than one PDF; the exact version of the PdfRenderer used for a project; custom command line arguments for the PdfRenderer; handling of failed renderings, i.e. when and how often to retry; etc. All these details are left for the expert.

Here comes an example:

// /tenants/mytenant/projects/myproject/renderpdf/config.ion
{
cometPdfVersion: "R30316",
buildScript: "test2.py"
}

Configuration Inheritance

Project configuration files inherit properties from the tenant configuration files form the same application which itself inherit from some global defaults.

The global defaults are documented together with each application type.

An example for a tenant wide configuration:

// /tenants/mytenant/renderpdf/config.ion
{
cometPdfVersion: "R29333",
buildScript: "build.py",
maxExecutionMillis: 180000, // 3 min,
redeliverOnError: [{
maxRedeliveries: 2,
redeliverIntervalMillis: 12000 // 2 min
}]
}

Without this tenant wide configuration the effective value for maxExecutionMillis would be 60000 i.e. 1 min (from the global defaults).

When the configuration properties are itself structured objects or an array of objects like the redeliverOnError in the example then you must override the whole block in the project specific config file.