API documentation
anindita_basu
A workshop
anindita_basu
Workshop goals
• Create your API
• Document it
• Reference documents
• Concept documents
• HowTos
anindita_basu
anindita_basu
anindita_basu
APIs
anindita_basu
anindita_basu
Create an API
1. Create an account at sheetlabs.com.
anindita_basu
Create an API
1. Create an account at sheetlabs.com.
Give a name to
your account.
Give a 3-letter
code for your
account.
All fields are
mandatory.
anindita_basu
Create an API
1. Create an account at sheetlabs.com.
2. Click Data tables > Import Data Table and import your spreadsheet.
Accept the default selections.
anindita_basu
Create an API
1. Create an account at sheetlabs.com.
2. Click Data tables > Import Data Table and import your spreadsheet.
Accept the default selections.
anindita_basu
Create an API
1. Create an account at sheetlabs.com.
2. Click Data tables > Import Data Table and import your spreadsheet.
Accept the default selections.
3. Click Create an API from this Data Table. Accept the defaults.
anindita_basu
Create an API
1. Create an account at sheetlabs.com.
2. Click Data tables > Import Data Table and import your spreadsheet.
Accept the default selections.
3. Click Create an API from this Data Table. Accept the defaults.
Required field
Required field
Change the
permission to
Public.
Leave this as-is.
Leave this as-is.
anindita_basu
Go to the API you just created
anindita_basu
1
2
Go to the API you just created
anindita_basu
anindita_basu
anindita_basu
Document your API
1
2
anindita_basu
Document your API
What does your
API do/contain?
Can the results
returned by
your API be
filtered?
If so, describe
how to use the
fields to filter
results.Describe what
these fields
mean in the
results
returned by
your API.
anindita_basu
Document your API
1
2
anindita_basu
Checkpoint
• Create your API
• Document it
• Reference documents
• Concept documents
• HowTos
anindita_basu
About your API
anindita_basu
About your API
• Authentication
• Rate limits
• License
• Error codes
• Versions and release notes
• Additional resources
anindita_basu
https://developer.oxforddictionaries.com/documentation/glo
ssary
https://developer.twitter.com/en/docs/basics/authentication
/overview/oauth
anindita_basu
https://developer.oxforddictionaries.com/documentation/glo
ssary
https://developer.twitter.com/en/docs/basics/authentication
/overview/oauth
Use your favourite word processor to write
a conceptual document for your API.
anindita_basu
Checkpoint
• Create your API
• Document it
• Reference documents
• Concept documents
• HowTos
anindita_basu
anindita_basu
https://editor.swagger.io/
anindita_basu
1
2
anindita_basu
anindita_basu
Import the YAML file I emailed you
anindita_basu
Document your API in Swagger
Give a title
to your API
anindita_basu
anindita_basu
HTTP methods
• GET
• POST
• DELETE
anindita_basu
Make a GET request to your API
anindita_basu
Document your API in Swagger
anindita_basu
anindita_basu
anindita_basu
anindita_basu
anindita_basu
anindita_basu
Checkpoint
• Create your API 
• Document it
• Reference documents  
• Concept documents 
• HowTos
anindita_basu
Task documentation
• Examples
• Code libraries
• SDKs
anindita_basu
anindita_basu
Create an algorithm
anindita_basu
Create an algorithm
Input: 2 numbers
Output: The number that’s greater
anindita_basu
Create an algorithm
get 2 numbers X and Y
if X < Y,
Print "Y is greater than X"
else,
Print "X is greater than Y"
anindita_basu
Create an algorithm
• Data source: Your API
• Goal: Find the youngest person in the
database.
anindita_basu
Create an algorithm
1. Make a GET request to the API.
2. From the results, extract the
following two fields, and put them
into a list:
• name
• bornwhen
3. Sort the list in ascending order.
4. Print the value of name of the first
entry in the list.
anindita_basu
Play with APIs
anindita_basu
Play with APIs
• Game of Thrones: https://anapioficeandfire.com/
• Star Wars: https://swapi.co/
• Harry Potter: https://www.potterapi.com/
• Oxford Dictionaries:
https://developer.oxforddictionaries.com/documentation
• Vedas: https://aninditabasu.github.io/rigVeda/
anindita_basu

API documentation

Editor's Notes

  • #5 building blocks
  • #24 For HTTP codes, on the Oxford Dictionaries site, click HTTP status codes.
  • #25 For HTTP codes, on the Oxford Dictionaries site, click HTTP status codes.
  • #27 Click Update API.
  • #34 methods = verbs