Ad

Monday, March 16, 2020

API Design 2020

Designing API

  • What kind of resources are needed
  • What kind of actions will be taken
  • What kind of endpoints should be designed

Testing API

Testing API using curl

GET Method
curl 'https://[URL]/[resource].json'

curl -X PUT -d '{"key":{"nested_key":"value"}}' \
  'https://[PROJECT_ID].firebaseio/users/tom.json'

curl -X PATCH -d '{"key":"value"}' \
 'https://[URL]/[resource].json'

curl -X POST -d '{"key":{"nested_key":"value"}}' \
  'https://[PROJECT_ID].firebaseio/users/tom.json'

curl -X DELETE \
'https://[PROJECT_ID].firebaseio/users/tom.json'

Use curl to check the documentation to see what the API does

No comments:

Post a Comment

Developing apps for airtable using Airtable Blocks

The airtable smart sheets now has an app platform called Airtable Blocks, which allows developers to add custom code, and build apps quickly...