Environment Variables
List of Environment Variables supported in comet scripting in priint cloud.
| Variable Name | Description |
|---|---|
| GRID_DATA_DIR | Folder location where resources from input zip can be found |
| GRID_DATA_FILE | File location containing the xml data |
| GRID_DOCUMENT_TEMPLATE | Document template as set via rest api |
| GRID_FOREIGN_KEY | Foreign key as set via rest api - a key generated by the content system |
| GRID_PROJECT | Current project name, e.g. myproject |
| GRID_PROJECT_ETAG | Current project version, actually a file hash of the comet_xml.zip |
| GRID_PROXY_URL | Media proxy URL, e.g. http://8653zwier34:eyJ4IjoieSJ9@mediaproxy:80 |
| GRID_TENANT | Current tenant name, e.g. mytenant |
| GRID_TICKET | Job ID, e.g. mil57pplqhumzkvrm6um2gazo7 |
| GRID_USER | Username 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 Name | Description |
|---|---|
| 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"));