---
title: Virtual patches
summary: Virtual patching rules block or log requests matching specific vulnerabilities.
url: https://www.fastly.com/documentation/reference/api/security/virtual-patches
---

Virtual patching rules block or log requests matching specific vulnerabilities.

## Data model

| Field | Type | Description |
|-------|------|-------------|
| `description` | string | Description of the virtual patch. |
| `enabled` | boolean | Control for enabling and disabling a virtual patch. |
| `id` | string | The ID of the virtual patch. |
| `mode` | string | Action to take when a signal for virtual patch is detected. |

## API endpoints

### List virtual patches

**GET** `/security/workspaces/{workspace_id}/virtual-patches`

List virtual patches for a workspace.

**Parameters:**

| Name | Type | In | Required | Description |
|------|------|----|---------|--------------|
| `limit` | integer | query | No | Limit how many results are returned. |
| `page` | integer | query | No | Page number of the collection to request. |
| `workspace_id` | string | path | Yes | The ID of the workspace. |

### Retrieve virtual patch

**GET** `/security/workspaces/{workspace_id}/virtual-patches/{virtual_patch_id}`

Get a virtual patch from a workspace.

**Parameters:**

| Name | Type | In | Required | Description |
|------|------|----|---------|--------------|
| `virtual_patch_id` | string | path | Yes | The ID of the virtual patch. |
| `workspace_id` | string | path | Yes | The ID of the workspace. |

### Edit virtual patch

**PATCH** `/security/workspaces/{workspace_id}/virtual-patches/{virtual_patch_id}`

Change attributes of a virtual patch in a workspace.

**Parameters:**

| Name | Type | In | Required | Description |
|------|------|----|---------|--------------|
| `virtual_patch_id` | string | path | Yes | The ID of the virtual patch. |
| `workspace_id` | string | path | Yes | The ID of the workspace. |

