Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .codegen.json
Original file line number Diff line number Diff line change
@@ -1 +1 @@
{ "engineHash": "12fa0b7", "specHash": "c5a35a6", "version": "5.18.0" }
{ "engineHash": "d55532c", "specHash": "e21eebc", "version": "5.18.0" }
20 changes: 16 additions & 4 deletions docs/sdkgen/chunkeduploads.md
Original file line number Diff line number Diff line change
Expand Up @@ -174,6 +174,9 @@ This function returns a value of type `UploadedPart`.

Chunk has been uploaded successfully.

The response always includes `sha512`. It also includes
`sha1` if the `Digest` header used `SHA-1`.


## Upload part of file

Expand Down Expand Up @@ -208,6 +211,9 @@ This function returns a value of type `UploadedPart`.

Chunk has been uploaded successfully.

The response always includes `sha512`. It also includes
`sha1` if the `Digest` header used `SHA-1`.


## Remove upload session by URL

Expand Down Expand Up @@ -312,6 +318,9 @@ This function returns a value of type `UploadParts`.

Returns a list of parts that have been uploaded.

Each part includes the hash type used to upload it. Parts
uploaded with a `SHA-512` `Digest` header don't include `sha1`.


## List parts

Expand Down Expand Up @@ -346,15 +355,18 @@ This function returns a value of type `UploadParts`.

Returns a list of parts that have been uploaded.

Each part includes the hash type used to upload it. Parts
uploaded with a `SHA-512` `Digest` header don't include `sha1`.


## Plan upload session by URL

Plan an upload session by checking which parts already exist on the server.
This endpoint allows clients to optimize uploads by skipping parts that
have already been uploaded (cache hits) and only uploading missing parts.

