Add-on Results API

Add-on Results API allows you to list and retrieve Add-on results.

Currently, the API only provides results for Recording Analysis Add-ons.

Recording Analysis Add-on Results

Add-on results live as a subresource under the integration point that the Add-on was configured with. For Recordings, this is under the Recording resource.

/2010-04-01/Accounts/{AccountSid}/Recordings/{RecordingSid}/AddOnResults/

These sub-resources require HTTP basic auth to access using your AccountSid and Authentication 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

Add-on Result Instance Sub-Resource

The Add-on Result instance sub-resource represents the result from an Add-on invoked on a specific Recording.

Sub-Resource URI

/AddOnResults/{RequestSid}

Resource Properties

A Recording resource is represented by the following properties:

Property Description
sid 34 character string that uniquely identifies the Add-on Result
account_sid 34 character string that uniquely identifies the Account owning the Add-on Result
status String indicating the current status of the Add-on result. Possible values include: queued, processing, in-progress, completed and failed
add_on_sid 34 character string that uniquely identifies the Add-on that generated this result
add_on_configuration_sid 34 character string that uniquely identifies the Add-on configuration that generated this result
reference_sid 34 character string that uniquely identifies the parent media (in this case, the Recording) that generated this result
date_created The date that this resource was created, given in RFC 2822 format
date_updated The date that this resource was updated, given in RFC 2822 format
date_completed The date that this resource reached a terminal state, given in RFC 2822 format
subresource_uris A dictionary of URIs for related resource

subresource_uris contains the following properties :

Property Description
payloads URL pointing to the Payload sub-resource

HTTP GET

Returns a single instance of an Add-on Result associated with the given parent resource.

Loading Code Samples...
Language
Format:
  • JSON
curl -X GET "https://api.twilio.com/2010-04-01/Accounts/AC05bee55315a1322d1ded353e1d74bd54/Recordings/RE557ce644e5ab84fa21cc21112e22c485/AddOnResults/XR00000000000000000000000000000000.json"
-u "AC05bee55315a1322d1ded353e1d74bd54:your_auth_token"
{
    "sid": "XR00000000000000000000000000000000",
    "account_sid": "AC00000000000000000000000000000000",
    "status": "completed",
    "add_on_sid": "XB00000000000000000000000000000000",
    "add_on_configuration_sid": "XE00000000000000000000000000000000",
    "reference_sid": "REdb6e4526c3f2f9121d4d8fc8ce0551d3",
    "date_created": "Mon, 16 Aug 2010 03:45:01 +0000",
    "date_updated": "Mon, 16 Aug 2010 03:45:03 +0000",
    "date_completed": "Mon, 16 Aug 2010 03:45:03 +0000",
    "subresource_uris": {
       "payloads": "/2010-04-01/Accounts/AC00000000000000000000000000000000/Recordings/RE00000000000000000000000000000000/AddOnResults/XR00000000000000000000000000000000/Payloads.json"
    }
}
Get Add-on Result for a Recording (as JSON)

HTTP POST

Unsupported

HTTP DELETE

Deleting at the Add-on Result resource will delete the result record and purge all associated Payloads. Successful responses will return no content.

Add-on Results List Sub-resource

The Add-on Results list sub-resource represents the set of results from Add-ons invoked on a specific Recording.

Sub-Resource URI

/AddOnResults/

Resource Properties

The Add-on Results list sub-resource is represented by the following properties:

Property Description
add_on_results List of Add-on Result Instances

HTTP GET

Returns a list of Add-on Result Instances associated with the given parent resource.

Loading Code Samples...
Language
Format:
  • JSON
