Upgrade to Pro
— share decks privately, control downloads, hide ads and more …
Speaker Deck
Features
Speaker Deck
PRO
Sign in
Sign up for free
Search
Search
Tools & Strategies for Consuming APIs
Search
Tonya Cooper
July 02, 2022
Technology
0
34
Tools & Strategies for Consuming APIs
Tonya Cooper
July 02, 2022
Tweet
Share
More Decks by Tonya Cooper
See All by Tonya Cooper
Custom Action Filters in ASP.NET MVC
tonyazen
0
110
Tools & Strategies for Consuming APIs V1
tonyazen
0
61
Testing_the_Endpoints_of_Your_REST_APIs.pdf
tonyazen
0
72
Other Decks in Technology
See All in Technology
さくらのクラウド開発ふりかえり2025
kazeburo
2
1.3k
MariaDB Connector/C のcaching_sha2_passwordプラグインの仕様について
boro1234
0
1.1k
AWSの新機能をフル活用した「re:Inventエージェント」開発秘話
minorun365
2
520
ESXi のAIOps だ!2025冬
unnowataru
0
440
人工知能のための哲学塾 ニューロフィロソフィ篇 第零夜 「ニューロフィロソフィとは何か?」
miyayou
0
190
[PR] はじめてのデジタルアイデンティティという本を書きました
ritou
0
240
re:Invent2025 セッションレポ ~Spec-driven development with Kiro~
nrinetcom
PRO
2
150
Strands AgentsのEvaluatorをLangfuseにぶち込んでみた
andoooooo_bb
0
100
ルネサンス開発者を育てる 1on1支援AIエージェント
yusukeshimizu
0
120
株式会社ビザスク_AI__Engineering_Summit_Tokyo_2025_登壇資料.pdf
eikohashiba
1
140
2025年のデザインシステムとAI 活用を振り返る
leveragestech
0
550
ハッカソンから社内プロダクトへ AIエージェント ko☆shi 開発で学んだ4つの重要要素
leveragestech
0
440
Featured
See All Featured
Organizational Design Perspectives: An Ontology of Organizational Design Elements
kimpetersen
PRO
0
46
Refactoring Trust on Your Teams (GOTO; Chicago 2020)
rmw
35
3.3k
Bioeconomy Workshop: Dr. Julius Ecuru, Opportunities for a Bioeconomy in West Africa
akademiya2063
PRO
0
34
Done Done
chrislema
186
16k
ラッコキーワード サービス紹介資料
rakko
0
1.9M
4 Signs Your Business is Dying
shpigford
187
22k
A designer walks into a library…
pauljervisheath
210
24k
What's in a price? How to price your products and services
michaelherold
246
13k
The B2B funnel & how to create a winning content strategy
katarinadahlin
PRO
0
210
Code Review Best Practice
trishagee
74
19k
Future Trends and Review - Lecture 12 - Web Technologies (1019888BNR)
signer
PRO
0
3.1k
JavaScript: Past, Present, and Future - NDC Porto 2020
reverentgeek
52
5.8k
Transcript
Tools & Strategies for Consuming APIs Tonya Cooper Quicken Loans
Software Engineer @tonyazen
Software Engineer Technology
None
None
third-party web • types • common components • integration tools
• coding strategies • communication • beer!
types
types rpc rest soap
rpc /GetAllBeers /GetBeer?beerid=001 rest /beers /beers/001
response types
[ { "Id": "1", "Name": "Red Eye Rye", "Style": "Rye",
"Abv": "6.7%", "BreweryId": "10003" }, { "Id": "2", "Name": "Poetic Pestilence", "Style": "India Pale Ale", "Abv": "11%", "BreweryId": "10004" }, …
<?xml version="1.0" encoding="ISO-8859-1"?> <root> <beers> <beer> <id>1</id> <name>Red Eye Rye</name>
<style>Rye</style> <abv>6.7%</abv> <breweryId>10003</breweryId> </beer> <beer> <id>2</id> <name>Poetic Pestilence</name> <style>India Pale Ale</style> <abv>11%</abv> …
a:1:{ s:5:"beers"; a:50:{ i:0; a:5:{ s:2:"Id"; s:1:"1"; s:4:"Name"; s:11:"Red Eye
Rye"; s:5:"Style"; s:3:"Rye"; s:3:"Abv"; s:4:"6.7%"; s:9:"BreweryId"; s:5:"10003"; …
[ { "Id": "1", "Name": "Red Eye Rye", "Style": "Rye",
"Abv": "6.7%", "BreweryId": "10003" }, { "Id": "2", "Name": "Poetic Pestilence", … format=json
if you want beer with SOAP… request response
<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.o <soapenv:Header/> <soapenv:Body> <tem:GetAllBeers> <tem:getAllBeersRequest> <beer:BaseRequest> <beer:APIKey>ILoveBeer</beer:APIKey> <beer:ClientCode>TonyaZen</beer:ClientCode <beer:RequestId>b9fa635a-6e0d-4de6-9431-ac
<beer:Version>1.02</beer:Version> </beer:BaseRequest> </tem:getAllBeersRequest> </tem:GetAllBeers> </soapenv:Body> </soapenv:Envelope>
<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.o <soapenv:Header/> <soapenv:Body> <tem:GetAllBeers> <tem:getAllBeersRequest> <beer:BaseRequest> <beer:APIKey>ILoveBeer</beer:APIKey> <beer:ClientCode>TonyaZen</beer:ClientCode <beer:RequestId>b9fa635a-6e0d-4de6-9431-ac
<beer:Version>1.02</beer:Version> </beer:BaseRequest> </tem:getAllBeersRequest> </tem:GetAllBeers> </soapenv:Body> </soapenv:Envelope> <beer:APIKey>ILoveBeer</beer:APIKey> <beer:ClientCode>TonyaZen</beer:ClientCode <beer:RequestId>b9fa635a-6e0d-4de6-9431-ac <beer:Version>1.02</beer:Version>
<s:Envelope xmlns:s="http://schemas.xmlsoap.org/soap/enve <s:Body> <GetAllBeersResponse xmlns="http://beerexample.com/ <GetAllBeersResult xmlns:a="http://schemas.datac <a:BaseResponse> <a:DisplayErrorMessage i:nil="true"/>
<a:RequestId>b9fa635a-6e0d-4de6-9431-acee1 <a:RequestTimeStamp>2019-02-14T21:01:19.15 <a:ResponseStatus>Success</a:ResponseStatu <a:TechnicalErrorMessage i:nil="true"/> </a:BaseResponse> <a:Beers xmlns:b="http://schemas.datacontract <b:Beer> <b:Abv>6.6%</b:Abv> <b:Brewery>Founder's Brewing Co.</b:B …
components
components pagination filtering security
pagination large datasets
pagination large datasets conserve resources
pagination large datasets conserve resources improve response time
page=3 pagination
page=3 size=100 pagination
first item=300 size=100 pagination
filtering style=ipa
• username / password • API key • token •
session ID authentication & authorization
integration tools
demo
coding strategies
None
public interface IBeerServices { BeersResponse GetBeers(); BeerResponse GetBeer(string id); BeerResponse
AddBeer(Beer beer); BeerResponse UpdateBeer(Beer beer); BaseResponse DeleteBeer(string id); }
public class BeersResponse : BaseResponse { public List<Beer> Beers {
get; set; } } public class BaseResponse { public bool Success { get; set; } public string Message { get; set; } }
public class BeersResponse : BaseResponse { public List<Beer> Beers {
get; set; } } public class BaseResponse { public bool Success { get; set; } public string Message { get; set; } } public bool Success { get; set; }
try { var response = beerService.GetBeers(); … } catch(Exception ex)
{ _logger.ErrorFormat("…"); … }
_logger.ErrorFormat($“process failed for client: {request.ClientCode}, requestId: {request.RequestId}, beer: {request.Beer.Name}, brewery:
{request.Beer.Brewery}, exception: {ex}.");
our object string Id string Name string Abv BeerStyle Style
string Description bool IsOnTap Brewery Brewery
our object string Id string Name string Abv BeerStyle Style
string Description bool IsOnTap Brewery Brewery 1 long BeerId string Name decimal Abv string Style string Description long Brewery
our object string Id string Name string Abv BeerStyle Style
string Description bool IsOnTap Brewery Brewery 1 long BeerId string Name decimal Abv string Style string Description long Brewery
our object string Id string Name string Abv BeerStyle Style
string Description bool IsOnTap Brewery Brewery
our object string Id string Name string Abv BeerStyle Style
string Description bool IsOnTap Brewery Brewery 2 string Id string Name string Abv Style Style string Description string Brewery
our object string Id string Name string Abv BeerStyle Style
string Description bool IsOnTap Brewery Brewery 2 string Id string Name string Abv Style Style string Description string Brewery
None
code review • separate service layer • interface for your
service class • response objects • try / catches • logging • use your own objects • cache results
communicating with owner
cheers to good communication • First…consult the documentation • Utilize
their ticketing system • Provide raw request and response • Be NICE!
Thank you! Tonya Cooper Quicken Loans Software Engineer @tonyazen