List all retention policies for your enterprise
box retention-policies
box retention-policies:assign POLICYID
box retention-policies:assignments ID
box retention-policies:assignments:get ID
box retention-policies:assignments:remove ID
box retention-policies:create POLICYNAME
box retention-policies:file-version-retentions
box retention-policies:file-version-retentions:get ID
box retention-policies:file-versions-under-retention:get ID
box retention-policies:files-under-retention:get ID
box retention-policies:get ID
box retention-policies:update ID
List all retention policies for your enterprise
USAGE
$ box retention-policies
OPTIONS
-h, --help Show CLI help
-n, --policy-name=policy-name A name to filter the retention policies by
-q, --quiet Suppress any non-error output to stderr
-s, --save Save report to default reports folder on disk
-t, --token=token Provide a token to perform this call
-u, --created-by-user-id=created-by-user-id A user id to filter the retention policies by
-v, --verbose Show verbose output, which can be helpful for debugging
-y, --yes Automatically respond yes to all confirmation prompts
--as-user=as-user Provide an ID for a user
--bulk-file-path=bulk-file-path File path to bulk .csv or .json objects
--csv Output formatted CSV
--fields=fields Comma separated list of fields to show
--json Output formatted JSON
--max-items=max-items A value that indicates the maximum number of results to return. This only
specifies a maximum boundary and will not guarantee the minimum number of
results returned. When the max-items (x) is greater than 1000, then the
maximum ceil(x/1000) requests will be made.
--no-color Turn off colors for logging
--policy-type=finite|indefinite A policy type to filter the retention policies by
--save-to-file-path=save-to-file-path Override default file path to save report
EXAMPLE
box retention-policies
See code: src/commands/retention-policies/index.js
Assign a retention policy assignment
USAGE
$ box retention-policies:assign POLICYID
ARGUMENTS
POLICYID The ID of the retention policy to assign this content to
OPTIONS
-h, --help Show CLI help
-q, --quiet Suppress any non-error output to stderr
-s, --save Save report to default reports folder on disk
-t, --token=token Provide a token to perform this call
-v, --verbose Show verbose output, which can be helpful for debugging
-y, --yes Automatically respond yes to all confirmation prompts
--as-user=as-user Provide an ID for a user
--assign-to-id=assign-to-id The ID of the content to assign the retention policy to
--assign-to-type=enterprise|folder|metadata_template (required) The type of the content to assign the retention
policy to
--bulk-file-path=bulk-file-path File path to bulk .csv or .json objects
--csv Output formatted CSV
--fields=fields Comma separated list of fields to show
--filter-field=filter-field Metadata fields to filter against, if assigning to a metadata
template.Allow properties: field, value. Example:
--filter-field=fieldName=fieldValue
--json Output formatted JSON
--no-color Turn off colors for logging
--save-to-file-path=save-to-file-path Override default file path to save report
--start-date-field=start-date-field The date the retention policy assignment begins
EXAMPLE
box retention-policies:assign 12345 --assign-to-type folder --assign-to-id 22222 --filter-field=fieldName=fieldValue
--start-date-field=upload_date
See code: src/commands/retention-policies/assign.js
List all retention policies for your enterprise
USAGE
$ box retention-policies:assignments ID
ARGUMENTS
ID ID of the retention policy to get assignments for
OPTIONS
-h, --help Show CLI help
-q, --quiet Suppress any non-error output to stderr
-s, --save Save report to default reports folder on disk
-t, --token=token Provide a token to perform this call
-v, --verbose Show verbose output, which can be helpful for debugging
-y, --yes Automatically respond yes to all confirmation prompts
--as-user=as-user Provide an ID for a user
--bulk-file-path=bulk-file-path File path to bulk .csv or .json objects
--csv Output formatted CSV
--fields=fields Comma separated list of fields to show
--json Output formatted JSON
--max-items=max-items A value that indicates the maximum number of results to return. This only
specifies a maximum boundary and will not guarantee the minimum number of
results returned. When the max-items (x) is greater than 1000, then the
maximum ceil(x/1000) requests will be made.
--no-color Turn off colors for logging
--save-to-file-path=save-to-file-path Override default file path to save report
--type=folder|enterprise|metadata_template The type of the retention policy assignment to retrieve
EXAMPLE
box retention-policies:assignments 12345
See code: src/commands/retention-policies/assignments/index.js
Get information about a retention policy assignment
USAGE
$ box retention-policies:assignments:get ID
ARGUMENTS
ID ID of the retention policy assignment to get
OPTIONS
-h, --help Show CLI help
-q, --quiet Suppress any non-error output to stderr
-s, --save Save report to default reports folder on disk
-t, --token=token Provide a token to perform this call
-v, --verbose Show verbose output, which can be helpful for debugging
-y, --yes Automatically respond yes to all confirmation prompts
--as-user=as-user Provide an ID for a user
--bulk-file-path=bulk-file-path File path to bulk .csv or .json objects
--csv Output formatted CSV
--fields=fields Comma separated list of fields to show
--json Output formatted JSON
--no-color Turn off colors for logging
--save-to-file-path=save-to-file-path Override default file path to save report
EXAMPLE
box retention-policies:assignments:get 1235
See code: src/commands/retention-policies/assignments/get.js
Remove a retention policy assignment applied to content
USAGE
$ box retention-policies:assignments:remove ID
ARGUMENTS
ID ID of the retention policy assignment to remove
OPTIONS
-h, --help Show CLI help
-q, --quiet Suppress any non-error output to stderr
-s, --save Save report to default reports folder on disk
-t, --token=token Provide a token to perform this call
-v, --verbose Show verbose output, which can be helpful for debugging
-y, --yes Automatically respond yes to all confirmation prompts
--as-user=as-user Provide an ID for a user
--bulk-file-path=bulk-file-path File path to bulk .csv or .json objects
--csv Output formatted CSV
--fields=fields Comma separated list of fields to show
--json Output formatted JSON
--no-color Turn off colors for logging
--save-to-file-path=save-to-file-path Override default file path to save report
EXAMPLE
box retention-policies:assignments:remove 1235
See code: src/commands/retention-policies/assignments/remove.js
Create a new retention policy
USAGE
$ box retention-policies:create POLICYNAME
ARGUMENTS
POLICYNAME Name of retention policy to be created
OPTIONS
-h, --help Show CLI help
-l, --retention-length=retention-length The number of days to apply the retention policy. If
not set, policy will be indefinite
-q, --quiet Suppress any non-error output to stderr
-s, --save Save report to default reports folder on disk
-t, --token=token Provide a token to perform this call
-v, --verbose Show verbose output, which can be helpful for debugging
-y, --yes Automatically respond yes to all confirmation prompts
--[no-]allow-extension The owner of a file will be allowed to extend the
retention
--as-user=as-user Provide an ID for a user
--bulk-file-path=bulk-file-path File path to bulk .csv or .json objects
--csv Output formatted CSV
--custom-notification-recipient=custom-notification-recipient A list of users notified when the retention policy
duration is about to end. Allowed properties are: id,
type, login, name
--description=description The additional text description of the retention policy
--disposition-action=permanently_delete|remove_retention (required) For indefinite policies, disposition action
must be remove_retention
--fields=fields Comma separated list of fields to show
--json Output formatted JSON
--no-color Turn off colors for logging
--[no-]notify-owners The owner or co-owner will get notified when a file is
nearing expiration
--retention-type=modifiable|non_modifiable The type of retention for the new policy
--save-to-file-path=save-to-file-path Override default file path to save report
EXAMPLE
box retention-policies:create "Tax Documents" --retention-length 2555 --disposition-action=remove_retention
--notify-owners --allow-extension --description "Tax documents for 2018"
--custom-notification-recipient=id=12345,login=user@box.com
See code: src/commands/retention-policies/create.js
List all file version retentions for your enterprise
USAGE
$ box retention-policies:file-version-retentions
OPTIONS
-h, --help Show CLI help
-q, --quiet Suppress any non-error output to stderr
-s, --save Save report to default reports folder on disk
-t, --token=token Provide a token to perform this call
-v, --verbose Show verbose output, which can be helpful for debugging
-y, --yes Automatically respond yes to all confirmation prompts
--as-user=as-user Provide an ID for a user
--bulk-file-path=bulk-file-path File path to bulk .csv or .json objects
--csv Output formatted CSV
--disposition-action=permanently_delete|remove_retention A disposition action to filter by
--disposition-after=disposition-after A date to filter retention policies that complete after a
certain time
--disposition-before=disposition-before A date to filter retention policies that complete before a
certain time
--fields=fields Comma separated list of fields to show
--file-id=file-id A file id to filter the file version retentions by
--file-version-id=file-version-id A file version id to filter the file version retentions by
--json Output formatted JSON
--max-items=max-items A value that indicates the maximum number of results to
return. This only specifies a maximum boundary and will not
guarantee the minimum number of results returned. When the
max-items (x) is greater than 1000, then the maximum
ceil(x/1000) requests will be made.
--no-color Turn off colors for logging
--policy-id=policy-id A policy id to filter the file version retentions by
--save-to-file-path=save-to-file-path Override default file path to save report
EXAMPLE
box retention-policies:file-version-retentions
See code: src/commands/retention-policies/file-version-retentions/index.js
Get information about a file version retention policy
USAGE
$ box retention-policies:file-version-retentions:get ID
ARGUMENTS
ID ID of the file version retention to get
OPTIONS
-h, --help Show CLI help
-q, --quiet Suppress any non-error output to stderr
-s, --save Save report to default reports folder on disk
-t, --token=token Provide a token to perform this call
-v, --verbose Show verbose output, which can be helpful for debugging
-y, --yes Automatically respond yes to all confirmation prompts
--as-user=as-user Provide an ID for a user
--bulk-file-path=bulk-file-path File path to bulk .csv or .json objects
--csv Output formatted CSV
--fields=fields Comma separated list of fields to show
--json Output formatted JSON
--no-color Turn off colors for logging
--save-to-file-path=save-to-file-path Override default file path to save report
EXAMPLE
box retention-policies:file-version-retentions:get 77777
See code: src/commands/retention-policies/file-version-retentions/get.js
Get information about file versions under retention for assignment
USAGE
$ box retention-policies:file-versions-under-retention:get ID
ARGUMENTS
ID ID of the retention policy assignment
OPTIONS
-h, --help Show CLI help
-q, --quiet Suppress any non-error output to stderr
-s, --save Save report to default reports folder on disk
-t, --token=token Provide a token to perform this call
-v, --verbose Show verbose output, which can be helpful for debugging
-y, --yes Automatically respond yes to all confirmation prompts
--as-user=as-user Provide an ID for a user
--bulk-file-path=bulk-file-path File path to bulk .csv or .json objects
--csv Output formatted CSV
--fields=fields Comma separated list of fields to show
--json Output formatted JSON
--max-items=max-items A value that indicates the maximum number of results to return. This only
specifies a maximum boundary and will not guarantee the minimum number of
results returned. When the max-items (x) is greater than 1000, then the maximum
ceil(x/1000) requests will be made.
--no-color Turn off colors for logging
--save-to-file-path=save-to-file-path Override default file path to save report
EXAMPLE
box retention-policies:file-versions-under-retention:get 77777
See code: src/commands/retention-policies/file-versions-under-retention/get.js
Get information about files under retention for assignment
USAGE
$ box retention-policies:files-under-retention:get ID
ARGUMENTS
ID ID of the retention policy assignment
OPTIONS
-h, --help Show CLI help
-q, --quiet Suppress any non-error output to stderr
-s, --save Save report to default reports folder on disk
-t, --token=token Provide a token to perform this call
-v, --verbose Show verbose output, which can be helpful for debugging
-y, --yes Automatically respond yes to all confirmation prompts
--as-user=as-user Provide an ID for a user
--bulk-file-path=bulk-file-path File path to bulk .csv or .json objects
--csv Output formatted CSV
--fields=fields Comma separated list of fields to show
--json Output formatted JSON
--max-items=max-items A value that indicates the maximum number of results to return. This only
specifies a maximum boundary and will not guarantee the minimum number of
results returned. When the max-items (x) is greater than 1000, then the maximum
ceil(x/1000) requests will be made.
--no-color Turn off colors for logging
--save-to-file-path=save-to-file-path Override default file path to save report
EXAMPLE
box retention-policies:files-under-retention:get 77777
See code: src/commands/retention-policies/files-under-retention/get.js
Get information about a retention policy
USAGE
$ box retention-policies:get ID
ARGUMENTS
ID ID of the retention policy to get
OPTIONS
-h, --help Show CLI help
-q, --quiet Suppress any non-error output to stderr
-s, --save Save report to default reports folder on disk
-t, --token=token Provide a token to perform this call
-v, --verbose Show verbose output, which can be helpful for debugging
-y, --yes Automatically respond yes to all confirmation prompts
--as-user=as-user Provide an ID for a user
--bulk-file-path=bulk-file-path File path to bulk .csv or .json objects
--csv Output formatted CSV
--fields=fields Comma separated list of fields to show
--json Output formatted JSON
--no-color Turn off colors for logging
--save-to-file-path=save-to-file-path Override default file path to save report
EXAMPLE
box retention-policies:get 12345
See code: src/commands/retention-policies/get.js
Update a retention policy
USAGE
$ box retention-policies:update ID
ARGUMENTS
ID ID of the retention policy to update
OPTIONS
-a, --disposition-action=disposition-action For indefinite policies, disposition action must be remove_retention
-h, --help Show CLI help
-l, --retention-length=retention-length The amount of time, in days, to apply the retention policy. Required for
finite policies
-n, --policy-name=policy-name New name of retention policy
-q, --quiet Suppress any non-error output to stderr
-r, --retire Retire a retention policy
-s, --save Save report to default reports folder on disk
-t, --token=token Provide a token to perform this call
-v, --verbose Show verbose output, which can be helpful for debugging
-y, --yes Automatically respond yes to all confirmation prompts
--[no-]allow-extension The owner of a file will be allowed to extend the retention
--as-user=as-user Provide an ID for a user
--bulk-file-path=bulk-file-path File path to bulk .csv or .json objects
--csv Output formatted CSV
--fields=fields Comma separated list of fields to show
--json Output formatted JSON
--no-color Turn off colors for logging
--non-modifiable Set retention type to non_modifiable.
--[no-]notify-owners The owner or co-owner will get notified when a file is nearing expiration
--policy-type=finite|indefinite Type of policy
--save-to-file-path=save-to-file-path Override default file path to save report
EXAMPLE
box retention-policies:update 12345