Building a REST API Interface With FME

Preview:

Citation preview

Building a REST API Interface With

FMENicholas Ranicar

Front Point Consulting

Hello!My name is Nic and I work as an independent consultant specializing in FME and ETL.

I love FME because it makes my life simpler and enables me to get outdoors faster!

I have lived and worked in Calgary for the past 10 years but (full disclosure) was employed by Safe Software for 8 years in Vancouver prior to moving to Calgary.

Building a REST API Interface With FME

There are a huge number of REST API's available for communicating with everything from publicly available websites to proprietary software. This presentation describes one approach for building an interface to a REST API for use with FME.

The Challenge

How can we turn…This… Into this?

The Process

Process• Understand the REST API• Build individual component custom transformers• Combine custom transformers for common tasks• Use transformers in a workspace

Understand the REST API• Do methods represent an underlying data structure?

API link

• How are methods / responses related?• Decide which methods to implement• Determine a test tool• Postman • Web browser + dev tools• Fiddler

Build individual component custom transformers• Transformer naming convention• Determine how to use FME to call a single API

method• HTTPCaller (URL, authentication)

• Implement results handling mechanism• Can result processing code be implemented in a custom

transformer?

• Implement error handling mechanism

{"responseStatus":{

"errorCode": "Not Found","message": "Could not find a project with URN '393' (Id '393') for your organization to retrieve.","errors": []

}}

Combine custom transformers for common tasks• Make useful components by combining individual

custom transformers for common tasks• Helps to abstract implementation details in case API

changes

Use transformers in a workspace• Wrapping the API in custom FME transformers can

simplify complex workspaces• Re-useable across multiple workspaces

Thank you!

Nicholas RanicarFront.point.consulting@gmail.com

Recommended