Exercise Navigating the REST API Documentation
Data None
Overall Goal To show how to navigate the REST API documentation
Demonstrates How to make an example request

This exercise is a basic introduction into how you can find and use the FME Server REST API documentation to understand the methods and request and response formats that it supports. Whilst specific to FME Server it provides a good example of how an API's documentation can be used to understand how an API is constructed and how to interact with it.


1) Navigate to the FME Rest API Page

Now that you know the basic information on using the REST API, we can explore how to use it. The first step is to visit your homepage for the REST API. To find this, go to

http://<yourServerHost>/fmerest/

You may also access this same page through your FME Server. Simply, go to your FME Server homepage, locate the help button and click on the REST API button.

2) Find the API Methods

This page provides helpful resources when first learning the REST API. This includes sample calls you can make to FME Server. On the main toolbar click on the API Link.

3) Find the Health Check Method

Here, you can explore the various calls you can make to FME Server. Find the third category called health check and expand the call. You should see documentation similar to this.

This page outlines everything you need to know about the call and its potential. Click "Try it out!", this connects to your server and will provide a response to your call. However, before you receive a response you will have to connect to your server.

4) Authenticate with the API

Here is the message you should receive. You will be prompted for the server username and password. This is where you will have to request a token to complete your call.

Log In Details for FME Server:

Your instructor will provide you with the current username and password required by your FME Server instance, though a default password is provided below.

UserName Password
admin FMERocks2020

Next, click Get Token. Now, you should see the token in the top right-hand corner of the page.

Once you click "Try it out!" the call can now be made. After you have made a call to FME Server, you will receive a response from FME Server.

5) Find the FME Engine Status

As you review the different methods available you will see there a range of different operations that you can perform with FME and that these are all grouped into sections depending on the nature of the request.

For the next part of the exercise we want to find out about the FME Servers Engines. If you are not familiar with FME Server it does not matter, but these are the processing units that run the Workspace.

To find the request we need we can look under the Transformations: Transformation Manager section of the API documentation. We will use the first request shown below.

Engine API Request

6) Review the Response Content

The documentation will describe the information we expect back from the response as shown below. From reviewing the response object we can see that we should be able to get information on the Engines Build Number (version), and its host for example.

Transformation Response

Click on the Try it Out button again.

7) Review the Response

As before the request response will be shown and you should be able to see the fields from the above response class definition in the returned response. Can you see the build number and the platform information.


CONGRATULATIONS
By completing this exercise you have learned how to:
  • Use the API Documentation
  • Make sample requests to the FME Server