REST Webservice
This service allows to call Rest webservices using GET or POST method.
Method
GET or POST.
Resource Path This is the Path of 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
Let you add some custom headers values.
Request data
Click add parameter button to add a new parameter:
-
If method is GET, data will be sent as query string in the url (i.e. https://server:port/action? param1=value1¶m2…).
-
If method is POST, data (and files) will be added to the body request.
Transform response
This parameter let 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, one the task executed, response will be equals to 1252, instead of the full object.
Upload/download
From File transfer tab, you can perform download operation, or upload 1 or various files.
Upload
By adding a new file to upload, you have to provide a parameter name, and an existing file path on agent.
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
Request method
Let you set the request method: http or https.
If you choose https, the following parameters are available.
Url
Define the base Url to call.
User
Define the User to log in and password.