Box Developer Documentation
Latest version

List storage policies

get
https://api.box.com/2.0
/storage_policies

This endpoint is in the version 2024.0. No changes are required to continue using it. For more details, see Box API versioning.

Fetches all the storage policies in the enterprise.

Request

bearer [ACCESS_TOKEN]
application/json

Query Parameters

string arrayin queryoptional
id,type,name

A comma-separated list of attributes to include in the response. This can be used to request fields that are not normally returned in a standard response.

Be aware that specifying this parameter will have the effect that none of the standard fields are returned in the response unless explicitly specified, instead only fields for the mini representation are returned, additional to the fields requested.

integer (int64)in queryoptional
1000
1000

The maximum number of items to return per page.

stringin queryoptional
JV9IRGZmieiBasejOG9yDCRNgd2ymoZIbjsxbJMjIs3kioVii

Defines the position marker at which to begin returning results. This is used when paginating using marker-based pagination.

This requires usemarker to be set to true.

Response

application/jsonStorage policies

Returns a collection of storage policies.

application/jsonClient error

An unexpected client error.

get
List storage policies
You can now try out some of our APIs live, right here in the documentation.
Log in

Request Example

Learn more about Box SDK versionig strategy.


cURL
curl -i -X GET "https://api.box.com/2.0/storage_policies" \
     -H "authorization: Bearer <ACCESS_TOKEN>"
Node/TypeScript v10
await client.storagePolicies.getStoragePolicies();
Python v10
client.storage_policies.get_storage_policies()
.NET v10
await client.StoragePolicies.GetStoragePoliciesAsync();
Swift v10
try await client.storagePolicies.getStoragePolicies()
Java v10
client.getStoragePolicies().getStoragePolicies()
Java v4
Iterable<BoxStoragePolicy.Info> storagePolicies = BoxStoragePolicy.getAll(api);
for (BoxStoragePolicy.Info storagePolicyInfo : storagePolicies) {
        //Do something with the storage policy.
}
Python v3
storage_policies = client.get_storage_policies(limit=100)
for storage_policy in storage_policies:
    print(f'The storage policy id is {storage_policy.id} and name is {storage_policy.name}')
.NET v5
BoxCollectionMarkerBased<BoxStoragePolicy> policies = await client.StoragePoliciesManager
    .GetListStoragePoliciesAsync();
Node v3
client.storagePolicies.getAll()
    .then(policies => {
        /* policies -> {
            next_marker: null,
            limit: 1000,
            entries: 
            [ { type: 'storage_policy', id: '42', name: 'Montreal / Dublin' },
                { type: 'storage_policy', id: '126', name: 'Frankfurt / Dublin' },
                { type: 'storage_policy', id: '162', name: 'US' } ] }
        */
    });

Response Example

{
  "entries": [
    {
      "id": "11446498",
      "type": "storage_policy",
      "name": "Montreal / Dublin"
    }
  ],
  "limit": 1000,
  "next_marker": "JV9IRGZmieiBasejOG9yDCRNgd2ymoZIbjsxbJMjIs3kioVii",
  "prev_marker": "JV9IRGZmieiBasejOG9yDCRNgd2ymoZIbjsxbJMjIs3kioVih"
}