Using a REST Client Tool to Test Calls

Now that you understand what the REST API is and how the calls and responses work; it's time to start interacting with FME Server.

For the purposes of this training course, we will use an external tool named Postman which can be downloaded here: https://www.getpostman.com/apps (this is already on the training computers).


Why use a REST Client tool?

A REST Client is a medium to practice calls with. The client accepts the REST calls and will communicate directly with a web service. There are several reasons why a user will use a REST Client tool:

  • Easy to use interface to input calls
  • Save the calls and use them later
  • Can generate code snippets from the calls to use in applications

It is often easier and quicker to test the API integration externally to FME to prototype the requests and responses with a given test case. Once you know a request is working it can be transferred to FME and also typically parameterised using attributes from features within the workflow.

PostMan:

PostMan is a software tool that allows a user to build API requests and then send those to a test server it makes it easy to create POST body content, set Headers and test authentication.

Some advantages of PostMan include;

  • Send Requests and View Responses
  • Create and execute any REST, and SOAP queries from within Postman.
  • Send any type of request in Postman. Create and save custom methods and send requests with the following body types:
  • URL-encoded—The default content type for sending simple text data
  • Inspect Responses
  • View the status code, response time, and response size.

Police API Example

Ricky RESTless says...
I use Postman to test calls before using them in the HTTPCaller Transformer in FME Workbench, this way I can ensure the call works before integrating it into my Workspace.