Successfully reported this slideshow.
We use your LinkedIn profile and activity data to personalize ads and to show you more relevant ads. You can change your ad preferences anytime.
Versioning APIs
Marcelo Cure
Why do I care?
Why contracts break?
Consumers set expectations
APIs evolve
Non breaking changes
Breaking changes
Breaks consumer :’(
And now?
Version it!
Be cautious
● Too many versions;
● Complexity;
● Bugs;
How to version my API?
Version as path/query
parameter
https://host/api/v1/bands/1/albuns
https://host/api/bands/albuns?version=
1 ● Explicit
● C...
Version as a header
Accept: application/json; version=1.0
● Less intrusive
● Does not polute URL
● No specification for th...
Take care of your contracts
● It’s your front door
● Care about your design
● Discuss contract changes, do it cautiously
●...
Bad design -> contract break -> versioning
Don’t have a lot of versions
You need to get used...
Contracts break, it’s
natural
But not so often
Thanks
Versioning APIs
Versioning APIs
Upcoming SlideShare
Loading in …5
×

Versioning APIs

223 views

Published on

Talk about Versioning APIs and contracts

Published in: Technology
  • Login to see the comments

Versioning APIs

  1. 1. Versioning APIs Marcelo Cure
  2. 2. Why do I care?
  3. 3. Why contracts break?
  4. 4. Consumers set expectations
  5. 5. APIs evolve
  6. 6. Non breaking changes
  7. 7. Breaking changes
  8. 8. Breaks consumer :’(
  9. 9. And now?
  10. 10. Version it!
  11. 11. Be cautious ● Too many versions; ● Complexity; ● Bugs;
  12. 12. How to version my API?
  13. 13. Version as path/query parameter https://host/api/v1/bands/1/albuns https://host/api/bands/albuns?version= 1 ● Explicit ● Cleaner for consumers ● Intrusive
  14. 14. Version as a header Accept: application/json; version=1.0 ● Less intrusive ● Does not polute URL ● No specification for that
  15. 15. Take care of your contracts ● It’s your front door ● Care about your design ● Discuss contract changes, do it cautiously ● Test your contracts
  16. 16. Bad design -> contract break -> versioning
  17. 17. Don’t have a lot of versions
  18. 18. You need to get used... Contracts break, it’s natural
  19. 19. But not so often
  20. 20. Thanks

×