curl -X GET "https://api.twilio.com/2010-04-01/Accounts/AC05bee55315a1322d1ded353e1d74bd54/Recordings/RE557ce644e5ab84fa21cc21112e22c485/AddOnResults.json"
-u "AC05bee55315a1322d1ded353e1d74bd54:your_auth_token"
{
    "add_on_results": [
        {
            "sid": "XR00000000000000000000000000000000",
            "account_sid": "AC00000000000000000000000000000000",
            "status": "completed",
            "add_on_sid": "XB00000000000000000000000000000000",
            "add_on_configuration_sid": "XE00000000000000000000000000000000",
            "reference_sid": "RE00000000000000000000000000000000",
            "date_created": "Mon, 16 Aug 2010 03:45:01 +0000",
            "date_updated": "Mon, 16 Aug 2010 03:45:03 +0000",
            "date_completed": "Mon, 16 Aug 2010 03:45:03 +0000",
            "subresource_uris": {
                "payloads": "/2010-04-01/Accounts/AC00000000000000000000000000000000/Recordings/RE00000000000000000000000000000000/AddOnResults/XR00000000000000000000000000000000/Payloads.json"
            }
        },
        {
            "sid": "XR00000000000000000000000000000001",
            "account_sid": "AC00000000000000000000000000000000",
            "status": "completed",
            "add_on_sid": "XB00000000000000000000000000000001",
            "add_on_configuration_sid": "XE00000000000000000000000000000001",
            "reference_sid": "RE00000000000000000000000000000000",
            "date_created": "Mon, 16 Aug 2010 03:45:01 +0000",
            "date_updated": "Mon, 16 Aug 2010 03:45:03 +0000",
            "date_completed": "Mon, 16 Aug 2010 03:45:03 +0000",
            "subresource_uris": {
                "payloads": "/2010-04-01/Accounts/AC00000000000000000000000000000000/Recordings/RE00000000000000000000000000000000/AddOnResults/XR00000000000000000000000000000001/Payloads.json"
            }
        }       
    ],
    "first_page_uri": "/2010-04-01/Accounts/AC00000000000000000000000000000000/Recordings/RE00000000000000000000000000000000/AddOnResults.json?PageSize=50&Page=0",
    "end": 1,
    "previous_page_uri": null,
    "uri": "/2010-04-01/Accounts/AC00000000000000000000000000000000/Recordings/RE00000000000000000000000000000000/AddOnResults.json?PageSize=50&Page=0",
    "page_size": 50,
    "start": 0,
    "next_page_uri": null,
    "page": 0
}
Get all Add-on results for a given Recording (as JSON)

HTTP POST

Unsupported

HTTP DELETE

Unsupported

Add-on Result Payload Instance Subresource

The Add-on Results Payload Subresource exposes the multiple types of Payloads that may be in included in an Add-on Result.

Sub-Resource URI

/AddOnResults/{RequestSid}/Payloads/{PayloadSid}

Resource Properties

A Recording resource is represented by the following properties:

Property Description
sid 34 character string that uniquely identifies the Payload
account_sid 34 character string that uniquely identifies the Account owning the Payload
add_on_result_sid 34 character string that uniquely identifies the the Add-on Result that created it
add_on_sid 34 character string that uniquely identifies the Add-on that generated this Payload
add_on_configuration_sid 34 character string that uniquely identifies the Add-on configuration that generated this Payload
reference_sid 34 character string that uniquely identifies the parent media (in this case, the Recording) that generated this result
label Human readable string that vendors use to describe the content they have returned. Default value is the SID identifying the resource
content_type MIME type of the Payload
date_created The date that this resource was created, given in RFC 2822 format
date_updated The date that this resource was updated, given in RFC 2822 format
subresource_uris A dictionary of URIs for related resource

subresource_uris contains the following properties :

Property Description
data URL pointing to the Data sub-resource

HTTP GET

Returns a single instance of a Payload associated with the given Add-on Result.

Loading Code Samples...
Language
Format:
  • JSON
curl -X GET "https://api.twilio.com/2010-04-01/Accounts/AC05bee55315a1322d1ded353e1d74bd54/Recordings/RE557ce644e5ab84fa21cc21112e22c485/AddOnResults/XR00000000000000000/Payloads/XH00000000000000000000000000000000.json"
-u "AC05bee55315a1322d1ded353e1d74bd54:your_auth_token"
{
    "sid": "XH00000000000000000000000000000000",
    "add_on_result_sid": "XR00000000000000000000000000000000",
    "add_on_sid": "XB00000000000000000000000000000000",
    "add_on_configuration_sid": "XE00000000000000000000000000000000",
    "account_sid": "AC00000000000000000000000000000000",
    "reference_sid": "REdb6e4526c3f2f9121d4d8fc8ce0551d3",
    "label": "XH00000000000000000000000000000000",
    "content_type": "application/json",
    "date_created": "Mon, 16 Aug 2010 03:45:01 +0000",
    "date_updated": "Mon, 16 Aug 2010 03:45:03 +0000",
    "subresource_uris": {
        "data": "/2010-04-01/Accounts/AC00000000000000000000000000000000/Recordings/REdb6e4526c3f2f9121d4d8fc8ce0551d3/AddOnResults/XR00000000000000000000000000000000/Payloads/XH00000000000000000000000000000000/Data.json"
    }
}
Get Add-on Result Payload Metadata (as JSON)

