Your SlideShare is downloading. ×
0
Designing the APIs for an internal set of services
Designing the APIs for an internal set of services
Designing the APIs for an internal set of services
Designing the APIs for an internal set of services
Designing the APIs for an internal set of services
Designing the APIs for an internal set of services
Designing the APIs for an internal set of services
Designing the APIs for an internal set of services
Designing the APIs for an internal set of services
Designing the APIs for an internal set of services
Designing the APIs for an internal set of services
Designing the APIs for an internal set of services
Designing the APIs for an internal set of services
Designing the APIs for an internal set of services
Designing the APIs for an internal set of services
Designing the APIs for an internal set of services
Designing the APIs for an internal set of services
Designing the APIs for an internal set of services
Designing the APIs for an internal set of services
Designing the APIs for an internal set of services
Designing the APIs for an internal set of services
Designing the APIs for an internal set of services
Designing the APIs for an internal set of services
Designing the APIs for an internal set of services
Designing the APIs for an internal set of services
Designing the APIs for an internal set of services
Designing the APIs for an internal set of services
Designing the APIs for an internal set of services
Designing the APIs for an internal set of services
Designing the APIs for an internal set of services
Designing the APIs for an internal set of services
Designing the APIs for an internal set of services
Designing the APIs for an internal set of services
Designing the APIs for an internal set of services
Designing the APIs for an internal set of services
Designing the APIs for an internal set of services
Designing the APIs for an internal set of services
Designing the APIs for an internal set of services
Designing the APIs for an internal set of services
Designing the APIs for an internal set of services
Designing the APIs for an internal set of services
Designing the APIs for an internal set of services
Designing the APIs for an internal set of services
Designing the APIs for an internal set of services
Designing the APIs for an internal set of services
Designing the APIs for an internal set of services
Designing the APIs for an internal set of services
Designing the APIs for an internal set of services
Designing the APIs for an internal set of services
Designing the APIs for an internal set of services
Designing the APIs for an internal set of services
Designing the APIs for an internal set of services
Designing the APIs for an internal set of services
Designing the APIs for an internal set of services
Designing the APIs for an internal set of services
Designing the APIs for an internal set of services
Designing the APIs for an internal set of services
Designing the APIs for an internal set of services
Designing the APIs for an internal set of services
Designing the APIs for an internal set of services
Designing the APIs for an internal set of services
Designing the APIs for an internal set of services
Designing the APIs for an internal set of services
Designing the APIs for an internal set of services
Designing the APIs for an internal set of services
Designing the APIs for an internal set of services
Designing the APIs for an internal set of services
Designing the APIs for an internal set of services
Designing the APIs for an internal set of services
Designing the APIs for an internal set of services
Designing the APIs for an internal set of services
Designing the APIs for an internal set of services
Designing the APIs for an internal set of services
Upcoming SlideShare
Loading in...5
×

Thanks for flagging this SlideShare!

Oops! An error has occurred.

×
Saving this for later? Get the SlideShare app to save on your phone or tablet. Read anywhere, anytime – even offline.
Text the download link to your phone
Standard text messaging rates apply

Designing the APIs for an internal set of services

87

Published on

Desinging the APIs for an internal set of services

Desinging the APIs for an internal set of services

Published in: Technology
0 Comments
0 Likes
Statistics
Notes
  • Be the first to comment

  • Be the first to like this

No Downloads
Views
Total Views
87
On Slideshare
0
From Embeds
0
Number of Embeds
0
Actions
Shares
0
Downloads
0
Comments
0
Likes
0
Embeds 0
No embeds

Report content
Flagged as inappropriate Flag as inappropriate
Flag as inappropriate

Select your reason for flagging this presentation as inappropriate.

Cancel
No notes for slide

Transcript

  • 1. for DESIGNING THE APIS an internal set of services
  • 2. albertoleal albertonb@gmail.com
  • 3. https://github.com/globocom
  • 4. for DESIGNING THE an internal APIS set of services
  • 5. what is an API ?
  • 6. micro-services environment
  • 7. "A concept where an application is decomposed into small and loosely coupled services, where each service has a single responsibility, running in its own process.
  • 8. ad$ A
  • 9. Evolving a service search accounts video images
  • 10. No restriction
  • 11. Maintainable and Stable
  • 12. Replacement
  • 13. test the services? HOWTO define services contract? manage deployment?
  • 14. How do we get started with our API?
  • 15. API Modeling
  • 16. API Modeling - Conceptual Model
  • 17. purpose
  • 18. audience
  • 19. developer,developer, developer
  • 20. Developer as a Customer API as a Product
  • 21. API Modeling - Ubiquitous Language
  • 22. API Modeling
  • 23. ! Do not reinvent the wheel HAL JSON API JSON Schema …
  • 24. what makes a great API?
  • 25. is flexible and simple to use
  • 26. /cars?fields=name,model,year /cars
  • 27. uses nouns instead of verbs
  • 28. /collection/<resource><?filters> /cars/123?fields=name,model,year
  • 29. /cars /cars?status=new /cars/123 /getAllCars /getAllNewCars /getCar/123
  • 30. uses HTTP Verbs to perform operations on the elements
  • 31. Resource POST (create) GET (read) PUT (replace) PATCH (update) DELETE (delete) /cars new car list all cars new car or error error delete all cars /cars/123 error show car 123 update car or error modify car or error delete car 123
  • 32. returns meaningful errors
  • 33. HTTP/1.1 400 Bad Request ! ! { "errorCode" : 123, "moreInfo": “http://dev.api.com/errors/123" "errors": [ { "name": [ “can’t be blank" ] } ] } use http status code payload as verbose as possible
  • 34. 400 - 401 - 403 - 404 - 500 Bad Request Forbidden Unauthorized Not Found Internal Server Error
  • 35. provides great support
  • 36. Documentation
  • 37. Documentation
  • 38. Documentation Communication
  • 39. CommunityDocumentation Communication
  • 40. is secure
  • 41. what about versioning?
  • 42. application/vnd.example.com+json; version=1 application/vnd.example.com.v1+json; Accept:
  • 43. test the services? HOWTO define services contract? manage deployment?
  • 44. ad$ A
  • 45. contracts enable service independence
  • 46. but…
  • 47. "A concept where an application is decomposed into small and loosely coupled services, where each service has a single responsibility, running in its own process.
  • 48. Contracts can also couple service providers and consumers
  • 49. { "title": "App", "type": "object", "properties": { "name": { "type": "string", "title": "Name" }, "uris": { "type": "array", "title":"URIs", "items": { "type": "string" } } }, "required": ["name"] } required fields
  • 50. { "links": [ { "href": "https://domain/apps", "method": "POST", "rel": “create”, "schema": { "$ref": "https://domain/schemas/apps/new_app" } } … ] }
  • 51. Consumer-Driven Contracts: A Service Evolution Pattern http://martinfowler.com/articles/consumerDrivenContracts.html
  • 52. test the services? HOWTO define services contract? manage deployment?
  • 53. Deployment imagessearch
  • 54. Deployment search
  • 55. Deployment
  • 56. test the services? HOWTO define services contract? manage deployment?
  • 57. Contract Tests Integration
 Tests
  • 58. be positive
  • 59. thanks! @albertoleal albertonb@gmail.com

×