You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: content/guides/api-calls/api-versioning-strategy.md
+38-12Lines changed: 38 additions & 12 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -65,9 +65,13 @@ For example, if security issues need addressing in the previously released versi
65
65
Each stable version is supported for a minimum of 12 months. This means that when a new version is released, the previous version becomes deprecated and will be available for use, but no new features will be added.
66
66
It also means, that a new version cannot be released sooner than every 12 months.
67
67
68
-
We strongly recommend updating your apps to make requests to the latest stable API version. However, if your app uses a stable version that is no longer supported, then you will get a response with an HTTP error code `404 - Not Found`. For details, see [Versioning Errors](#versioning-errors).
68
+
We strongly recommend updating your apps to make requests to the latest stable API version. However, if your app uses a stable version that is no longer supported, then you will get a response with an HTTP error code `400 - Bad Request`. For details, see [Versioning Errors](#versioning-errors).
69
69
70
-
If your request doesn't include a version, then the API defaults to the `V2` Box API version. However, we do not recommend relying on this behavior for adopting deprecated changes. As you update your app, you should specify the API version with every request. By making your app version-aware, you anchor your code to a specific set of features that are guaranteed to behave in the same way for the supported timeframe.
70
+
If your request doesn't include a version, the API defaults to the initial Box API version—the version available before
71
+
year-based versioning was introduced. However, relying on this behavior is not recommended when adopting deprecated
72
+
changes. To ensure consistency, always specify the API version with each request. By making your application
73
+
version-aware, you anchor it to a specific set of features, ensuring consistent behavior throughout the supported
74
+
timeframe.
71
75
72
76
## Calling an API version
73
77
@@ -83,9 +87,31 @@ The client gets a list of all created sign requests and asks for version `2025.0
83
87
84
88
## Versioning errors
85
89
86
-
### Calling an incorrect API version in the URL
90
+
### Calling an incorrect API version in the header
91
+
92
+
If the API version provided in the `box-version` header is incorrect, the response will return an `HTTP 400 - Bad Request error`.
93
+
The error response will have the following structure:
94
+
95
+
```json
96
+
{
97
+
"type": "error",
98
+
"status": 400,
99
+
"code": "invalid_api_version",
100
+
"message": "Some error message",
101
+
"context_info": {
102
+
"conflicts": [
103
+
"box_version value must be in the format of YYYY.MM"
The error message will contain information about the error and possible correct values for the `box-version` header. For example:
87
111
88
-
Box documentation specifies API URLs. For instance, the Sign Requests endpoints are accessed via: `https://api.box.com/2.0/sign_requests/`. If a customer mistakenly makes a call to an incorrect version, such as `https://api.box.com/3.0/sign_requests/`, the response returns an `HTTP error code 404 - Not Found` error.
112
+
-`The 'box-version' header supports only one header value per request, do not use comas.` - when the header contains multiple values separated by commas.
113
+
-`Missing required box-version header.` - when the header is missing but required.
114
+
-`Unsupported API version specified in 'box-version' header. Supported API versions: [LIST_OF_SUPPORTED_VERSIONS_COMA_SEPARATED]` - when the version specified is not supported by the API.
Customers should monitor API responses and take note when this header appears, signaling the need to plan for the transition to a new API version.
100
126
101
-
### Calling a nonexistent version
102
-
103
-
If a customer attempts to use an outdated API version, such as `2023.0`, which has reached its end-of-life, the response will return an `HTTP error code 404 - Not Found`. See [Calling an incorrect API version in the URL](#calling-an-incorrect-api-version-in-the-url) for more information.
104
-
105
127
## How Box SDK versioning works
106
128
107
129
The versioning strategy is only applied to [next generation generated SDKs](https://developer.box.com/sdks-and-tools/#next-generation-sdks).
@@ -192,6 +214,10 @@ Breaking changes in the Box API occur within versioned releases, typically accom
192
214
We use [oasdiff](https://github.com/Tufin/oasdiff/blob/main/BREAKING-CHANGES-EXAMPLES.md) tool to detect most of the possible breaking changes.
193
215
</Message>
194
216
217
+
## AI agent configuration versioning
218
+
219
+
[AI agent](g://box-ai/ai-agents) versioning gives the developers more control over model version management and ensures consistent responses. For details, see [AI agent configuration versioning guide](g://box-ai/ai-agents/ai-agent-versioning).
220
+
195
221
## Support policy and deprecation information
196
222
197
223
When newversionsof the Box APIs and Box SDKs are released, earlier versions will be retired. Box marks a version as `deprecated` at least 24 months before retiring it. In other words, a deprecated version cannot become end-of-life
@@ -213,12 +239,12 @@ The date tells clients when this version was marked as deprecated.
213
239
214
240
## Versioning considerations
215
241
216
-
When building your request, consider that:
242
+
When building your request, consider the following:
217
243
218
-
- If you do not specify a version, the service returns a default version that may not be the latest one.
244
+
- If you do not specify a version, the service will return the initial version—the version that existed before year-based versioning was introduced. If the initial version does not exist, the response will return an HTTP error code 400 - Bad Request.
245
+
- If the version header is specified but the requested version is unavailable, the response will return an HTTP error code 400 - Bad Request.
219
246
220
-
- When the version header is missing, the default resource version is determined by the version in the URL.
221
-
- When the version header is specified, but the requested version is unavailable, then the response will return an HTTP error code `404 - Not Found`.
247
+
You can check [Versioning Errors](#versioning-errors) for more information.
222
248
223
249
When Box deprecates a resource or a property of a resource in the API, the change is communicated in one or more of the following ways:
0 commit comments