Join us on May 20th for the Content + AI Virtual Summit. Register now
curl -i -X POST "https://api.box.com/2.0/retention_policy_assignments" \
-H "authorization: Bearer <ACCESS_TOKEN>" \
-H "content-type: application/json" \
-d '{
"policy_id": "173463",
"assign_to": {
"type": "folder",
"id": "6564564"
}
}'{
"id": "11446498",
"type": "retention_policy_assignment",
"retention_policy": {
"id": "12345",
"type": "retention_policy",
"policy_name": "Some Policy Name",
"retention_length": "365",
"disposition_action": "permanently_delete",
"max_extension_length": "365"
},
"assigned_to": {
"id": "a983f69f-e85f-4ph4-9f46-4afdf9c1af65",
"type": "metadata_template"
},
"filter_fields": [
{
"field": "a0f4ee4e-1dc1-4h90-a8a9-aef55fc681d4",
"value": "0c27b756-0p87-4fe0-a43a-59fb661ccc4e"
}
],
"assigned_by": {
"id": "11446498",
"type": "user",
"name": "Aaron Levie",
"login": "ceo@example.com"
},
"assigned_at": "2012-12-12T10:53:43-08:00",
"start_date_field": "upload_date"
}リテンションポリシーを項目に割り当てます。
curl -i -X POST "https://api.box.com/2.0/retention_policy_assignments" \
-H "authorization: Bearer <ACCESS_TOKEN>" \
-H "content-type: application/json" \
-d '{
"policy_id": "173463",
"assign_to": {
"type": "folder",
"id": "6564564"
}
}'{
"id": "11446498",
"type": "retention_policy_assignment",
"retention_policy": {
"id": "12345",
"type": "retention_policy",
"policy_name": "Some Policy Name",
"retention_length": "365",
"disposition_action": "permanently_delete",
"max_extension_length": "365"
},
"assigned_to": {
"id": "a983f69f-e85f-4ph4-9f46-4afdf9c1af65",
"type": "metadata_template"
},
"filter_fields": [
{
"field": "a0f4ee4e-1dc1-4h90-a8a9-aef55fc681d4",
"value": "0c27b756-0p87-4fe0-a43a-59fb661ccc4e"
}
],
"assigned_by": {
"id": "11446498",
"type": "user",
"name": "Aaron Levie",
"login": "ceo@example.com"
},
"assigned_at": "2012-12-12T10:53:43-08:00",
"start_date_field": "upload_date"
}Documentation Index
Fetch the complete documentation index at: https://developer.box.com/llms.txt
Use this file to discover all available pages before exploring further.
The access token received from the authorization server in the OAuth 2.0 flow.
割り当てるリテンションポリシーのID。
"173463"
ポリシーを割り当てる項目。
Show child attributes
assign_toのタイプがmetadata_templateの場合は、必要に応じてfilter_fieldsパラメータを追加します。このパラメータには、フィールドエントリと値エントリを含むオブジェクトの配列が必要になります。現在、fieldおよびvalueのオブジェクトは1つだけサポートされています。
Show child attributes
リテンションポリシー割り当ての開始日。
assigned_toのタイプがmetadata_templateの場合、このフィールドには、日付フィールドのメタデータ属性キーIDを指定できます。
"upload_date"
新しいリテンションポリシー割り当てオブジェクトを返します。
リテンションの割り当ては、リテンションポリシーで保持されるファイルを指定するルールを表します。割り当てにより、フォルダまたはメタデータに基づいてファイルを保持したり、企業内のすべてのファイルを保持したりできます。
リテンションポリシー割り当ての一意の識別子。
"11446498"
値は常にretention_policy_assignmentになります。
retention_policy_assignment "retention_policy_assignment"
コンテンツに割り当てられたリテンションポリシーオブジェクトのMini版の表示。
Show child attributes
リテンションの対象となるコンテンツのtypeとid。typeは、folder、enterprise、metadata_templateのいずれかになります。
Show child attributes
フィールドオブジェクトの配列。値が返されるのは、assigned_toのタイプがmetadata_templateの場合のみです。それ以外の場合、配列は空です。
Show child attributes
リテンションポリシー割り当てを作成したユーザーをMini版のユーザーオブジェクトで表示。
Show child attributes
リテンションポリシー割り当てオブジェクトが作成された日時。
"2012-12-12T10:53:43-08:00"
リテンションポリシー割り当ての開始日。assigned_toのタイプがmetadata_templateの場合、このフィールドには、日付フィールドのメタデータ属性キーIDを指定できます。
"upload_date"
Was this page helpful?