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
AI時代の発信活動 ~技術者として認知してもらうための発信法~ / 20251028 Masaki Okuda
shift_evolve
PRO
1
130
GPUをつかってベクトル検索を扱う手法のお話し~NVIDIA cuVSとCAGRA~
fshuhe
0
310
初海外がre:Inventだった人間の感じたこと
tommy0124
1
160
Okta Identity Governanceで実現する最小権限の原則
demaecan
0
230
InsightX 会社説明資料/ Company deck
insightx
0
150
AIでデータ活用を加速させる取り組み / Leveraging AI to accelerate data utilization
okiyuki99
6
1.6k
AIエージェントによる業務効率化への飽くなき挑戦-AWS上の実開発事例から学んだ効果、現実そしてギャップ-
nasuvitz
5
1.6k
AWS DMS で SQL Server を移行してみた/aws-dms-sql-server-migration
emiki
0
270
ストレージエンジニアの仕事と、近年の計算機について / 第58回 情報科学若手の会
pfn
PRO
4
930
Kotlinで型安全にバイテンポラルデータを扱いたい! ReladomoラッパーをAIと実装してみた話
itohiro73
3
130
어떤 개발자가 되고 싶은가?
arawn
1
360
Open Table Format (OTF) が必要になった背景とその機能 (2025.10.28)
simosako
3
580
Featured
See All Featured
Product Roadmaps are Hard
iamctodd
PRO
55
11k
GraphQLの誤解/rethinking-graphql
sonatard
73
11k
Let's Do A Bunch of Simple Stuff to Make Websites Faster
chriscoyier
508
140k
Evolution of real-time – Irina Nazarova, EuRuKo, 2024
irinanazarova
9
1k
How to Create Impact in a Changing Tech Landscape [PerfNow 2023]
tammyeverts
55
3k
Mobile First: as difficult as doing things right
swwweet
225
10k
How to train your dragon (web standard)
notwaldorf
97
6.3k
Faster Mobile Websites
deanohume
310
31k
The Language of Interfaces
destraynor
162
25k
Helping Users Find Their Own Way: Creating Modern Search Experiences
danielanewman
31
2.9k
How to Think Like a Performance Engineer
csswizardry
27
2.2k
Sharpening the Axe: The Primacy of Toolmaking
bcantrill
46
2.5k
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