企業のすべてのストレージポリシーを取得します。
id,type,nameレスポンスに含める属性のコンマ区切りリスト。このパラメータを使用すると、標準のレスポンスには通常含まれないフィールドをリクエストできます。
このパラメータを指定すると、明示的に指定しない限り標準フィールドはレスポンスに含まれず、リクエストしたフィールドのほかには、Mini版の表示のフィールドしか返されないことに注意してください。
10001000返す項目の1ページあたりの最大数。
JV9IRGZmieiBasejOG9yDCRNgd2ymoZIbjsxbJMjIs3kioVii結果が返される開始位置のマーカー。マーカーベースのページ割りを使用している場合に使用されます。
これを使用するには、usemarkerをtrueに設定する必要があります。
curl -i -X GET "https://api.box.com/2.0/storage_policies" \
-H "authorization: Bearer <ACCESS_TOKEN>"await client.storagePolicies.getStoragePolicies();client.storage_policies.get_storage_policies()await client.StoragePolicies.GetStoragePoliciesAsync();try await client.storagePolicies.getStoragePolicies()client.getStoragePolicies().getStoragePolicies()Iterable<BoxStoragePolicy.Info> storagePolicies = BoxStoragePolicy.getAll(api);
for (BoxStoragePolicy.Info storagePolicyInfo : storagePolicies) {
//Do something with the storage policy.
}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}')BoxCollectionMarkerBased<BoxStoragePolicy> policies = await client.StoragePoliciesManager
.GetListStoragePoliciesAsync();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' } ] }
*/
});{
"entries": [
{
"id": "11446498",
"type": "storage_policy",
"name": "Montreal / Dublin"
}
],
"limit": 1000,
"next_marker": "JV9IRGZmieiBasejOG9yDCRNgd2ymoZIbjsxbJMjIs3kioVii",
"prev_marker": "JV9IRGZmieiBasejOG9yDCRNgd2ymoZIbjsxbJMjIs3kioVih"
}