Skip to contentSkip to navigationSkip to topbar
Rate this page:
On this page

Rolling Back a Release using Plugins API


Sometimes, you need to roll-back a Release. For example, maybe you pushed changes to your Flex contact center, found a bug, and now need to return to a previous stable version. The Plugins API makes it simpler and faster to do this.


Fetch The Releases previously Active on Flex

fetch-the-releases-previously-active-on-flex page anchor

Start by retrieving the list of Releases previously active on your account

Read the List of Releases

read-the-list-of-releases page anchor
Node.js
Python
C#
Java
Go
PHP
Ruby
twilio-cli
curl

_18
// Download the helper library from https://www.twilio.com/docs/node/install
_18
const twilio = require("twilio"); // Or, for ESM: import twilio from "twilio";
_18
_18
// Find your Account SID and Auth Token at twilio.com/console
_18
// and set the environment variables. See http://twil.io/secure
_18
const accountSid = process.env.TWILIO_ACCOUNT_SID;
_18
const authToken = process.env.TWILIO_AUTH_TOKEN;
_18
const client = twilio(accountSid, authToken);
_18
_18
async function listPluginRelease() {
_18
const pluginReleases = await client.flexApi.v1.pluginReleases.list({
_18
limit: 20,
_18
});
_18
_18
pluginReleases.forEach((p) => console.log(p.sid));
_18
}
_18
_18
listPluginRelease();

Output

_20
{
_20
"releases": [
_20
{
_20
"sid": "FKaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
_20
"account_sid": "ACaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
_20
"configuration_sid": "FJaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
_20
"date_created": "2020-01-10T20:00:00Z",
_20
"url": "https://flex-api.twilio.com/v1/PluginService/Releases/FKaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa"
_20
}
_20
],
_20
"meta": {
_20
"page": 0,
_20
"page_size": 50,
_20
"first_page_url": "https://flex-api.twilio.com/v1/PluginService/Releases?PageSize=50&Page=0",
_20
"previous_page_url": null,
_20
"url": "https://flex-api.twilio.com/v1/PluginService/Releases?PageSize=50&Page=0",
_20
"next_page_url": null,
_20
"key": "releases"
_20
}
_20
}


Create a new Release from a prior Configuration

create-a-new-release-from-a-prior-configuration page anchor

From the list of Releases, choose the one that you want to roll-back to. Copy the configuration_sid of that release. You have to create a new Release with the configuration_sid copied in order to make it active on your Flex contact center.

Node.js
Python
C#
Java
Go
PHP
Ruby
twilio-cli
curl

_18
// Download the helper library from https://www.twilio.com/docs/node/install
_18
const twilio = require("twilio"); // Or, for ESM: import twilio from "twilio";
_18
_18
// Find your Account SID and Auth Token at twilio.com/console
_18
// and set the environment variables. See http://twil.io/secure
_18
const accountSid = process.env.TWILIO_ACCOUNT_SID;
_18
const authToken = process.env.TWILIO_AUTH_TOKEN;
_18
const client = twilio(accountSid, authToken);
_18
_18
async function createPluginRelease() {
_18
const pluginRelease = await client.flexApi.v1.pluginReleases.create({
_18
configurationId: "FJ10000000000000000000000000000000",
_18
});
_18
_18
console.log(pluginRelease.sid);
_18
}
_18
_18
createPluginRelease();

Output

_10
{
_10
"sid": "FKaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
_10
"account_sid": "ACaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
_10
"configuration_sid": "FJaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
_10
"date_created": "2020-01-10T20:00:00Z",
_10
"url": "https://flex-api.twilio.com/v1/PluginService/Releases/FKaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa"
_10
}

Whew! You've successfully rolled back your Contact Center to an operational version. Go hunt down that bug, and get ready to cut a new Release with the revised Plugin Code!



Rate this page: