Skip to content

Commit 4056a32

Browse files
committed
Merge branch 'APIMGMT-637-bdf' of github.com:box/developer.box.com into staging
2 parents f29d566 + 058df6c commit 4056a32

File tree

11 files changed

+72
-103
lines changed

11 files changed

+72
-103
lines changed

content/guides/api-calls/allowing-domain-access.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11,12 +11,12 @@ alias_paths:
1111
- /guides/api-calls/domain-whitelisting
1212
---
1313

14-
# Allowing Domain Access
14+
# Allow domain access
1515

1616
To use the Box APIs it is important that your application and users have access
1717
to the following domains, where needed.
1818

19-
## File Preview
19+
## File preview
2020

2121
To enable file preview, your application might need to load javascript file from
2222
the Box content delivery network (CDN). This file is loaded from the following

content/guides/api-calls/api-versioning-strategy.md

Lines changed: 46 additions & 64 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ related_guides: []
55
required_guides: []
66
---
77

8-
# API Versioning Strategy
8+
# API versioning strategy
99

1010
Box provides versioning capabilities for selected API endpoints. The version control system guarantees seamless functioning of existing endpoint versions, even if Box introduces new ones.
1111

@@ -25,24 +25,26 @@ Box API supports versioning in URL `path` and `header`. To determine which versi
2525

2626
</Message>
2727

28+
### Versioning in `path`
29+
2830
The default version of the API used in any requests is specified in the URL of the endpoint you call.
29-
An example flow looks like this:
31+
For example, when calling the `https://upload.box.com/api/2.0/files/content` endpoint without any version header specified, you reach the `2.0` version defined in the URL.
3032

31-
1. When calling the [upload](`https://upload.box.com/api/2.0/files/content`) endpoint without any version header specified, you hit the `2.0` version defined in the URL.
33+
If there is a significant change to API behavior, the new endpoint will be exposed under the new URL.
34+
For example, `https://upload.box.com/api/2.0/files/content` supports a multipart content type when uploading files to Box. If the new version of this API stops supporting this content type, it will be released under a new URL `https://upload.box.com/api/3.0/files/content`.
3235

33-
2. Box API processes the `box-version` header which should:
36+
### Versioning in `header`
3437

35-
- contain a valid version name, that is `box-version: 2025.0`
36-
- be directed at `https://api.box.com/2.0/files/:file_id/metadata`.
38+
Box API processes the `box-version` header which should contain a valid version name, that is `box-version: 2025.0` and be directed at `https://api.box.com/2.0/files/:file_id/metadata`.
3739

38-
3. If the provided version is correct, a response is sent back to the client. The response also contains the `box-version` header if it was provided in the request. By default, this header is not present in the response. If the version is wrong, an error with the HTTP code `400` is returned to the client.
39-
40-
If there is a significant change to API behavior, the new endpoint will be exposed under the new URL.
41-
For example, `https://upload.box.com/api/2.0/files/content` supports a multipart content type when uploading files to Box. If the new version of this API stops supporting this content type, it will be released under a new URL `https://upload.box.com/api/3.0/files/content`.
40+
If the provided version is correct, a response is sent back to the client. The response also contains the `box-version` header if it was provided in the request. By default, this header is not present in the response. If the version is wrong, an error with the HTTP code `400` is returned to the client.
4241

4342
## Release schedule and naming convention
4443

45-
Box can introduce a new breaking change to certain endpoints **once per year**. An endpoint encompasses all supported HTTP methods within a specific API root. For example, the Sign Request endpoints include:
44+
Box can introduce a new breaking change to certain endpoints **once per year**.
45+
Introducing a new version of the Sign Request endpoint means that **all paths and HTTP methods** of an endpoint will support it.
46+
47+
For example, if Sign Request endpoints receive a new version it will apply to all endpoints listed in the table:
4648

4749
| Method | Request URL | Description |
4850
| ------ | -------------------------------------------------- | ---------------------------------------- |
@@ -52,15 +54,15 @@ Box can introduce a new breaking change to certain endpoints **once per year**.
5254
| POST | `https://api.box.com/2.0/sign_requests/:id/resend` | Sends a specific sign request again. |
5355
| POST | `https://api.box.com/2.0/sign_requests/:id/cancel` | Cancels a specific sign request. |
5456

