Exercise 29.1 - Adding your first RESTful Repository and Request.

This is the first 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 a new RESTful repository in the Syndeia Dashboard

  2. Add a new Request to fetch data from the RESTful repository

  3. View and browse the Response to the Request

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)

Exercise

1/ Launch the Syndeia Dashboard and select the Repository Manager tab.

Figure 1: Repository Manager tab

2/ Right-click the RESTful repository type and select Add… to add a new RESTful repository, as shown in Figure 2 below.

Creating a new RESTful repository in Syndeia implies that you are connecting to an existing enterprise tool or service via its RESTful API.

Figure 2: Adding a new RESTful repository

3/ In the RESTful Repository Creation form, specify the following values for the fields.

  • Repository Name = SpaceX Data

  • URL = https://api.spacexdata.com/v3

  • Authentication Type = None

It is helpful to give meaningful names to your repositories so that you can easily identify them later. You can set the name field in the form above to another value.


4/ Click on the OK button to create the repository.


5/ You should see the new SpaceX Data repository listed under the RESTful repository type as well as on the RHS with a default collection named Default RESTful Request Collection.

Collections are logical groupings of Requests. You can use them to organize Requests. Think of them as folders except that a Request can be a part of multiple Collections. A default Collection is made available when you add a new RESTful repository.


6/ Right-click on the Default RESTful Request Collection in the Tree View and select New Request…


7/ You will see an empty form to create a new Request, as shown in Figure 8 below.


8/ In the Create Request form, specify the following values for the fields.

  • Name = Get all Rockets

  • Description = Request to get all Rockets

  • Method = GET (selected by default)

  • URL = https://api.spacexdata.com/v3/rockets

    • The URL for the RESTful repository (https://api.spacexdata.com/v3) with a forward slash (/) is already filled out.

    • You will add rockets to that URL path, as shown in the figure below.


9/ Click the Test button. Syndeia will send the request to the RESTful repository and if successful the response will be shown in the Response Test box, as shown in the figure below. The response is in the JSON format, which is the most common data format for RESTful APIs.


10/ Click the OK button to save the request. You should see a blue colored info message in the log window stating Request 'Get all Rockets' created (or existing definition updated) in 1 collection(s). The Request Get all Rockets should show in the RHS under the Default RESTful Request Collection. This request is a GET request and hence it is shown with a G icon.


11/ Expand the Get all Rockets request (G icon). Syndeia will send the request to the RESTful repository and if successful, the response will be shown under the request. In the figure shown below, the Request was successful and the resulting response includes data for 4 rockets.


12/ Expand Response from [GET ‘rockets’] (4). You will see data for each of the 4 rockets.


13/ Expand the data for the first rocket. You will see all the 23 key-value pairs. The name of this rocket is Falcon 1 (rocket_name) and the id of this rocket is falcon1 (rocket_id).


This is the end of the tutorial.

  • If you were able to complete all the steps in this tutorial successfully, Congratulations! You have successfully added your first RESTful repository to Syndeia and created your first Request. 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.