List of all Recording compositions.

GET /v1/Compositions

Recording compositions

List of all Recording compositions.

Query parameters

  • Status string

    Read only Composition resources with this status. Can be: enqueued, processing, completed, deleted, or failed.

    Values are enqueued, processing, completed, deleted, or failed.

  • DateCreatedAfter string(date-time)

    Read only Composition resources created on or after this ISO 8601 date-time with time zone.

  • DateCreatedBefore string(date-time)

    Read only Composition resources created before this ISO 8601 date-time with time zone.

  • RoomSid string

    Read only Composition resources with this Room SID.

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

  • PageSize integer(int64)

    How many resources to return in each list page.

    Minimum value is 1, maximum value is 100. Default value is 50.

  • 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
    • compositions array[object]
      Hide compositions attributes Show compositions attributes object
      • account_sid string | null

        The SID of the Account that created the Composition resource.

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

      • status string

        The status of the composition. Can be: enqueued, processing, completed, deleted or failed. enqueued is the initial state and indicates that the composition request has been received and is scheduled for processing; processing indicates the composition is being processed; completed indicates the composition has been completed and is available for download; deleted means the composition media has been deleted from the system, but its metadata is still available for 30 days; failed indicates the composition failed to execute the media processing task.

        Values are enqueued, processing, completed, deleted, or failed.

      • date_created string(date-time) | null

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

      • date_completed string(date-time) | null

        The date and time in GMT when the composition's media processing task finished, specified in ISO 8601 format.

      • date_deleted string(date-time) | null

        The date and time in GMT when the composition generated media was deleted, specified in ISO 8601 format.

      • sid string | null

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

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

      • room_sid string | null

        The SID of the Group Room that generated the audio and video tracks used in the composition. All media sources included in a composition must belong to the same Group Room.

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

      • audio_sources array[string] | null

        The array of track names to include in the composition. The composition 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.

      • audio_sources_excluded array[string] | null

        The array of track names to exclude from the composition. The composition 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

        An object that describes the video layout of the composition in terms of regions. See Specifying Video Layouts for more info.

      • 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 to remove intervals with no media, as specified in the POST request that created the composition. 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 composition's media files as specified in the POST request that created the Composition resource. See POST Parameters for more information.

        Values are mp4 or webm.

      • bitrate integer

        The average bit rate of the composition's media.

        Default value is 0.

      • size integer(int64) | null

        The size of the composed media file in bytes.

      • duration integer

        The duration of the composition's media file in seconds.

        Default value is 0.

      • media_external_location string(uri) | null

        The URL of the media file associated with the composition when stored externally. See External S3 Compositions for more details.

      • status_callback string(uri) | null

        The URL called using the status_callback_method to send status information on every composition event.

      • status_callback_method string(http-method) | null

        The HTTP method used to call status_callback. Can be: POST or GET, 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/Compositions
curl \
 --request GET 'https://video.twilio.com/v1/Compositions' \
 --user "username:password"
Response examples (200)
{
  "meta": {
    "key": "compositions",
    "url": "https://video.twilio.com/v1/Compositions?Status=enqueued&PageSize=10&Page=0",
    "page": 0,
    "page_size": 10,
    "next_page_url": null,
    "first_page_url": "https://video.twilio.com/v1/Compositions?Status=enqueued&PageSize=10&Page=0",
    "previous_page_url": null
  },
  "compositions": []
}
{
  "meta": {
    "key": "compositions",
    "url": "https://video.twilio.com/v1/Compositions?Status=completed&PageSize=50&Page=0",
    "page": 0,
    "page_size": 50,
    "next_page_url": null,
    "first_page_url": "https://video.twilio.com/v1/Compositions?Status=completed&PageSize=50&Page=0",
    "previous_page_url": null
  },
  "compositions": []
}
{
  "meta": {
    "key": "compositions",
    "url": "https://video.twilio.com/v1/Compositions?Status=completed&RoomSid=RMaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa&DateCreatedAfter=2017-01-01T00%3A00%3A01Z&DateCreatedBefore=2017-12-31T23%3A59%3A59Z&PageSize=50&Page=0",
    "page": 0,
    "page_size": 50,
    "next_page_url": null,
    "first_page_url": "https://video.twilio.com/v1/Compositions?Status=completed&RoomSid=RMaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa&DateCreatedAfter=2017-01-01T00%3A00%3A01Z&DateCreatedBefore=2017-12-31T23%3A59%3A59Z&PageSize=50&Page=0",
    "previous_page_url": null
  },
  "compositions": [
    {
      "sid": "CJaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
      "url": "https://video.twilio.com/v1/Compositions/CJaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
      "size": 4,
      "trim": true,
      "links": {
        "media": "https://video.twilio.com/v1/Compositions/CJaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/Media"
      },
      "format": "webm",
      "status": "completed",
      "bitrate": 64,
      "duration": 6,
      "room_sid": "RMaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
      "resolution": "1280x720",
      "account_sid": "ACaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
      "date_created": "2015-07-30T20:00:00Z",
      "date_deleted": null,
      "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": [
            "RTaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaab"
          ],
          "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": [
            "user*"
          ],
          "cells_excluded": [],
          "video_sources_excluded": []
        }
      },
      "audio_sources": [
        "RTaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
        "user*"
      ],
      "date_completed": "2015-07-30T20:01:33Z",
      "encryption_key": null,
      "status_callback": "https://mycallbackurl.com",
      "audio_sources_excluded": [],
      "status_callback_method": "POST",
      "media_external_location": null
    }
  ]
}