Skip to content

Actionsettoken

psiinon edited this page Apr 4, 2013 · 3 revisions

This action allows the script to set tokens from data returned in the last response which can is used later in the script.

Attributes

Name Format Description
tokenName String The name of the token
prefix String The string in the response which immediately precedes the token value
postfix String The string in the response which is immediately after the token value
index Integer The index of the statement in the script
elementType String Always ZestActionFail

When a Zest Token Action is encountered the Zest runtime will set the token value to the string between the first occurrences of the prefix and postfix.
If either the prefix or postfix are not found in the response then the runtime should report an error.

JSON

An basic example:
{
  "tokenName": "userid",
  "prefix": "your user id is: ",
  "postfix": "

", "index": 2, "elementType": "ZestActionSetToken" }

See also

Clone this wiki locally