Citrix Blog Post Hero Image 9 1290x526
Citrix Blog Post Hero Image 9 720x333
Subramanian Krishnan
2019-07-11T10:30:40.000Z
eds-citrix:topics/citrix-engineering,eds-citrix:products/citrix-cloud

Defining API guidelines for a company: What works?

It’s normal, especially in large companies, for different product/service groups to follow their own guidelines and best practices for API design. When companies grow through a merger or acquisition, even more variety gets added to the mix. The problem with having different API guidelines for each team includes, but is not limited to:

While the need to have common API guidelines across a company is clear, the process of defining them can be a bumpy if not approached sensibly and with sensitivity. Here’s what worked for us:

  1. Start with one API style and add more — There’s no need for mandating one API style over others (REST/GraphQL/Event Driven/gRPC). There will always be legitimate use cases where one style fits best. Start by defining API guidelines for the most commonly used/needed API styles, then add more when existing types don’t fit your needs. In our case, we started with REST guidelines.
  2. Gather a small working group — Form a small core team of two or three people who draft the guidelines. Smaller groups are effective and faster. It is always easier to have a proposal reviewed by a large group than to have two dozen people come up with a draft proposal.
  3. Stand on the shoulders of giants — There are enough published guidelines out there, and it makes sense to build on top of one or two of those instead of creating your own from scratch. We based our work (and gave credit where it was due) on the REST API guidelines published by Microsoft, Adidas, EMC, Apigee, and JSON API. We only changed what didn’t fit for us.
  4. Take an open source approach — Treat the guidelines as open source code. Having a repo on GitHub/Bitbucket makes it easier to collaborate, contribute, and review. You can see an image of a BitBucket repo with the Citrix API guidelines below.

API Guidelines

Defining and publishing the API guidelines for the company is a major first step. The next steps include driving adoption through processes and tools. In our next blog we will look at how we can ease the life of API Developers through automated tools. And check out the first blog in our series.

Citrix Blog Footer Banners 4