Skip to content
GET /environment-integration/{id}/versions

Every saved version of the environment integration, newest first, without their content.

Each save through PATCH /environment-integration/{id} that changes a tracked field records a new version, with who made it and the optional change_message sent in its body. The first recorded save also stores the state before it as a baseline. A version stored before version history existed has the source legacy and no author; its recorded_at is when it was replaced, not when it was made. When the environment integration was changed without recording a version, its live state is listed as the next version, untracked, and is current.

Only a caller who can edit the environment integration can read its history.

Path Parameters

idstring
required·

The object's ID.

Response Body

current_versioninteger

The version the object is at now.

resultobject[]
actorobject
4 properties
idstring

The user's ID, or for api_token the token's ID.

impersonated_by_staffboolean
namestring
Example: Jane Doe via API token "CI"
typestring

How the author authenticated, for example session or api_token.

is_currentboolean
messagestring

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_truncatedboolean

True when message is a shortened preview of a longer note.

recorded_atstring · date-time
restored_from_versioninteger
sourcestring

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.

Possible values:
saverestorebaselineuntrackedlegacy
versioninteger
tracked_fieldsstring[]

The fields a version holds, compares and restores.

Errors

StatusDescription
404No such environment integration, or the caller cannot edit it.
curl -X GET 'https://api.truto.one/environment-integration/{id}/versions' \
  -H 'Authorization: Bearer <your_api_token>' \
  -H 'Content-Type: application/json'
const response = await fetch('https://api.truto.one/environment-integration/{id}/versions', {
  method: 'GET',
  headers: {
    'Authorization': 'Bearer <your_api_token>',
    'Content-Type': 'application/json',
  },
});

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

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

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