Changes

Jump to: navigation, search

Workflows Overview

2,570 bytes added, 20:19, 23 May 2019
Task Type: Web Service - RESTful Request
===Task Type: Web Service - RESTful Request===
This workflow task type is used to consume a RESTful web service using GET or POST method.
 
====GET RESTful Web Service Request====
POST method is used to send data to a RESTful web service.
 
[[File:RESTful_GET.PNG|500px]]
 
GET RESTful Web Service Request have the following settings:
 
:* '''Endpoint''' - resource of the web service
:* '''Request Header''' - additional instructions sent with the request. These might define the type of response required or the authorization details.
:* '''Store Response To Field''' - [[Custom_Fields|Custom field]] where the response will be stored.
:* '''Store Response to SmartFolder''' - [[SmartFolders|SmartFolder ID]] where the response file will be stored.
 
====POST RESTful Request====
POST method is used to send data to a RESTful web service.
 
[[File:RESTful_POST.PNG|500px]]
 
POST RESTful Web Service Request have the following settings:
 
:* '''Endpoint''' - endpoint of the web service
:* '''Request Body''' - data sent with the request.
:* '''Request Header''' - additional instructions sent with the request. These might define the type of response required or the authorization details.
:* '''Store Response To Field''' - [[Custom_Fields|Custom field]] where the response will be stored.
:* '''Store Response to SmartFolder''' - [[SmartFolders|SmartFolder ID]] where the response file will be stored.
 
====Credentials of the Web Service RESTful Request====
<!--89397 - Workflow Task Type: Web Service - RESTful Request -->
Credentials of the web service can be added in the Request Header in the format: Authorization=Basic [base64 encoded credentials].<br/>
A third party software can be used to convert the username/password to a base64 encoded credentials.<br/>
Note that all equal signs within the base64 credentials should be replaced with %3D.<br/>
Example:<br/>
FROM: Authorization=Basic c3NcUyVzZXI6SzhAtHVuY2g'''='''<br/>
TO: Authorization=Basic c3NcUyVzZXI6SzhAtHVuY2g'''%3D'''
 
 
====Parsing JSON response====
<!--67458 - Add GET/POST REST services workflow tasks that are compatible with JSON-->
Variable syntax is available to parse and retrieve values from JSON format data.<br/>
''Sample 1''
<pre>data: {"firstname":"John"}
variable syntax: @json.FIELD_NAME.firstname@
result: John
</pre>
''Sample 2''
 
<pre>data: {"primarycontact":{"firstname":"Thomas"}}
variable syntax: @json.FIELD_NAME.primarycontact.firstname@
result: Thomas
</pre>
''Sample 3''
 
<pre>data: {"users":[{"firstname":"Marie"},{"firstname":"Eve"}]}
variable syntax: @json.FIELD_NAME.users.[# ~firstname~, #]@
result: Marie, Eve
</pre>
===Task Type: Translate Field Value===
Smartstaff
1,385
edits

Navigation menu