These are all the 1.0 APIs that have been deprecated since 23-Jan-2019. Please use the latest version of API 2.0.

/campaign/rate_qualification_task/<type>/<campaign_id>

This API is only for qualification campaign. Set question complexity using this API method.
The value of 'type' (Campaign type) can be 'B' or 'HG'.

task_id :

required

Text

task id

rating :

required

Array

An array of question Id and stars.\n e.g.: Array({sub_task_id}=>Array(Array(question_id=>{question_id},stars=>{rating_star}), Array(question_id=>{question_id},stars=>{rating_star}))

This API method is use for set question complexity.
curl -H "MicroworkersApiKey:YOUR_API_KEY" -X PUT "https://ttv.microworkers.com/api/campaign/rate_qualification_task/B/2168e3b09815/format/json" -d "task_id=1234&rating[5ce72fb9d0d3_HG_55b39607ad74c162079042][0][question_id]=Q554f4c5b4afe6&rating[5ce72fb9d0d3_HG_55b39607ad74c162079042][0][stars]=3&rating[5ce72fb9d0d3_HG_55b39607ad74c162079042][1][question_id]=Q554f4c5b4afe8&rating[5ce72fb9d0d3_HG_55b39607ad74c162079042][1][stars]=4"
from pprint import pprint
from MW_API import MW_API
mw_api = MW_API('YOUR_API_KEY')
res = mw_api.do_request('PUT','/campaign/rate_qualification_task/B/2168e3b09815/format/json', {"task_id" : "1234", "rating[5ce72fb9d0d3_HG_55b39607ad74c162079042][0][question_id]":"Q554f4c5b4afe6", "rating[5ce72fb9d0d3_HG_55b39607ad74c162079042][0][stars]":3, "rating[5ce72fb9d0d3_HG_55b39607ad74c162079042][1][question_id]":"Q554f4c5b4afe8", "rating[5ce72fb9d0d3_HG_55b39607ad74c162079042][1][stars]":4}, {})
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('PUT', '/campaign/rate_qualification_task/B/2168e3b09815/format/json', {
  "task_id" => "1234", "rating" => {"5ce72fb9d0d3_HG_55b39607ad74c162079042"=>[{"question_id"=>"Q554f4c5b4afe6", "stars" => 3},{"question_id"=>"Q554f4c5b4afe8", "stars"=> 4}]}
});
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/rate_qualification_task/B/2168e3b09815/format/json");
$client->setMethod("PUT");
$client->setData(array("task_id" => "1234", "rating" => array("5ce72fb9d0d3_HG_55b39607ad74c162079042"=>array(array("question_id"=>"Q554f4c5b4afe6", "stars" => 3),array("question_id"=>"Q554f4c5b4afe8", "stars"=> 4)))));
$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("task_id", "1234");
     postData.Add("rating", {\"5ce72fb9d0d3_HG_55b39607ad74c162079042\":[{\"question_id\":\"Q554f4c5b4afe6\", \"stars\" : 3},{\"question_id\":\"Q554f4c5b4afe8\", \"stars\": 4}]});
    
    string body = MW_API_Client.putRequest("/campaign/rate_qualification_task/B/2168e3b09815/format/json", postData);
    Console.WriteLine (body);
  }
}

Definition


Result Format

{
  "status": "SUCCESS",
  "response": "Task successfully rated."
}
{
  "status": "ERROR",
  "message": "Question Id not found."
}