Versioning RESTful services?

前端 未结 4 1959
旧时难觅i
旧时难觅i 2021-02-04 11:22

I have a RESTful web service deployed at http://example.com/v1/SomeResource. One day, a new protocol version (that is not backwards compatible) is deployed to h

4条回答
  •  执念已碎
    2021-02-04 12:09

    I think you shouldn't do this in the first place, but probably it's too late.

    URIs should also be static so that when the resource changes or the implementation of the service changes, the link stays the same. This allows bookmarking. It's also important that the relationship between resources that's encoded in the URIs remains independent of the way the relationships are represented where they are stored.

    From the article RESTful Web services: The basics.

提交回复
热议问题