Skip to main content

Environment Variables

List of Environment Variables supported in comet scripting in priint cloud.

Variable NameDescription
GRID_DATA_DIRFolder location where resources from input zip can be found
GRID_DATA_FILEFile location containing the xml data
GRID_DOCUMENT_TEMPLATEDocument template as set via rest api
GRID_FOREIGN_KEYForeign key as set via rest api - a key generated by the content system
GRID_PROJECTCurrent project name, e.g. myproject
GRID_PROJECT_ETAGCurrent project version, actually a file hash of the comet_xml.zip
GRID_PROXY_URLMedia proxy URL, e.g. http://8653zwier34:eyJ4IjoieSJ9@mediaproxy:80
GRID_TENANTCurrent tenant name, e.g. mytenant
GRID_TICKETJob ID, e.g. mil57pplqhumzkvrm6um2gazo7
GRID_USERUsername of the priint cloud request

Custom Variables

Variables coming in from the REST API custom parameter are also supported. Variable names are prefixed with 'GRID_CUSTOM_'.

Variable NameDescription
GRID_CUSTOM_<paramName>Custom key-value as set via REST API.
For a given parameter name like Foo and value Bar the calling URI would look like https://./renderpdf?custom=Foo:Bar and the variable name would be GRID_CUSTOM_Foo

Example Usage

Python

import os
s = os.getenv("GRID_DATA_DIR")

CScript

char *s = alloc(1000);
system::getenv(s, "GRID_DATA_DIR"));