List storage policies

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

Fetches all the storage policies in the enterprise.

Request

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 / int64in queryoptional
10001000-1000

The maximum number of items to return per page.

stringin queryoptional
JV9IRGZmieiBasejOG9yDCRNgd2ymoZIbjsxbJMjIs3kioVii

The position marker at which to begin the response.

Response

application/jsonStorage Policies

Returns a collection of storage policies.

You can now try out some of our APIs live, right here in the documentation.
Log In

Request Example

cURL
curl -X GET https://api.box.com/2.0/storage_policies \
     -H "Authorization: Bearer <ACCESS_TOKEN>"
.NET
BoxCollectionMarkerBased<BoxStoragePolicy> policies = await client.StoragePoliciesManager
    .GetListStoragePoliciesAsync();
Java
Iterable<BoxStoragePolicy.Info> storagePolicies = BoxStoragePolicy.getAll(api);
for (BoxStoragePolicy.Info storagePolicyInfo : storagePolicies) {
        //Do something with the storage policy.
}
Python
storage_policies = client.get_storage_policies(limit=100)
for storage_policy in storage_policies:
    print('The storage policy id is {0} and name is {1}'.format(storage_policy.id, storage_policy.name)))
Node
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

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