Search

Rest API

Articles

The REST API node allows the user to send and receive the JSON request using the Different http methods such as GET, PUT, POST, DELETE etc.

Image description

  • REST API node is used to call API’s in web applications, instead of doing web automations.
  • It is faster than the web automations.
  • It runs in either jiffy server or client depending on the defined configuration.

If the REST API input/output contains any file-type other than JSON/XML, the REST API node cannot handle it. To handle those scenarios, use python functions

Setting Up Rest API Configuration

  1. Select any existing configuration if it matches the criteria of the user or create a new configuration.

    Image description

    The user can also edit or copy the existing configuration by clicking on the Edit and Copy icons displayed against each configuration, respectively.

  2. Click on the New Configuration radio button to create a new configuration if required.

    Image description

    Provide the following details:

    • Configuration Name: Type a unique configuration name.
    • Protocol : Specify http or https
    • Server URL : Provide Server URL.
    • Port : Provide the port no through which API connection to be established to the server.
    • Run on: The user can either select the following options from the Run on list box that allows the user to specify the location from where the Email needs to be triggered:
      • JIFFY SERVER: Email gets triggered from the jiffy server.
      • CLUSTER: In case Jiffy server does not have internet connection or not able to access the specified website, then the CLUSTER option can be used.
    • User Name: Type the Email address from which the Email s must be browsed.
    • Password: Type the password of the Email account.
  3. Click on the CREATE button and then click on the SAVE button when the provided details are successfully validated without any error.

Choosing File Option

Designer must choose either of the 2 types of files template (XML or JSON) option in the files tab.

Image description

The user can also edit or copy the existing XML or JSON template by clicking on the Edit and Copy icons displayed against each template, respectively.

User can also delete the existing template by clicking on the ‘X’ icon against each templates.

Properties Of RestAPI Node

Image description

  1. Name: Name of the node. A default name is displayed in this field, which the user can edit according to the task and the intent of using the node.
  2. Description: A short note on the purpose of the node.
  3. Version : Version no
  4. Method : There are 4 methods ( GET, POST, PUT DELETE) Respective methods type to be chosen and corresponding paths , outputs etc to be provided based on the type of methods chosen upon the requirements.
  5. Path: Is a unit of a REST API that the user can call. The variable in the provided path can be passed from any previous node. The variable name must be passed in the format of \${}. For example: /api/documents/pathId?path=\${path}
  6. Request Header:  Headers data for authenticating the API call. The user must give proper name and separate the given names with comma. This data is used for REST API input mapping.
  7. Response Content Type: Select either JSON or XML option according to the REST API input/output.
  8. Input Template: Select the input template as JSON or XML according to the input format of the REST API. The structure of JSON/XML must be uploaded in Jiffy templates. Applicable only for POST and PUT methods.
  9. Output Template: Select the output template as JSON or XML according to the required output format of REST API. The structure of JSON/XML must be uploaded in Jiffy templates.
  10. Mark run Failure on Node Fail: When the Mark run Failure on Node Fail field is ON, if the node execution fails then the complete task execution is marked as fail.
  11. Continue even without match?:
Did you find what you were looking for?