Exercise 29.2 - Organizing Requests in Collections:

This is the second hands-on exercise to learn about the Syndeia RESTful Integration capability introduced in Syndeia 3.6.

In this exercise, we will use the open-source SpaceX Data REST API that provides endpoints to fetch data about SpaceX rockets, launches, ships, star links, and other missions.

Objectives

The learning objectives of this exercise are as follows:

  1. Add multiple Requests to a RESTful repository in the Syndeia Dashboard

  2. Create Collections

  3. Organize Requests in Collections

  4. Clone and Edit Requests

Preparation

This exercise assumes that the student has done the following preparations.

  1. Reviewed the content presented in Introduction to REST APIs and Syndeia RESTful Integration

  2. Able to access Syndeia Cloud 3.6 with a valid user account

  3. User account in Syndeia Cloud 3.6 has RESTFUL WRITE permission (contact Syndeia Cloud admin to verify)

  4. Successfully completed the first tutorial - Exercise 29.1 - Adding your first RESTful Repository and Request.

Exercise

The first tutorial included step-by-step instructions to create a new RESTful repository and add a new Request. This tutorial includes step-by-step instructions to create multiple Requests and organize Requests in Collections.

1/ The Request to get all payloads is similar to the one to get all rockets. So, we will clone the Get all Rockets Request and modify it. Right-click on Get all Rockets and select Clone Request…

Figure 1: Clone the Get all Rockets Request

2/ In the Update Request form that opens, update the following fields as specified below.

  • Name = Get all Payloads

  • Description = Request to get all Payloads

  • URL = Replace rockets with payloads in the URL path, as shown below.

Click on the Test button to verify the new Request. If the Request is successful, the Response should be shown with no errors.

Figure 2: Update name, description, and URL to create a new Request to get all payloads

3/ Click on the OK button to create the Request, then expand the newly created Get all Payloads Request on the RHS. Syndeia will send the Request and if successful, the Response will be shown under the Request.

As shown in the figure below, the Response includes data for 136 payloads. Expand the first payload, as shown in the figure below. You will see a payload with payload_id FalconSAT-2.


4/ In this step, you will create a new Collection. Right-click the SpaceX Data repository and select New Collection…

Specify the Name and Description for the new Collection, as shown in the figure below. Click on the OK button.

Collections are logical grouping of Requests. A Collection typically includes many Requests. A Request can be in multiple Collections. Collections can be created based on different criteria, such as:

  • Specific type of data or subsystem, e.g. all Requests related to Rockets are in a single collection

  • System development/lifecycle phase, e.g. all Requests related to Design versus Manufacturing vs Logistics

  • Frequency of Requests, e.g. Requests to run hourly, daily, weekly, or at project milestones

  • … and any other criteria


5/ Repeat the previous step to create another Collection with the following details.

  • Name = Payloads

  • Description = Requests related to Payloads

After successful creation, the new Rockets and Payloads Collections should be seen under the Default RESTful Request Collection.


6/ Now, you will add existing Requests to the two new Collections created in the steps above. Right-click Get all Rockets request and select Update Request... as shown in the figure below.


7/ In the Update Request panel, click on the Collections drop down. Check the Rockets Collection and uncheck the Default RESTful Request Collection, as shown in the figure below. Click on the OK button in the dropdown and then the OK button at the bottom of the window.

Since a Request can be a part of multiple Collections, you can check multiple Collections in the Select Collections drop-down.


8/ Repeat the step above for the Get all Payloads Request and add it to the Payloads Collection.


9/ Right-click and refresh the SpaceX Data repository. You should see the two new Collections - Payloads and Rockets, as shown in the figure below. Expand the Collections and you should see:

  • Get all Payloads Request under the Payloads Collection

  • Get all Rockets Request under the Rockets Collection


10/ Challenge - Follow steps 1-3 to create a new Request to fetch data for a specific Rocket with id falconheavy. The details for this Request are shown in the figure below.


11/ You should see that the Get Falcon Heavy Request is added. Expand the Get Falcon Heavy Request and verify if you get the same Response as shown in the figure below.


This is the end of the tutorial.

  • If you were able to complete all the steps in this tutorial successfully, Congratulations! You have successfully created multiple Requests and Collections, and learnt how to edit and clone Requests. You are ready for the next tutorial.

  • If you were not able to complete the steps in this tutorial successfully, feel free to contact us via our helpdesk. Our team will be happy to assist you.