Skip to main content

REST Webservice

This service lets you make a call using Rest webservices with the GET, POST, PUT, DELETE or HEAD methods.

main

Method
GET, POST, PUT, DELETE or HEAD.

Resource Path
This is the Path of the resource you want to call (Do not include the protocol and server address).

JSON-Encoded data
Send data as a JSON object. You don't need to encode yourself the object, and 'content-type' header will be set to 'application/json'.

Headers
Lets you add some custom headers values.

Request data

  • If method is GET, data will be sent as query string in the url (i.e. https://server:port/action?param1=value1&param2...).

  • If method is POST, data (and files) will be added to the body request.

Transform response
This parameter lets you keep only a relevant part of the response, simplifying access to the information.

Consider the following JSON response:

{"result": True, "data": {"request_id": 12521}}

Accessing to 'request_id':

response['data']['request_id']

Providing response['data']['request_id'] to 'Transform response' has the same effect as doing the following statement from 'on_success' callback:

response = response['data']['request_id']

For this example, once the task is executed, response will equal to 12521, instead of the full object.

Upload/download
From File transfer tab, you can perform download operation, or upload 1 or various files.

Upload
file_transfer

By adding a new file to upload, you have to provide a parameter name, and an existing file path on agent.

Download
download

To download a file to a distant server, provide a valid agent file path. Settings 'streamed' to True allow you to send big file without loading it in memory.

Web service configuration
configuration

Request method
Let you set the request method: http or https. If you choose https, the following parameters are available. ssl_verification

Url
Define the base Url to call.

User
Define the User to log in and password.

XML response
xml_response

This tab handles cases in which the response in XML and transforms it into JSON.

XSLT file path
Here you can specify an XSLT file to use to transform the XML.