Box Developer Documentation
Latest version

Get storage policy

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

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

Fetches a specific storage policy.

Request

bearer [ACCESS_TOKEN]
application/json

Path Parameters

stringin pathrequired
34342

The ID of the storage policy.

Response

application/jsonStorage policy

Returns a storage policy object.

application/jsonClient error

An unexpected client error.

get
Get storage policy
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/34342" \
     -H "authorization: Bearer <ACCESS_TOKEN>"
Node/TypeScript v10
await client.storagePolicies.getStoragePolicyById(storagePolicy.id);
Python v10
client.storage_policies.get_storage_policy_by_id(storage_policy.id)
.NET v10
await client.StoragePolicies.GetStoragePolicyByIdAsync(storagePolicyId: storagePolicy.Id);
Swift v10
try await client.storagePolicies.getStoragePolicyById(storagePolicyId: storagePolicy.id)
Java v10
client.getStoragePolicies().getStoragePolicyById(storagePolicy.getId())
Java v4
BoxStoragePolicy storagePolicy = new BoxStoragePolicy(api, id);
BoxStoragePolicy.Info storagePolicyInfo = storagePolicy.getInfo();
Python v3
storage_policy = client.storage_policy(policy_id='12345').get()
print(f'Storage Policy ID is {storage_policy.id} and name is {storage_policy.name}')
.NET v5
BoxStoragePolicy policy = await client.StoragePoliciesManager.GetStoragePolicyAsync(policyId: "6");
Node v3
client.storagePolicies.get('6')
    .then(storagePolicy => {
        /* storagePolicy -> {
            type: 'storage_policy', 
            id: '6',
            name: 'Tokyo & Singapore' }
        */
    });

Response Example

{
  "id": "11446498",
  "type": "storage_policy",
  "name": "Montreal / Dublin"
}