Skip to main content
Automation API

Revisions

Request
curl https://api.tapeapp.com/v1/automation/4021/revision \
-H "Authorization: Bearer $TAPE_TOKEN"
Response
{
"revisions": [
{
"id": "90071992547409929",
"automation_id": 4021,
"created_at": "2024-05-20 18:03:08",
"created_at_utc": "2024-05-20 16:03:08",
"name": "Email the owner on a new high-priority lead",
"paused": false,
"broken": false,
"trigger": { "type": "record_created", "config": {} },
"filter": null,
"actions": []
}
]
}
Request
curl https://api.tapeapp.com/v1/automation/4021/revision/90071992547409929 \
-H "Authorization: Bearer $TAPE_TOKEN"

Use these endpoints to read the version history of an automation and to roll its definition back.

Every change to an automation adds a revision: a frozen, unchangeable snapshot of its definition. There is no pointer to an "active version". To roll back, retrieve a revision and send its definition back with PUT.

Which capability do I need?

Both endpoints need Read automations (automations:read) and the Admin role in the app's workspace. They work with a personal access token, an OAuth access token or a user API key. Each request costs 1x base credits.

List revisions​

Use this endpoint to list the full history of an automation.

GET/v1/automation/{automation_id}/revisionapi.tapeapp.com
Request
curl https://api.tapeapp.com/v1/automation/4021/revision \
-H "Authorization: Bearer $TAPE_TOKEN"
Response
{
"revisions": [
{
"id": "90071992547409929",
"automation_id": 4021,
"created_at": "2024-05-20 18:03:08",
"created_at_utc": "2024-05-20 16:03:08",
"name": "Email the owner on a new high-priority lead",
"paused": false,
"broken": false,
"trigger": { "type": "record_created", "config": {} },
"filter": null,
"actions": []
}
]
}

General behavior

  • Revisions are sorted newest first.
  • The list has no pagination: no cursor and no total.
  • Simulation snapshots aren't included.

Requirements: automations:read, and the Admin role in the app's workspace. Works with a personal access token, an OAuth access token or a user API key.

Retrieve a revision​

Use this endpoint to read one revision of an automation.

GET/v1/automation/{automation_id}/revision/{revision_id}api.tapeapp.com
Request
curl https://api.tapeapp.com/v1/automation/4021/revision/90071992547409929 \
-H "Authorization: Bearer $TAPE_TOKEN"

The response is { revision }.

General behavior

  • The revision must belong to this automation.
  • The endpoint never reveals which revision IDs exist. See Errors.

Requirements: automations:read, and the Admin role in the app's workspace. Works with a personal access token, an OAuth access token or a user API key.

Roll back to a revision​

A revision is a read snapshot. Its envelope is wider than the update body accepts, so a PUT of the whole revision fails with 400.

The first revision in the list is the current state. Pausing and activating add revisions too. Pick the revision whose filter and actions you want back.

Send back only its definition members: name, trigger, filter and actions. The PUT needs automations:edit. Then validate the automation: an older definition can point to fields that no longer exist.

  • The envelope keys id, automation_id, created_at, created_at_utc, paused and broken aren't writable. The update body rejects unknown keys.
  • A filter or action condition with a collection-change condition (Has been added, Has been deleted or Changed item contains) has no writable form. Remove it first. See Filters.
  • Conditions with has_changed, has_changed_to and has_changed_to_any_of are writable. So are conditions on fields, record metadata, trigger outputs and action outputs.
  • The server-assigned webhook_url of a webhook_received trigger is on the live automation object, but not in a revision. It never causes a 400 on rollback.
Why doesn't a rollback restore the description?

A revision has no description. description keeps its current value, so reset it separately if you need to revert it too.

The revision object​

A revision is a snapshot of the automation's definition at one edit.

idstring

The revision ID, a 64-bit value returned as a string.

Example value "90071992547409929"

automation_idinteger

The automation this revision belongs to.

Example value 4021

created_atstring

When the revision was created, YYYY-MM-DD HH:mm:ss, in your timezone.

Example value "2024-05-20 18:03:08"

created_at_utcstring

Same instant as created_at, in UTC.

Example value "2024-05-20 16:03:08"

namestring

The name at this revision.

Example value "Email the owner on a new high-priority lead"

paused / brokenboolean

The state at this revision.

Example value false

triggerobject | null

The trigger at this revision.

Example value { "type": "record_created", "config": {} }

filterobject | null

The filter at this revision.

Example value null

actionsarray

The actions at this revision.

Example value []

A revision has fewer fields than the automation object. It has no description, broken_reason, updated_at, app_id or workspace_id.

Errors​

  • An automation ID that isn't an integer returns 400.
  • A credential that doesn't act on behalf of a user, for example an automation API key, returns 401.
  • A token without automations:read returns 403.
  • An automation or revision that isn't available to you returns 404. A revision_id that is unknown, malformed or belongs to another automation returns the same 404.

See Errors & broken reasons for the Automation API and Errors for all error codes.

Next steps​