12
Building a REST API Interface With FME Nicholas Ranicar Front Point Consulting

Building a REST API Interface With FME

Embed Size (px)

Citation preview

Page 1: Building a REST API Interface With FME

Building a REST API Interface With

FMENicholas Ranicar

Front Point Consulting

Page 2: Building a REST API Interface With FME

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.

Page 3: Building a REST API Interface With FME

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.

Page 4: Building a REST API Interface With FME

The Challenge

Page 5: Building a REST API Interface With FME

How can we turn…This… Into this?

Page 6: Building a REST API Interface With FME

The Process

Page 7: Building a REST API Interface With FME

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

Page 8: Building a REST API Interface With FME

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

Page 9: Building a REST API Interface With FME

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": []

}}

Page 10: Building a REST API Interface With FME

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

Page 11: Building a REST API Interface With FME

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

simplify complex workspaces• Re-useable across multiple workspaces

Page 12: Building a REST API Interface With FME

Thank you!

Nicholas [email protected]