Video Screencast Help
As we strive to continually improve your experience on our site, please help us by taking this survey and tell us about your satisfaction level using Symantec Connect. One lucky winner will receive 500 Connect points! * Take the survey.

Http Get

Created: 13 Jun 2012 • Updated: 21 Jan 2013
Language Translations
Collaborators: SymantecWorkflowTeam, Chan Eil Fhios
SymantecWorkflowTeam's picture
0 0 Votes
Login to vote

Component definition

This component sends an HTTP get command to a server and returns the response in a file or string. It can be configured to provide authentication credentials for secure servers as well.

Component icon

[Insert component icon Image file here.]

Definition of component input value or values

Input Value Name Input Value Data Type Req'd Example Format Explanation
Url String Yes The URL for the resource to get. This includes the address, file path and any parameters using standard URL formatting. This may be a variable, a constant, or the output from a Text merge or embedded process model.
Response Result Type ResponseType Yes File, Text Determines if the result of the http get should be stored in a string or saved to a file.
File Name String * example.txt The name for the file to which results will be saved. This is only available/required if "Response Result Type" is set to file.
Response Result Name String Yes responseText, responseFile Depending on the choice made in "Response Result Type" this is either the name of a variable pointing to the file named in "File Name" or a string to which the results are directly saved.

*When the field is required is described in the "Explanation" column.

Input Value Name Input Value Data Type Req'd Example Format Explanation
Use Credentials CredentialType Yes None, Default, Define Custom Credentials Indicates whether or not the send credentials in the http headers of the GET request. None passes no credentials. Default passes the current users credentials. Define Custom permits the credentials to be specified in the component.
Domain String No Specifying domain restricts the credentials to be sent only to that domain, otherwise, the same credentials will be sent to every credential request received on the call (in the case of redirects, for example). This option is only available if "Use Credentials" is set to define custom credentials.
User Name String * jdoe A user name recognized by the service being accessed by this call. This option is only available/required if "Use Credentials" is set to define custom credentials.
Password String * ******* A password assigned to the user name entered in "User Name". It will be provided by the service being accessed by this call. This option is only available/required if "Use Credentials" is set to define custom credentials.

*When the field is required is described in the "Explanation" column.

Definition of component output value or values

Returns a variable named in "Response Result Name" that either points to the file into which the results were stored or a string containing the actual data returned by the call.

Connection information

URL: A standard url, including http, server address, port numbers, resource path and parameters conforming to rfc3986.

[QUESTION: Does this component automatically provide url encoding for reserved characters or does the user have to do that?]

Component settings


Use case

Make a RESTful API call

One use of this component is requesting a service from a server using a RESTful API. In this example, we will retrieve the results of a saved search in Splunk that lists the response times for a web service.

Requesting the Results

The URL would be composed as follows

The parts of this url (see Splunk documentation for more information) are:

  • is the address of the splunk server where the results are saved.
  • /searches/jobs/ identifies what kind of object you want to access, in this case, search jobs.
  • mysavedsearchID is the identifier associated with the job you wish to retrieve results for.
  • /results identifies what information you want to get for the specified search job. In this case, the results.
  • ?output_mode=csv indicates that you want the results returned in csv format.

Providing Credentials

Splunk requires user credentials in order to access the RESTful api. To do so, go to the "General" tab and set "Use Credentials" to define custom credentials. Then enter the user name and password of a user defined within splunk into "User Name" and "Password" respectively. It is generally not necessary to specify the domain.

Getting the Results

If the result is expected to be a large amount of data or needs to be shared with another system then it might be appropriate to choose "File" in "Response Result Type". Otherwise, it's probably easiest to simply store the results into a string named in "Response Result Name" so that you can process the results later in the flow.

As this is a .csv result we will save to a file and then use the .csv file parsing component to parse the results for additional processing. For example, to look for response times that exceed maximum limits and starting a workflow to alert system administrators about the problem.

[Example 2]

[Describe the use case. Insert screen shots or package files. Insert a description of how the settings are configured. Insert additional information about the use case that you are submitting.]