Latest Legacy

Retrieve all multiparty calls

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.

Response

HTTP Status Code: 200

Response for a successful request

{
  "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
    }
  ]
}

Example Request

1
2
3
4
5
6
import plivo

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

response = client.multi_party_calls.list()
print(response)
1
2
3
4
5
6
7
8
9
10
11
12
require 'rubygems'
require 'plivo'
include Plivo
include Plivo::Exceptions

api = RestClient.new("<auth_id>","<auth_token>")
begin
  response = api.multipartycalls.list()
  puts response
rescue PlivoRESTError => e
  puts 'Exception: ' + e.message
end
1
2
3
4
5
6
7
8
9
10
11
12
var plivo = require('plivo');

(function main() {
    'use strict';

    var client = new plivo.Client("<auth_id>","<auth_token>");
    client.multiPartyCalls.list().then(function (response) {
        console.log(response);
    }, function (err) {
        console.error(err);
    });
})();
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
<?php
require 'vendor/autoload.php';

use Plivo\RestClient;
use Plivo\Exceptions\PlivoRestException;

$client = new RestClient("<auth_id>", "<auth_token>");
try
{
    $response = $client
        ->multiPartyCalls
        ->getList();
    print_r($response);
}
catch(PlivoRestException $ex)
{
    print_r($ex);
}
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
package com.plivo.examples.multipartycall;

import com.plivo.api.Plivo;
import com.plivo.api.exceptions.PlivoRestException;
import com.plivo.api.exceptions.PlivoValidationException;
import com.plivo.api.models.base.ListResponse;
import com.plivo.api.models.multipartycall.MultiPartyCall;
import com.plivo.api.models.multipartycall.MultiPartyCallUtils;
import com.plivo.api.util.PropertyFilter;

import java.io.IOException;
import java.text.SimpleDateFormat;
import java.time.OffsetDateTime;
import java.time.format.DateTimeFormatter;
import java.util.Date;


class ListMPC {

    public static void main(String [] args) throws IOException, PlivoRestException, PlivoValidationException
    {
        Plivo.init("<auth_id>", "<auth_token>");
        try
        {
          ListResponse<MultiPartyCall> allMPC = MultiPartyCall.lister().list();
          System.out.println(allMPC.getMeta().getCount());
        }
	       catch (Exception e)
        {
            e.printStackTrace();
        }
    }
}
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
using System;
using Plivo;
using Plivo.Exception;

namespace PlivoExamples
{
    class Program
    {
        static void Main(string[] args)
        {
            var api = new PlivoApi("<auth_id>", "<auth_token>");

            try
            {
                var response = api.MultiPartyCall.List();
                Console.WriteLine(response);
            }
            catch (PlivoRestException e)
            {
                Console.WriteLine("Exception: " + e.Message);
            }

        }
    }
}
1
2
curl -i --user AUTH_ID:AUTH_TOKEN \
    https://api.plivo.com/v1/Account/{auth_id}/MultiPartyCall/
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
package main

import (
	"fmt"

	"github.com/plivo/plivo-go/v7"
)

func main() {
	client, err := plivo.NewClient("<auth_id>", "<auth_token>", &plivo.ClientOptions{})
	if err != nil {
		panic(err)
	}
	response, err := client.MultiPartyCall.List(
		plivo.MultiPartyCallListParams{})
	if err != nil {
		panic(err)
	}
	fmt.Printf("Response: %#v\n", response)
}