intermediate·10 min read·Updated

API Governance Tools, Part 1: Lifecycle, Owners and Project Rules

API governance tools help a team say how its APIs should be run. Read what needs doing, set each API to draft, active, deprecated or retired, see who owns it, and switch on project rules that hold back a change.

This is lesson 9.26, part 1, of Shift-Left API in Depth. The previous lesson showed which APIs depend on each other. This one covers the decisions around each API: where it is in its life, who answers for it, and which rules a change must meet. API governance comes with Professional, the 15-day trial and Enterprise. On Free, the screen shows an upgrade card.

What do API governance tools help you decide?

API governance tools help a team say how its APIs should be run, and check that they are. In Shift-Left API, there are five decisions:

  1. Where each API is in its life.
  2. Who approves a change to its specification.
  3. Which design standards it is held to.
  4. Which policies every API must meet.
  5. Which risks the team has knowingly accepted.

Governance records, checks and reports. It never changes an API, never runs a test and never accepts a risk for you. A person sets the lifecycle, approves changes, grants exceptions and accepts risks. Every rule starts switched off.

Who can do what?

Every built-in role except Environment Manager can view Governance. Managing it (states, rules, standards, policies and risk acceptance) belongs to the Administrator. Approving API changes belongs to the Administrator and the Reviewer. People who can only look see the numbers, but no buttons.

What needs your attention first?

Tick Governance under Top menu tabs in the account menu, click it, and choose a project. The Overview tab starts with Needs your action, most urgent first, marked "Do first", "Should do" or "When you can". Each item has a button that takes you to the right place. Optional items you have not set up, such as policies or project rules, are not shown as failures. A gap also never looks like an all-clear.

How does API lifecycle management work?

On the Lifecycle tab, every API starts as Not set. It is counted on its own, never as Active, although it is treated as in use until someone decides. If a specification marks an API as deprecated, the table shows that, labelled as coming from the specification.

  • Set what is live. Tick the APIs, click Change state and choose Active.
  • Deprecate. Choose Deprecated, then add a retirement date and a reason. The API's owner is told, mocks of it are marked as possibly out of date, and nothing is switched off.
  • Retire. An API must be deprecated first. Retiring deletes nothing. A retired API leaves the list until you tick Show retired APIs, and it can come back. Retiring before a promised date needs an extra tick, which is recorded.

The table also shows each API's owner. Governance displays it but does not set it: owners are typed on the Inventory tab of the Security add-on. Owners matter because they are told when their API is deprecated or breaks a policy, and they can approve changes to it.

You can also choose which teams see selected APIs in the governance views and the API's record. This is a view, not a lock: anyone with the project can still open the API elsewhere. With the API Discovery add-on, a "Worth a look" list suggests APIs that Discovery has not seen lately. Nothing changes until a person acts.

What can project rules hold back?

The Project rules tab can require that:

  • a specification change is approved by someone with the approval permission, or by the owner of every API the change modifies or removes;
  • no more than a set number of versions are live at once;
  • deprecating an API includes a retirement date;
  • a REST specification's version is a real version number, such as 2.1.0, higher than the last approved one.

A fifth setting only suggests retiring APIs that have not been seen for 90 days.

When you import a new version of a specification, as in lesson 9.3, the review shows This project's rules and says why approval is not allowed yet. The rules are checked again on Approve & Import, before anything is imported, so a refused change simply waits. A change that only adds APIs has no owner, so it needs the permission. Anyone can still reject a change. If the rules cannot be read, nothing is approved.

Try it yourself

With a trial: import https://demo.totalshiftleft.ai/openapi/rest.json, tick Governance, set every API to Active, deprecate one with a date, and switch on one project rule.

Recap

  • API governance tools record how APIs are meant to be run, and check it.
  • Every API starts as Not set; a person moves it to Draft, Active, Deprecated or Retired.
  • Deprecate before you retire. Retiring deletes nothing.
  • Owners are shown in Governance and set in Security.
  • Project rules start off, and good API lifecycle management means turning them on deliberately.

Next: part 2, design standards, policies and risks. For the bigger picture, read about building an enterprise API governance program.

Hands-on lab

Try it: With a trial, import the sandbox store's specification, tick Governance in the account menu, set every API to Active, deprecate one with a retirement date, and switch on one project rule.

Enter your email to open the lab steps. One unlock opens every lab in the learning center.

No spam. Protected by reCAPTCHA — Google Privacy & Terms.

Frequently asked questions

What do API governance tools do?+

They record how your APIs are meant to be run and check that they are. In Shift-Left API, governance covers lifecycle states, change approval, design standards, policies and accepted risks. It works for REST, SOAP and GraphQL APIs, and a person makes each decision.

What is the difference between a deprecated and a retired API?+

A deprecated API still works but is on its way out. A retired one leaves the working views but keeps its tests, runs and history. In Shift-Left API, you deprecate an API before you retire it, so the people who use it get notice.

Which editions include API governance?+

API governance comes with Professional, the 15-day trial and Enterprise. Approving a specification change also needs Professional or above. An API's owner is set in the Security Inventory, which is part of the API security testing add-on.

Read more on the blog