Skip to content

QConSP 2018 Challenge

Marcelo Aguiar Rodrigues edited this page May 8, 2018 · 2 revisions

This is the tutorial for the challenge at QConSP 2018. Complete the challenge to win prizes.

If you are inr a hurry, check out section 6 ;)

Begin

At QCon 2018 Conductor Tecnologia made avaliable a demonstration of Heimdall, it's API orcherstrator. The challenge website is listed below.

Check out http://demo.getheimdall.io/


1. Login

At start page use the credentials below to login.

  • Username: admin
  • Password: admin

2. Creating a API

After loggin in you will land in the main Heimdall page. Here there is a list of all the API's registered to the system. The left side menu shows Heimdall's main functionalities. You can use the arrow at the bottom left to expand the menu and have a more detailed description of the menu symbols.

At this point let's focus on the API creation. Make sure you are at the API section. At the bottom right corner of the screen you will find the Add new API button. By clicking that you are redirected to the API creation page. At this page you will define the name, version, description and basepath for your API (remember this path, you will need it to test your work). You can also define the Status of your API, as we are nwo creating a API that we want to use leave the Status as "active". Now you can also set a Environment for your API. For the porpouse of this QConSP 2018 challenge a default Environment is already avaliable.

After filling all fields and selection the Environment hit Save. A success message should popup and you will be redirected back to the API listing page where your new API should appear.


3. Creating a Resource

Now that we have a API let's create a Resource for it.

Select the API you created by clicking the View button. You will be redirected to a sumary of your API. In this page you can also make changes to your API. Now we don't need to alter anything and we can go directly to the Resource creation.

Click the Resources tab and a message that reads You don't have resources in this API* should appear. Click the Add Resource button. The Resource configuration panel will appear and on it you can define a name and a optional description to the Resource. Click Save when you are done and the new Resource should show on your screen.

Any Resource can be deleted or edited by using the buttons on the right.


4. Creating a Operation

A Operation is always created as a part of a Resource. To create a new Operation click the new Resource you just created to expand its options and the Add Operation button will be shown.

At the Operation configuration panel you should choose the HTTP method that will be used and the path to the Operation. A optional decription can also be added.

For the pourposes of this challenge select the GET method and define a path (remember this path, you will need it to test your work). Save your Operation and you will be redirected back to the Resources listing but with your new created Operation.


5. Create a Interceptor

With a created Operation we can add a Interceptor to it. In order to do that select the Interceptors tab. To add a Interceptor first you need to select a Resource. Select the Resource you created at section 3. New you can select which Operation you wan the Interceptor to handle. In our case we can select the Operation we just created or leave this option at default "All" since we have only one Operation.

The Interceptor list is interactive. To add a Interceptor to a Request or a Response just drag and drop the Interceptor to the respective area.

For this challenge we will use the "MOCK" Interceptor. Drag and drop the MOCK to the Request area and the configuration panel will show. Here fill the name of the Interceptor. The lifecycle we want is the default Operation. At the Content we can modify the field body with a personalised message. Change the "Example mock" message to something you want to show, something like "Heimdall rocks". Leave the status as 200 and save.

Important: at this point the Interceptor is still no registered. To register it scroll down to the and of the page and hit "Save Changes".


6. TL;DR

  1. Login

    • Login using username/password -> admin/admin
  2. Creating a API

    • Click Add new API and fill all fields
    • Remember the basepath, you will need it later
    • The Environment should be registered for QConSP 2018
  3. Creating a Resource

    • At the API list choose your API
    • Click the Resource tab
    • Click Add new Resource
    • Set a name for the Resource and hit save
  4. Creating a Operation

    • Click Add Operation
    • Select the GET Method
    • Set a path and keep it in mind, you will need it later
    • Save the Operation
  5. Create a Interceptor

    • Click the Interceptors tab
    • Choose the Resource you created
    • Choose the Operation you created
    • Drag and Drop the "MOCK" Interceptor to the Request area
    • Set a name
    • At Content modify the "Example mock" for a personalised message
    • Save the Interceptor
    • Scroll down to the end of the page and Save Changes

7. Testing your work

Now its time to test your work. To do that you will need two pieces of information.

  • basepath - its thet basepath of the API
  • path - the path for the Operation

Now open a new tab on your browser and point it to https://gateway.getheimdall.io/basepath/path/ replacing the values to the ones you created.

Example:

Let the values be:

  • basepath = qcontest
  • path = mockoperation

Then your test should be: https://gateway.getheimdall.io/qcontest/mockoperation/


8. Thank You

Thanks for participating in this demonstration. Now have fun at the conference and visit http://getheimdall.io to download Heimdall and use in your future projects.

Clone this wiki locally