30
Intro to dev tools for RESTful APIs Micha Mazaheri

Tools for RESTful APIs

Embed Size (px)

Citation preview

Page 1: Tools for RESTful APIs

Intro to dev tools for RESTful APIs

Micha Mazaheri

Page 2: Tools for RESTful APIs
Page 3: Tools for RESTful APIs

How to make a REST API?

How to test a REST API?

Page 4: Tools for RESTful APIs

REST• Back to HTTP roots (RFC 2616) • Stateless – Each request is an independent transaction • Resources – Everything is a resource identified by a URI/{meetup_slug}/{meetup_slug}/events/{id}/{meetup_slug}/events/{id}/comments

• CRUD Methods GET, HEAD, OPTIONSPOST, PUT, PATCHDELETE

Page 5: Tools for RESTful APIs

Stay RESTful

POST /ParisAPI/events/225897650/{ "name":"Paris API Rocks" }

PATCH /ParisAPI/events/225897650/{ "name":"Paris API Rocks"}

POST /ParisAPI/events/225897650/set-nameParis API Rocks

Page 6: Tools for RESTful APIs

Hypermedia

{ "name":"Paris API", "organizer_id":88226292}

{ "name":"Paris API", “organizer":"/ParisAPI/members/88226292/"}

HATEOAS (Hypermedia as the Engine of Application State)

Page 7: Tools for RESTful APIs
Page 8: Tools for RESTful APIs

JSON-LDJSON for Linking Data

http://json-ld.org/

Page 9: Tools for RESTful APIs

JSON Schemajson-schema.org

Page 10: Tools for RESTful APIs

HTTP ClientsPlaygrounds for APIs

Paw

Page 11: Tools for RESTful APIs

PawprintJSFiddle for APIs

Page 12: Tools for RESTful APIs

Proxy

RunscopeTraffic InspectorCharles HTTP Client RequestBin

Page 13: Tools for RESTful APIs

Local Tunneling

localhost:8080 api.mydomain.com

Secure tunnels to localhost

Page 14: Tools for RESTful APIs

API definitionThink before writing code

Contract for APIs

Make consumers & providers happy together

Page 15: Tools for RESTful APIs

Swagger• JSON or YAML • JSON Schema http://json-schema.org/

• Many integrations • Most popular (Github stars)

Page 16: Tools for RESTful APIs

Swagger"paths": { "/meetups": { "get": { "description": "", "produces": [ "application/json" ], "parameters": [ { "name": "tags", "in": "query", "description": "Tag your devfloorists", "required": false, "type": "array", "items": { "type": "string" } ...

Page 17: Tools for RESTful APIs

SwaggerSwagger UI for documentation

Page 18: Tools for RESTful APIs

SwaggerSwagger Editor for realtime preview

Page 19: Tools for RESTful APIs

RAML

Page 20: Tools for RESTful APIs

API Blueprint

Page 21: Tools for RESTful APIs

API BlueprintInteractive documentation (Apiary.io SaaS)

Page 22: Tools for RESTful APIs

Monitoring Tools

Page 23: Tools for RESTful APIs

Runscope Radar• Cloud proxy to debug

Debug staging & prod • Have assertions & tests

Page 24: Tools for RESTful APIs

KONG & Galileo• KONG: extension of Nginx • Galileo: analytics for APIs

Page 25: Tools for RESTful APIs

Oh and…We hire!Bring together API playgrounds & definitions

Encourage best practices

Collaboration platform

and cool customers already…

Stay Tuned

Page 26: Tools for RESTful APIs

Oh and…We hire rockstars!

• React or OS X genius • Passion for interfaces &

beautiful code • Startup gal or guy (or cat?)

Page 27: Tools for RESTful APIs

http.cathttps://http.cat

Page 28: Tools for RESTful APIs

Thanks!

Micha Mazaheri

@mittsh

Paw http://paw.rest @luckymarmot

Page 29: Tools for RESTful APIs

Questions?

Micha Mazaheri

@mittsh

Paw http://paw.rest @luckymarmot

Page 30: Tools for RESTful APIs

50% off PARISAPI

Paw http://paw.rest @luckymarmot