Skip to content

Commit 802ee0d

Browse files
committed
[DOCS] Add x-topic about versioning
1 parent aa84744 commit 802ee0d

File tree

1 file changed

+51
-1
lines changed

1 file changed

+51
-1
lines changed

docs/overlays/elasticsearch-serverless-openapi-overlays.yaml

Lines changed: 51 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -44,4 +44,54 @@ actions:
4444
description: Add document security
4545
update:
4646
security:
47-
- apiKeyAuth: []
47+
- apiKeyAuth: []
48+
# Add x-topics
49+
- target: '$'
50+
description: Add an extra page about versioning
51+
update:
52+
x-topics:
53+
- title: API versioning
54+
content: |
55+
Elasticsearch Serverless implements API versioning to enable backwards-incompatible changes while maintaining client compatibility. An API version is a date-based identifier that represents a guaranteed backwards-compatible API surface.
56+
57+
As long as the server supports an API version and the client specifies that version, existing client code will continue to work without modification. This backwards compatibility guarantee covers request/response structure and API behavior.
58+
59+
## Guarantees
60+
61+
This API versioning scheme provides several key guarantees:
62+
63+
* No code changes required: Your application code remains unchanged during Serverless infrastructure upgrades.
64+
* No manual migrations: Data, indices, and resources are migrated transparently without user intervention.
65+
* New features available everywhere: Compatible additions like new APIs and parameters work across all supported versions.
66+
* Predictable upgrade timeline: API versions are supported for at least 18 months after newer versions are introduced.
67+
68+
## API version format
69+
70+
API versions use ISO8601 date format: `YYYY-MM-DD` (for example, `2023-10-31`).
71+
72+
## Supported versions
73+
74+
Elasticsearch Serverless currently supports the following API versions:
75+
76+
* `2023-10-31`
77+
78+
Future breaking changes will introduce new date-based versions.
79+
Support policies for existing versions will be announced when new versions are released.
80+
81+
## How to specify API versions
82+
83+
Clients specify API versions using the `Elastic-Api-Version` HTTP header:
84+
85+
```
86+
GET /_search HTTP/1.1
87+
Elastic-Api-Version: 2023-10-31
88+
```
89+
90+
### Server responses
91+
92+
The server's response depends on whether the client provides a version header:
93+
94+
* When a client sends the `Elastic-Api-Version` header, the server processes the request using the specified API version or returns HTTP 400 if the version is unsupported or malformed.
95+
* When no version header is provided, the server defaults to the latest supported API version.
96+
97+
The server always includes the Elastic-Api-Version header in successful responses to indicate which version was used.

0 commit comments

Comments
 (0)