The actual endpoint URL is returned by the [`Create upload session`](e://post-files-upload-sessions)
and [`Get upload session`](e://get-files-upload-sessions-id) endpoints.
The actual endpoint URL is returned by the [`Create upload session`](https://developer.box.com/reference/post-files-upload-sessions)
and [`Get upload session`](https://developer.box.com/reference/get-files-upload-sessions-id) endpoints.

This operation is performed by calling function `createFileUploadSessionPlanByUrl`.

Expand Down Expand Up @@ -390,8 +402,8 @@ Plan an upload session by checking which parts already exist on the server.
This endpoint allows clients to optimize uploads by skipping parts that
have already been uploaded (cache hits) and only uploading missing parts.

The actual endpoint URL is returned by the [`Create upload session`](e://post-files-upload-sessions)
and [`Get upload session`](e://get-files-upload-sessions-id) endpoints.
The actual endpoint URL is returned by the [`Create upload session`](https://developer.box.com/reference/post-files-upload-sessions)
and [`Get upload session`](https://developer.box.com/reference/get-files-upload-sessions-id) endpoints.

This operation is performed by calling function `createFileUploadSessionPlan`.

Expand Down
27 changes: 21 additions & 6 deletions docs/sdkgen/query.md
Original file line number Diff line number Diff line change
@@ -1,14 +1,29 @@
# QueryManager


- [Query for Box items](#query-for-box-items)
- [Box Query](#box-query)
- [Create insights for Box items](#create-insights-for-box-items)

## Query for Box items

Runs a query to discover Box items using a logical predicate that can filter
across item fields and metadata templates. Results can be sorted, paginated,
and shaped to include additional item or metadata fields.
## Box Query

Runs a query to discover Box items using a logical predicate, similar to a SQL
WHERE clause. The predicate can filter across multiple metadata templates and
item fields in a single request. Results can be sorted, paginated with markers,
and shaped with fields so each entry includes additional item or metadata
attributes.

This is the item-retrieval endpoint in the Query API (version 2026.0). Unlike
the [Metadata Query API](https://developer.box.com/reference/post-metadata-queries-execute-read),
it is not limited to a single metadata template or to files and folders. For
totals and grouped metrics over the same predicates, use
[Query Insights](https://developer.box.com/reference/v2026.0/post-query-insights)
instead of paging through every matching item.

For predicate syntax, parameters, examples, pagination behavior, and error
codes, see the
[Box Query guide](https://developer.box.com/guides/query/box-query). For shared
response schemas, including Query results and result entries, see
[Query resources](https://developer.box.com/reference/v2026.0/query-resources).

This operation is performed by calling function `createQueryV2026R0`.

Expand Down
4 changes: 4 additions & 0 deletions docs/sdkgen/search.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,10 @@

## Query files/folders by metadata

For new integrations, use the [v2026.0 Query API](https://developer.box.com/reference/v2026.0/query-resources).
This is the latest version of the Query API, with advanced capabilities including multi-template queries and
Query Insights, and is the API we will continue to enhance with new Query capabilities.

Create a search using SQL-like syntax to return items that match specific
metadata.

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -599,8 +599,8 @@ public UploadParts getFileUploadSessionParts(
* only uploading missing parts.
*
* <p>The actual endpoint URL is returned by the [`Create upload
* session`](e://post-files-upload-sessions) and [`Get upload
* session`](e://get-files-upload-sessions-id) endpoints.
* session`](https://developer.box.com/reference/post-files-upload-sessions) and [`Get upload
* session`](https://developer.box.com/reference/get-files-upload-sessions-id) endpoints.
*
* @param url URL of createFileUploadSessionPlan method
* @param requestBody Request body of createFileUploadSessionPlan method
Expand All @@ -620,8 +620,8 @@ public UploadSessionPlanResponse createFileUploadSessionPlanByUrl(
* only uploading missing parts.
*
* <p>The actual endpoint URL is returned by the [`Create upload
* session`](e://post-files-upload-sessions) and [`Get upload
* session`](e://get-files-upload-sessions-id) endpoints.
* session`](https://developer.box.com/reference/post-files-upload-sessions) and [`Get upload
* session`](https://developer.box.com/reference/get-files-upload-sessions-id) endpoints.
*
* @param url URL of createFileUploadSessionPlan method
* @param requestBody Request body of createFileUploadSessionPlan method
Expand Down Expand Up @@ -653,8 +653,8 @@ public UploadSessionPlanResponse createFileUploadSessionPlanByUrl(
* hits) and only uploading missing parts.
*
* <p>The actual endpoint URL is returned by the [`Create upload
* session`](e://post-files-upload-sessions) and [`Get upload
* session`](e://get-files-upload-sessions-id) endpoints.
* session`](https://developer.box.com/reference/post-files-upload-sessions) and [`Get upload
* session`](https://developer.box.com/reference/get-files-upload-sessions-id) endpoints.
*
* @param uploadSessionId The ID of the upload session. Example: "D5E3F7A"
* @param requestBody Request body of createFileUploadSessionPlan method
Expand All @@ -671,8 +671,8 @@ public UploadSessionPlanResponse createFileUploadSessionPlan(
* hits) and only uploading missing parts.
*
* <p>The actual endpoint URL is returned by the [`Create upload
* session`](e://post-files-upload-sessions) and [`Get upload
* session`](e://get-files-upload-sessions-id) endpoints.
* session`](https://developer.box.com/reference/post-files-upload-sessions) and [`Get upload
* session`](https://developer.box.com/reference/get-files-upload-sessions-id) endpoints.
*
* @param uploadSessionId The ID of the upload session. Example: "D5E3F7A"
* @param requestBody Request body of createFileUploadSessionPlan method
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,9 @@ public class CreateFileUploadSessionCommitByUrlHeaders {
* <p>Only SHA1 is supported. The SHA1 digest must be Base64 encoded. The format of this header is
* as `sha=BASE64_ENCODED_DIGEST`.
*
* <p>`SHA-512` is not supported for the whole-file digest, even if the parts were uploaded with
* `SHA-512` digests.
*
* <p>[1]: https://tools.ietf.org/html/rfc3230
*/
public final String digest;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,18 @@
@JsonFilter("nullablePropertyFilter")
public class CreateFileUploadSessionCommitByUrlRequestBody extends SerializableObject {

/** The list details for the uploaded parts. */
/**
* The list details for the uploaded parts.
*
* <p>Each entry can include `sha1` or `sha512`. Include `sha512` on every entry or on none of
* them. A request where only some entries include `sha512` is rejected.
*
* <p>Include parts that the server already has, returned as `hits` by the [`Plan upload
* session`](https://developer.box.com/reference/post-files-upload-sessions-id-plan) endpoint. Use
* the `part_id`, `offset`, and `size` from the plan response. If the other entries include
* `sha512`, include the `sha512` value from the plan response. Otherwise, leave the hash out of
* these entries.
*/
protected final List<UploadPart> parts;

public CreateFileUploadSessionCommitByUrlRequestBody(
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,9 @@ public class CreateFileUploadSessionCommitHeaders {
* <p>Only SHA1 is supported. The SHA1 digest must be Base64 encoded. The format of this header is
* as `sha=BASE64_ENCODED_DIGEST`.
*
* <p>`SHA-512` is not supported for the whole-file digest, even if the parts were uploaded with
* `SHA-512` digests.
*
* <p>[1]: https://tools.ietf.org/html/rfc3230
*/
public final String digest;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,18 @@
@JsonFilter("nullablePropertyFilter")
public class CreateFileUploadSessionCommitRequestBody extends SerializableObject {

/** The list details for the uploaded parts. */
/**
* The list details for the uploaded parts.
*
* <p>Each entry can include `sha1` or `sha512`. Include `sha512` on every entry or on none of
* them. A request where only some entries include `sha512` is rejected.
*
* <p>Include parts that the server already has, returned as `hits` by the [`Plan upload
* session`](https://developer.box.com/reference/post-files-upload-sessions-id-plan) endpoint. Use
* the `part_id`, `offset`, and `size` from the plan response. If the other entries include
* `sha512`, include the `sha512` value from the plan response. Otherwise, leave the hash out of
* these entries.
*/
protected final List<UploadPart> parts;

public CreateFileUploadSessionCommitRequestBody(@JsonProperty("parts") List<UploadPart> parts) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,13 +9,15 @@ public class UploadFilePartByUrlHeaders {
/**
* The [RFC3230][1] message digest of the chunk uploaded.
*
* <p>Only SHA1 is supported. The SHA1 digest must be base64 encoded. The format of this header is
* as `sha=BASE64_ENCODED_DIGEST`.
* <p>`SHA-1` and `SHA-512` ([RFC5843][2]) are supported. The digest must be base64 encoded. The
* format of this header is as `sha=BASE64_ENCODED_DIGEST` for `SHA-1`, or
* `sha-512=BASE64_ENCODED_DIGEST` for `SHA-512`.
*
* <p>To get the value for the `SHA` digest, use the openSSL command to encode the file part:
* `openssl sha1 -binary &lt;FILE_PART_NAME&gt; | base64`.
* <p>To get the value for the digest, use the openSSL command to encode the file part: `openssl
* sha1 -binary &lt;FILE_PART_NAME&gt; | base64` for `SHA-1`, or `openssl sha512 -binary
* &lt;FILE_PART_NAME&gt; | base64` for `SHA-512`.
*
* <p>[1]: https://tools.ietf.org/html/rfc3230
* <p>[1]: https://tools.ietf.org/html/rfc3230 [2]: https://tools.ietf.org/html/rfc5843
*/
public final String digest;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,13 +9,15 @@ public class UploadFilePartHeaders {
/**
* The [RFC3230][1] message digest of the chunk uploaded.
*
* <p>Only SHA1 is supported. The SHA1 digest must be base64 encoded. The format of this header is
* as `sha=BASE64_ENCODED_DIGEST`.
* <p>`SHA-1` and `SHA-512` ([RFC5843][2]) are supported. The digest must be base64 encoded. The
* format of this header is as `sha=BASE64_ENCODED_DIGEST` for `SHA-1`, or
* `sha-512=BASE64_ENCODED_DIGEST` for `SHA-512`.
*
* <p>To get the value for the `SHA` digest, use the openSSL command to encode the file part:
* `openssl sha1 -binary &lt;FILE_PART_NAME&gt; | base64`.
* <p>To get the value for the digest, use the openSSL command to encode the file part: `openssl
* sha1 -binary &lt;FILE_PART_NAME&gt; | base64` for `SHA-1`, or `openssl sha512 -binary
* &lt;FILE_PART_NAME&gt; | base64` for `SHA-512`.
*
* <p>[1]: https://tools.ietf.org/html/rfc3230
* <p>[1]: https://tools.ietf.org/html/rfc3230 [2]: https://tools.ietf.org/html/rfc5843
*/
public final String digest;

Expand Down
38 changes: 32 additions & 6 deletions src/main/java/com/box/sdkgen/managers/query/QueryManager.java
Original file line number Diff line number Diff line change
Expand Up @@ -34,9 +34,22 @@ protected QueryManager(Builder builder) {
}

/**
* Runs a query to discover Box items using a logical predicate that can filter across item fields
* and metadata templates. Results can be sorted, paginated, and shaped to include additional item
* or metadata fields.
* Runs a query to discover Box items using a logical predicate, similar to a SQL WHERE clause.
* The predicate can filter across multiple metadata templates and item fields in a single
* request. Results can be sorted, paginated with markers, and shaped with fields so each entry
* includes additional item or metadata attributes.
*
* <p>This is the item-retrieval endpoint in the Query API (version 2026.0). Unlike the [Metadata
* Query API](https://developer.box.com/reference/post-metadata-queries-execute-read), it is not
* limited to a single metadata template or to files and folders. For totals and grouped metrics
* over the same predicates, use [Query
* Insights](https://developer.box.com/reference/v2026.0/post-query-insights) instead of paging
* through every matching item.
*
* <p>For predicate syntax, parameters, examples, pagination behavior, and error codes, see the
* [Box Query guide](https://developer.box.com/guides/query/box-query). For shared response
* schemas, including Query results and result entries, see [Query
* resources](https://developer.box.com/reference/v2026.0/query-resources).
*
* @param requestBody Request body of createQueryV2026R0 method
*/
Expand All @@ -45,9 +58,22 @@ public QueryResultsV2026R0 createQueryV2026R0(QueryRequestBodyV2026R0 requestBod
}

/**
* Runs a query to discover Box items using a logical predicate that can filter across item fields
* and metadata templates. Results can be sorted, paginated, and shaped to include additional item
* or metadata fields.
* Runs a query to discover Box items using a logical predicate, similar to a SQL WHERE clause.
* The predicate can filter across multiple metadata templates and item fields in a single
* request. Results can be sorted, paginated with markers, and shaped with fields so each entry
* includes additional item or metadata attributes.
*
* <p>This is the item-retrieval endpoint in the Query API (version 2026.0). Unlike the [Metadata
* Query API](https://developer.box.com/reference/post-metadata-queries-execute-read), it is not
* limited to a single metadata template or to files and folders. For totals and grouped metrics
* over the same predicates, use [Query
* Insights](https://developer.box.com/reference/v2026.0/post-query-insights) instead of paging
* through every matching item.
*
* <p>For predicate syntax, parameters, examples, pagination behavior, and error codes, see the
* [Box Query guide](https://developer.box.com/guides/query/box-query). For shared response
* schemas, including Query results and result entries, see [Query
* resources](https://developer.box.com/reference/v2026.0/query-resources).
*
* @param requestBody Request body of createQueryV2026R0 method
* @param headers Headers of createQueryV2026R0 method
Expand Down
14 changes: 12 additions & 2 deletions src/main/java/com/box/sdkgen/managers/search/SearchManager.java
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,12 @@ protected SearchManager(Builder builder) {
}

/**
* Create a search using SQL-like syntax to return items that match specific metadata.
* For new integrations, use the [v2026.0 Query
* API](https://developer.box.com/reference/v2026.0/query-resources). This is the latest version
* of the Query API, with advanced capabilities including multi-template queries and Query
* Insights, and is the API we will continue to enhance with new Query capabilities.
*
* <p>Create a search using SQL-like syntax to return items that match specific metadata.
*
* <p>By default, this endpoint returns only the most basic info about the items for which the
* query matches. To get additional fields for each item, including any of the metadata, use the
Expand All @@ -46,7 +51,12 @@ public MetadataQueryResults searchByMetadataQuery(MetadataQuery requestBody) {
}

/**
* Create a search using SQL-like syntax to return items that match specific metadata.
* For new integrations, use the [v2026.0 Query
* API](https://developer.box.com/reference/v2026.0/query-resources). This is the latest version
* of the Query API, with advanced capabilities including multi-template queries and Query
* Insights, and is the API we will continue to enhance with new Query capabilities.
*
* <p>Create a search using SQL-like syntax to return items that match specific metadata.
*
* <p>By default, this endpoint returns only the most basic info about the items for which the
* query matches. To get additional fields for each item, including any of the metadata, use the
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@ public enum ClientErrorCodeField implements Valuable {
METHOD_NOT_ALLOWED("method_not_allowed"),
CONFLICT("conflict"),
PRECONDITION_FAILED("precondition_failed"),
UNPROCESSABLE_ENTITY("unprocessable_entity"),
TOO_MANY_REQUESTS("too_many_requests"),
INTERNAL_SERVER_ERROR("internal_server_error"),
UNAVAILABLE("unavailable"),
Expand Down
Loading
Loading