---
title: Diff
summary: See the line-by-line changes in configuration between two different versions of a service.
url: https://www.fastly.com/documentation/reference/api/utils/diff
---

See the line-by-line changes in configuration between two different versions of a service.

## Data model

| Field | Type | Description |
|-------|------|-------------|
| `diff` | string | The differences between two specified service versions. Returns the full config if the version configurations are identical. |
| `format` | string | The format the diff is being returned in (<code>text</code>, <code>html</code> or <code>html_simple</code>). |
| `from` | integer | The version number being diffed from. |
| `to` | integer | The version number being diffed to. |

## API endpoints

### Diff two service versions

**GET** `/service/{service_id}/diff/from/{from_version_id}/to/{to_version_id}`

Get diff between two versions.

**Parameters:**

| Name | Type | In | Required | Description |
|------|------|----|---------|--------------|
| `format` | string | query | No | Optional method to format the diff field. |
| `from_version_id` | integer | path | Yes | The version number of the service to which changes in the generated VCL are being compared. Can either be a positive number from 1 to your maximum version or a negative number from -1 down (-1 is latest version etc). |
| `service_id` | string | path | Yes | Alphanumeric string identifying the service. |
| `to_version_id` | integer | path | Yes | The version number of the service from which changes in the generated VCL are being compared. Uses same numbering scheme as <code>from</code>. |

