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

# List All Retention Policies

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 list all Retention Policies that have been created in an enterprise, call
the <Link href="/reference/get-retention-policies">`GET /retention_policies`</Link> API endpoint.

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

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

  ```python Python v10 theme={null}
  client.retention_policies.get_retention_policies()
  ```

  ```cs .NET v10 theme={null}
  await client.RetentionPolicies.GetRetentionPoliciesAsync();
  ```

  ```swift Swift v10 theme={null}
  try await client.retentionPolicies.getRetentionPolicies()
  ```

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

  ```java Java v5 theme={null}
  Iterable<BoxRetentionPolicy.Info> policies = BoxRetentionPolicy.getAll(api);
  for (BoxRetentionPolicy.Info policyInfo : policies) {
  	// Do something with the retention policy.
  }
  ```

  ```python Python v4 theme={null}
  retention_policies = client.get_retention_policies()
  for policy in retention_policies:
      print(f'The policy ID is {policy.id} and the name is {policy.policy_name}')
  ```

  ```cs .NET v6 theme={null}
  BoxCollectionMarkerBased<BoxRetentionPolicy> policies = await client.RetentionPoliciesManager
      .GetRetentionPoliciesAsync();
  ```

  ```javascript Node v4 theme={null}
  client.retentionPolicies.getAll({ policy_name: 'Tax' }).then((policies) => {
  	/* policies -> {
  			entries:
  			[ { type: 'retention_policy',
  				id: '123456789',
  				name: 'Tax Documents' } ],
  			limit: 100,
  			next_marker: 'someMarkerString' }
  		*/
  });
  ```
</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("List retention policies"), href: "/reference/get-retention-policies", badge: "GET" }
]}
/>

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