---
title: "Force revoke File Locks by path"
method: POST
path: "/runs/{id}/file_locks/revoke_by_path"
tags: ["Runs"]
---

# Force revoke File Locks by path

`POST /runs/{id}/file_locks/revoke_by_path`

## Request

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

Revokes file locks by provided path, file_name and lock_owner. Returns list of locks that were failed to revoke.

## Path parameters

- `id` number, required

## Request body

- object
  - `locks_to_revoke` object, required: Locks to revoke. Array or locks to revoke. Required and must not be empty.
  - `locks_to_revoke.file_name` string, required: File name.
  - `locks_to_revoke.path` string, required: Path. Path relatively to job folder.
  - `locks_to_revoke.lock_owner` string: Lock owner. If not provided, all locks (applied by all Agents) will be revoked for this file.

## Response `200`

Successful response

- object
  - `failed_to_revoke` object, required: Failed to revoke. Array of locks that were failed to revoke.
  - `file_name` string, required: File name.
  - `path` string, required: Path.
  - `reason` string, required: Reason.

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