HTTP POST

Unsupported

HTTP DELETE

Unsupported

Add-on Result Payloads List Subresource

The Add-on Results Payload list Subresource exposes the multiple types of Payloads that may be in included in an Add-on Result.

Sub-Resource URI

/AddOnResults/{RequestSid}/Payloads

Resource Properties

The Add-on Result Payloads list sub-resource is represented by the following properties:

Property Description
payloads List of Add-on Result Payload Instances

HTTP GET

Returns a list of Payload resource instances describing the data returned by Vendors as part of the Add-on Result.

Loading Code Samples...
Language
Format:
  • JSON
curl -X GET "https://api.twilio.com/2010-04-01/Accounts/AC05bee55315a1322d1ded353e1d74bd54/Recordings/RE557ce644e5ab84fa21cc21112e22c485/AddOnResults/XR121311312313131331/Payloads.json"
-u "AC05bee55315a1322d1ded353e1d74bd54:your_auth_token"
{
    "payloads": [
        {
            "sid": "XH00000000000000000000000000000000",
            "add_on_result_sid": "XR00000000000000000000000000000000",
            "add_on_sid": "XE00000000000000000000000000000000",
            "account_sid": "AC00000000000000000000000000000000",
            "reference_sid": "RE00000000000000000000000000000000",
            "label": "XH00000000000000000000000000000000",
            "content_type": "application/json",
            "date_created": "Mon, 16 Aug 2010 03:45:01 +0000",
            "date_updated": "Mon, 16 Aug 2010 03:45:03 +0000",
            "subresource_uris": {
                "data": "/2010-04-01/Accounts/AC00000000000000000000000000000000/Recordings/RE00000000000000000000000000000000/AddOnResults/XR00000000000000000000000000000000/Payloads/XH00000000000000000000000000000000/Data.json"
            }
        }
    ],
    "first_page_uri": "/2010-04-01/Accounts/AC00000000000000000000000000000000/Recordings/RE00000000000000000000000000000000/AddOnResults/XR00000000000000000000000000000000/Payloads.json?PageSize=50&Page=0",
    "end": 0,
    "previous_page_uri": null,
    "uri": "/2010-04-01/Accounts/AC00000000000000000000000000000000/Recordings/RE00000000000000000000000000000000/AddOnResults/XR00000000000000000000000000000000/Payloads.json?PageSize=50&Page=0",
    "page_size": 50,
    "start": 0,
}
Get all Add-on Result Payloads (as JSON)

HTTP POST

Unsupported

HTTP DELETE

Unsupported

Add-on Result Payload Data Subresource

The Payload Data Subresource hosts the actual data returned by the Add-on. GETs 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.

Sub-Resource URI

/AddOnResults/{RequestSid}/Payloads/{PayloadSid}/Data

HTTP GET

Returns a 307 redirect to a Signed URL to the Payload.

Example

GET /2010-04-01/Accounts/AC...../Recordings/RE.../AddOnResults/XR000.../Payloads/XH000.../Data

HTTP/1.1 307
Server: nginx
Date: Tue, 08 Nov 2016 22:43:19 GMT
Location: {SignedUrl}
Loading Code Samples...
Language
Format:
  • JSON
curl -L -X GET "https://api.twilio.com/2010-04-01/Accounts/AC05bee55315a1322d1ded353e1d74bd54/Recordings/RE557ce644e5ab84fa21cc21112e22c485/AddOnResults/XR123121313313/Payloads/XH12313213131313/Data"
-u "AC05bee55315a1322d1ded353e1d74bd54:your_auth_token"
{
   "results": [
      {
         "alternatives": [
            {
               "timestamps": [
                  ["several":, 1.0, 1.51],
                  ["tornadoes":, 1.51, 2.15],
                  ["touch":, 2.15, 2.5]
               ]
            },
            {
               "confidence": 0.8691191673278809,
               "transcript": "several tornadoes touch down as a line of severe thunderstorms swept through colorado on sunday "
            },
            {
               "transcript": "several tornadoes touched down as a line of severe thunderstorms swept through colorado on sunday "
            },
            {
               "transcript": "several tornadoes touch down is a line of severe thunderstorms swept through colorado on sunday "
            }
         ],
         "final": true
      }
   ],
   "result_index": 0
}
Get Add-on Result Payload Data

