Menu

get

This command requires additional license.

Sends a GET request to the defined URL and creates a variable for the data received as a response.

If this command is evaluated by a user authenticated through Salesforce, a request directed to an URL in the salesforce.com domain of the user's organization (eg. eu1.salesforce.com) is supplied with the user's Salesforce session data, which should allow Salesforce to let the request through. System-generated variable "sfdcServer" has the user's organization's base URL as its value (eg. "https://eu1.salesforce.com/") and can be used to form proper URLs for these kinds of requests.

Please note that this Salesforce authentication feature does not work properly if the evaluating user is actually another user, such as an administrator, that has logged in as the evaluating user.

Child commands

  • addHeader
    Optional. Each of these child commands adds a header field to the GET request.

Attributes

var

Required
Value type
EL-evaluated
Yes String No
Defines the name of the variable that will hold the response data. The kind of value stored as this variable depends on the dataType attribute.
url

Required
Value type
EL-evaluated
Yes String Yes
Defines the URL the request is sent to.
username

Required
Value type
EL-evaluated
No String Yes
Defines the user name for the credentials included in the request. Both this and password have to defined if credentials are to be included.
password

Required
Value type
EL-evaluated
No String Yes
Defines the password for the credentials included in the request. Both this and username have to defined if credentials are to be included.
dataType


Required
Value type
EL-evaluated
No
String
Yes
Defines what kind of value the response data will be represented as. The resolved value should be one of the following:
  • file
    The response data becomes a File value.
  • json
    The response data is parsed as JSON into a value mirroring the JSON structure; most likely a Map or a Collection, those being what object and array in JSON convert to.
  • text
    The response data is converted into a String value.
If not defined, the "file" data type is used.

Restrictions

The get command may be evaluated up to 10 times within a single evaluation process. Additionally, the size of the response data may not exceed 10485760 bytes.

Examples

If the Salesforce data retrieval commands do not satisfy the need of external data sources, get may be of use. Remember to set the dataType attribute if you're not expecting to be get file data in the response.

<get var="dynaJson" url="http://that.dynamodomain.yep/dynamoweaver?what=giveData" dataType="json">

Comments

0 comments