Make a call to RESTful API Web Services to retrieve or send data such as JSON data, documents, images, and so on.



Options


Method: Select type of request from dropdown list (GET, POST, etc...)

Url: The address of the endpoint. Can make calls back to the Blue Relay server to access datasets using the Blue Relay API format. Ex: "http://127.0.0.1:8080/BlueRelayApi/dataSet/61/row"


Content: Request body as expected by the Service endpoint. Can be in raw/JSON or form data format.

  • Raw/JSON format:
    • { "foo" : "bar" }
    • { (( #foo )) : (( #bar )) }
  • Form Data format (to send a Blue Relay file as the request body):
    • {"api_token": {"value": "7f227fe4e8ea052e4407b8a5edfe5dc6", "type":"TEXT"}, "file": {"value": "((#item.id))", "type":"FILE"}}


Headers: Optional. Used to specify network call headers. In JSON format. (Example: { "content-type" : "json" })

Success Callback: Optional. Call another created Event in Blue Relay after 

Error Callback: Optional. <explain that we can trigger other events or do advanced >





Examples:


How to send a Blue Relay file to a webservice endpoint:


This sends the file/item in context of the event to the endpoint below.

Any response from the endpoint can be captured in a response file.



Update a Blue Relay dataset row:

The following web service call uses the attributes from an item (in context of the event) and updates a dataset row with the attribute values.




How to upload a Binary Image file:

TBD


Formatting examples for Content field

  • Raw/JSON format:
    • { "foo" : "bar" }
    • { (( #foo )) : (( #bar )) }
  • Form Data format (to send a Blue Relay file as the request body):
    • {"api_token": {"value": "7f227fe4e8ea052e4407b8a5edfe5dc6", "type":"TEXT"}, "file": {"value": "((#item.id))", "type":"FILE"}}
  • Blue Relay Dataset Example (to update a data set):
    • {"cells":{"Name": "((#item.attributes.get("Campaign Name").value))", "Plan Year":"((#item.attributes.get("Year").value))"}}