55-
Introducing a new version of the sign request endpoint means that all paths and HTTP methods listed above will support it. You can find comprehensive information about the endpoint version in the [Box API Reference](https://developer.box.com/reference/).
56-
5757
### Naming convention
5858

5959
New API versions are labeled according to the calendar year of their release.
60-
For example, if a new version of the Sign Requests endpoint is released in 2025, it will be named `2025.0`.
6160

62-
Box can issue a new breaking change to API endpoints once per year, reserving the right to release an additional breaking change to address security or privacy concerns. In such cases, the new version will be incremented by one in the suffix.
63-
For example, if security issues need addressing in the previously released version `2025.0` of Sign Requests, the new version will be labeled `2025.1`.
61+
**Example**: If a new version of the Sign Requests endpoint is released in 2025, it will be named `2025.0`.
62+
63+
Box can issue a new breaking change to API endpoints **once** per year, reserving the right to release an additional breaking change to address security or privacy concerns. In such cases, the new version will be incremented by one in the suffix.
64+
65+
**Example**: If security issues need addressing in the previously released version `2025.0` of Sign Requests, the new version will be labeled `2025.1`.
6466

6567
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.
6668
It also means, that a new version cannot be released sooner than every 12 months.
@@ -69,10 +71,20 @@ We strongly recommend updating your apps to make requests to the latest stable A
6971

7072
If your request doesn't include a version, the API defaults to the initial Box API version—the version available before
7173
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
74+
changes. To ensure consistency, always specify the API version, with each request. By making your application
7375
version-aware, you anchor it to a specific set of features, ensuring consistent behavior throughout the supported
7476
timeframe.
7577

78+
### Endpoint marking
79+
80+
To keep you informed about the current API state, and improve the readability of the versioned API reference, the affected endpoints are marked with the following terms:
81+
82+
* **Beta**: Endpoints marked with **beta**, are offered subject to Box’s Main Beta Agreement, meaning the available capabilities may change at any time. Although beta endpoints not the same as versioned endpoints, they are a part of API lifecycle.
83+
84+
* **Latest version**: The latest version applies to APIs that are already versioned. **Latest version** marks the most recent API version of an endpoint.
85+
86+
* **Deprecated**: If a version is deprecated, it is still available for use, but no new features are added. Such a version is marked with **Deprecated**.
87+
7688
## Calling an API version
7789

7890
Box API versions are explicitly declared in the `box-version` header that your app makes requests to. For example:
@@ -87,48 +99,18 @@ The client gets a list of all created sign requests and asks for version `2025.0
8799

88100
## Versioning errors
89101

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"
104-
]
105-
},
106-
"help_url": "https://developer.box.com/guides/api-calls/permissions-and-errors/versioning-errors/"
107-
}
108-
```
109-
110-
The error message will contain information about the error and possible correct values for the `box-version` header. For example:
111-
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.
102+
When using versioned API actions such as calling an incorrect API version in header or a deprecated version can lead to errors.
115103

116-
### Calling a deprecated API
117-
118-
When a customer uses an API version that Box has marked as deprecated, the API will respond as usual. However, it will append a `Deprecation` header, stating the deprecation date, for example:
119-
120-
```sh
121-
Deprecation: date="Fri, 11 Nov 2023 23:59:59 GMT"
122-
Box-API-Deprecated-Reason: https://developer.box.com/reference/deprecated
123-
```
124-
125-
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.
104+
For details on possible errors, see [versioning errors](g://api-calls/permissions-and-errors/versioning-errors).
126105

127106
## How Box SDK versioning works
128107

129-
The versioning strategy is only applied to [next generation generated SDKs](https://developer.box.com/sdks-and-tools/#next-generation-sdks).
108+
The versioning strategy applies only to [next generation generated SDKs](https://developer.box.com/sdks-and-tools/#next-generation-sdks).
109+
130110
Box SDKs support the **All Versions In** SDK approach.
131-
This means that every release of SDK provides access to all endpoints in any version which is currently live. All generated SDKs use manager's approach - they group all endpoints with the same domain in one manager. For example `FolderManager` contains methods to: `create_folder`, `get_folder_by_id`, `update_folder_by_id`, `delete_folder_by_id`, `get_folder_items` and `copy_folder`.This division is done based on the value of `x-box-tag` field, which is assigned to each method in Public API Service specification. It mostly corresponds to the root of the endpoint URL, but not necessarily. For example: `FolderManager` contains methods with `https://api.box.com/2.0/folders` root URL, but the same base URL is also used in some methods of `SharedLinkFoldersManager`.
111+
This means that every release of SDK provides access to all endpoints in any version which is currently live. All generated SDKs use manager's approach - they group all endpoints with the same domain in one manager.
112+
113+
For example `FolderManager` contains methods to: `create_folder`, `get_folder_by_id`, `update_folder_by_id`, `delete_folder_by_id`, `get_folder_items` and `copy_folder`. This division is done based on the value of `x-box-tag` field, which is assigned to each method in Public API Service specification. It mostly corresponds to the root of the endpoint URL, but not necessarily. For example: `FolderManager` contains methods with `https://api.box.com/2.0/folders` root URL, but the same base URL is also used in some methods of `SharedLinkFoldersManager`.
132114
References to all managers are stored under one Box Client object.
133115

134116
See an example of the endpoint's lifecycle:
@@ -188,7 +170,7 @@ See an example of the endpoint's lifecycle:
188170

189171
## Breaking vs non-breaking changes
190172

191-
Breaking changes in the Box API occur within versioned releases, typically accompanied by a new major API version. Minor adjustments, which do not disrupt existing functionality, can be integrated into an existing API version. The following table offers illustrations of both breaking and non-breaking changes.
173+
Breaking changes in the Box API occur within versioned releases, typically accompanied by a new major API version. Minor adjustments, which do not disrupt existing functionality, can be integrated into an existing API version. The following table lists both breaking and non-breaking changes.
192174

193175
| API Change | Breaking change |
194176
| -------------------------------------------------------- | --------------- |
@@ -211,7 +193,7 @@ Breaking changes in the Box API occur within versioned releases, typically accom
211193

212194
<Message type='tip'>
213195

214-
We use [oasdiff](https://github.com/Tufin/oasdiff/blob/main/BREAKING-CHANGES-EXAMPLES.md) tool to detect most of the possible breaking changes.
196+
The [oasdiff](https://github.com/Tufin/oasdiff/blob/main/BREAKING-CHANGES-EXAMPLES.md) tool allows detecting most of the possible breaking changes.
215197
</Message>
216198

217199
## AI agent configuration versioning
@@ -241,25 +223,25 @@ The date tells clients when this version was marked as deprecated.
241223
242224
When building your request, consider the following:
243225
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.
226+
* If you do not specify a version, the service will return the initial 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`.
227+
* If the version header is specified but the requested version is unavailable, the response will return an HTTP error code `400 - Bad Request`.
246228
247-
You can check [Versioning Errors](#versioning-errors) for more information.
229+
For details, see [versioning errors](g://api-calls/permissions-and-errors/versioning-errors).
248230
249231
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:
250232
251-
- Calls that include the deprecated behavior return the response header `Box-API-Deprecated-Reason` and a link to get more information:
233+
* Calls that include the deprecated behavior return the response header `Box-API-Deprecated-Reason` and a link to get more information:
252234
253235
```sh
254236
box-version: 2023.0
255237
Deprecation: version="version", date="date"
256238
Box-API-Deprecated-Reason: https://developer.box.com/reference/deprecated
257239
```
258240
259-
- A notice about the deprecation is posted in the developer changelog.
260-
- The API reference is updated to identify the affected resource and any action you need to take.
261-
- If there is an imminent backwards-incompatible change that affects your app, then the contact email for your app might be contacted about the deprecation.
241+
* A deprecation announcement is posted in the developer changelog.
242+
* The API reference is updated to identify the affected resource and any action you need to take. Affected endpoints are marked with **deprecated** pill.
243+
* If there is an imminent backwards-incompatible change that affects your app, then the contact email for your app might be contacted about the deprecation.
262244
263245
## Additional resources
264246
265-
- [API reference](https://developer.box.com/reference/)
247+
* [API reference](https://developer.box.com/reference/)

content/guides/api-calls/ensure-consistency.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -17,9 +17,9 @@ required_guides: []
1717
alias_paths: []
1818
---
1919

20-
# Ensure Consistency
20+
# Ensure consistency with headers
2121

22-
A few of the Box APIs support headers to control consistency between your
22+
Some Box APIs support headers used to ensure consistency between your
2323
application and Box.
2424

2525
## `etag`, `if-match`, and `if-none-match`
@@ -83,7 +83,7 @@ The following endpoints support this header.
8383
The response of these APIs calls depends on the existence of the item,
8484
and whether the `etag` value matches the most recent version.
8585

86-
| Item found? | Etag match? | HTTP Status |
86+
| Item found? | Etag match? | HTTP status |
8787
| ----------- | ----------- | ----------- |
8888
| Yes | Yes | 200 |
8989
| Yes | No | 412 |

content/guides/api-calls/index.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ alias_paths:
88

99
# API Calls
1010

11-
The Box API is a restful API that attempts to follow common HTTP standards
11+
The Box API is a restful API that follow common HTTP standards
1212
where possible. The following guides take a look at some of the useful
1313
features and common mistakes that a developer can encounter when working with
1414
these APIs.

content/guides/api-calls/language-codes.md

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -7,10 +7,9 @@ alias_paths:
77
- /docs/api-language-codes
88
---
99

10-
# Language Codes
10+
# Language codes
1111

12-
The Box API uses a modified version of the ISO 639-1 Language Code to specify a
13-
user's language.
12+
The Box API uses a modified version of the **ISO 639-1 Language Code** to specify a user's language.
1413

1514
The following is a list of language codes used when [creating][create_user] or [updating][update_user].
1615

content/guides/api-calls/permissions-and-errors/index.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ required_guides: []
66
alias_paths: []
77
---
88

9-
# Permissions & Errors
9+
# Permissions and errors
1010

1111
The following guides provide information on the permissions or errors related to
1212
the Box API. It includes pages on [Common Errors][1], [Rate Limits][2],

0 commit comments

Comments
 (0)