[フレーム]
BT

InfoQ Software Architects' Newsletter

A monthly overview of things you need to know as an architect or aspiring architect.

View an example

We protect your privacy.

Facilitating the Spread of Knowledge and Innovation in Professional Software Development

Write for InfoQ

Unlock the full InfoQ experience

Unlock the full InfoQ experience by logging in! Stay updated with your favorite authors and topics, engage with content, and download exclusive resources.

Log In
or

Don't have an InfoQ account?

Register
  • Stay updated on topics and peers that matter to youReceive instant alerts on the latest insights and trends.
  • Quickly access free resources for continuous learningMinibooks, videos with transcripts, and training materials.
  • Save articles and read at anytimeBookmark articles to read whenever youre ready.

Topics

Choose your language

InfoQ Homepage News The LinkedIn Way of Building API Versions

The LinkedIn Way of Building API Versions

Aug 17, 2022 2 min read

Write for InfoQ

Feed your curiosity. Help 550k+ global
senior developers
each month stay ahead.
Get in touch

LinkedIn recently revealed how they built a new versioned API framework for LinkedIn Marketing APIs that allows external partners to migrate to newer versions of APIs at their own pace.

With the new framework, each API product exposes its versioned models and APIs through a mid-tier that serves APIs for external partners. The mid-tier APIs and models are exposed to the external world with specific versions. This allows their consumers to migrate to the new versions at their pace.

Legacy architecture consisted of backend APIs built by various business lines and exposed externally via Rest.li API gateway. Since these APIs were not versioned, everything implemented for the internal APIs was published to the external customers directly.

The post explains: "Unversioned APIs also blocked customers from accessing the latest features and caused internal challenges with new feature development. Additionally, feedback from developers indicated we were releasing too many API changes with short warning times that disrupted planning."

Source - https://engineering.linkedin.com/blog/2022/-under-the-hood--how-we-built-api-versioning-for-linkedin-market

LinkedIn built the new framework to expose changes to models and APIs under specific versions to effectively isolate external applications from changes and allow partners to migrate to new versions at their own pace.

Whenever an external application requests a specific API version, the API gateway translates the request and forwards it to the appropriate mid-tier.

Like any other API gateway, the API gateway in this architecture brings authentication, request Mapping, throttling control, authorization, anti-abuse control, and request dispatching.

Ultimately, the mid-tier exposes the features implemented by backends to the external applications.

There is only one mid-tier per API product.

Source - https://engineering.linkedin.com/blog/2022/-under-the-hood--how-we-built-api-versioning-for-linkedin-market

Different versions of the same logical resource can co-exist within the mid-tier, and this reference is maintained in the code. The gateway calls desired resource version using the request mapping.

The services in the mid-tier are responsible for calling the backend version agnostic services from the business lines. If services maintain this version-specific logic in code, it may cause code-maintenance problems. To avoid this, the team built the "Versioning Execution Framework" library that accomplishes the following two essential things: converting the request to the latest possible version via user-defined transformation, and once the request is converted into the latest possible version, it is then converted to the latest available internal model again via the user-defined internal model converter.

The implementation highlights LinkedIn’s design principle of "don’t disrupt customers."

With LinkedIn's Marketing APIs versioned since June 2022, developers and partners can use these stable APIs.

About the Author

Tanmay Deshpande

Show moreShow less

Rate this Article

Adoption
Style

This content is in the API topic

Related Topics:

Related Content

The InfoQ Newsletter

A round-up of last week’s content on InfoQ sent out every Tuesday. Join a community of over 250,000 senior developers. View an example

We protect your privacy.

BT

AltStyle によって変換されたページ (->オリジナル) /