Building a REST API Interface With FME
-
Upload
safe-software -
Category
Technology
-
view
38 -
download
0
Transcript of Building a REST API Interface With FME
![Page 1: Building a REST API Interface With FME](https://reader031.fdocuments.us/reader031/viewer/2022021921/58e7e45c1a28abbc0b8b4a7d/html5/thumbnails/1.jpg)
Building a REST API Interface With
FMENicholas Ranicar
Front Point Consulting
![Page 2: Building a REST API Interface With FME](https://reader031.fdocuments.us/reader031/viewer/2022021921/58e7e45c1a28abbc0b8b4a7d/html5/thumbnails/2.jpg)
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](https://reader031.fdocuments.us/reader031/viewer/2022021921/58e7e45c1a28abbc0b8b4a7d/html5/thumbnails/3.jpg)
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](https://reader031.fdocuments.us/reader031/viewer/2022021921/58e7e45c1a28abbc0b8b4a7d/html5/thumbnails/4.jpg)
The Challenge
![Page 5: Building a REST API Interface With FME](https://reader031.fdocuments.us/reader031/viewer/2022021921/58e7e45c1a28abbc0b8b4a7d/html5/thumbnails/5.jpg)
How can we turn…This… Into this?
![Page 6: Building a REST API Interface With FME](https://reader031.fdocuments.us/reader031/viewer/2022021921/58e7e45c1a28abbc0b8b4a7d/html5/thumbnails/6.jpg)
The Process
![Page 7: Building a REST API Interface With FME](https://reader031.fdocuments.us/reader031/viewer/2022021921/58e7e45c1a28abbc0b8b4a7d/html5/thumbnails/7.jpg)
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](https://reader031.fdocuments.us/reader031/viewer/2022021921/58e7e45c1a28abbc0b8b4a7d/html5/thumbnails/8.jpg)
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](https://reader031.fdocuments.us/reader031/viewer/2022021921/58e7e45c1a28abbc0b8b4a7d/html5/thumbnails/9.jpg)
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](https://reader031.fdocuments.us/reader031/viewer/2022021921/58e7e45c1a28abbc0b8b4a7d/html5/thumbnails/10.jpg)
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](https://reader031.fdocuments.us/reader031/viewer/2022021921/58e7e45c1a28abbc0b8b4a7d/html5/thumbnails/11.jpg)
Use transformers in a workspace• Wrapping the API in custom FME transformers can
simplify complex workspaces• Re-useable across multiple workspaces