My account : API documentation

API documentation

Account

/campaign_hg/list_tasks_extend/<campaign_id> GET

Returns detailed info for all tasks submitted for this Campaign.

Parameters:

<campaign_id>

Campaign ID

Example values: e7162dd17b83

GET data

 

 

rating

(Optional) Task Rating

Example values: [OK|NOK|NOTRATED|REVISE]

finished_from

(Optional) Finished from datetime

Example value: 2014-12-02 00:00:00

finished_to

(Optional) Finished to datetime

Example value: 2014-12-31 23:59:59

worker_id

(Optional) Worker Id

Example value: c44150b6

page

(Optional) Page #

Example value: 2. Default: 1

entries_per_page

(Optional) Entries per page #

Example value: 100. Default/Max: 50000

Return values:

SUCCESS

status=SUCCESS, tasks=[array of array], pager=[pagination]

ERROR

status=ERROR, error=[error message*], errors_list=[errors list]

*[NO SUCH CAMPAIGN|INPUT_DATA]

Code:

cURL:

curl -H "MicroworkersApiKey:YOUR_API_KEY" -X GET https://api.microworkers.com/campaign_hg/list_tasks_extend/<campaign_id>

PHP:

<?php

include "includes/RESTClient.php";
define("cAPI_KEY", "YOUR_API_KEY");
define("cAPI_URL", "https://api.microworkers.com");
$client = new RESTClient();
$client->setApiKey(cAPI_KEY);
$client->setUrl(cAPI_URL . "/campaign_hg/list_tasks_extend/e7162dd17b83");
$client->setMethod("GET");
$client->execute();
$response = $client->getLastResponse();
$client->resetClient();
echo $response;

?>

Perl:

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_hg/list_tasks_extend/e7162dd17b83');
print Dumper($res);

Python:

from pprint import pprint
from MW_API import MW_API
mw_api = MW_API('YOUR_API_KEY')
res = mw_api.do_request('GET', '/campaign_hg/list_tasks_extend/e7162dd17b83')
pprint(res)

C#:

using System;
using MWAPI;

public class Test
{
  public static void Main (string[] args)
  {
    MW_API MW_API_Client = new MW_API ("YOUR_API_KEY");
    string body = MW_API_Client.getRequest("/campaign_hg/list_tasks_extend/e7162dd17b83");
    Console.WriteLine (body);
  }
}

Examples:

https://api.microworkers.com/campaign_hg/list_tasks_extend/e7162dd17b83

