Variables
Variables are a simple yet powerful way of storing state between queries in a stage.
Usage​
Setting a variable​
... --variable "var1:column"
Note that setting a variable adds a --cache false
to your query
Using a checkpoint​
VARIABLES.{VARIABLE NAME}$
​
You can access any checkpoint value using the above token format. This is used with setting checkpoints using the --variable
flag.
api get https://www.{AUTHENTICATED-API}.com?nextPage=$VARIABLES.api_next_page$
Use cases​
Example:​
oauth --credential workday --variable "workdayAuth:token.access_token"
|| soap '{
"Request_Criteria": {"From_DateTime": "2023-07-17T12:15:00-07:00", "To_DateTime": "2023-07-17T13:15:00-07:00"},
"Response_Filter": { "Page": 1, "Count": 10, "As_Of_Entry_DateTime": "2023-07-17T12:15:00-07:00" }
}'
--wsdl Identity_Management_edit
--method "Get_Workday_Account_Signons"
--security.bearer "$VARIABLES.workdayAuth$"