HTTP POST

Unsupported

HTTP DELETE

Unsupported

Need some help?

We all do sometimes; code is hard. Get help now from our support team, or lean on the wisdom of the crowd browsing the Twilio tag on Stack Overflow.

Loading Code Samples...
Format:
  • JSON
curl -X GET "https://api.twilio.com/2010-04-01/Accounts/AC05bee55315a1322d1ded353e1d74bd54/Recordings/RE557ce644e5ab84fa21cc21112e22c485/AddOnResults/XR00000000000000000000000000000000.json"
-u "AC05bee55315a1322d1ded353e1d74bd54:your_auth_token"
{
    "sid": "XR00000000000000000000000000000000",
    "account_sid": "AC00000000000000000000000000000000",
    "status": "completed",
    "add_on_sid": "XB00000000000000000000000000000000",
    "add_on_configuration_sid": "XE00000000000000000000000000000000",
    "reference_sid": "REdb6e4526c3f2f9121d4d8fc8ce0551d3",
    "date_created": "Mon, 16 Aug 2010 03:45:01 +0000",
    "date_updated": "Mon, 16 Aug 2010 03:45:03 +0000",
    "date_completed": "Mon, 16 Aug 2010 03:45:03 +0000",
    "subresource_uris": {
       "payloads": "/2010-04-01/Accounts/AC00000000000000000000000000000000/Recordings/RE00000000000000000000000000000000/AddOnResults/XR00000000000000000000000000000000/Payloads.json"
    }
}
Format:
  • JSON
curl -X GET "https://api.twilio.com/2010-04-01/Accounts/AC05bee55315a1322d1ded353e1d74bd54/Recordings/RE557ce644e5ab84fa21cc21112e22c485/AddOnResults.json"
-u "AC05bee55315a1322d1ded353e1d74bd54:your_auth_token"
{
    "add_on_results": [
        {
            "sid": "XR00000000000000000000000000000000",
            "account_sid": "AC00000000000000000000000000000000",
            "status": "completed",
            "add_on_sid": "XB00000000000000000000000000000000",
            "add_on_configuration_sid": "XE00000000000000000000000000000000",
            "reference_sid": "RE00000000000000000000000000000000",
            "date_created": "Mon, 16 Aug 2010 03:45:01 +0000",
            "date_updated": "Mon, 16 Aug 2010 03:45:03 +0000",
            "date_completed": "Mon, 16 Aug 2010 03:45:03 +0000",
            "subresource_uris": {
                "payloads": "/2010-04-01/Accounts/AC00000000000000000000000000000000/Recordings/RE00000000000000000000000000000000/AddOnResults/XR00000000000000000000000000000000/Payloads.json"
            }
        },
        {
            "sid": "XR00000000000000000000000000000001",
            "account_sid": "AC00000000000000000000000000000000",
            "status": "completed",
            "add_on_sid": "XB00000000000000000000000000000001",
            "add_on_configuration_sid": "XE00000000000000000000000000000001",
            "reference_sid": "RE00000000000000000000000000000000",
            "date_created": "Mon, 16 Aug 2010 03:45:01 +0000",
            "date_updated": "Mon, 16 Aug 2010 03:45:03 +0000",
            "date_completed": "Mon, 16 Aug 2010 03:45:03 +0000",
            "subresource_uris": {
                "payloads": "/2010-04-01/Accounts/AC00000000000000000000000000000000/Recordings/RE00000000000000000000000000000000/AddOnResults/XR00000000000000000000000000000001/Payloads.json"
            }
        }       
    ],
    "first_page_uri": "/2010-04-01/Accounts/AC00000000000000000000000000000000/Recordings/RE00000000000000000000000000000000/AddOnResults.json?PageSize=50&Page=0",
    "end": 1,
    "previous_page_uri": null,
    "uri": "/2010-04-01/Accounts/AC00000000000000000000000000000000/Recordings/RE00000000000000000000000000000000/AddOnResults.json?PageSize=50&Page=0",
    "page_size": 50,
    "start": 0,
    "next_page_uri": null,
    "page": 0
}
Format:
  • JSON
