Box Developer Documentation

A beta version of the new Box developer documentation site is launching soon! Updated Developer Guides, modern API Reference, and AI-powered search are on the way to help you build with Box faster. Stay tuned for more updates.

Get Retention Policy

Get Retention Policy

To get the information for a specific Retention Policy that has been created in an enterprise, call the GET /retention_policies/:id API endpoint with the id of the policy.

cURL
curl -i -X GET "https://api.box.com/2.0/retention_policies/982312" \
     -H "authorization: Bearer <ACCESS_TOKEN>"
Node/TypeScript v10
await client.retentionPolicies.getRetentionPolicyById(retentionPolicy.id);
Python v10
client.retention_policies.get_retention_policy_by_id(retention_policy.id)
.NET v10
await client.RetentionPolicies.GetRetentionPolicyByIdAsync(retentionPolicyId: retentionPolicy.Id);
Swift v10
try await client.retentionPolicies.getRetentionPolicyById(retentionPolicyId: retentionPolicy.id)
Java v10
client.getRetentionPolicies().getRetentionPolicyById(retentionPolicy.getId())
.NET v6
await client.RetentionPolicies.GetRetentionPolicyByIdAsync(retentionPolicyId: retentionPolicy.Id);
Node v4
await client.retentionPolicies.getRetentionPolicyById(retentionPolicy.id);

Required Scopes

Before using any of the Retention Policy APIs, an application must have the right scopes enabled. See Required Scopes for more details.