Knowledge: DataAction - REST
Back
    Title*DataAction - REST
    ManualAdministration
    Manual Level TwoData Actions
    Manual Level ThreeREST
    Created02/09/2024
    Detail

    REST data actions are used to GET or POST data to third party external application, the response of which can be either JSON or XML.

    There are 2 data action types dedicated to REST:

    1. REST - Using no credentials, hard coded manual ones or ones constructed from pre-execute data actions.
    2. RESTOAuth - Accesses a managed API service e.g. iManage or Office365, where an OAuth access token is used.

    Outside of the authentication both data actions are very similar.

    When setting up an OAuth data action you will need to pick the OAuth Type.  Please see articles specific to OAuth configuration or for non OAuth REST calls see various authentication articles.

    When setting up the REST call you need to either add the Target or URL Endpoint:

    • OAuth data actions usually prefix the base URL, so you just need the Target after e.g. libraries/active/workspaces.
    • Non OAuth data actions require full URL e.g. https://www.example.com/getusers

    You can used any variables from the Form you have added as Input Mappings.  These are in the format of [!InputName!] so if wanting to find a specific user and had a Input Mappings called Email, you would construct a URL something like https://www.example.com/getusers?email=[!Email!].

    If the value you want to pass is not in the correct format, you can always use a calculated field to format it correctly on the form and use that as the input value instead.

    Data Actions default to GET method unless an Additional Setting in mappings is added to set the Method to POST or another valid value.  Note most POST methods require a specifically constructed body, so please discuss this with Sysero for more information on how to construct this data action.

    Data can be returned from REST API in either XML or JSON.  If JSON is returned use the Addtional Setting mapping JSON = True.  This will convert the JSON to XML so it can still be manipulated in Output mappings.

    The NodeXPath can also contain Input Mappings in same format of [!InputName!], the node XPath is a value like //result which would contain e.g. all <result> nodes.  From which Output Mappings can then be used to access indvidual nodes e.g. if <result> has one called <email> you could just put email to return the email value.  If email was an attribute of result e.g. <result email='me@example.com'> you would put @email as the Output value name.  If you want to do more complex xpath 2.0 using more advanced functions, then prefix the Output value with #.

    REST data actions can be cached if recalling common similar data, but this cannot be used with certain requests.  Please discuss caching requirements with Sysero before enabling.

    There are a number of other advanced settings this article does not cover, some of which maybe covered in seperate KB articles.

    Privacy Policy
    Cookies help us to improve your user experience. By using this site you consent to cookies being stored on your device. Read more...
    View or hide all system messages