Using GET Method With REST Service Integration
  • 14 Oct 2021
  • 2 Minutes to read
  • Dark
    Light
  This documentation version is deprecated, please click here for the latest version.

Using GET Method With REST Service Integration

  • Dark
    Light

Overview

The REST Service holds the configuration data which is shared between all calls to a service, including the base URL, authentication, and any custom headers. This service acts as a Folder, holding any number of REST Methods. Each REST Method defines an HTTP call that can be made to the URL defined in the REST Service. 

Example

In this example, create a simple Rest Service Integration with GET method. This example utilizes the API that tracks various information regarding the International Space Station (Visit Where The ISS At? for more details on the API).

  1. Begin by navigating to a Designer Folder and selecting CREATE DATATYPES/INTEGRATION. 

    Note
    Though it is possible to create a REST integration via Add REST Service Integration within the Integrations Folder, it is advised instead to create an integration within a Designer Folder. This allows the user more mobility with the project, should they wish to export/import the integration to another instance, as well as for ease of access purposes.
  2. Next, navigate to External Services > Add REST Service, and click CREATE. 

  3. In the resulting window, define the Service Name and paste https://api.wheretheiss.at/v1/ in the Service URL box and, if need be,  adjust the authentication settings
    Note
    This example does not require any additional authentication to work.
  4. Click OK to close and save. 

  5. Next, from the Folder for the REST Integration, select Add Method to Service from the bottom toolbar. 
  6. Begin by first naming the Service; then, type "satellites" into URL (Relative to Base); this will point the Service to a specific aspect of the API. 
  7. Click the drop down arrow for HTTP Method, and select GET
  8. Finish configuring the method by selecting JSON for Content Type
  9. When these parameters have been configured, select OK to save and exit the Method configuration. 

  10. Lastly, create a Flow to test the Rest Service Integration. 
  11. In the Designer Folder select CREATE FLOW on the Folder Actions Panel.

    2019-10-09_145003.PNG

  12. Then, name the Flow and select CREATE to proceed to the Flow Designer.
  13. In the Flow Designer, add the Service step from Integrations > My Integrations > REST Services category.

  14. Next, attach both the Done and Error paths to the End step.

Debugging

  1. Now select Debug on the top panel of the Flow Designer to test the Rest Service request.

  2. If properly configured, the Flow will follow the Done path. 
  3. To view the results of the REST service, select the Rest Service step and choose View Input/Output Data.
    Output Results 
    If the Flow runs successfully, it will return the expected data return of the satellite's name and NORAD catalog id, along with a Status Code of 200, and the data of the Headers from the GET call.


Was this article helpful?