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 noneXML .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:
Resource properties The unique string that that we created to identify the Recording AddOnResult resource.
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.
add_on_configuration_sid
type: SID<XE> Not PIIThe SID of the Add-on configuration.
date_created
type: string<DATE TIME RFC 2822> Not PIIdate_updated
type: string<DATE TIME RFC 2822> Not PIIdate_completed
type: string<DATE TIME RFC 2822> Not PIIThe SID of the recording to which the AddOnResult resource belongs.
subresource_uris
type: object<URI MAP> Not PIIA 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.
_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
_11 const accountSid = process.env.TWILIO_ACCOUNT_SID;
_11 const authToken = process.env.TWILIO_AUTH_TOKEN;
_11 const client = require('twilio')(accountSid, authToken);
_11 client.recordings('REXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX')
_11 .addOnResults('XRXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX')
_11 .then(add_on_result => console.log(add_on_result.sid));
_14 "sid": "XRXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX",
_14 "account_sid": "ACXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX",
_14 "reference_sid": "REXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX",
_14 "status": "completed",
_14 "add_on_sid": "XBXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX",
_14 "add_on_configuration_sid": "XEXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX",
_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/ACXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX/Recordings/REXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX/AddOnResults/XRXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX/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.
_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
_11 const accountSid = process.env.TWILIO_ACCOUNT_SID;
_11 const authToken = process.env.TWILIO_AUTH_TOKEN;
_11 const client = require('twilio')(accountSid, authToken);
_11 client.recordings('REXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX')
_11 .then(addOnResults => addOnResults.forEach(a => console.log(a.sid)));
_26 "first_page_uri": "/2010-04-01/Accounts/ACXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX/Recordings/REXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX/AddOnResults.json?PageSize=50&Page=0",
_26 "next_page_uri": "/2010-04-01/Accounts/ACXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX/Recordings/REXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX/AddOnResults.json?PageSize=50&Page=50",
_26 "previous_page_uri": "/2010-04-01/Accounts/ACXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX/Recordings/REXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX/AddOnResults.json?PageSize=50&Page=0",
_26 "sid": "XRXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX",
_26 "account_sid": "ACXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX",
_26 "reference_sid": "REXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX",
_26 "status": "completed",
_26 "add_on_sid": "XBXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX",
_26 "add_on_configuration_sid": "XEXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX",
_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/ACXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX/Recordings/REXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX/AddOnResults/XRXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX/Payloads.json"
_26 "uri": "/2010-04-01/Accounts/ACXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX/Recordings/REXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX/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:
Resource properties The unique string that that we created to identify the Recording AddOnResult Payload resource.
add_on_result_sid
type: SID<XR> Not PIIThe SID of the AddOnResult to which the payload belongs.
The string provided by the vendor that describes the payload.
The SID of the Add-on to which the result belongs.
add_on_configuration_sid
type: SID<XE> Not PIIThe SID of the Add-on configuration.
The MIME type of the payload.
date_created
type: string<DATE TIME RFC 2822> Not PIIdate_updated
type: string<DATE TIME RFC 2822> Not PIIThe SID of the recording to which the AddOnResult resource that contains the payload belongs.
subresource_uris
type: object<URI MAP> Not PIIA 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.
_12 // Download the helper library from https://www.twilio.com/docs/node/install
_12 // Find your Account SID and Auth Token at twilio.com/console
_12 // and set the environment variables. See http://twil.io/secure
_12 const accountSid = process.env.TWILIO_ACCOUNT_SID;
_12 const authToken = process.env.TWILIO_AUTH_TOKEN;
_12 const client = require('twilio')(accountSid, authToken);
_12 client.recordings('REXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX')
_12 .addOnResults('XRXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX')
_12 .payloads('XHXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX')
_12 .then(payload => console.log(payload.sid));
_15 "sid": "XHXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX",
_15 "reference_sid": "REXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX",
_15 "add_on_sid": "XBXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX",
_15 "add_on_configuration_sid": "XEXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX",
_15 "add_on_result_sid": "XRXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX",
_15 "account_sid": "ACXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX",
_15 "label": "XHXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX",
_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/ACXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX/Recordings/REXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX/AddOnResults/XRXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX/Payloads/XHXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX/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.
_12 // Download the helper library from https://www.twilio.com/docs/node/install
_12 // Find your Account SID and Auth Token at twilio.com/console
_12 // and set the environment variables. See http://twil.io/secure
_12 const accountSid = process.env.TWILIO_ACCOUNT_SID;
_12 const authToken = process.env.TWILIO_AUTH_TOKEN;
_12 const client = require('twilio')(accountSid, authToken);
_12 client.recordings('REXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX')
_12 .addOnResults('XRXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX')
_12 .then(payloads => payloads.forEach(p => console.log(p.sid)));
_27 "first_page_uri": "/2010-04-01/Accounts/ACXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX/Recordings/REXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX/AddOnResults/XRXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX/Payloads.json?PageSize=50&Page=0",
_27 "next_page_uri": "/2010-04-01/Accounts/ACXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX/Recordings/REXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX/AddOnResults/XRXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX/Payloads.json?PageSize=50&Page=50",
_27 "previous_page_uri": "/2010-04-01/Accounts/ACXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX/Recordings/REXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX/AddOnResults/XRXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX/Payloads.json?PageSize=50&Page=0",
_27 "sid": "XHXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX",
_27 "reference_sid": "REXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX",
_27 "add_on_sid": "XBXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX",
_27 "add_on_configuration_sid": "XEXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX",
_27 "add_on_result_sid": "XRXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX",
_27 "account_sid": "ACXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX",
_27 "label": "XHXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX",
_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/ACXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX/Recordings/REXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX/AddOnResults/XRXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX/Payloads/XHXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX/Data.json"
_27 "uri": "/2010-04-01/Accounts/ACXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX/Recordings/REXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX/AddOnResults/XRXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX/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
_10 Date: Tue, 08 Nov 2016 22:43:19 GMT
_10 curl -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 "