Add-on Results API
The Add-on Results API allows you to list and retrieve Add-on results.
Warning
Currently, the API only provides results for Recording Analysis Add-ons and the data is persisted for no more than 30 days.
Add-on results exist as a subresource under the integration point with which the Add-on was configured. For Recordings, this is the Recording resource.
_10/2010-04-01/Accounts/{AccountSid}/Recordings/{RecordingSid}/AddOnResults/
These subresources require HTTP basic authentication to access using your Account SIS and Auth Token.
GET
requests on Recording Add-on Results subresources can return one of the following representations with the appropriate extensions:
Extension | Representation |
---|
.xml or none | XML |
.json | JSON |
.csv | CSV |
The Add-on Result instance subresource represents the result from an Add-on invoked on a specific Recording.
_10/AddOnResults/{RequestSid}
An Add-on Result resource is represented by the following properties:
Property nameTypePIIDescription
The unique string that that we created to identify the Recording AddOnResult resource.
Pattern: ^XR[0-9a-fA-F]{32}$
Min length: 34
Max length: 34
The SID of the Account that created the Recording AddOnResult resource.
Pattern: ^AC[0-9a-fA-F]{32}$
Min length: 34
Max length: 34
The status of the result. Can be: canceled
, completed
, deleted
, failed
, in-progress
, init
, processing
, queued
.
Possible values: canceled
completed
deleted
failed
in-progress
init
processing
queued
The SID of the Add-on to which the result belongs.
Pattern: ^XB[0-9a-fA-F]{32}$
Min length: 34
Max length: 34
add_on_configuration_sidSID<XE> The SID of the Add-on configuration.
Pattern: ^XE[0-9a-fA-F]{32}$
Min length: 34
Max length: 34
date_createdstring<date-time-rfc-2822>
date_updatedstring<date-time-rfc-2822>
date_completedstring<date-time-rfc-2822>
The SID of the recording to which the AddOnResult resource belongs.
Pattern: ^RE[0-9a-fA-F]{32}$
Min length: 34
Max length: 34
subresource_urisobject<uri-map> A list of related resources identified by their relative URIs.
subresource_uris
contains the following properties :
Property | Description |
---|
payloads | URL pointing to the Payload sub-resource |
Returns a single instance of an Add-on Result associated with the given parent resource.
_19// Download the helper library from https://www.twilio.com/docs/node/install
_19const twilio = require("twilio"); // Or, for ESM: import twilio from "twilio";
_19// Find your Account SID and Auth Token at twilio.com/console
_19// and set the environment variables. See http://twil.io/secure
_19const accountSid = process.env.TWILIO_ACCOUNT_SID;
_19const authToken = process.env.TWILIO_AUTH_TOKEN;
_19const client = twilio(accountSid, authToken);
_19async function fetchRecordingAddOnResult() {
_19 const addOnResult = await client
_19 .recordings("REaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa")
_19 .addOnResults("XRaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa")
_19 console.log(addOnResult.sid);
_19fetchRecordingAddOnResult();
_14 "sid": "XRaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
_14 "account_sid": "ACaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
_14 "reference_sid": "REaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
_14 "status": "completed",
_14 "add_on_sid": "XBaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
_14 "add_on_configuration_sid": "XEaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
_14 "date_created": "Wed, 01 Sep 2010 15:15:41 +0000",
_14 "date_updated": "Wed, 01 Sep 2010 15:15:41 +0000",
_14 "date_completed": "Wed, 01 Sep 2010 15:15:41 +0000",
_14 "subresource_uris": {
_14 "payloads": "/2010-04-01/Accounts/ACaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/Recordings/REaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/AddOnResults/XRaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/Payloads.json"
Deleting the Add-on Result will delete the result record and purge all associated Payloads. Successful responses will return no content.
The Add-on Results list subresource represents the set of results from Add-ons invoked on a specific recording.
The Add-on Results list subresource is represented by the following properties:
Property | Description |
---|
add_on_results | List of Add-on Result Instances |
Returns a list of Add-on Result instances associated with the given parent resource.
_18// Download the helper library from https://www.twilio.com/docs/node/install
_18const twilio = require("twilio"); // Or, for ESM: import twilio from "twilio";
_18// Find your Account SID and Auth Token at twilio.com/console
_18// and set the environment variables. See http://twil.io/secure
_18const accountSid = process.env.TWILIO_ACCOUNT_SID;
_18const authToken = process.env.TWILIO_AUTH_TOKEN;
_18const client = twilio(accountSid, authToken);
_18async function listRecordingAddOnResult() {
_18 const addOnResults = await client
_18 .recordings("REaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa")
_18 .addOnResults.list({ limit: 20 });
_18 addOnResults.forEach((a) => console.log(a.sid));
_18listRecordingAddOnResult();
_26 "first_page_uri": "/2010-04-01/Accounts/ACaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/Recordings/REaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/AddOnResults.json?PageSize=50&Page=0",
_26 "next_page_uri": null,
_26 "previous_page_uri": null,
_26 "sid": "XRaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
_26 "account_sid": "ACaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
_26 "reference_sid": "REaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
_26 "status": "completed",
_26 "add_on_sid": "XBaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
_26 "add_on_configuration_sid": "XEaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
_26 "date_created": "Wed, 01 Sep 2010 15:15:41 +0000",
_26 "date_updated": "Wed, 01 Sep 2010 15:15:41 +0000",
_26 "date_completed": "Wed, 01 Sep 2010 15:15:41 +0000",
_26 "subresource_uris": {
_26 "payloads": "/2010-04-01/Accounts/ACaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/Recordings/REaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/AddOnResults/XRaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/Payloads.json"
_26 "uri": "/2010-04-01/Accounts/ACaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/Recordings/REaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/AddOnResults.json?PageSize=50&Page=0"
The Add-on Results Payload subresource exposes the multiple types of Payloads that may be included in an Add-on Result.
_10/AddOnResults/{RequestSid}/Payloads/{PayloadSid}
An Add-on Results Payload resource is represented by the following properties:
Property nameTypePIIDescription
The unique string that that we created to identify the Recording AddOnResult Payload resource.
Pattern: ^XH[0-9a-fA-F]{32}$
Min length: 34
Max length: 34
The SID of the AddOnResult to which the payload belongs.
Pattern: ^XR[0-9a-fA-F]{32}$
Min length: 34
Max length: 34
The SID of the Account that created the Recording AddOnResult Payload resource.
Pattern: ^AC[0-9a-fA-F]{32}$
Min length: 34
Max length: 34
The string provided by the vendor that describes the payload.
The SID of the Add-on to which the result belongs.
Pattern: ^XB[0-9a-fA-F]{32}$
Min length: 34
Max length: 34
add_on_configuration_sidSID<XE> The SID of the Add-on configuration.
Pattern: ^XE[0-9a-fA-F]{32}$
Min length: 34
Max length: 34
The MIME type of the payload.
date_createdstring<date-time-rfc-2822>
date_updatedstring<date-time-rfc-2822>
The SID of the recording to which the AddOnResult resource that contains the payload belongs.
Pattern: ^RE[0-9a-fA-F]{32}$
Min length: 34
Max length: 34
subresource_urisobject<uri-map> A list of related resources identified by their relative URIs.
subresource_uris
contains the following properties :
Property | Description |
---|
data | URL pointing to the Data sub-resource |
Returns a single instance of a Payload associated with the given Add-on Result.
_20// Download the helper library from https://www.twilio.com/docs/node/install
_20const twilio = require("twilio"); // Or, for ESM: import twilio from "twilio";
_20// Find your Account SID and Auth Token at twilio.com/console
_20// and set the environment variables. See http://twil.io/secure
_20const accountSid = process.env.TWILIO_ACCOUNT_SID;
_20const authToken = process.env.TWILIO_AUTH_TOKEN;
_20const client = twilio(accountSid, authToken);
_20async function fetchRecordingAddOnResultPayload() {
_20 const payload = await client
_20 .recordings("REaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa")
_20 .addOnResults("XRaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa")
_20 .payloads("XHaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa")
_20 console.log(payload.sid);
_20fetchRecordingAddOnResultPayload();
_15 "sid": "XHaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
_15 "reference_sid": "REaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
_15 "add_on_sid": "XBaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
_15 "add_on_configuration_sid": "XEaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
_15 "add_on_result_sid": "XRaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
_15 "account_sid": "ACaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
_15 "label": "XHaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
_15 "content_type": "application/json",
_15 "date_created": "Wed, 01 Sep 2010 15:15:41 +0000",
_15 "date_updated": "Wed, 01 Sep 2010 15:15:41 +0000",
_15 "subresource_uris": {
_15 "data": "/2010-04-01/Accounts/ACaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/Recordings/REaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/AddOnResults/XRaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/Payloads/XHaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/Data.json"
The Add-on Results Payload List subresource exposes the multiple types of Payloads that may be in included in an Add-on Result.
_10/AddOnResults/{RequestSid}/Payloads
The Add-on Result Payloads list subresource is represented by the following properties:
Property | Description |
---|
payloads | List of Add-on Result Payload Instances |
Returns a list of Payload resource instances describing the data returned by Vendors as part of the Add-on Result.
_19// Download the helper library from https://www.twilio.com/docs/node/install
_19const twilio = require("twilio"); // Or, for ESM: import twilio from "twilio";
_19// Find your Account SID and Auth Token at twilio.com/console
_19// and set the environment variables. See http://twil.io/secure
_19const accountSid = process.env.TWILIO_ACCOUNT_SID;
_19const authToken = process.env.TWILIO_AUTH_TOKEN;
_19const client = twilio(accountSid, authToken);
_19async function listRecordingAddOnResultPayload() {
_19 const payloads = await client
_19 .recordings("REaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa")
_19 .addOnResults("XRaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa")
_19 .payloads.list({ limit: 20 });
_19 payloads.forEach((p) => console.log(p.sid));
_19listRecordingAddOnResultPayload();
_27 "first_page_uri": "/2010-04-01/Accounts/ACaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/Recordings/REaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/AddOnResults/XRaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/Payloads.json?PageSize=50&Page=0",
_27 "next_page_uri": null,
_27 "previous_page_uri": null,
_27 "sid": "XHaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
_27 "reference_sid": "REaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
_27 "add_on_sid": "XBaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
_27 "add_on_configuration_sid": "XEaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
_27 "add_on_result_sid": "XRaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
_27 "account_sid": "ACaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
_27 "label": "XHaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
_27 "content_type": "application/json",
_27 "date_created": "Wed, 01 Sep 2010 15:15:41 +0000",
_27 "date_updated": "Wed, 01 Sep 2010 15:15:41 +0000",
_27 "subresource_uris": {
_27 "data": "/2010-04-01/Accounts/ACaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/Recordings/REaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/AddOnResults/XRaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/Payloads/XHaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/Data.json"
_27 "uri": "/2010-04-01/Accounts/ACaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/Recordings/REaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/AddOnResults/XRaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/Payloads.json?PageSize=50&Page=0"
The Payload Data subresource hosts the actual data returned by the Add-on. GET
requests issued to this subresource will receive a 307 redirect to a signed URL to the Payload. Clients will need to follow the redirect to receive the data associated with a Payload resource.
_10/AddOnResults/{RequestSid}/Payloads/{PayloadSid}/Data
Returns a 307 redirect to a signed URL to the Payload.
GET /2010-04-01/Accounts/AC...../Recordings/RE.../AddOnResults/XR000.../Payloads/XH000.../Data
_10Date: Tue, 08 Nov 2016 22:43:19 GMT
_10curl -L -X GET "https://api.twilio.com/2010-04-01/Accounts/AC05bee55315a1322d1ded353e1d74bd54/Recordings/RE557ce644e5ab84fa21cc21112e22c485/AddOnResults/XR123121313313/Payloads/XH12313213131313/Data"
_10-u "AC05bee55315a1322d1ded353e1d74bd54:your_auth_token"
_27 ["several":, 1.0, 1.51],
_27 ["tornadoes":, 1.51, 2.15],
_27 ["touch":, 2.15, 2.5]
_27 "confidence": 0.8691191673278809,
_27 "transcript": "several tornadoes touch down as a line of severe thunderstorms swept through colorado on sunday "
_27 "transcript": "several tornadoes touched down as a line of severe thunderstorms swept through colorado on sunday "
_27 "transcript": "several tornadoes touch down is a line of severe thunderstorms swept through colorado on sunday "