> ## 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.

# Get Retention Policy

export const MultiRelatedLinks = ({sections = []}) => {
  if (!sections || sections.length === 0) {
    return null;
  }
  return <div className="space-y-8">
      {sections.map((section, index) => <RelatedLinks key={index} title={section.title} items={section.items} />)}
    </div>;
};

export const RelatedLinks = ({title, items = []}) => {
  const getBadgeClass = badge => {
    if (!badge) return "badge-default";
    const badgeType = badge.toLowerCase().replace(/\s+/g, "-");
    return `badge-${badge === "ガイド" ? "guide" : badgeType}`;
  };
  if (!items || items.length === 0) {
    return null;
  }
  return <div className="my-8">
      {}
      <h3 className="text-sm font-bold uppercase tracking-wider mb-4">{title}</h3>

      {}
      <div className="flex flex-col gap-3">
        {items.map((item, index) => <a key={index} href={item.href} className="py-2 px-3 rounded related_link hover:bg-[#f2f2f2] dark:hover:bg-[#111827] flex items-center gap-3 group no-underline hover:no-underline border-b-0">
            {}
            <span className={`px-2 py-1 rounded-full text-xs font-semibold uppercase tracking-wide flex-shrink-0 ${getBadgeClass(item.badge)}`}>
              {item.badge}
            </span>

            {}
            <span className="text-base">{item.label}</span>
          </a>)}
      </div>
    </div>;
};

export const Link = ({href, children, className, ...props}) => {
  const localizedHref = localizeLink(href);
  return <a href={localizedHref} className={className} {...props}>
      {children}
    </a>;
};

To get the information for a specific Retention Policy that has been created in
an enterprise, call the <Link href="/reference/get-retention-policies-id">`GET /retention_policies/:id`</Link> API endpoint
with the `id` of the policy.

<CodeGroup>
  ```sh cURL theme={null}
  curl -i -X GET "https://api.box.com/2.0/retention_policies/982312" \
       -H "authorization: Bearer <ACCESS_TOKEN>"
  ```

  ```typescript Node/TypeScript v10 theme={null}
  await client.retentionPolicies.getRetentionPolicyById(retentionPolicy.id);
  ```

  ```python Python v10 theme={null}
  client.retention_policies.get_retention_policy_by_id(retention_policy.id)
  ```

  ```cs .NET v10 theme={null}
  await client.RetentionPolicies.GetRetentionPolicyByIdAsync(retentionPolicyId: retentionPolicy.Id);
  ```

  ```swift Swift v10 theme={null}
  try await client.retentionPolicies.getRetentionPolicyById(retentionPolicyId: retentionPolicy.id)
  ```

  ```java Java v10 theme={null}
  client.getRetentionPolicies().getRetentionPolicyById(retentionPolicy.getId())
  ```

  ```java Java v5 theme={null}
  // Get the policy name and status for a given retention policy
  BoxRetentionPolicy policy = new BoxRetentionPolicy(api, id);
  policy.getInfo("policy_name", "status");
  ```

  ```python Python v4 theme={null}
  retention_policy = client.retention_policy(retention_id='12345').get()
  print(f'Retention Policy ID is {retention_policy.id} and the name is {retention_policy.policy_name}')
  ```

  ```cs .NET v6 theme={null}
  BoxRetentionPolicy policy = await client.RetentionPoliciesManager.GetRetentionPolicyAsync("11111");
  ```

  ```javascript Node v4 theme={null}
  client.retentionPolicies.get('123456789').then((policy) => {
  	/* policy -> {
  			type: 'retention_policy',
  			id: '123456789',
  			policy_name: 'Tax Documents',
  			policy_type: 'indefinite',
  			retention_length: 'indefinite',
  			retention_type: 'modifiable',
  			description: 'Policy to retain all reports',
  			disposition_action: 'remove_retention',
  			can_owner_extend_retention: false,
  			status: 'active',
  			are_owners_notified: true,
  			custom_notification_recipients: []
  			assignment_counts: { enterprise: 0, folder: 1, metadata_template: 0 },
  			created_by:
  			{ type: 'user',
  				id: '11111',
  				name: 'Example User',
  				login: 'user@example.com' },
  			created_at: '2015-05-01T11:12:54-07:00',
  			modified_at: '2015-06-08T11:11:50-07:00' }
  		*/
  });
  ```
</CodeGroup>

## Required Scopes

Before using any of the Retention Policy APIs, an application must have the
right scopes enabled. See <Link href="/guides/retention-policies#required-scopes">Required Scopes</Link> for more details.

<RelatedLinks
  title="RELATED APIS"
  items={[
{ label: translate("Get retention policy"), href: "/reference/get-retention-policies-id", badge: "GET" }
]}
/>

<RelatedLinks
  title="RELATED GUIDES"
  items={[
{ label: translate("List All Retention Policies"), href: "/guides/retention-policies/list", badge: "GUIDE" }
]}
/>
