pageNumber
:
optional |
Integer
By Default value of pageNumber is 1. This API is returning 2000 csv rows per request. |
curl -H "MicroworkersApiKey:YOUR_API_KEY" -X GET "https://ttv.microworkers.com/api/campaign/result_csv/B/2168e3b09815/format/json?pageNumber=1"
from pprint import pprint
from MW_API import MW_API
mw_api = MW_API('YOUR_API_KEY')
res = mw_api.do_request('GET','/campaign/result_csv/B/2168e3b09815/format/json', {"pageNumber" : 1}, {})
pprint(res)
use MW_API;
use Data::Dumper qw(Dumper);
my $mw_api = MW_API->new('api_key' => 'YOUR_API_KEY');
my $res = $mw_api->do_request('GET', '/campaign/result_csv/B/2168e3b09815/format/json', {
"pageNumber" => 1
});
print Dumper($res);
<?php
include "includes/RESTClient.php";
define("cAPI_KEY", "YOUR_API_KEY");
define("cAPI_URL", "https://ttv.microworkers.com/api");
$client = new RESTClient();
$client->setApiKey(cAPI_KEY);
$client->setUrl(cAPI_URL . "/campaign/result_csv/B/2168e3b09815/format/json");
$client->setMethod("GET");
$client->setData(array("pageNumber" => 1));
$client->execute();
$response = $client->getLastResponse();
$client->resetClient();
echo $response;
?>
using System;
using MWAPI;
using System.Collections.Specialized;
public class Test{
public static void Main (string[] args){
MW_API MW_API_Client = new MW_API ("YOUR_API_KEY");
NameValueCollection postData = new NameValueCollection();
postData.Add("pageNumber", 1);
string body = MW_API_Client.getRequest("/campaign/result_csv/B/2168e3b09815/format/json");
Console.WriteLine (body);
}
}
{ "status": "SUCCESS", "response": "CAMPAIGN_ID,2094d1552966_HG\nCAMPAIGN_TITLE,\"TTV-bulkrate testing\"\nEMPLOYER_ID,de917335\n\nTASK_ID,STATUS,USER_ID,IP_ADDRESS,COUNTRY,START_TIME,FINISH_TIME,TIME_TOOK_TO_COMPLETE_TASK,title,Description,human,feedback\n2302946,OK,de917335,103.251.219.124,India,\"Wednesday, 08-Apr-15 22:20:48 EDT\",\"Wednesday, 08-Apr-15 22:20:58 EDT\",\"0 minute(s) and 10 second(s)\",b,b,b,b\n2302969,OK,de917335,103.251.219.124,India,\"Wednesday, 08-Apr-15 22:55:46 EDT\",\"Wednesday, 08-Apr-15 22:55:56 EDT\",\"0 minute(s) and 10 second(s)\",z,z,z,z\n2302945,OK,de917335,103.251.219.124,India,\"Wednesday, 08-Apr-15 22:20:33 EDT\",\"Wednesday, 08-Apr-15 22:20:41 EDT\",\"0 minute(s) and 8 second(s)\",a,a,a,a\n2302970,OK,de917335,103.251.219.124,India,\"Wednesday, 08-Apr-15 22:56:00 EDT\",\"Wednesday, 08-Apr-15 22:56:09 EDT\",\"0 minute(s) and 9 second(s)\",x,x,x,x\n2302947,OK,de917335,103.251.219.124,India,\"Wednesday, 08-Apr-15 22:21:03 EDT\",\"Wednesday, 08-Apr-15 22:21:09 EDT\",\"0 minute(s) and 6 second(s)\",c,c,c,c\n2302971,OK,de917335,103.251.219.124,India,\"Wednesday, 08-Apr-15 22:56:15 EDT\",\"Wednesday, 08-Apr-15 22:56:25 EDT\",\"0 minute(s) and 10 second(s)\",q,q,q,q\n" }
{ "status": "ERROR", "message": "TTVAPI-E0004:TTVCampaign-E0000:Campaign does not exists with id '2094d155966_HG'" }