Search…
Call Logs API

Call Logs API Description

Plum offers four services for its Call Log REST API:
Please note that each of these Call Log REST APIs use HTTP AUTH for authentication. The username/password to be used for authentication are the same as your standard Plum DEV login credentials.
All of the Call Log REST APIs have the same return format that includes a status (success or failure), error message and the result data.

Sample Responses

JSON (success)
JSON (failure)
XML (success)
XML (failure)
1
{
2
"status":"success",
3
"error":"",
4
"result": {
5
// SAMPLE RESULT DATA
6
}
7
}
Copied!
1
{
2
"status":"failure",
3
"error":"Unauthorized access to sample service",
4
}
Copied!
1
<sample>
2
<status>success</status>
3
<error/>
4
<result>
5
<!-- SAMPLE RESULT DATA -->
6
</result>
7
</sample>
Copied!
1
<sample>
2
<status>failure</status>
3
<error>Unauthorized access to sample service</error>
4
</sample>
Copied!
get
https://hosting.plumvoice.com
/ws/calls/logs/{start_timestamp}/{end_timstamp}
Recent Call Logs
Sample Code
The following code sample is written in PHP but any language that can connect to a JSON or XML REST service can utilize this API.
getlogs.php
CURL (command line)
1
<?php
2
header("Content-type: text/xml");
3
4
// initialize curl
5
$ch = curl_init();
6
7
// set necessary curl options
8
curl_setopt($ch, CURLOPT_URL, "https://hosting.plumvoice.com/ws/calls/logs/1509681600/1510203600?number=6177123000&offset=0&limit=2");
9
curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);
10
curl_setopt($ch, CURLOPT_HTTPHEADER, array('Accept: application/xml'));
11
curl_setopt($ch, CURLOPT_USERPWD, "username:password");
12
13
echo(curl_exec($ch));
14
15
curl_close($ch);
16
?>
Copied!
1
curl -u username:password -H"Accept: application/xml" "https://hosting.plumvoice.com/ws/calls/logs/1509681600/1510203600?number=6177123000&offset=0&limit=2"
Copied!
get
https://hosting.plumvoice.com
/ws/calls/log/{log_id}
Call Log
Sample Code
The following code sample is written in PHP but any language that can connect to a JSON or XML REST service can utilize this API.
getlog.php
CURL (command line)
1
<?php
2
header("Content-type: text/xml");
3
4
// initialize curl
5
$ch = curl_init();
6
7
// set necessary curl options
8
curl_setopt($ch, CURLOPT_URL, "https://hosting.plumvoice.com/ws/calls/log/421627729");
9
curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);
10
curl_setopt($ch, CURLOPT_HTTPHEADER, array('Accept: application/xml'));
11
curl_setopt($ch, CURLOPT_USERPWD, "username:password");
12
13
echo(curl_exec($ch));
14
15
curl_close($ch);
16
?>
Copied!
1
curl -u username:password -H"Accept: application/xml" "https://hosting.plumvoice.com/ws/calls/log/421627729"
Copied!
get
https://hosting.plumvoice.com
/ws/calls/sessions/{start_timestamp}/{end_timstamp}
Session Logs
Sample Code
The following code sample is written in PHP but any language that can connecting to a JSON or XML REST service can utilize this API.
getlogs.php
CURL (command line)
1
<?php
2
header("Content-type: text/xml");
3
4
// initialize curl
5
$ch = curl_init();
6
7
// set necessary curl options
8
curl_setopt($ch, CURLOPT_URL, "https://hosting.plumvoice.com/ws/calls/sessions/1509681600/1510203600?number=6177123000&offset=0&limit=2");
9
curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);
10
curl_setopt($ch, CURLOPT_HTTPHEADER, array('Accept: application/xml'));
11
curl_setopt($ch, CURLOPT_USERPWD, "username:password");
12
13
echo(curl_exec($ch));
14
15
curl_close($ch);
16
?>
Copied!
1
curl -u username:password -H"Accept: application/xml" "https://hosting.plumvoice.com/ws/calls/sessions/1509681600/1510203600?number=6177123000&offset=0&limit=2"
Copied!
get
https://hosting.plumvoice.com
/ws/calls/errors/{start_timestamp}/{end_timstamp}
Error Logs
Sample Code
The following code sample is written in PHP but any language that can connect to a JSON or XML REST service can utilize this API.
getlogs.php
CURL (command line)
1
<?php
2
header("Content-type: text/xml");
3
4
// initialize curl
5
$ch = curl_init();
6
7
// set necessary curl options
8
curl_setopt($ch, CURLOPT_URL, "https://hosting.plumvoice.com/ws/calls/errors/1509681600/1510203600?number=6177123000&offset=0&limit=2");
9
curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);
10
curl_setopt($ch, CURLOPT_HTTPHEADER, array('Accept: application/xml'));
11
curl_setopt($ch, CURLOPT_USERPWD, "username:password");
12
13
echo(curl_exec($ch));
14
15
curl_close($ch);
16
?>
Copied!
1
curl -u username:password -H"Accept: application/xml" "https://hosting.plumvoice.com/ws/calls/errors/1509681600/1510203600?number=6177123000&offset=0&limit=2"
Copied!
Last modified 8mo ago