指定したリテンションポリシーに関連付けられているすべてのリテンションポリシー割り当てのリストを返します。
982312
リテンションポリシーのID。
1000
1000
返す項目の1ページあたりの最大数。
JV9IRGZmieiBasejOG9yDCRNgd2ymoZIbjsxbJMjIs3kioVii
結果が返される開始位置のマーカー。マーカーベースのページ割りを使用している場合に使用されます。
これを使用するには、usemarker
をtrue
に設定する必要があります。
folder
取得するリテンションポリシー割り当てのタイプ。
次の値のいずれか1つ: folder
,enterprise
指定したリテンションポリシーに関連付けられているリテンションポリシー割り当てのリストを返します。
不明なtype
が指定された場合は、エラーを返します。
予期しないクライアントエラー。
curl -X GET https://api.box.com/2.0/retention_policies/982312/assignments \
-H 'Authorization: Bearer <ACCESS_TOKEN>'
BoxCollectionMarkerBased<BoxRetentionPolicyAssignment> assignments = await client.RetentionPoliciesManager
.GetRetentionPolicyAssignmentsAsync(retentionPolicyId: "11111");
BoxRetentionPolicy policy = new BoxRetentionPolicy(api, id);
Iterable<BoxRetentionPolicyAssignment.Info> allAssignments = policy.getAllAssignments("assigned_by");
Iterable<BoxRetentionPolicyAssignment.Info> folderAssignments = policy.getFolderAssignments(50, "assigned_by");
Iterable<BoxRetentionPolicyAssignment.Info> enterpriseAssignments = policy.getEnterpriseAssignments();
for (BoxRetentionPolicyAssignments.Info assignmentInfo : allAssignments) {
// Do something with the assignment.
}
for (BoxRetentionPolicyAssignments.Info assignmentInfo : folderAssignments) {
// Do something with the assignment.
}
for (BoxRetentionPolicyAssignments.Info assignmentInfo : enterpriseAssignments) {
// Do something with the assignment.
}
client.retentionPolicies.getAssignments('123456789', {type: 'folder'})
.then(assignments => {
/* assignments -> {
entries: [ { type: 'retention_policy_assignment', id: '12345678' } ],
limit: 100,
next_marker: 'someMarkerString' }
*/
});