API Pull Data Node

      API Pull Data Node


        Article summary

        API Pull Data Node

        The Pull Data node allows the user to GET, POST or PATCH payloads to an API endpoint, providing on-demand access to API data. It will return the result for the API called.

        Adding a Pull Data node to your workflow

        1. First, select your desired solution and navigate to Rayven Workflow.
        2. Select ‘Inputs’ from the left-hand panel.
        3. Find the Pull Data node and drag it onto the canvas.
        4. Double click on the Pull Data node to open its configuration window.


         

        Configuring a Pull Data node

        1. Give your node a name. Choose something simple that clearly explains its purpose. You must pick a name that has three or more characters.
        2. Enter the API URL endpoint from which you want to push or pull data.
        3. Select an HTTP Method from the drop-down menu. The options are GET, POST, and PATCH.
        4. Enter the format for the payload the endpoint will return.

        Advanced Features

        1. You can add a predetermined string to your request as a Bearer Token to get an approved response. This token functions similarly to a password.
        2. If you want JSON object results returned in a new field, enter a new name under Result To Field.
        3. You have the option to choose a URL Encoded Form.
        4. Rayven supports JSON and x-www-form-encoded formats. When using POST or PATCH methods, you should provide a JSON object. Under Body, use<<_deviceid_>> as a placeholder for the Device Code. Use [[Field Name]] as a placeholder for the JSON value.
        5. If using POST, specify whether the node should send the fields set out in the Body field or the entire JSON payload under POST JSON.

        Configuring Headers

        GET and POST methods require key and value pairs. You can configure these under Header 1. Enter additional keys using the ⊕ button.

        Cookies

        You will need to configure cookies when connecting to external servers that demand cookies data as identification. Add additional cookies using the ⊕ button.

        1. Enter the key name for the cookie. 
        2. Under Payload Field Name, enter the value to send in the cookie. 

        Payload Date Settings

        You can configure data timestamps based on when data arrives from a device. You will need to define the following three fields and ensure the device has a time zone applied:

        1. Under Date Field Name, enter the name of the date field in the device payload.
        2. Define the Date Format, for example, dd/MM/yyyy or HH:mm:ss. If data is in a 24-hour format, make sure you capitalise the hour letters (i.e. HH:mm:ss).
        3. Select the Timezone for the device from the drop-down list.


        Authentication Settings

        Enter the User Name and Password required to access the API.

        Activation

        Once you have configured the node, click 'activate' and then 'save'. The node is now ready to send data into the workflow.


        See Also: Adding devices

        As of Release: 17.11.2021


        What's Next