curl -X GET "https://api.twilio.com/2010-04-01/Accounts/AC05bee55315a1322d1ded353e1d74bd54/Recordings/RE557ce644e5ab84fa21cc21112e22c485/AddOnResults/XR00000000000000000/Payloads/XH00000000000000000000000000000000.json"
-u "AC05bee55315a1322d1ded353e1d74bd54:your_auth_token"
{
    "sid": "XH00000000000000000000000000000000",
    "add_on_result_sid": "XR00000000000000000000000000000000",
    "add_on_sid": "XB00000000000000000000000000000000",
    "add_on_configuration_sid": "XE00000000000000000000000000000000",
    "account_sid": "AC00000000000000000000000000000000",
    "reference_sid": "REdb6e4526c3f2f9121d4d8fc8ce0551d3",
    "label": "XH00000000000000000000000000000000",
    "content_type": "application/json",
    "date_created": "Mon, 16 Aug 2010 03:45:01 +0000",
    "date_updated": "Mon, 16 Aug 2010 03:45:03 +0000",
    "subresource_uris": {
        "data": "/2010-04-01/Accounts/AC00000000000000000000000000000000/Recordings/REdb6e4526c3f2f9121d4d8fc8ce0551d3/AddOnResults/XR00000000000000000000000000000000/Payloads/XH00000000000000000000000000000000/Data.json"
    }
}
Format:
  • JSON
curl -X GET "https://api.twilio.com/2010-04-01/Accounts/AC05bee55315a1322d1ded353e1d74bd54/Recordings/RE557ce644e5ab84fa21cc21112e22c485/AddOnResults/XR121311312313131331/Payloads.json"
-u "AC05bee55315a1322d1ded353e1d74bd54:your_auth_token"
{
    "payloads": [
        {
            "sid": "XH00000000000000000000000000000000",
            "add_on_result_sid": "XR00000000000000000000000000000000",
            "add_on_sid": "XE00000000000000000000000000000000",
            "account_sid": "AC00000000000000000000000000000000",
            "reference_sid": "RE00000000000000000000000000000000",
            "label": "XH00000000000000000000000000000000",
            "content_type": "application/json",
            "date_created": "Mon, 16 Aug 2010 03:45:01 +0000",
            "date_updated": "Mon, 16 Aug 2010 03:45:03 +0000",
            "subresource_uris": {
                "data": "/2010-04-01/Accounts/AC00000000000000000000000000000000/Recordings/RE00000000000000000000000000000000/AddOnResults/XR00000000000000000000000000000000/Payloads/XH00000000000000000000000000000000/Data.json"
            }
        }
    ],
    "first_page_uri": "/2010-04-01/Accounts/AC00000000000000000000000000000000/Recordings/RE00000000000000000000000000000000/AddOnResults/XR00000000000000000000000000000000/Payloads.json?PageSize=50&Page=0",
    "end": 0,
    "previous_page_uri": null,
    "uri": "/2010-04-01/Accounts/AC00000000000000000000000000000000/Recordings/RE00000000000000000000000000000000/AddOnResults/XR00000000000000000000000000000000/Payloads.json?PageSize=50&Page=0",
    "page_size": 50,
    "start": 0,
}
Format:
  • JSON
curl -L -X GET "https://api.twilio.com/2010-04-01/Accounts/AC05bee55315a1322d1ded353e1d74bd54/Recordings/RE557ce644e5ab84fa21cc21112e22c485/AddOnResults/XR123121313313/Payloads/XH12313213131313/Data"
-u "AC05bee55315a1322d1ded353e1d74bd54:your_auth_token"
{
   "results": [
      {
         "alternatives": [
            {
               "timestamps": [
                  ["several":, 1.0, 1.51],
                  ["tornadoes":, 1.51, 2.15],
                  ["touch":, 2.15, 2.5]
               ]
            },
            {
               "confidence": 0.8691191673278809,
               "transcript": "several tornadoes touch down as a line of severe thunderstorms swept through colorado on sunday "
            },
            {
               "transcript": "several tornadoes touched down as a line of severe thunderstorms swept through colorado on sunday "
            },
            {
               "transcript": "several tornadoes touch down is a line of severe thunderstorms swept through colorado on sunday "
            }
         ],
         "final": true
      }
   ],
   "result_index": 0
}