# Get integration version

> Source: https://truto.one/docs/api-reference/admin/integrations/get-version/

`GET /integration/{id}/versions/{version}`

Resource: **Integrations**

One version of the integration, with its content in `data`: the tracked fields as they were at that version, with secrets removed.

## Path parameters

- **`id`** _(string, required)_
  The object's ID.
- **`version`** _(integer, required)_

## Response body

- **`version`** _(integer)_
- **`source`** _(string)_
  `save` and `restore` were written by a save. `baseline` is the state found before the first recorded save. `untracked` is a state found before a save that no recorded version matched: the object was changed without recording a version. `legacy` was stored before version history existed. The last three have no author.
  Allowed: `save`, `restore`, `baseline`, `untracked`, `legacy`
- **`recorded_at`** _(string)_
- **`actor`** _(object)_
  - **`type`** _(string)_
    How the author authenticated, for example `session` or `api_token`.
  - **`id`** _(string)_
    The user's ID, or for `api_token` the token's ID.
  - **`name`** _(string)_
  - **`impersonated_by_staff`** _(boolean)_
- **`message`** _(string)_
  The change note. In a listing, a note too long to store with the version's metadata is a shortened preview ending in `…`, and `message_truncated` is true; getting that one version returns it whole.
- **`message_truncated`** _(boolean)_
  True when `message` is a shortened preview of a longer note.
- **`restored_from_version`** _(integer)_
- **`is_current`** _(boolean)_
- **`data`** _(object)_
  The object's tracked fields as they were at this version, with secrets removed.

## Errors

| Status | Description |
| :----- | :---------- |
| `400` | A `version` that is not a positive integer. |
| `404` | No such integration or version, or the caller cannot edit the integration. |

## Code examples

### curl

```bash
curl -X GET 'https://api.truto.one/integration/{id}/versions/{version}' \
  -H 'Authorization: Bearer <your_api_token>' \
  -H 'Content-Type: application/json'
```

### JavaScript

```javascript
const response = await fetch('https://api.truto.one/integration/{id}/versions/{version}', {
  method: 'GET',
  headers: {
    'Authorization': 'Bearer <your_api_token>',
    'Content-Type': 'application/json',
  },
});

const data = await response.json();
console.log(data);
```

### Python

```python
import requests

url = "https://api.truto.one/integration/{id}/versions/{version}"
headers = {
    "Authorization": "Bearer <your_api_token>",
    "Content-Type": "application/json",
}
params = {
}

response = requests.get(url, headers=headers, params=params)
print(response.json())
```
