REST APIs are supposed to be easy to build and use – so why are they so complicated to figure out?
There’s a lot to think about when it comes to APIs. The different methods of authentication, error handling, security, and the coding required.
If you’ve ever felt intimidated by APIs and how to connect to your preferred application, we can help. Because ultimately, APIs can make you operate more efficiently, provide opportunities for automation, give you access to new data, and make your enterprise more agile.
With FME, you get all the benefits of APIs without ever having to code. It’s one of the most customizable solutions. Learn how to get started in this webinar.
3. Agenda
What we’re covering today.
● What is a REST API?
○ Benefits of using APIs
○ Reading API documentation
● FME Overview
○ Using APIs in FME
○ Transforming your API Data
● Authentication in APIs
○ Types of authentication used in APIs
● Automating API Workflows
○ Building no code web applications
○ Scheduling API workflows
● Q&A and Wrap Up
4. Why Use APIs?
Ever needed to download a report from an online service but were tired of manually
logging in and fetching the same data over and over again?
Users often want to access APIs so that they can:
● Automate manual processes
● Fetch the most up to date data
● Send data to the web
● Integrate applications
5. What is an API?
Application
Programming
Interface
APIs can be used to request specific data,
update records, or even delete records
programmatically.
6. Important API Terminology
● REST- a common type of API, has a uniform structure, uses a URL to
call a resource
● HTTP Method- determines the action you are using.
● Request Headers- gives context to the call. What data type is being
sent?
● Request Body- specifies the information to be modified, created, or
deleted
8. Benefits of REST APIs
Automatically send data to a
web service.
Create reports using the most up
to date data possible.
Integrate multiple datasets from
multiple services.
9. Accessing APIs with
No Code
How can you access an Application
Programming Interface without
programming?
Third party tools!
Third party tools can allow users to access
APIs without needing to write any code.
Today we will be discussing FME, however
the basics of accessing APIs will be the
same no matter what tool you use.
10. Connect
Data between
450+ systems
Extend
Capabilities with custom
connections, transformers,
R & Python
Run
Workflows locally or publish
to FME Server
FME Desktop
Quickly author repeatable, self-documenting data integration
workflows using an intuitive visual interface.
No coding required.
13. Powerful API Transformers
Typically most workflows in FME
begin with a Reader that
initiates the workflow.
However, since most APIs use
the HTTPCaller as the Reader.
The Creator is used to kick off
the workflow.
The HTTPCaller is where the
call to the REST API is
handled.
Most REST APIs return
JSON. JSON can be parsed
in the JSON fragmenter.
14. Traffic Data Demo
The Goal
I’d like up to date
traffic data tailored
to my commute
The Obstacles
I can look up this
information online
but I might get a lot
of unnecessary
information.
The Solution
I will use FME to get
the data directly
from the Drive BC API
The Result
Using FME I can get
a custom HTML
report with data
from my commute
17. Why API Authentication Matters.
Authentication: Verifies your identity before you can make a request.
Authorization: Verifies that you are allowed to make that request.
Authentication protects an API’s data, resources and functionality.
18. Authenticating with FME.
HTTP Authentication Protocols
● Basic: Sends credentials, unencrypted.
● Digest: Sends credentials, encrypted.
● NTLM: Like Digest, but more secure. Built for Windows.
Even More Ways to Authenticate….
● API keys: Sends a unique identifier for a app.
● Web Tokens: Sends a unique identifier for a user.
● OAuth 2.0: Gets app access, without sharing your credentials.
19. Web Connections
What are they?
● A safe and convenient way to store and reuse your connection parameters
● A secure, named container to use in your workflows
● Use with all supported authentication protocols
OAuth 2.0 Authentication and Web Services
● Register with Web Services from FME Desktop
○ Google Suite, Microsoft Sharepoint, Autodesk, Dropbox, Slack….
○ Custom connections
20. OAuth 2.0 Authorization
Using FME to log into your into web services, directly.
Creating a brand new Web Connection with OAuth 2.0
If we don’t ship it, create your own!
Tutorial: Creating Web Connections in FME Using OAuth 2.0
21. Where to Find Web Connections.
From Inside FME Workbench. From FME Hub.
22. Setting up the
HTTPCaller to use
Authentication
1. Select “Use Authentication”
2. Choose your Authentication Type
3. Enter your user parameters.
4. Start making API Calls
25. In this demo....
The Goal
Use the Movebank
database to
request and display
Bald Eagle
migratory patterns.
The Unknowns
How do you connect
and authenticate to
the Movebank API?
How can I format and
stream the data back?
The Solution
Use the HTTPCaller
Transformer to
connect to the API.
Use transformers to
parse and display the
response.
The Result
A workspace that
can connect to the
Movebank
database on
demand, to stream
back Bald Eagle
migratory area.
27. Automating API Driven Workflows
What if these workflows need to be run frequently?
Avoid manual effort and automate them!
● Schedule jobs that need to run frequently
● Run in response to events in real time
● Create apps to run jobs on-demand
28. Build
Schedules, applications and
automations using a visual
interface
Scale
To process massive
amounts of data
Eliminate
The effects of data gravity
by deploying engines close
to the source
FME Server
Scale up processing power on-prem or in the cloud, and
enable event-driven automations using a web user interface.
29. Web Connections on FME Server
● When uploading a Workspace to FME
Server, you can also choose to publish
any web connections used within it
30. Web Connections on FME Server
● Once published, web connections
can be managed on FME Server
similarly to managing within
Workbench
34. No Code Web Apps to Connect to APIs
Allow end-users to run workflows on-demand
- Get the data you need when you need it
Customize requests with User Parameters
35. Create a Server app that calls an API
Building an App in FME Server is a simple process with no coding needed!
Simply choose your Workspace...
… and customize your App
36. Tips
- Published parameters can be used to get user input for the API calls you make. Two
particularly useful parameter types are:
- Web Connections: Change the credentials the workflow will use
- Geometry Parameter: Select a location on a map to pass into the workflow
37. In this demo...
The Goal
Create an easy to
use App to allow
users to download
data from the US
Census API
The Obstacles
My users don’t have
FME Workbench to
run the workspace
I’ve built.
I don’t have time to
write code to build
this App
The Solution
Use an FME Server
App to give users
access to run this job
to download the
data they need when
they need it.
The Result
Created a simple
web app where my
users can select a
location on a map
and download data
for that area from
the US Census API
39. Important Considerations when
connecting to an API
● REST APIs can be deprecated or updated. Try getting on an email list for
developers if you rely on the resource.
● Authentication can change and passwords can expire
● FME Server can be used to alert you if a job fails due to a change in the REST API
40. Try it yourself!
Download FME Examine the API
documentation of
your chosen resource
Try creating your own
workflow using our
templates
Free Trial | Upgrade
41. Resources
● Getting Started with REST APIs
● FME Server REST API Training
● FME Hub
● Creating Web Connections
● The Ultimate Guide to APIs
42. Come one, come all from May 4 - 14! Discover tips & tricks, the
newest updates, and innovative ways to use FME.
FME World Fair 2021
safe.com/world-fair