import plivo

client = plivo.RestClient(auth_id="<auth_id>", auth_token="<auth_token>")

response = client.multi_party_calls.list()
print(response)
{
  "api_id": "ed93aea0-45cd-11eb-8530-0242ac110006",
  "meta": {
    "count": 2,
    "limit": 20,
    "next": null,
    "offset": 0,
    "previous": null
  },
  "objects": [
    {
      "billed_amount": "0.05000",
      "billed_duration": 60,
      "creation_time": "2020-12-24 15:23:38+05:30",
      "duration": 2,
      "end_time": "2020-12-24 15:23:40+05:30",
      "friendly_name": "test_mpc_1",
      "mpc_uuid": "4ed623a5-9f3e-45e0-9e7e-3d19a94b3bd3",
      "participants": "/v1/Account/MAOTE1OWE0MDK0MTLHYW/MultiPartyCall/uuid_4ed623a5-9f3e-45e0-9e7e-3d19a94b3bd3/Participant/",
      "recording": null,
      "resource_uri": "/v1/Account/MAOTE1OWE0MDK0MTLHYW/MultiPartyCall/uuid_4ed623a5-9f3e-45e0-9e7e-3d19a94b3bd3/",
      "start_time": "2020-12-24 15:23:38+05:30",
      "status": "Ended",
      "stay_alone": false,
      "sub_account": null,
      "termination_cause": "No Active Participants",
      "termination_cause_code": 1000
    },
    {
      "billed_amount": "0.05000",
      "billed_duration": 60,
      "creation_time": "2020-12-24 14:50:03+05:30",
      "duration": 27,
      "end_time": "2020-12-24 14:50:30+05:30",
      "friendly_name": "test_mpc",
      "mpc_uuid": "8742d531-292a-46aa-8754-836be1092885",
      "participants": "/v1/Account/MAOTE1OWE0MDK0MTLHYW/MultiPartyCall/uuid_8742d531-292a-46aa-8754-836be1092885/Participant/",
      "recording": null,
      "resource_uri": "/v1/Account/MAOTE1OWE0MDK0MTLHYW/MultiPartyCall/uuid_8742d531-292a-46aa-8754-836be1092885/",
      "start_time": "2020-12-24 14:50:03+05:30",
      "status": "Ended",
      "stay_alone": false,
      "sub_account": null,
      "termination_cause": "No Active Participants",
      "termination_cause_code": 1000
    }
  ]
}

Lets you retrieve details of a list of multiparty calls made from an account.

API Endpoint

GET
https://api.plivo.com/v1/Account/{auth_id}/MultiPartyCall/

Arguments

friendly_name

MPC name provided during the creation of the MPC.

status

The current status of the MPC.

Allowed values: initialized, active, ended

termination_cause_code

A unique integer code for the termination cause.

Possible cause codes are:

  • 1000: No Active Participants

  • 1010: Stay Alone Not Permitted

  • 2000: Max Duration Reached

  • 3000: Hangup API Triggered

end_time
optional

Filters MPC by their completion time. The time format expected is YYYY-MM-DD HH:MM[:ss[.uuuuuu]]. The filter can be used in these four forms:

  • end_time__gt: gt stands for greater than. To get all calls that ended after 2021-03-21 11:47, use end_time__gt=2021-03-21 11:47

  • end_time__gte: gte stands for greater than or equal to. To get all calls that ended after or exactly at 2021-03-21 11:47[:30], use end_time__gte=2021-03-21 11:47[:30]

  • end_time__lt: lt stands for less than. To get all calls that ended before 2021-03-21 11:47, use end_time__lt=2021-03-21 11:47

  • end_time__lte: lte stands for less than or equal to. To get all calls that ended before or exactly at 2021-03-21 11:47[:30], use end_time__lte=2021-03-21 11:47[:30]

