Box CLI V2 release
A major version release (V2) has been made to the .See the following links for updated information:
- Release notes: Major revision details, breaking
changes, and bug fixes.
- Command list: All commands available in the new
CLI.
- : Standalone installers and
source code options.
Java SDK v2.25.0 released
- Allow content streaming to box through
outputstream. #667
Collaborations now show unregistered users
An additional field, invite_email, has been added to the collaboration return
object in the instance where an unregistered user has been added as a
collaborator on a file or folder. This change was put in place because the
current accessible_by object returned would show null as the result for an
unregistered user. The new field will now show the email address that was used
to invite the user.This change affects the following endpoints:Previously a collaboration object with an unregistered user would look like the
following:With this new update the object returned would look like the following:
Enterprise events API adds created_by for supervisors
A minor change has been made to the response object of the
enterprise events API endpoint in the
event that an action is taken by a supervisor or internal admin user, such as a
Box admin.Prior to this update the user information of the supervisor or internal admin
user would be displayed in the created_by field of the response object. With
this update the response will now show generic user information when that user
is a supervisor or internal admin.Previously the created_by field in the response looked like this:With this update that same response would look similar to the following:
Java SDK v2.24.0 released
- added tests and implementation for options object (#661)
- Expose object type on
BoxItem (#662)
- Allow per-connection timeouts (#660)
- Add global setting for max requests (#657)
- added overload for
is_ongoing field and added getter for is_ongoing (#653)
Breaking Changes
-
Python 2.6 is no longer supported.
-
Python 3.3 is no longer supported.
-
client.search() now returns a Search object that exposes a query() method to call the Search API.
Use client.search().query(**search_params) instead of client.search(**search_params).
-
client.get_memberships(...) has a change in signature. The limit and offset parameters have swapped positions to keep
consistency with the rest of the SDK.
-
client.groups(...) has been changed to client.get_groups. The limit and offset parameters have swapped positions.
-
The
unshared_at parameter for item.create_shared_link(...) and file.get_shared_link_download_url(...)
now takes an RFC3339-formatted <https://tools.ietf.org/html/rfc3339#section-5.8> unicode string instead of a
datetime.date. Users migrating from v1.x can pass the value of date.isoformat() instead of the date
object itself.
-
Events.get_events(...) now returns a list of Event instances rather than a list of dict
representing events. Event inherits from Mapping but will not have all the same capabilities as
dict.
-
Your code is affected if you use
Events.get_events(...) and expect a list of dict rather than a list of
Mapping. For example, if you use __setitem__ (event['key'] = value), update(), copy(), or
if your code depends on the str or repr of the Event. Use of __getitem__ (event['key']),
get(), and other Mapping methods is unaffected. See the Python
documentation for methods supported on
Mapping instances.
-
Migration: If you still need to treat an
Event as a dict, you can get a deepcopy of the original dict
using the new property on BaseAPIJSONObject, response_object.
-
LoggingNetwork has been removed. Logging calls are now made from the DefaultNetwork class. In addition,
the logging format strings in this class have changed in a way that
will break logging for any applications that have overridden any of these
strings. They now use keyword format placeholders instead of positional
placeholders. All custom format strings will now have to use the same keyword
format placeholders. Though this is a breaking change, the good news is that
using keyword format placeholders means that any future changes will be
automatically backwards-compatible (as long as there aren’t any changes to
change/remove any of the keywords).
-
File.update_contents() and File.update_contents_with_stream() now
correctly return a File object with the correct internal JSON structure.
Previously it would return a File object where the file JSON is hidden
inside file['entries'][0]. This is a bug fix, but will be a breaking
change for any clients that have already written code to handle the bug.
-
Comparing two objects (e.g. a
File and a Folder) that have the same Box ID but different types with ==
will now correctly return False.
-
The following methods now return iterators over the entire collection of returned objects, rather than
a single page:
client.users()
client.groups()
client.search().query()
folder.get_items()
Since folder.get_items() now returns an iterator, folder.get_items_limit_offset() and
folder.get_items_marker() have been removed. To use marker based paging with folder.get_items(),
pass the use_marker=True parameter and optionally specify a marker parameter to begin paging from that
point in the collection.
Additionally, group.membership() has been renamed to group.get_memberships(), and returns an iterator of
membership objects. This method no longer provides the option to return tuples with paging information.
-
The
Translator class has been reworked; translator.get(...) still returns the constructor for the object class
corresponding to the passed in type, but translator.translate(...) now takes a Session and response object
directly and produces the translated object. This method will also translate any nested objects found.
- This change obviates the need for
GroupMembership to have a custom constructor; it now uses the default
BaseObject constructor.
Features
-
All publicly documented API endpoints and parameters should now be supported by the SDK
-
Added more flexibility to the object translation system:
- Can create non-global
Translator instances, which can extend or
not-extend the global default Translator.
- Can initialize
BoxSession with a custom Translator.
- Can register custom subclasses on the
Translator which is associated
with a BoxSession or a Client.
- All translation of API responses now use the
Translator that is
referenced by the BoxSession, instead of directly using the global
default Translator.
- Nested objects are now translated by
translator.translate()
-
When the
auto_session_renewal is True when calling any of the request
methods on BoxSession, if there is no access token, BoxSession will
renew the token before making the request. This saves an API call.
-
Auth objects can now be closed, which prevents them from being used to
request new tokens. This will also revoke any existing tokens (though that
feature can be turned off by passing
revoke=False). Also introduces a
closing() context manager method, which will auto-close the auth object
on exit.
-
Various enhancements to the
JWTAuth baseclass:
- The
authenticate_app_user() method is renamed to
authenticate_user(), to reflect that it may now be used to authenticate
managed users as well. See the method docstring for details.
authenticate_app_user() is now an alias of authenticate_user(), in
order to not introduce an unnecessary backwards-incompatibility.
- The
user argument to authenticate_user() may now be either a user
ID string or a User instance. Before it had to be a User instance.
- The constructor now accepts an optional
user keyword argument, which
may be a user ID string or a User instance. When this is passed,
authenticate_user() and can be called without passing a value for the
user argument. More importantly, this means that refresh() can be
called immediately after construction, with no need for a manual call to
authenticate_user(). Combined with the aforementioned improvement to
the auto_session_renewal functionality of BoxSession, this means
that authentication for JWTAuth objects can be done completely
automatically, at the time of first API call.
- The constructor now supports passing the RSA private key in two different
ways: by file system path (existing functionality), or by passing the key
data directly (new functionality). The
rsa_private_key_file_sys_path
parameter is now optional, but it is required to pass exactly one of
rsa_private_key_file_sys_path or rsa_private_key_data.
- Document that the
enterprise_id argument to JWTAuth is allowed to
be None.
authenticate_instance() now accepts an enterprise argument, which
can be used to set and authenticate as the enterprise service account user,
if None was passed for enterprise_id at construction time.
- Authentications that fail due to the expiration time not falling within the
correct window of time are now automatically retried using the time given
in the Date header of the Box API response. This can happen naturally when
the system time of the machine running the Box SDK doesn’t agree with the
system time of the Box API servers.
-
Added an
Event class.
-
Moved
metadata() method to Item so it’s now available for Folder
as well as File.
-
The
BaseAPIJSONObject baseclass (which is a superclass of all API
response objects) now supports __contains__ and __iter__. They behave
the same as for Mapping. That is, __contains__ checks for JSON keys
in the object, and __iter__ yields all of the object’s keys.
-
Added a
RecentItem class.
-
Added
client.get_recent_items() to retrieve a user’s recently accessed items on Box.
-
Added support for the
can_view_path parameter when creating new collaborations.
-
Added
BoxObjectCollection and subclasses LimitOffsetBasedObjectCollection and
MarkerBasedObjectCollection to more directly manage paging of objects from an endpoint.
These classes manage the logic of constructing requests to an endpoint and storing the results,
then provide __next__ to iterate over the results. The option to return results one
by one or as a Page of results is also provided.
-
Added a
downscope_token() method to the Client class. This generates a token that
has its permissions reduced to the provided scopes and for the optionally provided
File or Folder.
-
Added methods for configuring
JWTAuth from config file: JWTAuth.from_settings_file and
JWTAuth.from_settings_dictionary.
-
Added
network_response property to BoxOAuthException.
-
API Configuration can now be done per
BoxSession instance.
Other
- Added extra information to
BoxAPIException.
- Added
collaboration() method to Client.
- Reworked the class hierarchy. Previously,
BaseEndpoint was the parent of BaseObject which was the parent
of all smart objects. Now BaseObject is a child of both BaseEndpoint and BaseAPIJSONObject.
BaseObject is the parent of all objects that are a part of the REST API. Another subclass of
BaseAPIJSONObject, APIJSONObject, was created to represent pseudo-smart objects such as Event that are not
directly accessible through an API endpoint.
- Added
network_response_constructor as an optional property on the
Network interface. Implementations are encouraged to override this
property, and use it to construct NetworkResponse instances. That way,
subclass implementations can extend the functionality of the
NetworkResponse, by re-overriding this property. This property is defined
and used in the DefaultNetwork implementation.
- Move response logging to a new
LoggingNetworkResponse class (which is
made possible by the aforementioned network_response_constructor
property). Now the SDK decides whether to log the response body, based on
whether the caller reads or streams the content.
- Add more information to the request/response logs from
LoggingNetwork.
- Add logging for request exceptions in
LoggingNetwork.
- Bugfix so that the return value of
JWTAuth.refresh() correctly matches
that of the auth interface (by returning a tuple of
((access token), (refresh token or None)), instead of only the access token).
In particular, this fixes an exception in BoxSession that always occurred
when it tried to refresh any JWTAuth object.
- Fixed an exception that was being raised from
ExtendableEnumMeta.__dir__().
CPython 3.6 support.
- Increased required minimum version of six to 1.9.0.
Python SDK v2 Launched
A major update (version 2.0) of the Box Python SDK has been
released with significant updates and API feature parity completion.
See here for full API release notes. Along with
the release, the following documentation changes have been made:
We have released an open beta version of a new Box UI Element, the ‘Open With’
element. ‘Open With’ will allow developers to embed a menu to open content
stored in box with a partner application. The partners available with this beta
release are Adobe Sign and G Suite.Documentation and setup instructions for this new element are
available here.
Java SDK v2.23.2 released
- Batch headers patch (#649)
Java SDK v2.23.1 released
- Fix opening too many TCP connections when issuing a high number of requests (#646)
Annotations available for Excel files in preview
Currently, annotations capabilities don’t appear within Excel files in preview,
either via the
Box UI Content Preview element or
expiring embed, even if annotations are enabled (showAnnotations=true).Starting on September 13th, 2018, users will be able to annotate Excel
files like they can other file types (PDFs, docs, PPT). All 3 annotation
types (highlight, point, and drawing) will be supported. If showAnnotations
is set to true annotations on Excel files will be displayed.
Java SDK v2.23.0 released
- Metadata cascade policy (#603)
Add new fields to folder update and get info endpoints
Two major releases have been added to the update folder API endpoint,
is_collaboration_restricted_to_enterprise. This is a boolean value made to
set whether future collaborations should be restricted to within the enterprise
only. This does not affect existing collaborations. The value of this field
will also be displayed when calling the get folder info endpoint.
Add new action_by field to enterprise events
To better document admin actions taken on user accounts, we have added an
action_by mini-user object in the enterprise events response data. This field
will display the admin account which performed the user action, if applicable.For enterprise admins this would include the ID, login, and name of their
account. For actions taken by a Box internal admin this would be:
- id:
box_support
- login:
support@box.com
- name:
Box Support
The additional object is documented within the enterprise
event object attributes.
Box user_id field size changed
The user_id field, used to track all platform users (that is, managed,
externally managed, and app users), will soon be updated to begin producing
64-bit integer numeric values, rather than the 32-bit integers it creates
currently.For customers who are translating the produced user_id strings from our APIs
into 32-bit integer fields, your internal systems are affected by this update,
and you must update them to support the new 64-bit user_id integer size. We
recommend that all user_id fields be stored as strings, as per our
API documentation.
Generic method added to the Salesforce SDK
The Box for Salesforce Developer Toolkit now provides a global method,
sendRequest that accepts an HttpRequest
object as a parameter and returns an
HttpResponse
object. This method will use the authentication details of the Service
Account to make calls to Box’s APIs, allowing you to focus on incorporating
the business logic of your integration. For more details about the added
method, please see the method details
and sample code
in the Box metadata sidebar for Salesforce Developer Toolkit documentation.
Java SDK v2.22.0 Released
- patch for transfer content to another user (#632)
Expanded Relay Workflow API
We have expanded the capabilities of Box Relay, a workflow tool
co-developed between Box and IBM, with a new Workflow API. The Relay Workflow
API allows you to launch Box Relay workflows and retrieve the statuses of those
workflows from within your application. It also allows you to view which
workflow templates have been published in file directly into your instance of
Box Relay. For more information about the API, please see our
announcement blog post.
A new report has been made available via the website. Documentation is available
in the Box Admin Console that displays an enterprise’s historical utilization of
platform resources. This report displays an enterprise’s Monthly Active Users,
API calls, and bandwidth consumption by application by month for
January 1, 2017 to March 31, 2018. More information can be found
here.
Java SDK v2.21.0 released
Sharedlink password (#623)
- Correct link (#626)
Java SDK v2.20.2 released
- Case Insensitivity for Response Headers (#620)
Update to the Box CLI
We have released updates to the Box CLI. This
version includes the following updates:
- New CLI configuration dump command: Adds the
ability to dump the Box configuration file as a single string, optionally with
escaped quotes, in order to copy the value to general availability. Open With
delivers an environment variable or configuration property (for example, in AWS
individual button or Azure).
Box Android SDK v4.2.0 released
This version is to provide support for 16+ devices once TLS 1.0 is deprecated.
Java SDK v2.20.1 released
- Handle JSON parse error in response exception (#615)
- Fix return object for
uploadNewVersion() (#614)
Java SDK v2.20.0 released
- multi select metadata field (#610)
- Fix check for duplicate As-User headers (#612)
Java SDK v2.19.0 released
- Multizones (#598)
- Add
getLogin() method on BoxCollaborator.Info (#602)
- Add support for
multiSelect fields in metadata (#597)
Windows .NET SDK v3.8.0 released
- Fixed an issue where users could not create
BoxClient on Xamarin
- Added File property to
BoxLock objects in events
- Added
MetadataManager.DeleteMetadataTemplate(string scope, string template) for deleting a Metadata template
- Made API URLs modifiable in
BoxConfig
- Improved API response error objects/messages
nuget.org/packages/Box.V2/3.8.0
nuget.org/packages/Box.V2.Core/3.8.0
Java SDK v2.18.0 released
- Error object (#588)
- Quick fix for NPE on
request.toString() in interceptor (#595)
- Add support for fetching representation content (#583)
- fixed
BoxConfig constructor method where privateKeyPassword was not being set (#593)
A report has been made available in the Box Admin Console that displays an
enterprise’s utilization of platform resources. The first version of this
report displays integration into the total number of API calls to the Box
existing Content API by day effective April 1st, 2018. Future iterations of
this report will display additional resource consumption (Monthly Active Users,
bandwidth, and storage) by service and will also include historical data. For
more information, please see the article in Box
product documentation.
We have introduced new functionality in the
Retention Policy Object
API Explorer element to support metadata-driven retention policies, where
retention policies can be applied to individual files based on custom metadata.
This also enables customers to configure retention policies at the launch file
level in addition to at the global and folder levels. In addition to bringing
these new, expanded Box Governance capabilities to Box Admins via the Box Admin
Console, we’re also making these capabilities available via the
Retention Policy and
Retention Assignment APIs
and in Box’s Java, Node, and .NET SDKs.
Box CLI v1.2.0 released
- Created bulk actions for the following commands:
- users
- groups
- group memberships
- collaborations
- Added filtering by event type to
box events get and box events poll
- Added a command for deleting metadata templates from files and folders.
- Bumped underlying
box-windows-sdk to v3.6.0
- Fixed a bug hindering creating float types for metadata on files and folders.
- Fixed a bug that did not assign the
User-Agent HTTP header correctly.
- Fixed a bug that wasn’t reporting all errors to
stderr.
- Fixed a bug with bulk creation of metadata templates.
- Fixed a bug giving duplicate commands on group
membership command.
- Fixed a bug with creating the wrong object for
tracking_codes on users.
- Fixed a bug requiring an ID in CSV files on bulk creation of users.
Java SDK v2.17.0 released
- Add Metadata-driven Retention Policies support (#535)
We have introduced a new attribute type to
Metadata Templates called
multiSelect, which translates to multiple selection. This new attribute type
allows for a checkbox style multiple selection of values when composing
template instances on files content with Adobe Sign, G Suite, or folders.The addition of this field introduces changes to the
Metadata Object (template instance)
since enabled multiSelect options are represented using an array of string
values, where each string in the array corresponds to the key of a multiSelect
option.
Java SDK v2.16.1 released
- Add
CONTENT_ACCESS event type. (#581)
Update to Box Annotations
The annotations update announced on March 5, 2018 has been re-enabled.
Java SDK v2.16.0 released
- Adjust JWT expiration interval (#572)
- Allow setting custom headers on API connection (#562)
- Fix JWT retry timestamp parsing (#575)
- Add support for User Tracking Codes (#487)
Windows .NET SDK v3.5.1 released
- Switched to exponential backoff when the SDK receives a rate limit or server error response.
- Force support for TLS
v1.1 or higher when available to improve the security of connections to the Box API.
- Perform modified retry on JWT auth for when the local clock and the Box Server clock are not aligned as well as if the JWT ID has already been consumed.
- Made
name parameter optional on RestoreTrashedAsync().
nuget.org/packages/Box.V2/3.5.1
nuget.org/packages/Box.V2.Core/3.5.1
Update to Box Annotations
Due to performance issues reported by some users, the update has been rolled
back to prevent critical business applications from getting impacted. Drawing
Annotations and Point Annotations mode features have now been turned off. We do
not have an ETA for performance fixes or when these features will be
re-enabled. We sincerely apologize for the inconvenience.Users who used the Drawing Annotations capability while it was available will
still be able to access their annotations once the feature Edit. Documentation
is re-enabled. Until then, the said annotations will be stored in our
application data store but won’t be exposed via the viewers.
Java SDK v2.15.0 released
- Allow retrieving Collaboration fields (#570)
- Implement Get Metadata Template by ID (#568)
Update to Box Annotations
We will be introducing two enhancements to the annotations features available
via the Box API that your customer uses in their custom application. The
updates are as follows:
- Point Annotations mode: We are enhancing point annotations by introducing
Point Annotations mode. This allows users to expediently add annotations on a
document without having to re-select the point annotation icon after each
annotation. here.
- Drawing Annotations via Expiring Embed: We launched Drawing Annotations
in November of 2017. This provided end users the ability to free-form draw on
their touch-enabled devices using touch or a stylus. We are excited to share
that we’re making Drawing Annotations Full release announcement is available
via the Expiring Embed. Users using annotations via the Get Embed Link API will
now have a whole new way to express themselves via Box Preview.
Java SDK v2.14.1 released
- Add randomization to exponential backoff (#565)
- Force TLS version 1.1 or greater when supported (#548)
- Delay successive API calls by
EventStream (#564)
On March 29, 2018, we will introduce a new data type (array of strings) in the
response body of the Metadata API endpoints. We are making this change because
we are adding a new field type to metadata templates in Box called multiSelect.
This new field type represents a checkbox type multiple selection of values
when creating template instances on files or folders. The selected options for
this field type are stored in an array of strings, where each string in the
array corresponds to the key of the chosen multiSelect option.An example metadata template JSON response body is shown below. The value for
the key audience1 shows an example of the new data type (array of strings) that
we are introducing in this change.
Java SDK v2.14.0 released
New Features, Enhancements, and Bug Fixes
- fixes missing
can_view_path property on collaboration object (#560)
- Add missing methods and documentation (#559)
- Add support for setting tags on items (#554)
Java SDK v2.13.0 released
- Handle metadata values better (#553)
Java SDK v2.12.0 released
- Fix collaboration notify parameter (#545)
- Add OAuth 2.0 token creation event type (#533)
- Implement invite user to enterprise (#504)
- Switch to
X-Box-UA header for analytics (#536)
- Reduce Large File Upload memory usage (#543)
Java SDK v2.11.0 released
- Fix chunked upload for files > 2GB (#531)
- Add updated file version upload endpoint and deprecate old method (#524)
- Perform modified retry on JWT auth to avoid common JWT errors
Java SDK v2.10.0 released
- Add optional
is_confirmed parameter for adding user email alias (#499)
- Add support for token revocation (#510)
- Metadata template delete (#512)
Java SDK v2.9.0 released
- Search
readme update (#506)
- Add option to pass file
SHA-1 hash for upload integrity (#502)
- Events log limit (#507)
- Terms of Service (#484)
- Change
wiremock port (#505)
- Delete redundant
response.disconnect() from moveFolderToUser() (#485)
- Events
readme patch (#503)
- Add missing webhook triggers to enum (#497)
- Fix
MetadataTemplate.updateMetadataTemplate() type error (#498)
- Add missing event types to enum (#500)
- Add
modified_at timestamp to BoxComment.Info(#501)
- Collaboration whitelists (#492)
- Trash empty body patch (#495)
- Adding support for indefinite Box file locking by allowing null expiration (#494)
- Additional test in response for Batch API (#474)
- Fixing
BoxDeveloperEditionAPIConnection - decryptPrivateKey() - PEMParser returns PrivateKeyInfo already - Invalid cast #470 (#471)
Last modified on November 10, 2026