Flow Revision
Flows Revisions track every change made to a Flow resource. Revisions are automatically created when a Flow is created or updated. Each revision is read-only and immutable (cannot be updated or deleted).
For convenience, the latest Revision and latest published Revision can be fetched using the magic identifiers LatestPublished
and LatestRevision
in place of an integer.
Fetching the parent Flow resource will always return the latest Flow Revision.
Resource properties
sid
type: SID<FW>
The unique string that we created to identify the Flow resource.
Pattern:
^FW[0-9a-fA-F]{32}$
friendly_name
type: string
The string that you assigned to describe the Flow.
definition
type: object
JSON representation of flow definition.
status
type: enum<string>
The status of the Flow. Can be: draft
or published
.
Possible values:
draft
published
revision
type: integer
The latest revision number of the Flow's definition.
commit_message
type: string
Description of change made in the revision.
valid
type: boolean
Boolean if the flow definition is valid.
errors
type: array
List of error in the flow definition.
date_created
type: string<date-time>
date_updated
type: string<date-time>
url
type: string<uri>
The absolute URL of the resource.
GET https://studio.twilio.com/v2/Flows/{Sid}/Revisions/{Revision}
URI parameters
Sid
type: SID<FW>
The SID of the Flow resource to fetch.
Pattern:
^FW[0-9a-fA-F]{32}$
Revision
type: string
Specific Revision number or can be LatestPublished
and LatestRevision
.
_11// Download the helper library from https://www.twilio.com/docs/node/install
_11// Find your Account SID and Auth Token at twilio.com/console
_11// and set the environment variables. See http://twil.io/secure
_11const accountSid = process.env.TWILIO_ACCOUNT_SID;
_11const authToken = process.env.TWILIO_AUTH_TOKEN;
_11const client = require('twilio')(accountSid, authToken);
_11client.studio.v2.flows('FWXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX')
_11 .then(flow_revision => console.log(flow_revision.friendlyName));
_16 "sid": "FWXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX",
_16 "account_sid": "ACXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX",
_16 "initial_state": "Trigger"
_16 "friendly_name": "Test Flow",
_16 "status": "published",
_16 "commit_message": null,
_16 "date_created": "2017-11-06T12:00:00Z",
_16 "date_updated": null,
_16 "url": "https://studio.twilio.com/v2/Flows/FWXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX/Revisions/1"
GET https://studio.twilio.com/v2/Flows/{Sid}/Revisions
URI parameters
Sid
type: SID<FW>
The SID of the Flow resource to fetch.
Pattern:
^FW[0-9a-fA-F]{32}$
PageSize
type: integer
How many resources to return in each list page. The default is 50, and the maximum is 1000.
Page
type: integer
The page index. This value is simply for client state.
PageToken
type: string
The page token. This is provided by the API.
_11// Download the helper library from https://www.twilio.com/docs/node/install
_11// Find your Account SID and Auth Token at twilio.com/console
_11// and set the environment variables. See http://twil.io/secure
_11const accountSid = process.env.TWILIO_ACCOUNT_SID;
_11const authToken = process.env.TWILIO_AUTH_TOKEN;
_11const client = require('twilio')(accountSid, authToken);
_11client.studio.v2.flows('FWXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX')
_11 .then(revisions => revisions.forEach(r => console.log(r.sid)));
_27 "previous_page_url": "https://studio.twilio.com/v2/Flows/FWXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX/Revisions?PageSize=50&Page=0",
_27 "next_page_url": "https://studio.twilio.com/v2/Flows/FWXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX/Revisions?PageSize=50&Page=1",
_27 "url": "https://studio.twilio.com/v2/Flows/FWXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX/Revisions?PageSize=50&Page=0",
_27 "first_page_url": "https://studio.twilio.com/v2/Flows/FWXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX/Revisions?PageSize=50&Page=0",
_27 "sid": "FWXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX",
_27 "account_sid": "ACXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX",
_27 "friendly_name": "Test Flow",
_27 "status": "published",
_27 "commit_message": null,
_27 "date_created": "2017-11-06T12:00:00Z",
_27 "date_updated": "2017-11-06T12:00:00Z",
_27 "url": "https://studio.twilio.com/v2/Flows/FWXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX/Revisions/1"