Upgrade to Pro — share decks privately, control downloads, hide ads and more …

API Design with Apiary

Z
March 17, 2016

API Design with Apiary

As presentent on ofmForum.

Z

March 17, 2016
Tweet

More Decks by Z

Other Decks in Programming

Transcript

  1. 4 STAGES OF API MATURITY API as a by- product

    of building apps API documentation generated from code Design-first API Development API Design Consistency
  2. API DESCRIPTION • API Blueprint • OpenAPI Specification (Swagger) •

    Others (RAML, WADL, WSDL, Email, Word document)
  3. # User [/user] ## Retrieve [GET] Retrieves the . +

    Response 200 (application/json) { "name": "John" }
  4. Design & Prototype 1. Formalize API in an API Description

    format* 2. Put API Description in a VCS 3. Circulate & Review 4. Apiary Mock Server
  5. Develop 1. API Description in the same repository as implementation

    2. Test locally 3. Test with Apiary 4. Test in CI
  6. Consume 1. Apiary Documentation 2. Apiary Mock Server 3. Documentation

    Console 4. Language Examples 5. Apiary Traffic Inspector 6. Apiary Proxy
  7. MIND SHIFT • Describe resource NOT representation • Define domain

    semantics • Reuse common semantics • Do NOT focus on technical details • URIs • representations • schema validations
  8. API ISN’T… • API is not pretty URLs • API

    is not HTTP Verbs • API is not CRUD • API is not JSON
  9. REST ARCHITECTURAL STYLE • Client–server • Stateless • Cacheable •

    Layered system • Code on Demand (optional) • Uniform Interface • Identification of resources • Manipulation through representations • Self-descriptive messages • Hypermedia as the engine of the application state