ストレージポリシーを取得

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

特定のストレージポリシーを取得します。

Request

Bearer [ACCESS_TOKEN]
application/json

Path Parameters

stringin pathrequired
34342

ストレージポリシーのID。

Response

ストレージポリシーオブジェクトを返します。

予期しないクライアントエラー。

get
ストレージポリシーを取得
You can now try out some of our APIs live, right here in the documentation.
Log in

Request Example

cURL
curl -i -X GET "https://api.box.com/2.0/storage_policies/34342" \
     -H "Authorization: Bearer <ACCESS_TOKEN>"
.NET
BoxStoragePolicy policy = await client.StoragePoliciesManager.GetStoragePolicyAsync(policyId: "6");
Java
BoxStoragePolicy storagePolicy = new BoxStoragePolicy(api, id);
BoxStoragePolicy.Info storagePolicyInfo = storagePolicy.getInfo();
Python
storage_policy = client.storage_policy(policy_id='12345').get()
print('Storage Policy ID is {0} and name is {1}'.format(storage_policy.id, storage_policy.name))
Node
client.storagePolicies.get('6')
    .then(storagePolicy => {
        /* storagePolicy -> {
            type: 'storage_policy', 
            id: '6',
            name: 'Tokyo & Singapore' }
        */
    });
iOS
client.storagePolicies.get(storagePolicyId: "22222") { (result: Result<StoragePolicy, BoxSDKError>) in
    guard case let .success(policy) = result else {
        print("Error getting storage policy")
        return
    }
    print("Policy ID is \(policy.id)")
}

Response Example

{
  "type": "error",
  "code": "item_name_invalid",
  "help_url": "http://developers.box.com/docs/#errors",
  "message": "Method Not Allowed",
  "request_id": "abcdef123456",
  "status": 400
}