Video Screencast Help

Http Post

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 post command to a server and returns the response in a 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

Configuration
Input Value Name Input Value Data Type Req'd Example Format Explanation
Url String Yes http://www.example.com/Upload 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.
Request Data String No   The string entered here (as a variable, constant, text merge or embedded model output) will be uploaded to the server as the body of the HTTP POST.
Response Result Name String Yes responseResult This is the name of a string variable into which the results of the call are saved.
General
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 user's credentials. Define Custom permits the credentials to be specified in the component.
Domain String No example.com 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 string variable named in "Response Result Name" that contains the data returned by the call.

Connection information

URL: A standard url, including http, server address, port numbers, resource path and parameters conforming to rfc3986. [Does this component automatically provide url encoding for reserved characters or does the user have to do that?]

Component settings

None

Use case

Make a RESTful API call

One use of this component is requesting a service from a server using a RESTful API. For example, to execute a saved search in Splunk.

Request to Start a Search

The URL would be composed as follows:

http://splunk.example.com/saved/searches/searchName/dispatch

  • splunk.example.com is the address of the splunk server where the search is saved.
  • /saved/searches/ identifies what kind of object you want to access, in this case, saved searches.
  • searchName is the name of the saved search that should be executed.
  • /dispatch indicates that the search should be started.

Additional parameters for the request would be specified in "Request Data". For instance, to suppress actions that are normally triggered when this search runs, the following string would be sent in "Resuts Data":

trigger_actions=0

The Result

The result of the request will be stored into the variable named in "Response Result Name". The value stored there may be checked for errors or success of the request. In the case of an error, a system administrator might then be notified that there is a 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.]