Available translations

API Query Parameter

foundations.png
api-query-parameter.png
This node represent a single query parameter. For a full definition of what a query parameter is please see the API Query Parameters page.
API Query Parameter Configuration
Properties
  • codeName: This must match with the name of the query parameter defined at the API docs.
  • isString: Define if the path parameter is a string or not.
  • isOptional: Define if this path parameter is optional or not.
  • description: Define a basic description of what this path parameter accomplishes.
  • value: This is the value to be used by the parameter.
  • replaceBy: [Optional] This property allows you to instruct the API Fetcher Bot to set a value to this parameter replacing the current default and using contextual information available only at runtime.
Here is an example config setting a query option to false:
 {
    "codeName": "localization",
    "isString": false,
    "isOptional": true,
    "description": "Trim down responce object",
    "value": false
}
Foundations->Concept->replaceBy Config Property->How To Use It
replaceBy Config Property Usage
This property is optional, meaning that the Bot will use the default value when it is not present. The default value for both API Query Parameter and API Path Parameter is the codeName config property. An example of how this would look in a config is as follows:
 {
    "codeName": "currentBaseAsset",
    "isString": false,
    "isOptional": false,
    "description": "",
    "replaceBy": "@BaseAsset"
}
The following list lays out all the possible values you can use within the replaceBy property.
For Base Asset
  • @BaseAsset: This will force the Bot to use the current Base Asset.
 parameterValue = TS.projects.foundations.globals.taskConstants.TASK_NODE
.parentNode.parentNode.parentNode.referenceParent.baseAsset.referenceParent.config.codeName
  • @BaseAssetNameUppercase: This will force the Bot to use the current name of the Base Asset beginning with an uppercase letter.
 rawValue = TS.projects.foundations.globals.taskConstants.TASK_NODE
.parentNode.parentNode.parentNode.referenceParent.baseAsset.referenceParent.name
parameterValue = rawValue.toUpperCase()
  • @BaseAssetNameLowercase: This will force the Bot to use the name of the current Base Asset beginning with a lowercase letter.
 rawValue = TS.projects.foundations.globals.taskConstants.TASK_NODE.parentNode
.parentNode.parentNode.referenceParent.baseAsset.referenceParent.name
parameterValue = rawValue.toLowerCase()
For Quoted Asset
  • @QuotedAsset: This will force the Bot to use the current Quoted Asset.
 parameterValue = TS.projects.foundations.globals.taskConstants.TASK_NODE
.parentNode.parentNode.parentNode.referenceParent.quotedAsset.referenceParent.config.codeName
  • @QuotedAssetNameUppercase: This will force the Bot to use the name of the current Base Asset beginning with an uppercase letter.
 rawValue = TS.projects.foundations.globals.taskConstants.TASK_NODE
.parentNode.parentNode.parentNode.referenceParent.quotedAsset.referenceParent.name
parameterValue = rawValue.toUpperCase()
  • @QuotedAssetNameLowercase: This will force the Bot to use the name of the current Base Asset beginning with a lowercase letter.
 rawValue = TS.projects.foundations.globals.taskConstants.TASK_NODE
.parentNode.parentNode.parentNode.referenceParent.quotedAsset.referenceParent.name
parameterValue = rawValue.toLowerCase()
For Exchange
  • @Exchange: This will force the Bot to use the current Exchange.
 parameterValue = TS.projects.foundations.globals.taskConstants.TASK_NODE 
.parentNode.parentNode.parentNode.referenceParent.parentNode.parentNode.config.codeName
  • @ExchangeNameUppercase: This will force the Bot to use the name of the current Exchange beginning with an uppercase letter.
 rawValue = TS.projects.foundations.globals.taskConstants.TASK_NODE
.parentNode.parentNode.parentNode.referenceParent.parentNode.parentNode.name
parameterValue = rawValue.toUpperCase()
  • @ExchangeNameLowercase: This will force the Bot to use the name of the current Exchange beginning with a lowercase letter.
 rawValue = TS.projects.foundations.globals.taskConstants.TASK_NODE
.parentNode.parentNode.parentNode.referenceParent.parentNode.parentNode.name
parameterValue = rawValue.toLowerCase()
For Timestamp
  • @BeginCurrentMinute: This will instruct the Bot to use a timestamp at the beginning of the current minute.
 parameterValue = 
Math.trunc((new Date()).valueOf() / 
SA.projects.foundations.globals.timeConstants.ONE_MIN_IN_MILISECONDS) * 
SA.projects.foundations.globals.timeConstants.ONE_MIN_IN_MILISECONDS
  • @EndCurrentMinute: This will instruct the Bot to use a timestamp at the ending of the current minute.
 parameterValue = Math.trunc((new Date()).valueOf() / 
SA.projects.foundations.globals.timeConstants.ONE_MIN_IN_MILISECONDS) * 
SA.projects.foundations.globals.timeConstants.ONE_MIN_IN_MILISECONDS + 
SA.projects.foundations.globals.timeConstants.ONE_MIN_IN_MILISECONDS - 1
Initial Values
These are the Initial Values for API Query Parameter configuration:
 {
    "codeName": "",
    "isString": false,
    "isOptional": false,
    "description": ""
}
Examples
This is a list of properties featured by the API Query Parameter configuration. Expanding a property shows sample values for the property extracted from the current Workspace.
API Query Parameter Menu
The API Query Parameter node has the following Node Menu items:
The Configure menu item has the following properties:
  • action: Configure
  • actionFunction: uiObject.configEditor.activate
  • label: Configure
  • iconPathOn: configuration
  • iconPathOff: configuration
The Delete menu item has the following properties:
  • action: Delete UI Object
  • actionProject: Visual-Scripting
  • askConfirmation: true
  • confirmationLabel: Confirm to Delete
  • label: Delete
  • iconPathOn: delete-entity
  • iconPathOff: delete-entity
  • actionFunction: payload.executeAction
API Query Parameter Attaching Rules
The following are the Node Attaching Rules that govern the attachment of API Query Parameter with other nodes:
Compatible Types: