All About API Research
& Testing Tools
Jim Medlock
February 2024
What is an API?
You implement this in a private
API
Someone else does this in a
public API
You create
this for any
API
API’s are a way to
retrieve info from
a server in a
standard fashion
API Types: REST
Queries are rigid -
requests & payloads
are defined by the
server
More info
API Types: GraphQL
Queries are flexible -
requests & payloads
are defined by the
client
● Fewer server requests than REST to
retrieve information
● But, more complex than REST
● More info
API Types: REST vs. GraphQL
GraphQL REST
Architecture Client-driven Server-driven
Organization Schema & strong typing Endpoints
Operations Query/Mutation/Subscription CRUD
Data Fetching Specific data with single API call Fixed data w/multiple API calls
Community Growing Mega-huge
Performance Fast Dependent on no. calls
Development Rapid Slower
Learning Curve Difficult Easy
Self-Documenting Yes No
Stability Less error prone, auto validation & type checking Better choice for queries w/complex business logic
Use Cases Multiple microservices, mobile apps Simple apps, resource-driven apps
Why are tools necessary?
1. Verify the API satisfies your requirements
2. Verify the API matches its documentation
3. Test your access strategy
4. Test an API you’ve created
5. Identify edge cases
6. Identify rate limit boundaries
7. Identify performance options & optimizations
Case Study
● Problem: An open source team needs to track team
engagement to reward frequent contributors
● Solution: Use the GitHub REST API to retrieve commit
metrics on the team repo so they can be tallied and
periodically updated in a dashboard
CLI → curl + jq
● curl
○ Retrieve data from a website
○ Available on MacOS, Linux, Windows
○ Website
● jq
○ Interactively navigate JSON
○ Available on MacOS, Linux, Windows
○ Website
Usage Strategy: curl + jq
● Extract GitHub commits using curl & save to a local file
● Feed this file to jq for analysis
Usage Strategy: curl + jq
● Accumulate jq commands in a test files
Test Drive - curl & jq
● Demo → Repo
WYSIWYG → Postman
● A platform for building and using APIs
● Helps developers build and test APIs
● Supports multiple protocols - HTTP, REST, SOAP,
GraphQL, and WebSockets
● Core features - design, documentation, testing, mock
servers, monitoring, AI Visualization
● Affordable - Core features free for up to 3 users
● Well documented
● Another option is Insomnia
Test Drive - Postman
● Demo → Repo
Questions?
Additional Resources
● Public Graphql API’s for demo/reference
● Apollo Client Devtools & other ways to view/run your
graphql queries.
● A list of public API's for demo/reference:

Roundtable_-_API_Research__Testing_Tools.pdf

  • 1.
    All About APIResearch & Testing Tools Jim Medlock February 2024
  • 2.
    What is anAPI? You implement this in a private API Someone else does this in a public API You create this for any API API’s are a way to retrieve info from a server in a standard fashion
  • 3.
    API Types: REST Queriesare rigid - requests & payloads are defined by the server More info
  • 4.
    API Types: GraphQL Queriesare flexible - requests & payloads are defined by the client ● Fewer server requests than REST to retrieve information ● But, more complex than REST ● More info
  • 5.
    API Types: RESTvs. GraphQL GraphQL REST Architecture Client-driven Server-driven Organization Schema & strong typing Endpoints Operations Query/Mutation/Subscription CRUD Data Fetching Specific data with single API call Fixed data w/multiple API calls Community Growing Mega-huge Performance Fast Dependent on no. calls Development Rapid Slower Learning Curve Difficult Easy Self-Documenting Yes No Stability Less error prone, auto validation & type checking Better choice for queries w/complex business logic Use Cases Multiple microservices, mobile apps Simple apps, resource-driven apps
  • 6.
    Why are toolsnecessary? 1. Verify the API satisfies your requirements 2. Verify the API matches its documentation 3. Test your access strategy 4. Test an API you’ve created 5. Identify edge cases 6. Identify rate limit boundaries 7. Identify performance options & optimizations
  • 7.
    Case Study ● Problem:An open source team needs to track team engagement to reward frequent contributors ● Solution: Use the GitHub REST API to retrieve commit metrics on the team repo so they can be tallied and periodically updated in a dashboard
  • 8.
    CLI → curl+ jq ● curl ○ Retrieve data from a website ○ Available on MacOS, Linux, Windows ○ Website ● jq ○ Interactively navigate JSON ○ Available on MacOS, Linux, Windows ○ Website
  • 9.
    Usage Strategy: curl+ jq ● Extract GitHub commits using curl & save to a local file ● Feed this file to jq for analysis
  • 10.
    Usage Strategy: curl+ jq ● Accumulate jq commands in a test files
  • 11.
    Test Drive -curl & jq ● Demo → Repo
  • 12.
    WYSIWYG → Postman ●A platform for building and using APIs ● Helps developers build and test APIs ● Supports multiple protocols - HTTP, REST, SOAP, GraphQL, and WebSockets ● Core features - design, documentation, testing, mock servers, monitoring, AI Visualization ● Affordable - Core features free for up to 3 users ● Well documented ● Another option is Insomnia
  • 13.
    Test Drive -Postman ● Demo → Repo
  • 14.
    Questions? Additional Resources ● PublicGraphql API’s for demo/reference ● Apollo Client Devtools & other ways to view/run your graphql queries. ● A list of public API's for demo/reference: