APImetrics provides a number of pre-defined system variables that can be used in an API call.
Variables can be injected into a call by surrounding the variable name by either percentages (e.g.
%%NAME%%) or double underscores (e.g.
__NAME__). For use in a URI, we recommend double underscore.
|Variable Name (%%VAR_NAME%% or VAR_NAME)||Description|
|A date string in ISO format, e.g.: 2019-07-09T19:29:43.492000|
|Returns the date only, e.g.: 2019-05-04|
|Returns the time string only, e.g.: 14:34:45|
|The API ID of the current project - a text string, e.g. ag9zfmFwaW1ldHJpY3MtcWNyEQsSBFVzZXIYgICAtILamwoM|
|The name of the current project, e.g. "Project Dec 20"|
|The API ID of the current API Call, e.g. ag9zfmFwaW1ldHJpY3MtcWNyFwsSClRlc3RTZXR1cDIYgIDgpOT1pAgM|
|The name of the current API call, e.g. "Create Contact"|
|The API ID of the current API Result, e.g. ag9zfmFwaW1ldHJpY3MtcWNyGAsSC1Rlc3RSZXN1bHQzGICA4IT5pKELDA|
|The API ID of the Auth used by the current API Call|
|The API ID of the Token used by the current API Call|
|The API ID of the current Workflow, if running in a Workflow|
|The Name of the current Workflow|
|The API ID of the current Workflow Result, if running in a workflow|
|The client id from your selected developer key set in Authentication settings|
|The client secret from your selected developer key set in Authentication settings|
|The current time in UNIX time (i.e the number of seconds since 1970 January 1) - e.g. 335632800|
|Generates a random 16 digit number that passes the Luhn Checksum|
|Generates a random number with the correct initial digits such as it appears the relevant card-type. RANDCARD is randomly picked number from of the other three|
|A random integer between 1 and 10000|
|A random latitude (a 6-decimal point precision number between -90.0 an 90.0) and a random longitude (a 6-decimal point precision number between -180.0 an 180.0)|
|A RFC 4122 compliant version 4 UUID (e.g. 2dbf15b4-fa53-45c7-8e37-ea8965396b42)|
|An ID number identifying the current test (remains constant for each test), e.g.: 5872285445521408|
|A unique ID number identifying the specific call (changes for each call made).|
|An ID number identifying the current workflow (remains constant throughout lifetime of workflow).|
|A unique ID number identifying the specific workflow run (remains the same for all the calls in that workflow, but is different each time that workflow is triggered).|
There are additional variables that are set if the Workflow has been triggered as an alert. Please see the Alerts & Webhooks documentation for the full list.
Need more advanced date or time manipulation?
If you require more complex date or time formatting or manipulation, create a Workflow and use our momentjs-based REST API.
Users can define variables as Global Variables or as workflow variables where variables are set from returned JSON or XML.
Updated 20 days ago