{
  "status": "SUCCESS",
  "campaign_id": "e7162dd17b83",
  "pager": {
    "current_page": 1,
    "entries_on_this_page": 10,
    "entries_per_page": 50000,
    "first": 1,
    "first_page": 1,
    "last": 10,
    "last_page": 1,
    "next_page": null,
    "previous_page": null,
    "total_entries": 10
  },
  "tasks": [
    {
      "task_details": {
        "bonus_worker_earned": "0.00000",
        "campaign_id": "e7162dd17b83",
        "csv_record_nr": "0",
        "country": "Australia",
        "employer_comment": "",
        "finished_datetime": "2015-09-03 11:17:24",
        "ip": "51.57.53.96",
        "proof": [
         "human",
         "",
         ""
        ],
        "task_rating": "OK",
        "worker_earned": "0.05000",
        "worker_id": "5mtJddpm"
      },
      "task_id": "2208461"
    },
    {
      "task_details": {
        "bonus_worker_earned": "0.00000",
        "campaign_id": "e7162dd17b83",
        "csv_record_nr": "0",
        "country": "Australia",
        "employer_comment": "wrong answer",
        "finished_datetime": "2015-09-03 11:17:35",
        "ip": "51.57.53.96",
        "proof": [
         "robot",
         "",
         ""
        ],
        "task_rating": "OK",
        "worker_earned": "0.05000",
        "worker_id": "5mtJddpm"
      ,
      "task_id": "2208462"
    },
    {
      "task_details": {
        "bonus_worker_earned": "0.00000",
        "campaign_id": "e7162dd17b83",
        "csv_record_nr": "0",
        "country": "Australia",
        "employer_comment": "wrong answer",
        "finished_datetime": "2015-09-03 11:17:45",
        "ip": "51.57.53.96",
        "proof": [
         "I don't know",
         "",
         ""
        ],
        "task_rating": "OK",
        "worker_earned": "0.05000",
        "worker_id": "5mtJddpm"
      },
      "task_id": "2208463"
    },
    {
      "task_details": {
        "bonus_worker_earned": "0.00000",
        "campaign_id": "e7162dd17b83",
        "csv_record_nr": "0",
        "country": "India",
        "employer_comment": "",
        "finished_datetime": "2015-09-03 11:17:54",
        "ip": "51.57.53.96",
        "proof": [
         "human",
         "",
         ""
        ],
        "task_rating": "OK",
        "worker_earned": "0.05000",
        "worker_id": "5mtJddpm"
      },
      "task_id": "2208464"
    },
    {
      "task_details": {
        "bonus_worker_earned": "0.00000",
        "campaign_id": "e7162dd17b83",
        "csv_record_nr": "0",
        "country": "China",
        "employer_comment": "wrong answer",
        "finished_datetime": "2015-09-03 11:18:03",
        "ip": "51.57.53.96",
        "proof": [
         "robot",
         "",
         ""
        ],
        "task_rating": "OK",
        "worker_earned": "0.05000",
        "worker_id": "5mtJddpm"
      },
      "task_id": "2208465"
    },
    {
      "task_details": {
        "bonus_worker_earned": "0.00000",
        "campaign_id": "e7162dd17b83",
        "csv_record_nr": "0",
        "country": "China",
        "employer_comment": "wrong answer",
        "finished_datetime": "2015-09-03 11:18:13",
        "ip": "51.57.53.96",
        "proof": [
         "I don't know",
         "",
         ""
        ],
        "task_rating": "NOK",
        "worker_earned": "0.00000",
        "worker_id": "5mtJddpm"
      },
      "task_id": "2208466"
    },
    {
      "task_details": {
        "bonus_worker_earned": "0.00000",
        "campaign_id": "e7162dd17b83",
        "csv_record_nr": "0",
        "country": "China",
        "employer_comment": "",
        "finished_datetime": "2015-09-03 11:18:28",
        "ip": "51.57.53.96",
        "proof": [
         "human",
         "",
         ""
        ],
        "task_rating": "OK",
        "worker_earned": "0.05000",
        "worker_id": "5mtJddpm"
      },
      "task_id": "2208467"
    },
    {
      "task_details": {
        "bonus_worker_earned": "0.00000",
        "campaign_id": "e7162dd17b83",
        "csv_record_nr": "0",
        "country": "Denmark",
        "employer_comment": "wrong answer",
        "finished_datetime": "2015-09-03 11:18:42",
        "ip": "51.57.53.96",
        "proof": [
         "I don't know",
         "",
         ""
        ],
        "task_rating": "NOK",
        "worker_earned": "0.00000",
        "worker_id": "5mtJddpm"
      },
      "task_id": "2208468"
    },
    {
      "task_details": {
        "bonus_worker_earned": "0.00000",
        "campaign_id": "e7162dd17b83",
        "csv_record_nr": "0",
        "country": "China",
        "employer_comment": "",
        "finished_datetime": "2015-09-03 11:18:50",
        "ip": "51.57.53.96",
        "proof": [
         "human",
         "",
         ""
        ],
        "task_rating": "OK",
        "worker_earned": "0.05000",
        "worker_id": "5mtJddpm"
      },
      "task_id": "2208469"
    },
    {
      "task_details": {
        "bonus_worker_earned": "0.00000",
        "campaign_id": "e7162dd17b83",
        "csv_record_nr": "0",
        "country": "Turkey",
        "employer_comment": "",
        "finished_datetime": "2015-09-03 11:19:03",
        "ip": "51.57.53.96",
        "proof": [
         "human",
         "",
         ""
        ],
        "task_rating": "OK",
        "worker_earned": "0.05000",
        "worker_id": "5mtJddpm"
      },
      "task_id": "2208470"
    }
  ]}

https://api.microworkers.com/campaign_hg/list_tasks_extend/abbb2dd17b83

{
  "status": "ERROR",
  "campaign_id": "abbb2dd17b83",
  "error": "NO SUCH CAMPAIGN"
}