Home / Statistics / all
Use this method to retrieve all the mails that will/are sent
using the application.
The following errors can occur:
- Token not present in request.
- Token not in the required format.
- Session does not exist.
- Session has expired.
- The user does not exist.
- No database specified.
- Database parameter not in correct format.
- You are not allowed to access this database.
You should call this function as followed:
- rest/v2/statistics/all?token=TOKEN&database=DATABASE_ID
- rest/v2/statistics/all?token=TOKEN&database=DATABASE_ID&status=running
- rest/v2/statistics/all?token=TOKEN&database=DATABASE_ID&status=running&offset=150&records=50
- rest/v2/statistics/all?token=TOKEN&database=DATABASE_ID&status=running&offset=150&records=50&splitrun=1
require_once 'Rest.php';
$username = 'my_username';
$password = 'my_password';
$database = '999';
$rest = new Rest($username, $password, $database);
$result = $rest->call('statistics/all', [
'status' => [
' => 'running',
' => 'running'
],
'offset' => [
' => '150',
' => '150'
],
'records' => '50',
'splitrun' => '1'
], 'GET');
var_dump($result);
The following parameters this method can/should be called with:
key: status
values: pending, setup, running, completed, defaults to completed
what: Shows you the mailing statistics in the given category.
key: offset
values: integer, >= 0 & <= count, defaults to 0
what: The offset the result-list should start at.
key: records
values: integer, >= 5 & <= 50, defaults to 25
what: How much records you want to retrieve.
key: splitrun
values: 1, default to 0
what: To include splitrun mailings set the value to 1 to exclude the splitrun mailings set the value to 0. Standard on 0
The following items:
- user/login For the TOKEN.
- user/database For the DATABASE_ID