---
title: "Get file policy by id"
method: GET
path: "/filePolicies/{id}"
tags: ["FilePolicies"]
---

# Get file policy by id

`GET /filePolicies/{id}`

## Request

- Base URL: `https://localhost:8446/api/v2`
- URL: `https://localhost:8446/api/v2/filePolicies/{id}`
- Auth: API key in header `Authorization`

Returns file policy.

## Path parameters

- `id` number, required

## Response `200`

Successful response

- object
  - `id` number, required: File policy id
  - `name` string, required: File policy name. Is unique.
  - `case_insensitive` boolean, required: Case sensitivity ON/OFF for rules lists.
  - `exclusion` string, required: List of exclusion rules
  - `pinning` string, required: List of pinning rules
  - `size_limit_type` string, required: Type of size limit.
  - `size_limit` number, required: Cache size limit. Is greater than 0. Max value is 100, if size_limit_type is equal 'percent'.
  - `clear_cache_when` number, required: Clear cache when percent of used cache storage is equal to specified value.
  - `clear_cache_until` number, required: Clear cache cache until percent of used cache storage is back to specified value.
  - `priority_type` string, required: Type of priority.
  - `priority_by_mtime` string: Type of priority by mtime. Required if priority_type is equal 'mtime'.
  - `priority_by_name` string: List of names. Required if priority_type is equal 'name'.

## Other responses

- `default`: Error response. Depending on the error, either a 4xx or 5xx response status is returned.

---

[API](https://skmtc.dev/resilio/apis/resilio-api.md) - [All operations](https://skmtc.dev/resilio/apis/resilio-api/llms.txt) - [OpenAPI document](https://skmtc.dev/resilio/apis/resilio-api/revisions/ca39130a395e?raw)