Note: You can combine these filters to get calls that ended in a particular time range.
When no end_time filter is specified, Plivo uses a default search window of the last seven days.
When only end_time__[gt|gte] or end_time__[lt|lte] is specified, Plivo uses a search window of 30 days from/to the specified end_time__[gt|gte] / end_time__[lt|lte].
Timestamps need to be UTC timestamps.

creation_time

Filters MPC by creation time. The time format expected is YYYY-MM-DD HH:MM[:ss[.uuuuuu]]. The filter can be used in these four forms:

  • creation_time__gt: gt stands for greater than. To get all calls that created after 2021-03-21 11:47, use creation_time__gt=2021-03-21 11:47

  • creation_time__gte: gte stands for greater than or equal to. To get all calls that created after or exactly at 2021-03-21 11:47[:30], use creation_time__gte=2021-03-21 11:47[:30]

  • creation_time__lt: lt stands for less than. To get all calls that created before 2021-03-21 11:47, use creation_time__lt=2021-03-21 11:47

  • creation_time__lte: lte stands for less than or equal to. To get all calls that created before or exactly at 2021-03-21 11:47[:30], use creation_time__lte=2021-03-21 11:47[:30]

limit

Limits the number of results retrieved. The maximum it can be set to is 20.

Defaults to 20.

offset

Denotes the number of value items by which the results should be offset. For example, if the results contains 1,000 values and limit is set to 10 and offset is set to 705, then values 706 through 715 are displayed in the results. This parameter is also used for pagination of the results.

Returns

Returns the details of a list of multiparty calls.

import plivo

client = plivo.RestClient(auth_id="<auth_id>", auth_token="<auth_token>")

response = client.multi_party_calls.list()
print(response)
{
  "api_id": "ed93aea0-45cd-11eb-8530-0242ac110006",
  "meta": {
    "count": 2,
    "limit": 20,
    "next": null,
    "offset": 0,
    "previous": null
  },
  "objects": [
    {
      "billed_amount": "0.05000",
      "billed_duration": 60,
      "creation_time": "2020-12-24 15:23:38+05:30",
      "duration": 2,
      "end_time": "2020-12-24 15:23:40+05:30",
      "friendly_name": "test_mpc_1",
      "mpc_uuid": "4ed623a5-9f3e-45e0-9e7e-3d19a94b3bd3",
      "participants": "/v1/Account/MAOTE1OWE0MDK0MTLHYW/MultiPartyCall/uuid_4ed623a5-9f3e-45e0-9e7e-3d19a94b3bd3/Participant/",
      "recording": null,
      "resource_uri": "/v1/Account/MAOTE1OWE0MDK0MTLHYW/MultiPartyCall/uuid_4ed623a5-9f3e-45e0-9e7e-3d19a94b3bd3/",
      "start_time": "2020-12-24 15:23:38+05:30",
      "status": "Ended",
      "stay_alone": false,
      "sub_account": null,
      "termination_cause": "No Active Participants",
      "termination_cause_code": 1000
    },
    {
      "billed_amount": "0.05000",
      "billed_duration": 60,
      "creation_time": "2020-12-24 14:50:03+05:30",
      "duration": 27,
      "end_time": "2020-12-24 14:50:30+05:30",
      "friendly_name": "test_mpc",
      "mpc_uuid": "8742d531-292a-46aa-8754-836be1092885",
      "participants": "/v1/Account/MAOTE1OWE0MDK0MTLHYW/MultiPartyCall/uuid_8742d531-292a-46aa-8754-836be1092885/Participant/",
      "recording": null,
      "resource_uri": "/v1/Account/MAOTE1OWE0MDK0MTLHYW/MultiPartyCall/uuid_8742d531-292a-46aa-8754-836be1092885/",
      "start_time": "2020-12-24 14:50:03+05:30",
      "status": "Ended",
      "stay_alone": false,
      "sub_account": null,
      "termination_cause": "No Active Participants",
      "termination_cause_code": 1000
    }
  ]
}