List of all Recording CompositionHook resources.

GET /v1/CompositionHooks

Recording composition hooks

List of all Recording CompositionHook resources.

Query parameters

  • Enabled boolean

    Read only CompositionHook resources with an enabled value that matches this parameter.

  • DateCreatedAfter string(date-time)

    Read only CompositionHook resources created on or after this ISO 8601 datetime with time zone.

  • DateCreatedBefore string(date-time)

    Read only CompositionHook resources created before this ISO 8601 datetime with time zone.

  • FriendlyName string

    Read only CompositionHook resources with friendly names that match this string. The match is not case sensitive and can include asterisk * characters as wildcard match.

  • PageSize integer(int64)

    How many resources to return in each list page. The default is 50, and the maximum is 1000.

    Minimum value is 1, maximum value is 1000.

  • Page integer

    The page index. This value is simply for client state.

    Minimum value is 0.

  • PageToken string

    The page token. This is provided by the API.

Responses

  • 200 application/json

    OK

    Hide headers attributes Show headers attributes
    • Access-Control-Allow-Origin string

      Specify the origin(s) allowed to access the resource

    • Access-Control-Allow-Methods string

      Specify the HTTP methods allowed when accessing the resource

    • Access-Control-Allow-Headers string

      Specify the headers allowed when accessing the resource

    • Access-Control-Allow-Credentials boolean

      Indicates whether the browser should include credentials

    • Access-Control-Expose-Headers string

      Headers exposed to the client

    Hide response attributes Show response attributes object
    • composition_hooks array[object]
      Hide composition_hooks attributes Show composition_hooks attributes object
      • account_sid string | null

        The SID of the Account that created the CompositionHook resource.

        Minimum length is 34, maximum length is 34. Format should match the following pattern: ^AC[0-9a-fA-F]{32}$.

      • friendly_name string | null

        The string that you assigned to describe the resource. Can be up to 100 characters long and must be unique within the account.

      • enabled boolean | null

        Whether the CompositionHook is active. When true, the CompositionHook is triggered for every completed Group Room on the account. When false, the CompositionHook is never triggered.

      • date_created string(date-time) | null

        The date and time in GMT when the resource was created specified in ISO 8601 format.

      • date_updated string(date-time) | null

        The date and time in GMT when the resource was last updated specified in ISO 8601 format.

      • sid string | null

        The unique string that we created to identify the CompositionHook resource.

        Minimum length is 34, maximum length is 34. Format should match the following pattern: ^HK[0-9a-fA-F]{32}$.

      • audio_sources array[string] | null

        The array of track names to include in the compositions created by the composition hook. A composition triggered by the composition hook includes all audio sources specified in audio_sources except those specified in audio_sources_excluded. The track names in this property can include an asterisk as a wild card character, which matches zero or more characters in a track name. For example, student* includes tracks named student as well as studentTeam. Please, be aware that either video_layout or audio_sources have to be provided to get a valid creation request

      • audio_sources_excluded array[string] | null

        The array of track names to exclude from the compositions created by the composition hook. A composition triggered by the composition hook includes all audio sources specified in audio_sources except for those specified in audio_sources_excluded. The track names in this property can include an asterisk as a wild card character, which matches zero or more characters in a track name. For example, student* excludes student as well as studentTeam. This parameter can also be empty.

      • video_layout object | null

        A JSON object that describes the video layout of the composition in terms of regions as specified in the HTTP POST request that created the CompositionHook resource. See POST Parameters for more information. Please, be aware that either video_layout or audio_sources have to be provided to get a valid creation request

      • resolution string | null

        The dimensions of the video image in pixels expressed as columns (width) and rows (height). The string's format is {width}x{height}, such as 640x480.

      • trim boolean | null

        Whether intervals with no media are clipped, as specified in the POST request that created the CompositionHook resource. Compositions with trim enabled are shorter when the Room is created and no Participant joins for a while as well as if all the Participants leave the room and join later, because those gaps will be removed. See Specifying Video Layouts for more info.

      • format string

        The container format of the media files used by the compositions created by the composition hook. If mp4 or webm, audio_sources must have one or more tracks and/or a video_layout element must contain a valid video_sources list, otherwise an error occurs.

        Values are mp4 or webm.

      • status_callback string(uri) | null

        The URL we call using the status_callback_method to send status information to your application.

      • status_callback_method string(http-method) | null

        The HTTP method we should use to call status_callback. Can be POST or GET and defaults to POST.

        Values are GET or POST.

      • url string(uri) | null

        The absolute URL of the resource.

    • meta object
      Hide meta attributes Show meta attributes object
      • first_page_url string(uri)
      • key string
      • next_page_url string(uri) | null
      • page integer
      • page_size integer
      • previous_page_url string(uri) | null
      • url string(uri)
GET /v1/CompositionHooks
curl \
 --request GET 'https://video.twilio.com/v1/CompositionHooks' \
 --user "username:password"
Response examples (200)
{
  "meta": {
    "key": "composition_hooks",
    "url": "https://video.twilio.com/v1/CompositionHooks?Enabled=true&PageSize=50&Page=0",
    "page": 0,
    "page_size": 50,
    "next_page_url": null,
    "first_page_url": "https://video.twilio.com/v1/CompositionHooks?Enabled=true&PageSize=50&Page=0",
    "previous_page_url": null
  },
  "composition_hooks": []
}
{
  "meta": {
    "key": "composition_hooks",
    "url": "https://video.twilio.com/v1/CompositionHooks?FriendlyName=%2AHook%2A&DateCreatedBefore=2017-12-31T23%3A59%3A59Z&DateCreatedAfter=2017-01-01T00%3A00%3A01Z&Enabled=true&PageSize=50&Page=0",
    "page": 0,
    "page_size": 50,
    "next_page_url": null,
    "first_page_url": "https://video.twilio.com/v1/CompositionHooks?FriendlyName=%2AHook%2A&DateCreatedBefore=2017-12-31T23%3A59%3A59Z&DateCreatedAfter=2017-01-01T00%3A00%3A01Z&Enabled=true&PageSize=50&Page=0",
    "previous_page_url": null
  },
  "composition_hooks": [
    {
      "sid": "HKaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
      "url": "https://video.twilio.com/v1/CompositionHooks/HKaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
      "trim": true,
      "format": "webm",
      "enabled": true,
      "resolution": "1280x720",
      "account_sid": "ACaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
      "date_created": "2015-07-30T20:00:00Z",
      "date_updated": "2015-07-30T20:01:33Z",
      "video_layout": {
        "pip": {
          "reuse": "none",
          "width": 0,
          "x_pos": 100,
          "y_pos": 600,
          "z_pos": 10,
          "height": 0,
          "max_rows": 0,
          "max_columns": 0,
          "video_sources": [
            "student*"
          ],
          "cells_excluded": [],
          "video_sources_excluded": []
        },
        "grid": {
          "reuse": "show_oldest",
          "width": 0,
          "x_pos": 100,
          "y_pos": 600,
          "z_pos": 10,
          "height": 0,
          "max_rows": 0,
          "max_columns": 0,
          "video_sources": [
            "*"
          ],
          "cells_excluded": [],
          "video_sources_excluded": [
            "moderator*"
          ]
        }
      },
      "audio_sources": [
        "*"
      ],
      "friendly_name": "My Special Hook1",
      "status_callback": "http://www.example.com",
      "audio_sources_excluded": [],
      "status_callback_method": "POST"
    }
  ]
}