List an automation's versions
const url = 'https://api.pixonaut.app/v1/automations/example/versions?page=1&pageSize=50';const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
try { const response = await fetch(url, options); const data = await response.json(); console.log(data);} catch (error) { console.error(error);}curl --request GET \ --url 'https://api.pixonaut.app/v1/automations/example/versions?page=1&pageSize=50' \ --header 'Authorization: Bearer <token>'Operation ID: automations.versions
Newest first: who saved each and when, what it changed from the version before, whether it is current, and how many firings are still on it. Versions are never edited or deleted.
Authorizations
Section titled “Authorizations”Parameters
Section titled “Parameters”Path Parameters
Section titled “Path Parameters”Query Parameters
Section titled “Query Parameters”The page to read, from 1; the first when left out.
The page to read, from 1; the first when left out.
Responses
Section titled “Responses”A page of the automation’s versions
object
How many there are in all.
object
What it changed from the version before, in words.
object
The draft as this version saved it: what a new draft starts from, to save as the next version.
object
The automation’s tree of steps.
object
object
Every one holds.
object
At least one holds.
object
It does not hold.
object
The fact compared.
It holds when the fact is one of these: each at most 200 characters, or 2054 for an origin, which may name a store’s site.
object
It holds from this many copies up.
It holds up to this many copies.
The order’s quantity.
object
The order’s delivery address.
Whether it must be set, or must not.
The steps, in the order they run. A step’s type names an action from the catalogue.
object
Further steps, under each branch’s name.
object
Its id, unique in the body: what a firing names it by.
What its type takes; the draft check refuses settings the type does not.
object
Its action (approve, create_print, place_order, reroute, cancel_order, notify, email, webhook) or flow step (only_if, paths, wait_for, delay).
The sources it acts on: the studio always; designer links, keys and connected stores, each every one or a snapshot. To act on only some, an Only if compares the design’s origin.
object
On, it acts on designs from every secret and publishable key no store was given, those added later too. Off, only from those in keys.
On, it acts on designs from every designer link, those made later too. Off, only from the links in links.
On, it acts on designs from every connected store, those connected later too. Off, only from those in stores. A store may have its own automated flows on its designs; if it does, the first to move one on wins.
While its switch is off, those that existed when it was switched off; null while it is on. A save that turns it off with none takes it then.
object
Each one that existed then, as a design’s origin names it: link:<id>, secret_key:<id> and publishable_key:<id>, or store:<site>.
When its switch was turned off: the snapshot is as of then.
While its switch is off, those that existed when it was switched off; null while it is on. A save that turns it off with none takes it then.
object
Each one that existed then, as a design’s origin names it: link:<id>, secret_key:<id> and publishable_key:<id>, or store:<site>.
When its switch was turned off: the snapshot is as of then.
While its switch is off, those that existed when it was switched off; null while it is on. A save that turns it off with none takes it then.
object
Each one that existed then, as a design’s origin names it: link:<id>, secret_key:<id> and publishable_key:<id>, or store:<site>.
When its switch was turned off: the snapshot is as of then.
The event it fires on; null for none yet.
Firings that started on it and are still running, waiting or paused.
Examples
Example
{ "page": 1, "pageSize": 50, "total": 3, "versions": [ { "changes": [ { "field": "body", "summary": "Added 1 step." }, { "field": "spendLimit", "summary": "Spend limit changed from 20 to 50 a day." } ], "current": true, "draft": { "body": { "steps": [ { "id": "s1", "settings": {}, "type": "approve" } ] }, "name": "Hosted link to printshop", "runsAs": "author", "sources": { "includeNewKeys": true, "includeNewLinks": false, "includeNewStores": true, "keys": null, "links": { "sources": [ "link:shl_3f9a1c7e2b4d" ], "takenAt": 1760000200000 }, "stores": null }, "spendLimit": 50, "trigger": "design.committed" }, "savedAt": 1760000400000, "savedBy": { "kind": "member", "name": "Ada Lewis", "userId": "u_8b1d2c3e4f5a" }, "unfinishedFirings": 2, "version": 3 }, { "changes": [ { "field": "sources", "summary": "Leaves out designer links made from now on." } ], "current": false, "draft": { "body": { "steps": [] }, "name": "Hosted link to printshop", "runsAs": "author", "sources": { "includeNewKeys": true, "includeNewLinks": false, "includeNewStores": true, "keys": null, "links": { "sources": [ "link:shl_3f9a1c7e2b4d" ], "takenAt": 1760000200000 }, "stores": null }, "spendLimit": 20, "trigger": "design.committed" }, "savedAt": 1760000200000, "savedBy": { "kind": "key", "label": "Shop server" }, "unfinishedFirings": 0, "version": 2 }, { "changes": [ { "field": "created", "summary": "Created." } ], "current": false, "draft": { "body": { "steps": [] }, "name": "Hosted link to printshop", "runsAs": "author", "sources": { "includeNewKeys": true, "includeNewLinks": true, "includeNewStores": true, "keys": null, "links": null, "stores": null }, "spendLimit": 20, "trigger": "design.committed" }, "savedAt": 1760000000000, "savedBy": { "kind": "member", "name": "Ada Lewis", "userId": "u_8b1d2c3e4f5a" }, "unfinishedFirings": 0, "version": 1 } ]}Headers
Section titled “Headers”Every response names the request it answers in X-Request-Id: the id the request was sent with in that header, when it is well formed, else one the API gave it. Quote it when reporting a refusal or a failure: the API’s log lines for that request carry it.
Refused: unauthorized
object
Examples
unauthorized
{ "error": "unauthorized"}Headers
Section titled “Headers”Every response names the request it answers in X-Request-Id: the id the request was sent with in that header, when it is well formed, else one the API gave it. Quote it when reporting a refusal or a failure: the API’s log lines for that request carry it.
Refused: origin_forbidden, forbidden, feature_disabled
object
The feature the tenant does not have. Always sent with feature_disabled.
Examples
feature_disabled
{ "error": "feature_disabled", "feature": "api"}forbidden
{ "error": "forbidden"}origin_forbidden
{ "error": "origin_forbidden"}Headers
Section titled “Headers”Every response names the request it answers in X-Request-Id: the id the request was sent with in that header, when it is well formed, else one the API gave it. Quote it when reporting a refusal or a failure: the API’s log lines for that request carry it.
Refused: automation_not_found
object
Examples
automation_not_found
{ "error": "automation_not_found"}Headers
Section titled “Headers”Every response names the request it answers in X-Request-Id: the id the request was sent with in that header, when it is well formed, else one the API gave it. Quote it when reporting a refusal or a failure: the API’s log lines for that request carry it.
Refused: invalid_query
object
Examples
invalid_query
{ "error": "invalid_query"}Headers
Section titled “Headers”Every response names the request it answers in X-Request-Id: the id the request was sent with in that header, when it is well formed, else one the API gave it. Quote it when reporting a refusal or a failure: the API’s log lines for that request carry it.
Refused: db_error. A request that failed unexpectedly answers as text instead.
object
Examples
db_error
{ "error": "db_error"}Headers
Section titled “Headers”Every response names the request it answers in X-Request-Id: the id the request was sent with in that header, when it is well formed, else one the API gave it. Quote it when reporting a refusal or a failure: the API’s log lines for that request carry it.
Questions? Write to [email protected].