template_id
:
required |
Text
Template Id must be starts with "T". |
question_id
:
required |
Text
Question Id of the template. |
required
:
required |
Text
Possible value is "true" or "false". |
curl -H "MicroworkersApiKey:YOUR_API_KEY" -X PUT "https://ttv.microworkers.com/api/template/update_required_property/format/json" -d "template_id=T54f9518a418e2&question_id=Q54f9527d287b6&required=true"
from pprint import pprint
from MW_API import MW_API
mw_api = MW_API('YOUR_API_KEY')
res = mw_api.do_request('PUT','/template/update_required_property/format/json', {"template_id" : "T54f9518a418e2", "question_id" : "Q54f9527d287b6", "required" : "true"}, {})
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', '/template/update_required_property/format/json', {
"template_id" => "T54f9518a418e2", "question_id" => "Q54f9527d287b6", "required" => "true"
});
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 . "/template/update_required_property/format/json");
$client->setMethod("PUT");
$client->setData(array("template_id" => "T54f9518a418e2", "question_id" => "Q54f9527d287b6", "required" => "true"));
$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("template_id", "T54f9518a418e2");
postData.Add("question_id", "Q54f9527d287b6");
postData.Add("required", "true");
string body = MW_API_Client.putRequest("/template/update_required_property/format/json", postData);
Console.WriteLine (body);
}
}
{ "status": "SUCCESS", "response": "Question details updated successfully." }
{ "status": "ERROR", "message": "TTVAPI-E0011:Required value must be 'true' or 'false'." }