API Strategies at eBay
source link: https://www.tuicool.com/articles/BbameeF
Go to the source link to view the article. You can view the picture content, updated content and better typesetting reading experience. If the link is broken, please click the button below to view the snapshot at that time.
After working with improperly versioned SOAP-based APIs for many years, eBay decided to move to new RESTful APIs with semantic versioning and a deprecation standard. Focus is on extensibility and adaptability to make it easier for developers to create new applications that utilize eBay’s APIs. In a blog post, Tanya Vlahovic describes the concepts and how they are implemented in their APIs.
For Vlahovic, lead public API architect at eBay, APIs represent the business, but she emphasizes that individual APIs are not enough; they must be used together to bring real value to the business. She compares eBays’ set of APIs with cooking — the APIs are the ingredients and it’s then up to the developer community to come up with a great meal by combining different APIs in some new and innovative way.
To create an API ecosystem that is flexible and adaptable, it is important to understand if individual APIs are a success or a failure; are they used by developers or just ignored? Vlahovic believes that API owners should be very open and look for solutions from different perspectives when trying to improve the APIs and get them used. Two examples of new APIs that she thinks have changed how people think are search by image and machine text translations , both released last summer.
Vlahovic describes an API as doing three simple things: it performs actions and gather data, it formats data, and finally it serves the data. She believes that the easiest way to create an API is to design intuitive and straightforward contracts without spending a lot of time on documentation, and then let developers try it out and assess its value. She points out that APIs are interfaces for human developers, not for robots.
In their new RESTful APIs, they follow semantic versioning with three quality levels: alpha, beta and general availability. Beyond these levels, they also support experimental APIs. This allows for early adopters to explore, test and give fast feedback on the APIs.
Their deprecation standard focuses on both the contract and runtime behaviour, and applies to the same quality levels they use in versioning. When they deprecate an element in an API, for example a resource, a field or behaviour, the elements are normally maintained in their original form for 18 months. For every new deprecation of an element, a new minor version of the API is released, and it's accompanied by a public announcement with detailed instructions to developers. If needed, the instructions also include migration instructions. If a deprecation causes a backward incompatibility, the API owner must decide if instead of a minor version, a new major version is released.
Whenever an element is deprecated, the deprecated attribute is added to the element, and the description attribute is updated to reflect the deprecation. Both attributes are defined in the OpenAPI specification . At runtime they inform about a deprecation using a standard Warning HTTP response header with the code 299. This header should be logged and monitored by consumer applications so that developers can be alerted about new changes.
Vlahovic sees APIs as building blocks that enable developers to create new applications. To simplify this work, eBay provides SDKs that abstract away some concepts. One example is the industry standard OAuth 2.0 protocol that is used by eBay to handle authorization and data privacy concerns. They require that all API clients are authorized before they use their marketplace capabilities, and support for this is therefore included in the SDKs. In addition to the existing open source Java OAuth client library, they recently released a C# and a Python version of the library.
In an earlier blog post, Vlahovic wrote about eBay’s two year journey to deliver a new family of APIs for their marketplace and what they learned during that time.
Recommend
-
67
From the time it was announced, WebAssembly caused a huge buzz in the front-end world. The web community readily embraced the idea of taking code written in programming languages other than JavaScript and running that code in the browser. Above...
-
18
优先刊登物品显示第 1 张/共 1 张 - 优先刊登物品
-
20
The Christmas lights are long since down, the turkey was picked clean an eternity ago, and (if it was ever out), the mistletoe is safely back in the attic. Notwithstanding the completion of 2019, and as we move towards a...
-
9
Author's Note: This article follows “ Speed By A Thousand Cuts ” as the second installment of the series. A majority of the traffic t...
-
11
You only get one shot at a first impression – being able to show off your listing in an engaging video can improve buyer confidence. Today, eBay announced a new video platform called REEL, which will integrate videos int...
-
38
供稿 | eBay IE Cloud Team 作者 | 谢文利 & 李程远 编辑 | 顾欣怡
-
38
供稿 | ...
-
13
Ebay is port scanning visitors to their website - and they aren't the only ones By Dan Nemec 24 May 2020 ...
-
3
eBay Adopts AsyncAPI for Asynchronous API Contracts May 19, 2021...
-
11
How Alibaba’s Taobao Beat eBay in China Cold Call...
About Joyk
Aggregate valuable and interesting links.
Joyk means Joy of geeK