Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[HTTP] Support public HTTP API availability statuses #179170

Open
jloleysens opened this issue Mar 21, 2024 · 5 comments
Open

[HTTP] Support public HTTP API availability statuses #179170

jloleysens opened this issue Mar 21, 2024 · 5 comments
Labels
discuss Feature:http Team:Core Core services & architecture: plugins, logging, config, saved objects, http, ES client, i18n, etc

Comments

@jloleysens
Copy link
Contributor

jloleysens commented Mar 21, 2024

When a Kibana API is made public there is no way to capture it's stability: e.g. "experimental" or "stable". Being able differentiate public APIs in this way provides some freedom to run experiments and learn about real usage before committing to supporting an API for +18 months.

Further, having this kind of metadata present in code would enable us to communicate the overall API level of stability in docs, requests and responses.

The following sections are some thoughts and discussion we've had on this topic. Additional input is welcome!

Elasticsearch-specification approach

We can piggy back off the Elasticsearch-specification. It documents API "stability" as one of experimental, beta, stable. For example. This value could be surfaced in request responses as a header, something like x-availability-stability: experimental to further increase visibility of stability.

The break-when-graduate approach

An extension to ES-specification approach: instead of only sending back a header we can encoding stability into something like the version or URL path. Anything that forces a break once the API moves from experimental to stable. This may make it easier to choose to end the experiment by removing an API entirely but could also reduce involvement if users know APIs could vanish whenever we choose.

Overall the intention is provide a way to avoid future experimental APIs from becoming relied upon by end users in unintended ways.

There are a couple of mechanisms for forcing breakages that I could think of:

  1. Encode availability in the version, something like 2023-10-31.experimental
  2. Encode availability in the path, something like /api/experimental/<rest-of-path>

Generally, avoid experimental APIs

Not all APIs are equal and it could be dangerous to release certain capabilities even under the "experimental" label (thinking specifically of SO APIs). This is where the "break-when-graduate" approach could be helpful because users more explicitly opt in to an experiment.

Ideally there are ways of gathering data other than releasing new APIs we are not sure we'll support.

@botelastic botelastic bot added the needs-team Issues missing a team label label Mar 21, 2024
@jloleysens jloleysens added Team:Core Core services & architecture: plugins, logging, config, saved objects, http, ES client, i18n, etc and removed needs-team Issues missing a team label labels Mar 21, 2024
@elasticmachine
Copy link
Contributor

Pinging @elastic/kibana-core (Team:Core)

@jloleysens
Copy link
Contributor Author

Related #105692

@TinaHeiligers
Copy link
Contributor

@jloleysens we need to pick up the discussion for upcoming breaking changes

@TinaHeiligers
Copy link
Contributor

related #192292

@rayafratkina
Copy link
Contributor

Will tackle this work as part of enabling new API versions

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
discuss Feature:http Team:Core Core services & architecture: plugins, logging, config, saved objects, http, ES client, i18n, etc
Projects
None yet
Development

No branches or pull requests

4 participants