Task Lists
This module covers task list related operations within Zoho Projects. Use this API to retrieve, create, update, reorder, move, or delete task lists in both portals and projects.
This module covers task list related operations within Zoho Projects. Use this API to retrieve, create, update, reorder, move, or delete task lists in both portals and projects.
Retrieve task lists from the Zoho Projects portal
OAuth Scope:
ZohoProjects.tasklists.READ
String
requiredUnique, immutable identifier of the portal in Zoho Projects. You can obtain it from the Get Portals API (the "id" field in the response).
JSONObject
Enter filter criteria.
int
default : 1Enter the page number to retrieve. Default: 1.
int
limit : 1-200Enter the number of entries to be displayed per page.
String
Enter the sort criteria. Accepted values: ASC(field_name) or DESC(field_name)
String
Enter the custom view ID.
Request Example
curl -X GET \
'https://projects.zoho.com/api/v3/portal/[PORTAL_ID]/all-tasklists?filter=%7B%22criteria%22%3A%5B%7B%22field_name%22%3A%22project%22%2C%22criteria_condition%22%3A%22contains%22%2C%22value%22%3A%5B%221752587000000097269%22%5D%2C%22module_name%22%3A%22task%22%7D%5D%2C%22pattern%22%3A%221%22%7D&page=1&per_page=10&sort_by=ASC%28last_modified_time%29&view_id=23806000074760021' \
-H 'Authorization: Bearer 1000.03xxxxxxxxxxxxxxxxxa5317.dxxxxxxxxxxxxxxxxxfa'
url = "https://projects.zoho.com/api/v3/portal/[PORTAL_ID]/all-tasklists";
filter_value = {"criteria":[{"field_name":"project","criteria_condition":"contains","value":["1752587000000097269"],"module_name":"task"}],"pattern":"1"};
params = Map();
params.put("filter", filter_value);
params.put("page", "1");
params.put("per_page", "10");
params.put("sort_by", "ASC(last_modified_time)");
params.put("view_id", "23806000074760021");
response = invokeUrl
[
url: url
type: GET
parameters: params
connection: "projects"
];
info response;
const https = require('https');
const url = new URL('https://projects.zoho.com/api/v3/portal/[PORTAL_ID]/all-tasklists');
url.searchParams.append('filter', '{"criteria":[{"field_name":"project","criteria_condition":"contains","value":["1752587000000097269"],"module_name":"task"}],"pattern":"1"}');
url.searchParams.append('page', '1');
url.searchParams.append('per_page', '10');
url.searchParams.append('sort_by', 'ASC(last_modified_time)');
url.searchParams.append('view_id', '23806000074760021');
const options = {
hostname: url.hostname,
path: url.pathname + url.search,
method: 'GET',
headers: {
'Authorization': 'Bearer 1000.03xxxxxxxxxxxxxxxxxa5317.dxxxxxxxxxxxxxxxxxfa'
}
};
const req = https.request(options, (res) => {
let data = '';
res.on('data', (chunk) => { data += chunk; });
res.on('end', () => { console.log(JSON.parse(data)); });
});
req.on('error', (err) => { console.error(err); });
req.end();
require 'net/http'
require 'uri'
require 'json'
url = URI("https://projects.zoho.com/api/v3/portal/[PORTAL_ID]/all-tasklists")
params = {
"filter" => "{\"criteria\":[{\"field_name\":\"project\",\"criteria_condition\":\"contains\",\"value\":[\"1752587000000097269\"],\"module_name\":\"task\"}],\"pattern\":\"1\"}",
"page" => "1",
"per_page" => "10",
"sort_by" => "ASC(last_modified_time)",
"view_id" => "23806000074760021"
}
url.query = URI.encode_www_form(params)
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["Authorization"] = "Bearer 1000.03xxxxxxxxxxxxxxxxxa5317.dxxxxxxxxxxxxxxxxxfa"
response = http.request(request)
puts response.read_body
<?php
$params = [
'filter' => '{"criteria":[{"field_name":"project","criteria_condition":"contains","value":["1752587000000097269"],"module_name":"task"}],"pattern":"1"}',
'page' => '1',
'per_page' => '10',
'sort_by' => 'ASC(last_modified_time)',
'view_id' => '23806000074760021',
];
$url = "https://projects.zoho.com/api/v3/portal/[PORTAL_ID]/all-tasklists" . "?" . http_build_query($params);
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => $url,
CURLOPT_RETURNTRANSFER => true,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"Authorization: Bearer 1000.03xxxxxxxxxxxxxxxxxa5317.dxxxxxxxxxxxxxxxxxfa"
],
]);
$response = curl_exec($curl);
curl_close($curl);
echo $response;
import requests
url = "https://projects.zoho.com/api/v3/portal/[PORTAL_ID]/all-tasklists"
params = {
"filter": "{\"criteria\":[{\"field_name\":\"project\",\"criteria_condition\":\"contains\",\"value\":[\"1752587000000097269\"],\"module_name\":\"task\"}],\"pattern\":\"1\"}",
"page": "1",
"per_page": "10",
"sort_by": "ASC(last_modified_time)",
"view_id": "23806000074760021"
}
headers = {
"Authorization": "Bearer 1000.03xxxxxxxxxxxxxxxxxa5317.dxxxxxxxxxxxxxxxxxfa",
}
response = requests.get(url, headers=headers, params=params)
print(response.json())
#include <stdio.h>
#include <string.h>
#include <curl/curl.h>
int main(void) {
CURL *curl = curl_easy_init();
if (curl) {
char *enc_filter = curl_easy_escape(curl, "{\"criteria\":[{\"field_name\":\"project\",\"criteria_condition\":\"contains\",\"value\":[\"1752587000000097269\"],\"module_name\":\"task\"}],\"pattern\":\"1\"}", 0);
char *enc_page = curl_easy_escape(curl, "1", 0);
char *enc_per_page = curl_easy_escape(curl, "10", 0);
char *enc_sort_by = curl_easy_escape(curl, "ASC(last_modified_time)", 0);
char *enc_view_id = curl_easy_escape(curl, "23806000074760021", 0);
char url[2048];
snprintf(url, sizeof(url), "https://projects.zoho.com/api/v3/portal/[PORTAL_ID]/all-tasklists?filter=%s&page=%s&per_page=%s&sort_by=%s&view_id=%s", enc_filter, enc_page, enc_per_page, enc_sort_by, enc_view_id);
struct curl_slist *headers = NULL;
headers = curl_slist_append(headers, "Authorization: Bearer 1000.03xxxxxxxxxxxxxxxxxa5317.dxxxxxxxxxxxxxxxxxfa");
curl_easy_setopt(curl, CURLOPT_URL, url);
curl_easy_setopt(curl, CURLOPT_HTTPHEADER, headers);
curl_easy_setopt(curl, CURLOPT_CUSTOMREQUEST, "GET");
CURLcode res = curl_easy_perform(curl);
if (res != CURLE_OK)
fprintf(stderr, "curl failed: %s\n", curl_easy_strerror(res));
curl_free(enc_filter);
curl_free(enc_page);
curl_free(enc_per_page);
curl_free(enc_sort_by);
curl_free(enc_view_id);
curl_slist_free_all(headers);
curl_easy_cleanup(curl);
}
return 0;
}
using System.Net.Http;
using System.Text;
using System.Web;
var client = new HttpClient();
client.DefaultRequestHeaders.Add("Authorization", "Bearer 1000.03xxxxxxxxxxxxxxxxxa5317.dxxxxxxxxxxxxxxxxxfa");
var query = HttpUtility.ParseQueryString(string.Empty);
query["filter"] = "{\"criteria\":[{\"field_name\":\"project\",\"criteria_condition\":\"contains\",\"value\":[\"1752587000000097269\"],\"module_name\":\"task\"}],\"pattern\":\"1\"}";
query["page"] = "1";
query["per_page"] = "10";
query["sort_by"] = "ASC(last_modified_time)";
query["view_id"] = "23806000074760021";
var uriBuilder = new UriBuilder("https://projects.zoho.com/api/v3/portal/[PORTAL_ID]/all-tasklists") { Query = query.ToString() };
var request = new HttpRequestMessage(HttpMethod.Get, uriBuilder.Uri);
var response = await client.SendAsync(request);
var body = await response.Content.ReadAsStringAsync();
Console.WriteLine(body);
#include <iostream>
#include <string>
#include <curl/curl.h>
static size_t WriteCallback(void* contents, size_t size, size_t nmemb, std::string* output) {
output->append((char*)contents, size * nmemb);
return size * nmemb;
}
int main() {
CURL* curl = curl_easy_init();
if (curl) {
std::string response;
char* enc_filter = curl_easy_escape(curl, "{\"criteria\":[{\"field_name\":\"project\",\"criteria_condition\":\"contains\",\"value\":[\"1752587000000097269\"],\"module_name\":\"task\"}],\"pattern\":\"1\"}", 0);
char* enc_page = curl_easy_escape(curl, "1", 0);
char* enc_per_page = curl_easy_escape(curl, "10", 0);
char* enc_sort_by = curl_easy_escape(curl, "ASC(last_modified_time)", 0);
char* enc_view_id = curl_easy_escape(curl, "23806000074760021", 0);
std::string url = "https://projects.zoho.com/api/v3/portal/[PORTAL_ID]/all-tasklists";
url += "?filter=" + std::string(enc_filter);
url += "&page=" + std::string(enc_page);
url += "&per_page=" + std::string(enc_per_page);
url += "&sort_by=" + std::string(enc_sort_by);
url += "&view_id=" + std::string(enc_view_id);
struct curl_slist* headers = NULL;
headers = curl_slist_append(headers, "Authorization: Bearer 1000.03xxxxxxxxxxxxxxxxxa5317.dxxxxxxxxxxxxxxxxxfa");
curl_easy_setopt(curl, CURLOPT_URL, url.c_str());
curl_easy_setopt(curl, CURLOPT_HTTPHEADER, headers);
curl_easy_setopt(curl, CURLOPT_CUSTOMREQUEST, "GET");
curl_easy_setopt(curl, CURLOPT_WRITEFUNCTION, WriteCallback);
curl_easy_setopt(curl, CURLOPT_WRITEDATA, &response);
CURLcode res = curl_easy_perform(curl);
if (res == CURLE_OK)
std::cout << response << std::endl;
else
std::cerr << curl_easy_strerror(res) << std::endl;
curl_free(enc_filter);
curl_free(enc_page);
curl_free(enc_per_page);
curl_free(enc_sort_by);
curl_free(enc_view_id);
curl_slist_free_all(headers);
curl_easy_cleanup(curl);
}
return 0;
}
(require '[clj-http.client :as client])
(let [enc-filter (java.net.URLEncoder/encode "{\"criteria\":[{\"field_name\":\"project\",\"criteria_condition\":\"contains\",\"value\":[\"1752587000000097269\"],\"module_name\":\"task\"}],\"pattern\":\"1\"}" "UTF-8")
enc-page (java.net.URLEncoder/encode "1" "UTF-8")
enc-per_page (java.net.URLEncoder/encode "10" "UTF-8")
enc-sort_by (java.net.URLEncoder/encode "ASC(last_modified_time)" "UTF-8")
enc-view_id (java.net.URLEncoder/encode "23806000074760021" "UTF-8")
url (str "https://projects.zoho.com/api/v3/portal/[PORTAL_ID]/all-tasklists" "?filter=" enc-filter "&page=" enc-page "&per_page=" enc-per_page "&sort_by=" enc-sort_by "&view_id=" enc-view_id)]
(def response
(client/get url
{:headers {"Authorization" "Bearer 1000.03xxxxxxxxxxxxxxxxxa5317.dxxxxxxxxxxxxxxxxxfa"}
:as :json}))
(println (:body response))
package main
import (
"fmt"
"io"
"net/http"
"net/url"
)
func main() {
req, _ := http.NewRequest("GET", "https://projects.zoho.com/api/v3/portal/[PORTAL_ID]/all-tasklists", nil)
q := req.URL.Query()
q.Add("filter", "{\"criteria\":[{\"field_name\":\"project\",\"criteria_condition\":\"contains\",\"value\":[\"1752587000000097269\"],\"module_name\":\"task\"}],\"pattern\":\"1\"}")
q.Add("page", "1")
q.Add("per_page", "10")
q.Add("sort_by", "ASC(last_modified_time)")
q.Add("view_id", "23806000074760021")
req.URL.RawQuery = q.Encode()
req.Header.Add("Authorization", "Bearer 1000.03xxxxxxxxxxxxxxxxxa5317.dxxxxxxxxxxxxxxxxxfa")
resp, _ := http.DefaultClient.Do(req)
defer resp.Body.Close()
body, _ := io.ReadAll(resp.Body)
fmt.Println(string(body))
}
GET https://projects.zoho.com/api/v3/portal/[PORTAL_ID]/all-tasklists?filter=%7B%22criteria%22%3A%5B%7B%22field_name%22%3A%22project%22%2C%22criteria_condition%22%3A%22contains%22%2C%22value%22%3A%5B%221752587000000097269%22%5D%2C%22module_name%22%3A%22task%22%7D%5D%2C%22pattern%22%3A%221%22%7D&page=1&per_page=10&sort_by=ASC%28last_modified_time%29&view_id=23806000074760021 HTTP/1.1
Host: https://projects.zoho.com/api/v3/portal/[PORTAL_ID]/all-tasklists?filter=%7B%22criteria%22%3A%5B%7B%22field_name%22%3A%22project%22%2C%22criteria_condition%22%3A%22contains%22%2C%22value%22%3A%5B%221752587000000097269%22%5D%2C%22module_name%22%3A%22task%22%7D%5D%2C%22pattern%22%3A%221%22%7D&page=1&per_page=10&sort_by=ASC%28last_modified_time%29&view_id=23806000074760021
Authorization: Bearer 1000.03xxxxxxxxxxxxxxxxxa5317.dxxxxxxxxxxxxxxxxxfa
HttpClientBuilder httpClientBuilder = HttpClientBuilder.create();
SSLContext sslContext = SSLContext.getDefault();
SSLConnectionSocketFactory sslConnectionSocketFactory = new SSLConnectionSocketFactory(sslContext, NoopHostnameVerifier.INSTANCE);
CloseableHttpClient httpclient = httpClientBuilder.setSSLSocketFactory(sslConnectionSocketFactory).build();
URIBuilder uriBuilder = new URIBuilder("https://projects.zoho.com/api/v3/portal/[PORTAL_ID]/all-tasklists");
uriBuilder.addParameter("filter", "{\"criteria\":[{\"field_name\":\"project\",\"criteria_condition\":\"contains\",\"value\":[\"1752587000000097269\"],\"module_name\":\"task\"}],\"pattern\":\"1\"}");
uriBuilder.addParameter("page", "1");
uriBuilder.addParameter("per_page", "10");
uriBuilder.addParameter("sort_by", "ASC(last_modified_time)");
uriBuilder.addParameter("view_id", "23806000074760021");
HttpUriRequest requestObj = new HttpGet(uriBuilder.build());
requestObj.addHeader("Authorization", "Bearer 1000.03xxxxxxxxxxxxxxxxxa5317.dxxxxxxxxxxxxxxxxxfa");
HttpResponse response = httpclient.execute(requestObj);
HttpEntity responseEntity = response.getEntity();
Object responseObject = EntityUtils.toString(responseEntity);
String responseString = responseObject.toString();
const url = 'https://projects.zoho.com/api/v3/portal/[PORTAL_ID]/all-tasklists';
const params = new URLSearchParams({
'filter': '{"criteria":[{"field_name":"project","criteria_condition":"contains","value":["1752587000000097269"],"module_name":"task"}],"pattern":"1"}',
'page': '1',
'per_page': '10',
'sort_by': 'ASC(last_modified_time)',
'view_id': '23806000074760021'
});
const options = {
method: 'GET',
headers: {
'Authorization': 'Bearer 1000.03xxxxxxxxxxxxxxxxxa5317.dxxxxxxxxxxxxxxxxxfa'
}
};
fetch(url + '?' + params.toString(), options)
.then(response => response.json())
.then(data => console.log(data))
.catch(error => console.error(error));
filter = {"criteria":[{"field_name":"project","criteria_condition":"contains","value":["1752587000000097269"],"module_name":"task"}],"pattern":"1"}
page = "1"
per_page = "10"
sort_by = "ASC(last_modified_time)"
view_id = "23806000074760021"import java.net.HttpURLConnection
import java.net.URL
import okhttp3.HttpUrl.Companion.toHttpUrl
fun main() {
val urlBuilder = "https://projects.zoho.com/api/v3/portal/[PORTAL_ID]/all-tasklists".toHttpUrl().newBuilder()
urlBuilder.addQueryParameter("filter", "{\"criteria\":[{\"field_name\":\"project\",\"criteria_condition\":\"contains\",\"value\":[\"1752587000000097269\"],\"module_name\":\"task\"}],\"pattern\":\"1\"}")
urlBuilder.addQueryParameter("page", "1")
urlBuilder.addQueryParameter("per_page", "10")
urlBuilder.addQueryParameter("sort_by", "ASC(last_modified_time)")
urlBuilder.addQueryParameter("view_id", "23806000074760021")
val url = URL(urlBuilder.build().toString())
val conn = url.openConnection() as HttpURLConnection
conn.requestMethod = "GET"
conn.setRequestProperty("Authorization", "Bearer 1000.03xxxxxxxxxxxxxxxxxa5317.dxxxxxxxxxxxxxxxxxfa")
val response = conn.inputStream.bufferedReader().readText()
println(response)
}
NSString *encodedFilter = [@"{\"criteria\":[{\"field_name\":\"project\",\"criteria_condition\":\"contains\",\"value\":[\"1752587000000097269\"],\"module_name\":\"task\"}],\"pattern\":\"1\"}" stringByAddingPercentEncodingWithAllowedCharacters:[NSCharacterSet URLQueryAllowedCharacterSet]];
NSString *encodedPage = [@"1" stringByAddingPercentEncodingWithAllowedCharacters:[NSCharacterSet URLQueryAllowedCharacterSet]];
NSString *encodedPer_page = [@"10" stringByAddingPercentEncodingWithAllowedCharacters:[NSCharacterSet URLQueryAllowedCharacterSet]];
NSString *encodedSort_by = [@"ASC(last_modified_time)" stringByAddingPercentEncodingWithAllowedCharacters:[NSCharacterSet URLQueryAllowedCharacterSet]];
NSString *encodedView_id = [@"23806000074760021" stringByAddingPercentEncodingWithAllowedCharacters:[NSCharacterSet URLQueryAllowedCharacterSet]];
NSString *urlString = [NSString stringWithFormat:@"https://projects.zoho.com/api/v3/portal/[PORTAL_ID]/all-tasklists?filter=%@&page=%@&per_page=%@&sort_by=%@&view_id=%@", encodedFilter, encodedPage, encodedPer_page, encodedSort_by, encodedView_id];
NSURL *url = [NSURL URLWithString:urlString];
NSMutableURLRequest *request = [NSMutableURLRequest requestWithURL:url];
[request setHTTPMethod:@"GET"];
[request setValue:@"Bearer 1000.03xxxxxxxxxxxxxxxxxa5317.dxxxxxxxxxxxxxxxxxfa" forHTTPHeaderField:@"Authorization"];
NSURLSession *session = [NSURLSession sharedSession];
NSURLSessionDataTask *task = [session dataTaskWithRequest:request
completionHandler:^(NSData *data, NSURLResponse *response, NSError *error) {
NSString *result = [[NSString alloc] initWithData:data encoding:NSUTF8StringEncoding];
NSLog(@"%@", result);
}];
[task resume];
open Lwt
open Cohttp_lwt_unix
let () =
let enc_filter = Uri.pct_encode "{\"criteria\":[{\"field_name\":\"project\",\"criteria_condition\":\"contains\",\"value\":[\"1752587000000097269\"],\"module_name\":\"task\"}],\"pattern\":\"1\"}" in
let enc_page = Uri.pct_encode "1" in
let enc_per_page = Uri.pct_encode "10" in
let enc_sort_by = Uri.pct_encode "ASC(last_modified_time)" in
let enc_view_id = Uri.pct_encode "23806000074760021" in
let uri = Uri.of_string ("https://projects.zoho.com/api/v3/portal/[PORTAL_ID]/all-tasklists" ^ "?filter=" ^ enc_filter ^ "&page=" ^ enc_page ^ "&per_page=" ^ enc_per_page ^ "&sort_by=" ^ enc_sort_by ^ "&view_id=" ^ enc_view_id) in
let headers = Cohttp.Header.init ()
|> fun h -> Cohttp.Header.add h "Authorization" "Bearer 1000.03xxxxxxxxxxxxxxxxxa5317.dxxxxxxxxxxxxxxxxxfa"
in
Lwt_main.run (
Client.get ~headers uri >>= fun (_, body) ->
Cohttp_lwt.Body.to_string body >|= fun s ->
print_endline s)
$headers = @{
"Authorization" = "Bearer 1000.03xxxxxxxxxxxxxxxxxa5317.dxxxxxxxxxxxxxxxxxfa"
}
$params = @{
filter = "{`"criteria`":[{`"field_name`":`"project`",`"criteria_condition`":`"contains`",`"value`":[`"1752587000000097269`"],`"module_name`":`"task`"}],`"pattern`":`"1`"}"
page = "1"
per_page = "10"
sort_by = "ASC(last_modified_time)"
view_id = "23806000074760021"
}
$queryString = ($params.GetEnumerator() | ForEach-Object { "$($_.Key)=$([System.Uri]::EscapeDataString($_.Value))" }) -join "&"
$url = "https://projects.zoho.com/api/v3/portal/[PORTAL_ID]/all-tasklists" + "?" + $queryString
$response = Invoke-RestMethod -Uri $url -Method GET -Headers $headers
$response | ConvertTo-Json
library(httr)
url <- "https://projects.zoho.com/api/v3/portal/[PORTAL_ID]/all-tasklists"
params <- list(
filter = "{\"criteria\":[{\"field_name\":\"project\",\"criteria_condition\":\"contains\",\"value\":[\"1752587000000097269\"],\"module_name\":\"task\"}],\"pattern\":\"1\"}",
page = "1",
per_page = "10",
sort_by = "ASC(last_modified_time)",
view_id = "23806000074760021"
)
response <- GET(
url,
add_headers(Authorization = "Bearer 1000.03xxxxxxxxxxxxxxxxxa5317.dxxxxxxxxxxxxxxxxxfa"),
query = params
)
content(response, "text")
import Foundation
var components = URLComponents(string: "https://projects.zoho.com/api/v3/portal/[PORTAL_ID]/all-tasklists")!
components.queryItems = [
URLQueryItem(name: "filter", value: "{\"criteria\":[{\"field_name\":\"project\",\"criteria_condition\":\"contains\",\"value\":[\"1752587000000097269\"],\"module_name\":\"task\"}],\"pattern\":\"1\"}"),
URLQueryItem(name: "page", value: "1"),
URLQueryItem(name: "per_page", value: "10"),
URLQueryItem(name: "sort_by", value: "ASC(last_modified_time)"),
URLQueryItem(name: "view_id", value: "23806000074760021")
]
let url = components.url!
var request = URLRequest(url: url)
request.httpMethod = "GET"
request.setValue("Bearer 1000.03xxxxxxxxxxxxxxxxxa5317.dxxxxxxxxxxxxxxxxxfa", forHTTPHeaderField: "Authorization")
let semaphore = DispatchSemaphore(value: 0)
let task = URLSession.shared.dataTask(with: request) { data, response, error in
if let data = data, let result = String(data: data, encoding: .utf8) {
print(result)
}
semaphore.signal()
}
task.resume()
semaphore.wait()
Sample Input
Sample Response
Possible Errors
Retrieve task lists associated with a specific project.
OAuth Scope:
ZohoProjects.tasklists.READ
String
requiredUnique, immutable identifier of the portal in Zoho Projects. You can obtain it from the Get Portals API (the "id" field in the response).
String
requiredUnique, immutable identifier of the project within the specified portal. You can obtain it from the Get Projects API (the "id" field in the response).
JSONObject
Enter the filter criteria.
int
default : 1Enter the page number to retrieve. Default: 1.
int
limit : 1-200Enter the number of entries to be displayed per page.
String
Enter the sort criteria. Accepted values: ASC(field_name) or DESC(field_name)
String
Enter the custom view ID. You can obtain it from the Get Task Custom Views API (the "id" field in the response).
Request Example
curl -X GET \
'https://projects.zoho.com/api/v3/portal/[PORTAL_ID]/projects/23806000097545166/tasklists?filter=%7B%22criteria%22%3A%5B%7B%22field_name%22%3A%22project%22%2C%22criteria_condition%22%3A%22contains%22%2C%22value%22%3A%5B%221752587000000097269%22%5D%2C%22module_name%22%3A%22task%22%7D%5D%2C%22pattern%22%3A%221%22%7D&page=1&per_page=10&sort_by=ASC%28last_modified_time%29&view_id=23806000074760021' \
-H 'Authorization: Bearer 1000.03xxxxxxxxxxxxxxxxxa5317.dxxxxxxxxxxxxxxxxxfa'
url = "https://projects.zoho.com/api/v3/portal/[PORTAL_ID]/projects/23806000097545166/tasklists";
filter_value = {"criteria":[{"field_name":"project","criteria_condition":"contains","value":["1752587000000097269"],"module_name":"task"}],"pattern":"1"};
params = Map();
params.put("filter", filter_value);
params.put("page", 1);
params.put("per_page", 10);
params.put("sort_by", "ASC(last_modified_time)");
params.put("view_id", "23806000074760021");
response = invokeUrl
[
url: url
type: GET
parameters: params
connection: "projects"
];
info response;
const https = require('https');
const url = new URL('https://projects.zoho.com/api/v3/portal/[PORTAL_ID]/projects/23806000097545166/tasklists');
url.searchParams.append('filter', '{"criteria":[{"field_name":"project","criteria_condition":"contains","value":["1752587000000097269"],"module_name":"task"}],"pattern":"1"}');
url.searchParams.append('page', '1');
url.searchParams.append('per_page', '10');
url.searchParams.append('sort_by', 'ASC(last_modified_time)');
url.searchParams.append('view_id', '23806000074760021');
const options = {
hostname: url.hostname,
path: url.pathname + url.search,
method: 'GET',
headers: {
'Authorization': 'Bearer 1000.03xxxxxxxxxxxxxxxxxa5317.dxxxxxxxxxxxxxxxxxfa'
}
};
const req = https.request(options, (res) => {
let data = '';
res.on('data', (chunk) => { data += chunk; });
res.on('end', () => { console.log(JSON.parse(data)); });
});
req.on('error', (err) => { console.error(err); });
req.end();
require 'net/http'
require 'uri'
require 'json'
url = URI("https://projects.zoho.com/api/v3/portal/[PORTAL_ID]/projects/23806000097545166/tasklists")
params = {
"filter" => "{\"criteria\":[{\"field_name\":\"project\",\"criteria_condition\":\"contains\",\"value\":[\"1752587000000097269\"],\"module_name\":\"task\"}],\"pattern\":\"1\"}",
"page" => "1",
"per_page" => "10",
"sort_by" => "ASC(last_modified_time)",
"view_id" => "23806000074760021"
}
url.query = URI.encode_www_form(params)
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["Authorization"] = "Bearer 1000.03xxxxxxxxxxxxxxxxxa5317.dxxxxxxxxxxxxxxxxxfa"
response = http.request(request)
puts response.read_body
<?php
$params = [
'filter' => '{"criteria":[{"field_name":"project","criteria_condition":"contains","value":["1752587000000097269"],"module_name":"task"}],"pattern":"1"}',
'page' => '1',
'per_page' => '10',
'sort_by' => 'ASC(last_modified_time)',
'view_id' => '23806000074760021',
];
$url = "https://projects.zoho.com/api/v3/portal/[PORTAL_ID]/projects/23806000097545166/tasklists" . "?" . http_build_query($params);
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => $url,
CURLOPT_RETURNTRANSFER => true,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"Authorization: Bearer 1000.03xxxxxxxxxxxxxxxxxa5317.dxxxxxxxxxxxxxxxxxfa"
],
]);
$response = curl_exec($curl);
curl_close($curl);
echo $response;
import requests
url = "https://projects.zoho.com/api/v3/portal/[PORTAL_ID]/projects/23806000097545166/tasklists"
params = {
"filter": "{\"criteria\":[{\"field_name\":\"project\",\"criteria_condition\":\"contains\",\"value\":[\"1752587000000097269\"],\"module_name\":\"task\"}],\"pattern\":\"1\"}",
"page": "1",
"per_page": "10",
"sort_by": "ASC(last_modified_time)",
"view_id": "23806000074760021"
}
headers = {
"Authorization": "Bearer 1000.03xxxxxxxxxxxxxxxxxa5317.dxxxxxxxxxxxxxxxxxfa",
}
response = requests.get(url, headers=headers, params=params)
print(response.json())
#include <stdio.h>
#include <string.h>
#include <curl/curl.h>
int main(void) {
CURL *curl = curl_easy_init();
if (curl) {
char *enc_filter = curl_easy_escape(curl, "{\"criteria\":[{\"field_name\":\"project\",\"criteria_condition\":\"contains\",\"value\":[\"1752587000000097269\"],\"module_name\":\"task\"}],\"pattern\":\"1\"}", 0);
char *enc_page = curl_easy_escape(curl, "1", 0);
char *enc_per_page = curl_easy_escape(curl, "10", 0);
char *enc_sort_by = curl_easy_escape(curl, "ASC(last_modified_time)", 0);
char *enc_view_id = curl_easy_escape(curl, "23806000074760021", 0);
char url[2048];
snprintf(url, sizeof(url), "https://projects.zoho.com/api/v3/portal/[PORTAL_ID]/projects/23806000097545166/tasklists?filter=%s&page=%s&per_page=%s&sort_by=%s&view_id=%s", enc_filter, enc_page, enc_per_page, enc_sort_by, enc_view_id);
struct curl_slist *headers = NULL;
headers = curl_slist_append(headers, "Authorization: Bearer 1000.03xxxxxxxxxxxxxxxxxa5317.dxxxxxxxxxxxxxxxxxfa");
curl_easy_setopt(curl, CURLOPT_URL, url);
curl_easy_setopt(curl, CURLOPT_HTTPHEADER, headers);
curl_easy_setopt(curl, CURLOPT_CUSTOMREQUEST, "GET");
CURLcode res = curl_easy_perform(curl);
if (res != CURLE_OK)
fprintf(stderr, "curl failed: %s\n", curl_easy_strerror(res));
curl_free(enc_filter);
curl_free(enc_page);
curl_free(enc_per_page);
curl_free(enc_sort_by);
curl_free(enc_view_id);
curl_slist_free_all(headers);
curl_easy_cleanup(curl);
}
return 0;
}
using System.Net.Http;
using System.Text;
using System.Web;
var client = new HttpClient();
client.DefaultRequestHeaders.Add("Authorization", "Bearer 1000.03xxxxxxxxxxxxxxxxxa5317.dxxxxxxxxxxxxxxxxxfa");
var query = HttpUtility.ParseQueryString(string.Empty);
query["filter"] = "{\"criteria\":[{\"field_name\":\"project\",\"criteria_condition\":\"contains\",\"value\":[\"1752587000000097269\"],\"module_name\":\"task\"}],\"pattern\":\"1\"}";
query["page"] = "1";
query["per_page"] = "10";
query["sort_by"] = "ASC(last_modified_time)";
query["view_id"] = "23806000074760021";
var uriBuilder = new UriBuilder("https://projects.zoho.com/api/v3/portal/[PORTAL_ID]/projects/23806000097545166/tasklists") { Query = query.ToString() };
var request = new HttpRequestMessage(HttpMethod.Get, uriBuilder.Uri);
var response = await client.SendAsync(request);
var body = await response.Content.ReadAsStringAsync();
Console.WriteLine(body);
#include <iostream>
#include <string>
#include <curl/curl.h>
static size_t WriteCallback(void* contents, size_t size, size_t nmemb, std::string* output) {
output->append((char*)contents, size * nmemb);
return size * nmemb;
}
int main() {
CURL* curl = curl_easy_init();
if (curl) {
std::string response;
char* enc_filter = curl_easy_escape(curl, "{\"criteria\":[{\"field_name\":\"project\",\"criteria_condition\":\"contains\",\"value\":[\"1752587000000097269\"],\"module_name\":\"task\"}],\"pattern\":\"1\"}", 0);
char* enc_page = curl_easy_escape(curl, "1", 0);
char* enc_per_page = curl_easy_escape(curl, "10", 0);
char* enc_sort_by = curl_easy_escape(curl, "ASC(last_modified_time)", 0);
char* enc_view_id = curl_easy_escape(curl, "23806000074760021", 0);
std::string url = "https://projects.zoho.com/api/v3/portal/[PORTAL_ID]/projects/23806000097545166/tasklists";
url += "?filter=" + std::string(enc_filter);
url += "&page=" + std::string(enc_page);
url += "&per_page=" + std::string(enc_per_page);
url += "&sort_by=" + std::string(enc_sort_by);
url += "&view_id=" + std::string(enc_view_id);
struct curl_slist* headers = NULL;
headers = curl_slist_append(headers, "Authorization: Bearer 1000.03xxxxxxxxxxxxxxxxxa5317.dxxxxxxxxxxxxxxxxxfa");
curl_easy_setopt(curl, CURLOPT_URL, url.c_str());
curl_easy_setopt(curl, CURLOPT_HTTPHEADER, headers);
curl_easy_setopt(curl, CURLOPT_CUSTOMREQUEST, "GET");
curl_easy_setopt(curl, CURLOPT_WRITEFUNCTION, WriteCallback);
curl_easy_setopt(curl, CURLOPT_WRITEDATA, &response);
CURLcode res = curl_easy_perform(curl);
if (res == CURLE_OK)
std::cout << response << std::endl;
else
std::cerr << curl_easy_strerror(res) << std::endl;
curl_free(enc_filter);
curl_free(enc_page);
curl_free(enc_per_page);
curl_free(enc_sort_by);
curl_free(enc_view_id);
curl_slist_free_all(headers);
curl_easy_cleanup(curl);
}
return 0;
}
(require '[clj-http.client :as client])
(let [enc-filter (java.net.URLEncoder/encode "{\"criteria\":[{\"field_name\":\"project\",\"criteria_condition\":\"contains\",\"value\":[\"1752587000000097269\"],\"module_name\":\"task\"}],\"pattern\":\"1\"}" "UTF-8")
enc-page (java.net.URLEncoder/encode "1" "UTF-8")
enc-per_page (java.net.URLEncoder/encode "10" "UTF-8")
enc-sort_by (java.net.URLEncoder/encode "ASC(last_modified_time)" "UTF-8")
enc-view_id (java.net.URLEncoder/encode "23806000074760021" "UTF-8")
url (str "https://projects.zoho.com/api/v3/portal/[PORTAL_ID]/projects/23806000097545166/tasklists" "?filter=" enc-filter "&page=" enc-page "&per_page=" enc-per_page "&sort_by=" enc-sort_by "&view_id=" enc-view_id)]
(def response
(client/get url
{:headers {"Authorization" "Bearer 1000.03xxxxxxxxxxxxxxxxxa5317.dxxxxxxxxxxxxxxxxxfa"}
:as :json}))
(println (:body response))
package main
import (
"fmt"
"io"
"net/http"
"net/url"
)
func main() {
req, _ := http.NewRequest("GET", "https://projects.zoho.com/api/v3/portal/[PORTAL_ID]/projects/23806000097545166/tasklists", nil)
q := req.URL.Query()
q.Add("filter", "{\"criteria\":[{\"field_name\":\"project\",\"criteria_condition\":\"contains\",\"value\":[\"1752587000000097269\"],\"module_name\":\"task\"}],\"pattern\":\"1\"}")
q.Add("page", "1")
q.Add("per_page", "10")
q.Add("sort_by", "ASC(last_modified_time)")
q.Add("view_id", "23806000074760021")
req.URL.RawQuery = q.Encode()
req.Header.Add("Authorization", "Bearer 1000.03xxxxxxxxxxxxxxxxxa5317.dxxxxxxxxxxxxxxxxxfa")
resp, _ := http.DefaultClient.Do(req)
defer resp.Body.Close()
body, _ := io.ReadAll(resp.Body)
fmt.Println(string(body))
}
GET https://projects.zoho.com/api/v3/portal/[PORTAL_ID]/projects/23806000097545166/tasklists?filter=%7B%22criteria%22%3A%5B%7B%22field_name%22%3A%22project%22%2C%22criteria_condition%22%3A%22contains%22%2C%22value%22%3A%5B%221752587000000097269%22%5D%2C%22module_name%22%3A%22task%22%7D%5D%2C%22pattern%22%3A%221%22%7D&page=1&per_page=10&sort_by=ASC%28last_modified_time%29&view_id=23806000074760021 HTTP/1.1
Host: https://projects.zoho.com/api/v3/portal/[PORTAL_ID]/projects/23806000097545166/tasklists?filter=%7B%22criteria%22%3A%5B%7B%22field_name%22%3A%22project%22%2C%22criteria_condition%22%3A%22contains%22%2C%22value%22%3A%5B%221752587000000097269%22%5D%2C%22module_name%22%3A%22task%22%7D%5D%2C%22pattern%22%3A%221%22%7D&page=1&per_page=10&sort_by=ASC%28last_modified_time%29&view_id=23806000074760021
Authorization: Bearer 1000.03xxxxxxxxxxxxxxxxxa5317.dxxxxxxxxxxxxxxxxxfa
HttpClientBuilder httpClientBuilder = HttpClientBuilder.create();
SSLContext sslContext = SSLContext.getDefault();
SSLConnectionSocketFactory sslConnectionSocketFactory = new SSLConnectionSocketFactory(sslContext, NoopHostnameVerifier.INSTANCE);
CloseableHttpClient httpclient = httpClientBuilder.setSSLSocketFactory(sslConnectionSocketFactory).build();
URIBuilder uriBuilder = new URIBuilder("https://projects.zoho.com/api/v3/portal/[PORTAL_ID]/projects/23806000097545166/tasklists");
uriBuilder.addParameter("filter", "{\"criteria\":[{\"field_name\":\"project\",\"criteria_condition\":\"contains\",\"value\":[\"1752587000000097269\"],\"module_name\":\"task\"}],\"pattern\":\"1\"}");
uriBuilder.addParameter("page", "1");
uriBuilder.addParameter("per_page", "10");
uriBuilder.addParameter("sort_by", "ASC(last_modified_time)");
uriBuilder.addParameter("view_id", "23806000074760021");
HttpUriRequest requestObj = new HttpGet(uriBuilder.build());
requestObj.addHeader("Authorization", "Bearer 1000.03xxxxxxxxxxxxxxxxxa5317.dxxxxxxxxxxxxxxxxxfa");
HttpResponse response = httpclient.execute(requestObj);
HttpEntity responseEntity = response.getEntity();
Object responseObject = EntityUtils.toString(responseEntity);
String responseString = responseObject.toString();
const url = 'https://projects.zoho.com/api/v3/portal/[PORTAL_ID]/projects/23806000097545166/tasklists';
const params = new URLSearchParams({
'filter': '{"criteria":[{"field_name":"project","criteria_condition":"contains","value":["1752587000000097269"],"module_name":"task"}],"pattern":"1"}',
'page': '1',
'per_page': '10',
'sort_by': 'ASC(last_modified_time)',
'view_id': '23806000074760021'
});
const options = {
method: 'GET',
headers: {
'Authorization': 'Bearer 1000.03xxxxxxxxxxxxxxxxxa5317.dxxxxxxxxxxxxxxxxxfa'
}
};
fetch(url + '?' + params.toString(), options)
.then(response => response.json())
.then(data => console.log(data))
.catch(error => console.error(error));
filter = {"criteria":[{"field_name":"project","criteria_condition":"contains","value":["1752587000000097269"],"module_name":"task"}],"pattern":"1"}
page = 1
per_page = 10
sort_by = "ASC(last_modified_time)"
view_id = "23806000074760021"import java.net.HttpURLConnection
import java.net.URL
import okhttp3.HttpUrl.Companion.toHttpUrl
fun main() {
val urlBuilder = "https://projects.zoho.com/api/v3/portal/[PORTAL_ID]/projects/23806000097545166/tasklists".toHttpUrl().newBuilder()
urlBuilder.addQueryParameter("filter", "{\"criteria\":[{\"field_name\":\"project\",\"criteria_condition\":\"contains\",\"value\":[\"1752587000000097269\"],\"module_name\":\"task\"}],\"pattern\":\"1\"}")
urlBuilder.addQueryParameter("page", "1")
urlBuilder.addQueryParameter("per_page", "10")
urlBuilder.addQueryParameter("sort_by", "ASC(last_modified_time)")
urlBuilder.addQueryParameter("view_id", "23806000074760021")
val url = URL(urlBuilder.build().toString())
val conn = url.openConnection() as HttpURLConnection
conn.requestMethod = "GET"
conn.setRequestProperty("Authorization", "Bearer 1000.03xxxxxxxxxxxxxxxxxa5317.dxxxxxxxxxxxxxxxxxfa")
val response = conn.inputStream.bufferedReader().readText()
println(response)
}
NSString *encodedFilter = [@"{\"criteria\":[{\"field_name\":\"project\",\"criteria_condition\":\"contains\",\"value\":[\"1752587000000097269\"],\"module_name\":\"task\"}],\"pattern\":\"1\"}" stringByAddingPercentEncodingWithAllowedCharacters:[NSCharacterSet URLQueryAllowedCharacterSet]];
NSString *encodedPage = [@"1" stringByAddingPercentEncodingWithAllowedCharacters:[NSCharacterSet URLQueryAllowedCharacterSet]];
NSString *encodedPer_page = [@"10" stringByAddingPercentEncodingWithAllowedCharacters:[NSCharacterSet URLQueryAllowedCharacterSet]];
NSString *encodedSort_by = [@"ASC(last_modified_time)" stringByAddingPercentEncodingWithAllowedCharacters:[NSCharacterSet URLQueryAllowedCharacterSet]];
NSString *encodedView_id = [@"23806000074760021" stringByAddingPercentEncodingWithAllowedCharacters:[NSCharacterSet URLQueryAllowedCharacterSet]];
NSString *urlString = [NSString stringWithFormat:@"https://projects.zoho.com/api/v3/portal/[PORTAL_ID]/projects/23806000097545166/tasklists?filter=%@&page=%@&per_page=%@&sort_by=%@&view_id=%@", encodedFilter, encodedPage, encodedPer_page, encodedSort_by, encodedView_id];
NSURL *url = [NSURL URLWithString:urlString];
NSMutableURLRequest *request = [NSMutableURLRequest requestWithURL:url];
[request setHTTPMethod:@"GET"];
[request setValue:@"Bearer 1000.03xxxxxxxxxxxxxxxxxa5317.dxxxxxxxxxxxxxxxxxfa" forHTTPHeaderField:@"Authorization"];
NSURLSession *session = [NSURLSession sharedSession];
NSURLSessionDataTask *task = [session dataTaskWithRequest:request
completionHandler:^(NSData *data, NSURLResponse *response, NSError *error) {
NSString *result = [[NSString alloc] initWithData:data encoding:NSUTF8StringEncoding];
NSLog(@"%@", result);
}];
[task resume];
open Lwt
open Cohttp_lwt_unix
let () =
let enc_filter = Uri.pct_encode "{\"criteria\":[{\"field_name\":\"project\",\"criteria_condition\":\"contains\",\"value\":[\"1752587000000097269\"],\"module_name\":\"task\"}],\"pattern\":\"1\"}" in
let enc_page = Uri.pct_encode "1" in
let enc_per_page = Uri.pct_encode "10" in
let enc_sort_by = Uri.pct_encode "ASC(last_modified_time)" in
let enc_view_id = Uri.pct_encode "23806000074760021" in
let uri = Uri.of_string ("https://projects.zoho.com/api/v3/portal/[PORTAL_ID]/projects/23806000097545166/tasklists" ^ "?filter=" ^ enc_filter ^ "&page=" ^ enc_page ^ "&per_page=" ^ enc_per_page ^ "&sort_by=" ^ enc_sort_by ^ "&view_id=" ^ enc_view_id) in
let headers = Cohttp.Header.init ()
|> fun h -> Cohttp.Header.add h "Authorization" "Bearer 1000.03xxxxxxxxxxxxxxxxxa5317.dxxxxxxxxxxxxxxxxxfa"
in
Lwt_main.run (
Client.get ~headers uri >>= fun (_, body) ->
Cohttp_lwt.Body.to_string body >|= fun s ->
print_endline s)
$headers = @{
"Authorization" = "Bearer 1000.03xxxxxxxxxxxxxxxxxa5317.dxxxxxxxxxxxxxxxxxfa"
}
$params = @{
filter = "{`"criteria`":[{`"field_name`":`"project`",`"criteria_condition`":`"contains`",`"value`":[`"1752587000000097269`"],`"module_name`":`"task`"}],`"pattern`":`"1`"}"
page = "1"
per_page = "10"
sort_by = "ASC(last_modified_time)"
view_id = "23806000074760021"
}
$queryString = ($params.GetEnumerator() | ForEach-Object { "$($_.Key)=$([System.Uri]::EscapeDataString($_.Value))" }) -join "&"
$url = "https://projects.zoho.com/api/v3/portal/[PORTAL_ID]/projects/23806000097545166/tasklists" + "?" + $queryString
$response = Invoke-RestMethod -Uri $url -Method GET -Headers $headers
$response | ConvertTo-Json
library(httr)
url <- "https://projects.zoho.com/api/v3/portal/[PORTAL_ID]/projects/23806000097545166/tasklists"
params <- list(
filter = "{\"criteria\":[{\"field_name\":\"project\",\"criteria_condition\":\"contains\",\"value\":[\"1752587000000097269\"],\"module_name\":\"task\"}],\"pattern\":\"1\"}",
page = "1",
per_page = "10",
sort_by = "ASC(last_modified_time)",
view_id = "23806000074760021"
)
response <- GET(
url,
add_headers(Authorization = "Bearer 1000.03xxxxxxxxxxxxxxxxxa5317.dxxxxxxxxxxxxxxxxxfa"),
query = params
)
content(response, "text")
import Foundation
var components = URLComponents(string: "https://projects.zoho.com/api/v3/portal/[PORTAL_ID]/projects/23806000097545166/tasklists")!
components.queryItems = [
URLQueryItem(name: "filter", value: "{\"criteria\":[{\"field_name\":\"project\",\"criteria_condition\":\"contains\",\"value\":[\"1752587000000097269\"],\"module_name\":\"task\"}],\"pattern\":\"1\"}"),
URLQueryItem(name: "page", value: "1"),
URLQueryItem(name: "per_page", value: "10"),
URLQueryItem(name: "sort_by", value: "ASC(last_modified_time)"),
URLQueryItem(name: "view_id", value: "23806000074760021")
]
let url = components.url!
var request = URLRequest(url: url)
request.httpMethod = "GET"
request.setValue("Bearer 1000.03xxxxxxxxxxxxxxxxxa5317.dxxxxxxxxxxxxxxxxxfa", forHTTPHeaderField: "Authorization")
let semaphore = DispatchSemaphore(value: 0)
let task = URLSession.shared.dataTask(with: request) { data, response, error in
if let data = data, let result = String(data: data, encoding: .utf8) {
print(result)
}
semaphore.signal()
}
task.resume()
semaphore.wait()
Sample Input
Sample Response
Possible Errors
Retrieve the details of a specific task list. Use this API to fetch metadata and configuration of a task list within a project.
OAuth Scope:
ZohoProjects.tasklists.READ
String
requiredUnique, immutable identifier of the portal in Zoho Projects. You can obtain it from the Get Portals API (the "id" field in the response).
String
requiredUnique, immutable identifier of the project within the specified portal. You can obtain it from the Get Projects API (the "id" field in the response).
String
requiredIdentifier of a tasklist. Obtained from the Get Tasklists API - the "id" field in the response corresponds to tasklist_id.
Request Example
curl -X GET \
'https://projects.zoho.com/api/v3/portal/[PORTAL_ID]/projects/23806000097545166/tasklists/[TASKLIST_ID]' \
-H 'Authorization: Bearer 1000.03xxxxxxxxxxxxxxxxxa5317.dxxxxxxxxxxxxxxxxxfa'
url = "https://projects.zoho.com/api/v3/portal/[PORTAL_ID]/projects/23806000097545166/tasklists/[TASKLIST_ID]";
response = invokeUrl
[
url: url
type: GET
connection: "projects"
];
info response;
const https = require('https');
const url = new URL('https://projects.zoho.com/api/v3/portal/[PORTAL_ID]/projects/23806000097545166/tasklists/[TASKLIST_ID]');
const options = {
hostname: url.hostname,
path: url.pathname + url.search,
method: 'GET',
headers: {
'Authorization': 'Bearer 1000.03xxxxxxxxxxxxxxxxxa5317.dxxxxxxxxxxxxxxxxxfa'
}
};
const req = https.request(options, (res) => {
let data = '';
res.on('data', (chunk) => { data += chunk; });
res.on('end', () => { console.log(JSON.parse(data)); });
});
req.on('error', (err) => { console.error(err); });
req.end();
require 'net/http'
require 'uri'
require 'json'
url = URI("https://projects.zoho.com/api/v3/portal/[PORTAL_ID]/projects/23806000097545166/tasklists/[TASKLIST_ID]")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["Authorization"] = "Bearer 1000.03xxxxxxxxxxxxxxxxxa5317.dxxxxxxxxxxxxxxxxxfa"
response = http.request(request)
puts response.read_body
<?php
$url = "https://projects.zoho.com/api/v3/portal/[PORTAL_ID]/projects/23806000097545166/tasklists/[TASKLIST_ID]";
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => $url,
CURLOPT_RETURNTRANSFER => true,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"Authorization: Bearer 1000.03xxxxxxxxxxxxxxxxxa5317.dxxxxxxxxxxxxxxxxxfa"
],
]);
$response = curl_exec($curl);
curl_close($curl);
echo $response;
import requests
url = "https://projects.zoho.com/api/v3/portal/[PORTAL_ID]/projects/23806000097545166/tasklists/[TASKLIST_ID]"
headers = {
"Authorization": "Bearer 1000.03xxxxxxxxxxxxxxxxxa5317.dxxxxxxxxxxxxxxxxxfa",
}
response = requests.get(url, headers=headers)
print(response.json())
#include <stdio.h>
#include <string.h>
#include <curl/curl.h>
int main(void) {
CURL *curl = curl_easy_init();
if (curl) {
struct curl_slist *headers = NULL;
headers = curl_slist_append(headers, "Authorization: Bearer 1000.03xxxxxxxxxxxxxxxxxa5317.dxxxxxxxxxxxxxxxxxfa");
curl_easy_setopt(curl, CURLOPT_URL, "https://projects.zoho.com/api/v3/portal/[PORTAL_ID]/projects/23806000097545166/tasklists/[TASKLIST_ID]");
curl_easy_setopt(curl, CURLOPT_HTTPHEADER, headers);
curl_easy_setopt(curl, CURLOPT_CUSTOMREQUEST, "GET");
CURLcode res = curl_easy_perform(curl);
if (res != CURLE_OK)
fprintf(stderr, "curl failed: %s\n", curl_easy_strerror(res));
curl_slist_free_all(headers);
curl_easy_cleanup(curl);
}
return 0;
}
using System.Net.Http;
using System.Text;
using System.Web;
var client = new HttpClient();
client.DefaultRequestHeaders.Add("Authorization", "Bearer 1000.03xxxxxxxxxxxxxxxxxa5317.dxxxxxxxxxxxxxxxxxfa");
var request = new HttpRequestMessage(HttpMethod.Get, "https://projects.zoho.com/api/v3/portal/[PORTAL_ID]/projects/23806000097545166/tasklists/[TASKLIST_ID]");
var response = await client.SendAsync(request);
var body = await response.Content.ReadAsStringAsync();
Console.WriteLine(body);
#include <iostream>
#include <string>
#include <curl/curl.h>
static size_t WriteCallback(void* contents, size_t size, size_t nmemb, std::string* output) {
output->append((char*)contents, size * nmemb);
return size * nmemb;
}
int main() {
CURL* curl = curl_easy_init();
if (curl) {
std::string response;
struct curl_slist* headers = NULL;
headers = curl_slist_append(headers, "Authorization: Bearer 1000.03xxxxxxxxxxxxxxxxxa5317.dxxxxxxxxxxxxxxxxxfa");
curl_easy_setopt(curl, CURLOPT_URL, "https://projects.zoho.com/api/v3/portal/[PORTAL_ID]/projects/23806000097545166/tasklists/[TASKLIST_ID]");
curl_easy_setopt(curl, CURLOPT_HTTPHEADER, headers);
curl_easy_setopt(curl, CURLOPT_CUSTOMREQUEST, "GET");
curl_easy_setopt(curl, CURLOPT_WRITEFUNCTION, WriteCallback);
curl_easy_setopt(curl, CURLOPT_WRITEDATA, &response);
CURLcode res = curl_easy_perform(curl);
if (res == CURLE_OK)
std::cout << response << std::endl;
else
std::cerr << curl_easy_strerror(res) << std::endl;
curl_slist_free_all(headers);
curl_easy_cleanup(curl);
}
return 0;
}
(require '[clj-http.client :as client])
(def response
(client/get "https://projects.zoho.com/api/v3/portal/[PORTAL_ID]/projects/23806000097545166/tasklists/[TASKLIST_ID]"
{:headers {"Authorization" "Bearer 1000.03xxxxxxxxxxxxxxxxxa5317.dxxxxxxxxxxxxxxxxxfa"}
:as :json}))
(println (:body response))
package main
import (
"fmt"
"io"
"net/http"
)
func main() {
req, _ := http.NewRequest("GET", "https://projects.zoho.com/api/v3/portal/[PORTAL_ID]/projects/23806000097545166/tasklists/[TASKLIST_ID]", nil)
req.Header.Add("Authorization", "Bearer 1000.03xxxxxxxxxxxxxxxxxa5317.dxxxxxxxxxxxxxxxxxfa")
resp, _ := http.DefaultClient.Do(req)
defer resp.Body.Close()
body, _ := io.ReadAll(resp.Body)
fmt.Println(string(body))
}
GET https://projects.zoho.com/api/v3/portal/[PORTAL_ID]/projects/23806000097545166/tasklists/[TASKLIST_ID] HTTP/1.1
Host: https://projects.zoho.com/api/v3/portal/[PORTAL_ID]/projects/23806000097545166/tasklists/[TASKLIST_ID]
Authorization: Bearer 1000.03xxxxxxxxxxxxxxxxxa5317.dxxxxxxxxxxxxxxxxxfa
HttpClientBuilder httpClientBuilder = HttpClientBuilder.create();
SSLContext sslContext = SSLContext.getDefault();
SSLConnectionSocketFactory sslConnectionSocketFactory = new SSLConnectionSocketFactory(sslContext, NoopHostnameVerifier.INSTANCE);
CloseableHttpClient httpclient = httpClientBuilder.setSSLSocketFactory(sslConnectionSocketFactory).build();
URIBuilder uriBuilder = new URIBuilder("https://projects.zoho.com/api/v3/portal/[PORTAL_ID]/projects/23806000097545166/tasklists/[TASKLIST_ID]");
HttpUriRequest requestObj = new HttpGet(uriBuilder.build());
requestObj.addHeader("Authorization", "Bearer 1000.03xxxxxxxxxxxxxxxxxa5317.dxxxxxxxxxxxxxxxxxfa");
HttpResponse response = httpclient.execute(requestObj);
HttpEntity responseEntity = response.getEntity();
Object responseObject = EntityUtils.toString(responseEntity);
String responseString = responseObject.toString();
const url = 'https://projects.zoho.com/api/v3/portal/[PORTAL_ID]/projects/23806000097545166/tasklists/[TASKLIST_ID]';
const options = {
method: 'GET',
headers: {
'Authorization': 'Bearer 1000.03xxxxxxxxxxxxxxxxxa5317.dxxxxxxxxxxxxxxxxxfa'
}
};
fetch(url, options)
.then(response => response.json())
.then(data => console.log(data))
.catch(error => console.error(error));
import java.net.HttpURLConnection
import java.net.URL
import okhttp3.HttpUrl.Companion.toHttpUrl
fun main() {
val url = URL("https://projects.zoho.com/api/v3/portal/[PORTAL_ID]/projects/23806000097545166/tasklists/[TASKLIST_ID]")
val conn = url.openConnection() as HttpURLConnection
conn.requestMethod = "GET"
conn.setRequestProperty("Authorization", "Bearer 1000.03xxxxxxxxxxxxxxxxxa5317.dxxxxxxxxxxxxxxxxxfa")
val response = conn.inputStream.bufferedReader().readText()
println(response)
}
NSURL *url = [NSURL URLWithString:@"https://projects.zoho.com/api/v3/portal/[PORTAL_ID]/projects/23806000097545166/tasklists/[TASKLIST_ID]"];
NSMutableURLRequest *request = [NSMutableURLRequest requestWithURL:url];
[request setHTTPMethod:@"GET"];
[request setValue:@"Bearer 1000.03xxxxxxxxxxxxxxxxxa5317.dxxxxxxxxxxxxxxxxxfa" forHTTPHeaderField:@"Authorization"];
NSURLSession *session = [NSURLSession sharedSession];
NSURLSessionDataTask *task = [session dataTaskWithRequest:request
completionHandler:^(NSData *data, NSURLResponse *response, NSError *error) {
NSString *result = [[NSString alloc] initWithData:data encoding:NSUTF8StringEncoding];
NSLog(@"%@", result);
}];
[task resume];
open Lwt
open Cohttp_lwt_unix
let () =
let uri = Uri.of_string "https://projects.zoho.com/api/v3/portal/[PORTAL_ID]/projects/23806000097545166/tasklists/[TASKLIST_ID]" in
let headers = Cohttp.Header.init ()
|> fun h -> Cohttp.Header.add h "Authorization" "Bearer 1000.03xxxxxxxxxxxxxxxxxa5317.dxxxxxxxxxxxxxxxxxfa"
in
Lwt_main.run (
Client.get ~headers uri >>= fun (_, body) ->
Cohttp_lwt.Body.to_string body >|= fun s ->
print_endline s)
$headers = @{
"Authorization" = "Bearer 1000.03xxxxxxxxxxxxxxxxxa5317.dxxxxxxxxxxxxxxxxxfa"
}
$response = Invoke-RestMethod -Uri "https://projects.zoho.com/api/v3/portal/[PORTAL_ID]/projects/23806000097545166/tasklists/[TASKLIST_ID]" -Method GET -Headers $headers
$response | ConvertTo-Json
library(httr)
url <- "https://projects.zoho.com/api/v3/portal/[PORTAL_ID]/projects/23806000097545166/tasklists/[TASKLIST_ID]"
response <- GET(
url,
add_headers(Authorization = "Bearer 1000.03xxxxxxxxxxxxxxxxxa5317.dxxxxxxxxxxxxxxxxxfa")
)
content(response, "text")
import Foundation
let url = URL(string: "https://projects.zoho.com/api/v3/portal/[PORTAL_ID]/projects/23806000097545166/tasklists/[TASKLIST_ID]")!
var request = URLRequest(url: url)
request.httpMethod = "GET"
request.setValue("Bearer 1000.03xxxxxxxxxxxxxxxxxa5317.dxxxxxxxxxxxxxxxxxfa", forHTTPHeaderField: "Authorization")
let semaphore = DispatchSemaphore(value: 0)
let task = URLSession.shared.dataTask(with: request) { data, response, error in
if let data = data, let result = String(data: data, encoding: .utf8) {
print(result)
}
semaphore.signal()
}
task.resume()
semaphore.wait()
Sample Response
Add a Task list to the project.
OAuth Scope:
ZohoProjects.tasklists.CREATE
String
requiredUnique, immutable identifier of the portal in Zoho Projects. You can obtain it from the Get Portals API (the "id" field in the response).
String
requiredUnique, immutable identifier of the project within the specified portal. You can obtain it from the Get Projects API (the "id" field in the response).
String
requiredEnter the name of the task list
JSONObject
Enter the associated milestone ID.
String
max length : 100Set the task list flag. Accepted values: internal,external .
String
max length : 100Specify the status of the task list. Accepted values: active or completed.
JSONArray
max length : 10000Specify the tags to associate with this task list. Use add to attach new tags or remove to detach existing ones.
Request Example
curl -X POST \
'https://projects.zoho.com/api/v3/portal/[PORTAL_ID]/projects/23806000097545166/tasklists' \
-H 'Authorization: Bearer 1000.03xxxxxxxxxxxxxxxxxa5317.dxxxxxxxxxxxxxxxxxfa' \
-H 'Content-Type: application/json' \
-d '{"name":"Tasklist","milestone":{"id":"4000000062001"},"flag":"internal","status":"active","tags":[{"add":[{"id":"4000000062001"}],"remove":[{"id":"4000000062001"}],"id":"4000000062001"}]}'
url = "https://projects.zoho.com/api/v3/portal/[PORTAL_ID]/projects/23806000097545166/tasklists";
params = Map();
params.put("name", "Tasklist");
params.put("milestone", {"id":"4000000062001"});
params.put("flag", "internal");
params.put("status", "active");
params.put("tags", [{"add":[{"id":"4000000062001"}],"remove":[{"id":"4000000062001"}],"id":"4000000062001"}]);
response = invokeUrl
[
url: url
type: POST
parameters: params.toString()
connection: "projects"
];
info response;
const https = require('https');
const url = new URL('https://projects.zoho.com/api/v3/portal/[PORTAL_ID]/projects/23806000097545166/tasklists');
const payload = JSON.stringify({"name":"Tasklist","milestone":{"id":"4000000062001"},"flag":"internal","status":"active","tags":[{"add":[{"id":"4000000062001"}],"remove":[{"id":"4000000062001"}],"id":"4000000062001"}]});
const options = {
hostname: url.hostname,
path: url.pathname + url.search,
method: 'POST',
headers: {
'Authorization': 'Bearer 1000.03xxxxxxxxxxxxxxxxxa5317.dxxxxxxxxxxxxxxxxxfa',
'Content-Type': 'application/json',
'Content-Length': Buffer.byteLength(payload)
}
};
const req = https.request(options, (res) => {
let data = '';
res.on('data', (chunk) => { data += chunk; });
res.on('end', () => { console.log(JSON.parse(data)); });
});
req.on('error', (err) => { console.error(err); });
req.write(payload);
req.end();
require 'net/http'
require 'uri'
require 'json'
url = URI("https://projects.zoho.com/api/v3/portal/[PORTAL_ID]/projects/23806000097545166/tasklists")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = "Bearer 1000.03xxxxxxxxxxxxxxxxxa5317.dxxxxxxxxxxxxxxxxxfa"
request["Content-Type"] = "application/json"
request.body = '{"name":"Tasklist","milestone":{"id":"4000000062001"},"flag":"internal","status":"active","tags":[{"add":[{"id":"4000000062001"}],"remove":[{"id":"4000000062001"}],"id":"4000000062001"}]}'
response = http.request(request)
puts response.read_body
<?php
$url = "https://projects.zoho.com/api/v3/portal/[PORTAL_ID]/projects/23806000097545166/tasklists";
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => $url,
CURLOPT_RETURNTRANSFER => true,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => '{"name":"Tasklist","milestone":{"id":"4000000062001"},"flag":"internal","status":"active","tags":[{"add":[{"id":"4000000062001"}],"remove":[{"id":"4000000062001"}],"id":"4000000062001"}]}',
CURLOPT_HTTPHEADER => [
"Authorization: Bearer 1000.03xxxxxxxxxxxxxxxxxa5317.dxxxxxxxxxxxxxxxxxfa",
"Content-Type: application/json"
],
]);
$response = curl_exec($curl);
curl_close($curl);
echo $response;
import requests
url = "https://projects.zoho.com/api/v3/portal/[PORTAL_ID]/projects/23806000097545166/tasklists"
headers = {
"Authorization": "Bearer 1000.03xxxxxxxxxxxxxxxxxa5317.dxxxxxxxxxxxxxxxxxfa",
"Content-Type": "application/json",
}
payload = '{"name":"Tasklist","milestone":{"id":"4000000062001"},"flag":"internal","status":"active","tags":[{"add":[{"id":"4000000062001"}],"remove":[{"id":"4000000062001"}],"id":"4000000062001"}]}'
response = requests.post(url, headers=headers, data=payload)
print(response.json())
#include <stdio.h>
#include <string.h>
#include <curl/curl.h>
int main(void) {
CURL *curl = curl_easy_init();
if (curl) {
struct curl_slist *headers = NULL;
headers = curl_slist_append(headers, "Authorization: Bearer 1000.03xxxxxxxxxxxxxxxxxa5317.dxxxxxxxxxxxxxxxxxfa");
headers = curl_slist_append(headers, "Content-Type: application/json");
curl_easy_setopt(curl, CURLOPT_URL, "https://projects.zoho.com/api/v3/portal/[PORTAL_ID]/projects/23806000097545166/tasklists");
curl_easy_setopt(curl, CURLOPT_HTTPHEADER, headers);
curl_easy_setopt(curl, CURLOPT_CUSTOMREQUEST, "POST");
curl_easy_setopt(curl, CURLOPT_POSTFIELDS, "{\"name\":\"Tasklist\",\"milestone\":{\"id\":\"4000000062001\"},\"flag\":\"internal\",\"status\":\"active\",\"tags\":[{\"add\":[{\"id\":\"4000000062001\"}],\"remove\":[{\"id\":\"4000000062001\"}],\"id\":\"4000000062001\"}]}");
CURLcode res = curl_easy_perform(curl);
if (res != CURLE_OK)
fprintf(stderr, "curl failed: %s\n", curl_easy_strerror(res));
curl_slist_free_all(headers);
curl_easy_cleanup(curl);
}
return 0;
}
using System.Net.Http;
using System.Text;
using System.Web;
var client = new HttpClient();
client.DefaultRequestHeaders.Add("Authorization", "Bearer 1000.03xxxxxxxxxxxxxxxxxa5317.dxxxxxxxxxxxxxxxxxfa");
var request = new HttpRequestMessage(HttpMethod.Post, "https://projects.zoho.com/api/v3/portal/[PORTAL_ID]/projects/23806000097545166/tasklists");
request.Content = new StringContent(
@"{""name"":""Tasklist"",""milestone"":{""id"":""4000000062001""},""flag"":""internal"",""status"":""active"",""tags"":[{""add"":[{""id"":""4000000062001""}],""remove"":[{""id"":""4000000062001""}],""id"":""4000000062001""}]}",
Encoding.UTF8,
"application/json"
);
var response = await client.SendAsync(request);
var body = await response.Content.ReadAsStringAsync();
Console.WriteLine(body);
#include <iostream>
#include <string>
#include <curl/curl.h>
static size_t WriteCallback(void* contents, size_t size, size_t nmemb, std::string* output) {
output->append((char*)contents, size * nmemb);
return size * nmemb;
}
int main() {
CURL* curl = curl_easy_init();
if (curl) {
std::string response;
struct curl_slist* headers = NULL;
headers = curl_slist_append(headers, "Authorization: Bearer 1000.03xxxxxxxxxxxxxxxxxa5317.dxxxxxxxxxxxxxxxxxfa");
headers = curl_slist_append(headers, "Content-Type: application/json");
curl_easy_setopt(curl, CURLOPT_URL, "https://projects.zoho.com/api/v3/portal/[PORTAL_ID]/projects/23806000097545166/tasklists");
curl_easy_setopt(curl, CURLOPT_HTTPHEADER, headers);
curl_easy_setopt(curl, CURLOPT_CUSTOMREQUEST, "POST");
curl_easy_setopt(curl, CURLOPT_WRITEFUNCTION, WriteCallback);
curl_easy_setopt(curl, CURLOPT_WRITEDATA, &response);
curl_easy_setopt(curl, CURLOPT_POSTFIELDS, "{\"name\":\"Tasklist\",\"milestone\":{\"id\":\"4000000062001\"},\"flag\":\"internal\",\"status\":\"active\",\"tags\":[{\"add\":[{\"id\":\"4000000062001\"}],\"remove\":[{\"id\":\"4000000062001\"}],\"id\":\"4000000062001\"}]}");
CURLcode res = curl_easy_perform(curl);
if (res == CURLE_OK)
std::cout << response << std::endl;
else
std::cerr << curl_easy_strerror(res) << std::endl;
curl_slist_free_all(headers);
curl_easy_cleanup(curl);
}
return 0;
}
(require '[clj-http.client :as client])
(def response
(client/post "https://projects.zoho.com/api/v3/portal/[PORTAL_ID]/projects/23806000097545166/tasklists"
{:headers {"Authorization" "Bearer 1000.03xxxxxxxxxxxxxxxxxa5317.dxxxxxxxxxxxxxxxxxfa"
"Content-Type" "application/json"}
:body "{\"name\":\"Tasklist\",\"milestone\":{\"id\":\"4000000062001\"},\"flag\":\"internal\",\"status\":\"active\",\"tags\":[{\"add\":[{\"id\":\"4000000062001\"}],\"remove\":[{\"id\":\"4000000062001\"}],\"id\":\"4000000062001\"}]}"
:as :json}))
(println (:body response))
package main
import (
"fmt"
"io"
"net/http"
"strings"
)
func main() {
payload := strings.NewReader("{\"name\":\"Tasklist\",\"milestone\":{\"id\":\"4000000062001\"},\"flag\":\"internal\",\"status\":\"active\",\"tags\":[{\"add\":[{\"id\":\"4000000062001\"}],\"remove\":[{\"id\":\"4000000062001\"}],\"id\":\"4000000062001\"}]}")
req, _ := http.NewRequest("POST", "https://projects.zoho.com/api/v3/portal/[PORTAL_ID]/projects/23806000097545166/tasklists", payload)
req.Header.Add("Authorization", "Bearer 1000.03xxxxxxxxxxxxxxxxxa5317.dxxxxxxxxxxxxxxxxxfa")
req.Header.Add("Content-Type", "application/json")
resp, _ := http.DefaultClient.Do(req)
defer resp.Body.Close()
body, _ := io.ReadAll(resp.Body)
fmt.Println(string(body))
}
POST https://projects.zoho.com/api/v3/portal/[PORTAL_ID]/projects/23806000097545166/tasklists HTTP/1.1
Host: https://projects.zoho.com/api/v3/portal/[PORTAL_ID]/projects/23806000097545166/tasklists
Authorization: Bearer 1000.03xxxxxxxxxxxxxxxxxa5317.dxxxxxxxxxxxxxxxxxfa
Content-Type: application/json
{"name":"Tasklist","milestone":{"id":"4000000062001"},"flag":"internal","status":"active","tags":[{"add":[{"id":"4000000062001"}],"remove":[{"id":"4000000062001"}],"id":"4000000062001"}]}
HttpClientBuilder httpClientBuilder = HttpClientBuilder.create();
SSLContext sslContext = SSLContext.getDefault();
SSLConnectionSocketFactory sslConnectionSocketFactory = new SSLConnectionSocketFactory(sslContext, NoopHostnameVerifier.INSTANCE);
CloseableHttpClient httpclient = httpClientBuilder.setSSLSocketFactory(sslConnectionSocketFactory).build();
URIBuilder uriBuilder = new URIBuilder("https://projects.zoho.com/api/v3/portal/[PORTAL_ID]/projects/23806000097545166/tasklists");
HttpUriRequest requestObj = new HttpPost(uriBuilder.build());
requestObj.addHeader("Authorization", "Bearer 1000.03xxxxxxxxxxxxxxxxxa5317.dxxxxxxxxxxxxxxxxxfa");
HttpEntityEnclosingRequestBase requestBase = (HttpEntityEnclosingRequestBase) requestObj;
String requestBody = "{\"name\":\"Tasklist\",\"milestone\":{\"id\":\"4000000062001\"},\"flag\":\"internal\",\"status\":\"active\",\"tags\":[{\"add\":[{\"id\":\"4000000062001\"}],\"remove\":[{\"id\":\"4000000062001\"}],\"id\":\"4000000062001\"}]}";
requestBase.setEntity(new StringEntity(requestBody, HTTP.UTF_8));
HttpResponse response = httpclient.execute(requestObj);
HttpEntity responseEntity = response.getEntity();
Object responseObject = EntityUtils.toString(responseEntity);
String responseString = responseObject.toString();
const url = 'https://projects.zoho.com/api/v3/portal/[PORTAL_ID]/projects/23806000097545166/tasklists';
const options = {
method: 'POST',
headers: {
'Authorization': 'Bearer 1000.03xxxxxxxxxxxxxxxxxa5317.dxxxxxxxxxxxxxxxxxfa',
'Content-Type': 'application/json'
},
body: JSON.stringify({"name":"Tasklist","milestone":{"id":"4000000062001"},"flag":"internal","status":"active","tags":[{"add":[{"id":"4000000062001"}],"remove":[{"id":"4000000062001"}],"id":"4000000062001"}]})
};
fetch(url, options)
.then(response => response.json())
.then(data => console.log(data))
.catch(error => console.error(error));
{"name":"Tasklist","milestone":{"id":"4000000062001"},"flag":"internal","status":"active","tags":[{"add":[{"id":"4000000062001"}],"remove":[{"id":"4000000062001"}],"id":"4000000062001"}]}import java.net.HttpURLConnection
import java.net.URL
import okhttp3.HttpUrl.Companion.toHttpUrl
fun main() {
val url = URL("https://projects.zoho.com/api/v3/portal/[PORTAL_ID]/projects/23806000097545166/tasklists")
val conn = url.openConnection() as HttpURLConnection
conn.requestMethod = "POST"
conn.setRequestProperty("Authorization", "Bearer 1000.03xxxxxxxxxxxxxxxxxa5317.dxxxxxxxxxxxxxxxxxfa")
conn.setRequestProperty("Content-Type", "application/json")
conn.doOutput = true
conn.outputStream.bufferedWriter().use { it.write("""{"name":"Tasklist","milestone":{"id":"4000000062001"},"flag":"internal","status":"active","tags":[{"add":[{"id":"4000000062001"}],"remove":[{"id":"4000000062001"}],"id":"4000000062001"}]}""") }
val response = conn.inputStream.bufferedReader().readText()
println(response)
}
NSURL *url = [NSURL URLWithString:@"https://projects.zoho.com/api/v3/portal/[PORTAL_ID]/projects/23806000097545166/tasklists"];
NSMutableURLRequest *request = [NSMutableURLRequest requestWithURL:url];
[request setHTTPMethod:@"POST"];
[request setValue:@"Bearer 1000.03xxxxxxxxxxxxxxxxxa5317.dxxxxxxxxxxxxxxxxxfa" forHTTPHeaderField:@"Authorization"];
[request setValue:@"application/json" forHTTPHeaderField:@"Content-Type"];
NSData *body = [@"{\"name\":\"Tasklist\",\"milestone\":{\"id\":\"4000000062001\"},\"flag\":\"internal\",\"status\":\"active\",\"tags\":[{\"add\":[{\"id\":\"4000000062001\"}],\"remove\":[{\"id\":\"4000000062001\"}],\"id\":\"4000000062001\"}]}" dataUsingEncoding:NSUTF8StringEncoding];
[request setHTTPBody:body];
NSURLSession *session = [NSURLSession sharedSession];
NSURLSessionDataTask *task = [session dataTaskWithRequest:request
completionHandler:^(NSData *data, NSURLResponse *response, NSError *error) {
NSString *result = [[NSString alloc] initWithData:data encoding:NSUTF8StringEncoding];
NSLog(@"%@", result);
}];
[task resume];
open Lwt
open Cohttp_lwt_unix
let () =
let uri = Uri.of_string "https://projects.zoho.com/api/v3/portal/[PORTAL_ID]/projects/23806000097545166/tasklists" in
let headers = Cohttp.Header.init ()
|> fun h -> Cohttp.Header.add h "Authorization" "Bearer 1000.03xxxxxxxxxxxxxxxxxa5317.dxxxxxxxxxxxxxxxxxfa"
|> fun h -> Cohttp.Header.add h "Content-Type" "application/json"
in
let body = Cohttp_lwt.Body.of_string {json|{"name":"Tasklist","milestone":{"id":"4000000062001"},"flag":"internal","status":"active","tags":[{"add":[{"id":"4000000062001"}],"remove":[{"id":"4000000062001"}],"id":"4000000062001"}]}|json} in
Lwt_main.run (
Client.post ~headers ~body uri >>= fun (_, body) ->
Cohttp_lwt.Body.to_string body >|= fun s ->
print_endline s)
$headers = @{
"Authorization" = "Bearer 1000.03xxxxxxxxxxxxxxxxxa5317.dxxxxxxxxxxxxxxxxxfa"
"Content-Type" = "application/json"
}
$body = @'
{"name":"Tasklist","milestone":{"id":"4000000062001"},"flag":"internal","status":"active","tags":[{"add":[{"id":"4000000062001"}],"remove":[{"id":"4000000062001"}],"id":"4000000062001"}]}
'@
$response = Invoke-RestMethod -Uri "https://projects.zoho.com/api/v3/portal/[PORTAL_ID]/projects/23806000097545166/tasklists" -Method POST -Headers $headers -Body $body
$response | ConvertTo-Json
library(httr)
url <- "https://projects.zoho.com/api/v3/portal/[PORTAL_ID]/projects/23806000097545166/tasklists"
response <- POST(
url,
add_headers(Authorization = "Bearer 1000.03xxxxxxxxxxxxxxxxxa5317.dxxxxxxxxxxxxxxxxxfa"),
content_type_json(),
body = "{\"name\":\"Tasklist\",\"milestone\":{\"id\":\"4000000062001\"},\"flag\":\"internal\",\"status\":\"active\",\"tags\":[{\"add\":[{\"id\":\"4000000062001\"}],\"remove\":[{\"id\":\"4000000062001\"}],\"id\":\"4000000062001\"}]}"
)
content(response, "text")
import Foundation
let url = URL(string: "https://projects.zoho.com/api/v3/portal/[PORTAL_ID]/projects/23806000097545166/tasklists")!
var request = URLRequest(url: url)
request.httpMethod = "POST"
request.setValue("Bearer 1000.03xxxxxxxxxxxxxxxxxa5317.dxxxxxxxxxxxxxxxxxfa", forHTTPHeaderField: "Authorization")
request.setValue("application/json", forHTTPHeaderField: "Content-Type")
request.httpBody = """
{"name":"Tasklist","milestone":{"id":"4000000062001"},"flag":"internal","status":"active","tags":[{"add":[{"id":"4000000062001"}],"remove":[{"id":"4000000062001"}],"id":"4000000062001"}]}
""".data(using: .utf8)
let semaphore = DispatchSemaphore(value: 0)
let task = URLSession.shared.dataTask(with: request) { data, response, error in
if let data = data, let result = String(data: data, encoding: .utf8) {
print(result)
}
semaphore.signal()
}
task.resume()
semaphore.wait()
Sample Input
Sample Response
Create a task list in the specified project by cloning an existing task list from a project, project template, or task template.
OAuth Scope:
ZohoProjects.tasklists.CREATE
String
requiredUnique, immutable identifier of the portal in Zoho Projects. You can obtain it from the Get Portals API (the "id" field in the response).
String
requiredUnique, immutable identifier of the project within the specified portal. You can obtain it from the Get Projects API (the "id" field in the response).
JSONObject
Specify the task list that should be copied.
JSONObject
Specify the destination phase.
String
Specify the task list flag.
String
regex : ISO-8601Enter the date shift configuration in ISO 8601 format to adjust task dates when copying the task list.
boolean
Specify whether dependent task lists should also be copied along with the source task list. Accepted values: true or false.
JSONArray
Specify the mapping between source task list statuses and destination project statuses when the source statuses are not available in the destination project layout.
If mapping to the existing status: Enter the ID in both old_status and new_status.
If creating and mapping new status: Enter the ID in old_status, and specify name, color, and type in new_status.
JSONArray
max length : 10000Specify tags to add or remove during task list creation.
Request Example
curl -X POST \
'https://projects.zoho.com/api/v3/portal/[PORTAL_ID]/projects/23806000097545166/tasklists/clone' \
-H 'Authorization: Bearer 1000.03xxxxxxxxxxxxxxxxxa5317.dxxxxxxxxxxxxxxxxxfa' \
-H 'Content-Type: application/json' \
-d '{"source_tasklist":{"id":"5000000075001"},"milestone":{"id":"5000000051031"},"flag":"internal","shift_date":"2023-12-20","include_dependent_tasklists":true,"status_mapping":[{"old_status":{"id":"4000000062001"},"new_status":{"id":"4000000062001","name":"Tasklist","color":"#67a0ff","type":"open"}}],"tags":[{"add":[{"id":"5000000053043"}],"remove":[{"id":"4000000062001"}],"id":"4000000062001"}]}'
url = "https://projects.zoho.com/api/v3/portal/[PORTAL_ID]/projects/23806000097545166/tasklists/clone";
params = Map();
params.put("source_tasklist", {"id":"5000000075001"});
params.put("milestone", {"id":"5000000051031"});
params.put("flag", "internal");
params.put("shift_date", "2023-12-20");
params.put("include_dependent_tasklists", true);
params.put("status_mapping", [{"old_status":{"id":"4000000062001"},"new_status":{"id":"4000000062001","name":"Tasklist","color":"#67a0ff","type":"open"}}]);
params.put("tags", [{"add":[{"id":"5000000053043"}],"remove":[{"id":"4000000062001"}],"id":"4000000062001"}]);
response = invokeUrl
[
url: url
type: POST
parameters: params.toString()
connection: "projects"
];
info response;
const https = require('https');
const url = new URL('https://projects.zoho.com/api/v3/portal/[PORTAL_ID]/projects/23806000097545166/tasklists/clone');
const payload = JSON.stringify({"source_tasklist":{"id":"5000000075001"},"milestone":{"id":"5000000051031"},"flag":"internal","shift_date":"2023-12-20","include_dependent_tasklists":true,"status_mapping":[{"old_status":{"id":"4000000062001"},"new_status":{"id":"4000000062001","name":"Tasklist","color":"#67a0ff","type":"open"}}],"tags":[{"add":[{"id":"5000000053043"}],"remove":[{"id":"4000000062001"}],"id":"4000000062001"}]});
const options = {
hostname: url.hostname,
path: url.pathname + url.search,
method: 'POST',
headers: {
'Authorization': 'Bearer 1000.03xxxxxxxxxxxxxxxxxa5317.dxxxxxxxxxxxxxxxxxfa',
'Content-Type': 'application/json',
'Content-Length': Buffer.byteLength(payload)
}
};
const req = https.request(options, (res) => {
let data = '';
res.on('data', (chunk) => { data += chunk; });
res.on('end', () => { console.log(JSON.parse(data)); });
});
req.on('error', (err) => { console.error(err); });
req.write(payload);
req.end();
require 'net/http'
require 'uri'
require 'json'
url = URI("https://projects.zoho.com/api/v3/portal/[PORTAL_ID]/projects/23806000097545166/tasklists/clone")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = "Bearer 1000.03xxxxxxxxxxxxxxxxxa5317.dxxxxxxxxxxxxxxxxxfa"
request["Content-Type"] = "application/json"
request.body = '{"source_tasklist":{"id":"5000000075001"},"milestone":{"id":"5000000051031"},"flag":"internal","shift_date":"2023-12-20","include_dependent_tasklists":true,"status_mapping":[{"old_status":{"id":"4000000062001"},"new_status":{"id":"4000000062001","name":"Tasklist","color":"#67a0ff","type":"open"}}],"tags":[{"add":[{"id":"5000000053043"}],"remove":[{"id":"4000000062001"}],"id":"4000000062001"}]}'
response = http.request(request)
puts response.read_body
<?php
$url = "https://projects.zoho.com/api/v3/portal/[PORTAL_ID]/projects/23806000097545166/tasklists/clone";
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => $url,
CURLOPT_RETURNTRANSFER => true,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => '{"source_tasklist":{"id":"5000000075001"},"milestone":{"id":"5000000051031"},"flag":"internal","shift_date":"2023-12-20","include_dependent_tasklists":true,"status_mapping":[{"old_status":{"id":"4000000062001"},"new_status":{"id":"4000000062001","name":"Tasklist","color":"#67a0ff","type":"open"}}],"tags":[{"add":[{"id":"5000000053043"}],"remove":[{"id":"4000000062001"}],"id":"4000000062001"}]}',
CURLOPT_HTTPHEADER => [
"Authorization: Bearer 1000.03xxxxxxxxxxxxxxxxxa5317.dxxxxxxxxxxxxxxxxxfa",
"Content-Type: application/json"
],
]);
$response = curl_exec($curl);
curl_close($curl);
echo $response;
import requests
url = "https://projects.zoho.com/api/v3/portal/[PORTAL_ID]/projects/23806000097545166/tasklists/clone"
headers = {
"Authorization": "Bearer 1000.03xxxxxxxxxxxxxxxxxa5317.dxxxxxxxxxxxxxxxxxfa",
"Content-Type": "application/json",
}
payload = '{"source_tasklist":{"id":"5000000075001"},"milestone":{"id":"5000000051031"},"flag":"internal","shift_date":"2023-12-20","include_dependent_tasklists":true,"status_mapping":[{"old_status":{"id":"4000000062001"},"new_status":{"id":"4000000062001","name":"Tasklist","color":"#67a0ff","type":"open"}}],"tags":[{"add":[{"id":"5000000053043"}],"remove":[{"id":"4000000062001"}],"id":"4000000062001"}]}'
response = requests.post(url, headers=headers, data=payload)
print(response.json())
#include <stdio.h>
#include <string.h>
#include <curl/curl.h>
int main(void) {
CURL *curl = curl_easy_init();
if (curl) {
struct curl_slist *headers = NULL;
headers = curl_slist_append(headers, "Authorization: Bearer 1000.03xxxxxxxxxxxxxxxxxa5317.dxxxxxxxxxxxxxxxxxfa");
headers = curl_slist_append(headers, "Content-Type: application/json");
curl_easy_setopt(curl, CURLOPT_URL, "https://projects.zoho.com/api/v3/portal/[PORTAL_ID]/projects/23806000097545166/tasklists/clone");
curl_easy_setopt(curl, CURLOPT_HTTPHEADER, headers);
curl_easy_setopt(curl, CURLOPT_CUSTOMREQUEST, "POST");
curl_easy_setopt(curl, CURLOPT_POSTFIELDS, "{\"source_tasklist\":{\"id\":\"5000000075001\"},\"milestone\":{\"id\":\"5000000051031\"},\"flag\":\"internal\",\"shift_date\":\"2023-12-20\",\"include_dependent_tasklists\":true,\"status_mapping\":[{\"old_status\":{\"id\":\"4000000062001\"},\"new_status\":{\"id\":\"4000000062001\",\"name\":\"Tasklist\",\"color\":\"#67a0ff\",\"type\":\"open\"}}],\"tags\":[{\"add\":[{\"id\":\"5000000053043\"}],\"remove\":[{\"id\":\"4000000062001\"}],\"id\":\"4000000062001\"}]}");
CURLcode res = curl_easy_perform(curl);
if (res != CURLE_OK)
fprintf(stderr, "curl failed: %s\n", curl_easy_strerror(res));
curl_slist_free_all(headers);
curl_easy_cleanup(curl);
}
return 0;
}
using System.Net.Http;
using System.Text;
using System.Web;
var client = new HttpClient();
client.DefaultRequestHeaders.Add("Authorization", "Bearer 1000.03xxxxxxxxxxxxxxxxxa5317.dxxxxxxxxxxxxxxxxxfa");
var request = new HttpRequestMessage(HttpMethod.Post, "https://projects.zoho.com/api/v3/portal/[PORTAL_ID]/projects/23806000097545166/tasklists/clone");
request.Content = new StringContent(
@"{""source_tasklist"":{""id"":""5000000075001""},""milestone"":{""id"":""5000000051031""},""flag"":""internal"",""shift_date"":""2023-12-20"",""include_dependent_tasklists"":true,""status_mapping"":[{""old_status"":{""id"":""4000000062001""},""new_status"":{""id"":""4000000062001"",""name"":""Tasklist"",""color"":""#67a0ff"",""type"":""open""}}],""tags"":[{""add"":[{""id"":""5000000053043""}],""remove"":[{""id"":""4000000062001""}],""id"":""4000000062001""}]}",
Encoding.UTF8,
"application/json"
);
var response = await client.SendAsync(request);
var body = await response.Content.ReadAsStringAsync();
Console.WriteLine(body);
#include <iostream>
#include <string>
#include <curl/curl.h>
static size_t WriteCallback(void* contents, size_t size, size_t nmemb, std::string* output) {
output->append((char*)contents, size * nmemb);
return size * nmemb;
}
int main() {
CURL* curl = curl_easy_init();
if (curl) {
std::string response;
struct curl_slist* headers = NULL;
headers = curl_slist_append(headers, "Authorization: Bearer 1000.03xxxxxxxxxxxxxxxxxa5317.dxxxxxxxxxxxxxxxxxfa");
headers = curl_slist_append(headers, "Content-Type: application/json");
curl_easy_setopt(curl, CURLOPT_URL, "https://projects.zoho.com/api/v3/portal/[PORTAL_ID]/projects/23806000097545166/tasklists/clone");
curl_easy_setopt(curl, CURLOPT_HTTPHEADER, headers);
curl_easy_setopt(curl, CURLOPT_CUSTOMREQUEST, "POST");
curl_easy_setopt(curl, CURLOPT_WRITEFUNCTION, WriteCallback);
curl_easy_setopt(curl, CURLOPT_WRITEDATA, &response);
curl_easy_setopt(curl, CURLOPT_POSTFIELDS, "{\"source_tasklist\":{\"id\":\"5000000075001\"},\"milestone\":{\"id\":\"5000000051031\"},\"flag\":\"internal\",\"shift_date\":\"2023-12-20\",\"include_dependent_tasklists\":true,\"status_mapping\":[{\"old_status\":{\"id\":\"4000000062001\"},\"new_status\":{\"id\":\"4000000062001\",\"name\":\"Tasklist\",\"color\":\"#67a0ff\",\"type\":\"open\"}}],\"tags\":[{\"add\":[{\"id\":\"5000000053043\"}],\"remove\":[{\"id\":\"4000000062001\"}],\"id\":\"4000000062001\"}]}");
CURLcode res = curl_easy_perform(curl);
if (res == CURLE_OK)
std::cout << response << std::endl;
else
std::cerr << curl_easy_strerror(res) << std::endl;
curl_slist_free_all(headers);
curl_easy_cleanup(curl);
}
return 0;
}
(require '[clj-http.client :as client])
(def response
(client/post "https://projects.zoho.com/api/v3/portal/[PORTAL_ID]/projects/23806000097545166/tasklists/clone"
{:headers {"Authorization" "Bearer 1000.03xxxxxxxxxxxxxxxxxa5317.dxxxxxxxxxxxxxxxxxfa"
"Content-Type" "application/json"}
:body "{\"source_tasklist\":{\"id\":\"5000000075001\"},\"milestone\":{\"id\":\"5000000051031\"},\"flag\":\"internal\",\"shift_date\":\"2023-12-20\",\"include_dependent_tasklists\":true,\"status_mapping\":[{\"old_status\":{\"id\":\"4000000062001\"},\"new_status\":{\"id\":\"4000000062001\",\"name\":\"Tasklist\",\"color\":\"#67a0ff\",\"type\":\"open\"}}],\"tags\":[{\"add\":[{\"id\":\"5000000053043\"}],\"remove\":[{\"id\":\"4000000062001\"}],\"id\":\"4000000062001\"}]}"
:as :json}))
(println (:body response))
package main
import (
"fmt"
"io"
"net/http"
"strings"
)
func main() {
payload := strings.NewReader("{\"source_tasklist\":{\"id\":\"5000000075001\"},\"milestone\":{\"id\":\"5000000051031\"},\"flag\":\"internal\",\"shift_date\":\"2023-12-20\",\"include_dependent_tasklists\":true,\"status_mapping\":[{\"old_status\":{\"id\":\"4000000062001\"},\"new_status\":{\"id\":\"4000000062001\",\"name\":\"Tasklist\",\"color\":\"#67a0ff\",\"type\":\"open\"}}],\"tags\":[{\"add\":[{\"id\":\"5000000053043\"}],\"remove\":[{\"id\":\"4000000062001\"}],\"id\":\"4000000062001\"}]}")
req, _ := http.NewRequest("POST", "https://projects.zoho.com/api/v3/portal/[PORTAL_ID]/projects/23806000097545166/tasklists/clone", payload)
req.Header.Add("Authorization", "Bearer 1000.03xxxxxxxxxxxxxxxxxa5317.dxxxxxxxxxxxxxxxxxfa")
req.Header.Add("Content-Type", "application/json")
resp, _ := http.DefaultClient.Do(req)
defer resp.Body.Close()
body, _ := io.ReadAll(resp.Body)
fmt.Println(string(body))
}
POST https://projects.zoho.com/api/v3/portal/[PORTAL_ID]/projects/23806000097545166/tasklists/clone HTTP/1.1
Host: https://projects.zoho.com/api/v3/portal/[PORTAL_ID]/projects/23806000097545166/tasklists/clone
Authorization: Bearer 1000.03xxxxxxxxxxxxxxxxxa5317.dxxxxxxxxxxxxxxxxxfa
Content-Type: application/json
{"source_tasklist":{"id":"5000000075001"},"milestone":{"id":"5000000051031"},"flag":"internal","shift_date":"2023-12-20","include_dependent_tasklists":true,"status_mapping":[{"old_status":{"id":"4000000062001"},"new_status":{"id":"4000000062001","name":"Tasklist","color":"#67a0ff","type":"open"}}],"tags":[{"add":[{"id":"5000000053043"}],"remove":[{"id":"4000000062001"}],"id":"4000000062001"}]}
HttpClientBuilder httpClientBuilder = HttpClientBuilder.create();
SSLContext sslContext = SSLContext.getDefault();
SSLConnectionSocketFactory sslConnectionSocketFactory = new SSLConnectionSocketFactory(sslContext, NoopHostnameVerifier.INSTANCE);
CloseableHttpClient httpclient = httpClientBuilder.setSSLSocketFactory(sslConnectionSocketFactory).build();
URIBuilder uriBuilder = new URIBuilder("https://projects.zoho.com/api/v3/portal/[PORTAL_ID]/projects/23806000097545166/tasklists/clone");
HttpUriRequest requestObj = new HttpPost(uriBuilder.build());
requestObj.addHeader("Authorization", "Bearer 1000.03xxxxxxxxxxxxxxxxxa5317.dxxxxxxxxxxxxxxxxxfa");
HttpEntityEnclosingRequestBase requestBase = (HttpEntityEnclosingRequestBase) requestObj;
String requestBody = "{\"source_tasklist\":{\"id\":\"5000000075001\"},\"milestone\":{\"id\":\"5000000051031\"},\"flag\":\"internal\",\"shift_date\":\"2023-12-20\",\"include_dependent_tasklists\":true,\"status_mapping\":[{\"old_status\":{\"id\":\"4000000062001\"},\"new_status\":{\"id\":\"4000000062001\",\"name\":\"Tasklist\",\"color\":\"#67a0ff\",\"type\":\"open\"}}],\"tags\":[{\"add\":[{\"id\":\"5000000053043\"}],\"remove\":[{\"id\":\"4000000062001\"}],\"id\":\"4000000062001\"}]}";
requestBase.setEntity(new StringEntity(requestBody, HTTP.UTF_8));
HttpResponse response = httpclient.execute(requestObj);
HttpEntity responseEntity = response.getEntity();
Object responseObject = EntityUtils.toString(responseEntity);
String responseString = responseObject.toString();
const url = 'https://projects.zoho.com/api/v3/portal/[PORTAL_ID]/projects/23806000097545166/tasklists/clone';
const options = {
method: 'POST',
headers: {
'Authorization': 'Bearer 1000.03xxxxxxxxxxxxxxxxxa5317.dxxxxxxxxxxxxxxxxxfa',
'Content-Type': 'application/json'
},
body: JSON.stringify({"source_tasklist":{"id":"5000000075001"},"milestone":{"id":"5000000051031"},"flag":"internal","shift_date":"2023-12-20","include_dependent_tasklists":true,"status_mapping":[{"old_status":{"id":"4000000062001"},"new_status":{"id":"4000000062001","name":"Tasklist","color":"#67a0ff","type":"open"}}],"tags":[{"add":[{"id":"5000000053043"}],"remove":[{"id":"4000000062001"}],"id":"4000000062001"}]})
};
fetch(url, options)
.then(response => response.json())
.then(data => console.log(data))
.catch(error => console.error(error));
{"source_tasklist":{"id":"5000000075001"},"milestone":{"id":"5000000051031"},"flag":"internal","shift_date":"2023-12-20","include_dependent_tasklists":true,"status_mapping":[{"old_status":{"id":"4000000062001"},"new_status":{"id":"4000000062001","name":"Tasklist","color":"#67a0ff","type":"open"}}],"tags":[{"add":[{"id":"5000000053043"}],"remove":[{"id":"4000000062001"}],"id":"4000000062001"}]}import java.net.HttpURLConnection
import java.net.URL
import okhttp3.HttpUrl.Companion.toHttpUrl
fun main() {
val url = URL("https://projects.zoho.com/api/v3/portal/[PORTAL_ID]/projects/23806000097545166/tasklists/clone")
val conn = url.openConnection() as HttpURLConnection
conn.requestMethod = "POST"
conn.setRequestProperty("Authorization", "Bearer 1000.03xxxxxxxxxxxxxxxxxa5317.dxxxxxxxxxxxxxxxxxfa")
conn.setRequestProperty("Content-Type", "application/json")
conn.doOutput = true
conn.outputStream.bufferedWriter().use { it.write("""{"source_tasklist":{"id":"5000000075001"},"milestone":{"id":"5000000051031"},"flag":"internal","shift_date":"2023-12-20","include_dependent_tasklists":true,"status_mapping":[{"old_status":{"id":"4000000062001"},"new_status":{"id":"4000000062001","name":"Tasklist","color":"#67a0ff","type":"open"}}],"tags":[{"add":[{"id":"5000000053043"}],"remove":[{"id":"4000000062001"}],"id":"4000000062001"}]}""") }
val response = conn.inputStream.bufferedReader().readText()
println(response)
}
NSURL *url = [NSURL URLWithString:@"https://projects.zoho.com/api/v3/portal/[PORTAL_ID]/projects/23806000097545166/tasklists/clone"];
NSMutableURLRequest *request = [NSMutableURLRequest requestWithURL:url];
[request setHTTPMethod:@"POST"];
[request setValue:@"Bearer 1000.03xxxxxxxxxxxxxxxxxa5317.dxxxxxxxxxxxxxxxxxfa" forHTTPHeaderField:@"Authorization"];
[request setValue:@"application/json" forHTTPHeaderField:@"Content-Type"];
NSData *body = [@"{\"source_tasklist\":{\"id\":\"5000000075001\"},\"milestone\":{\"id\":\"5000000051031\"},\"flag\":\"internal\",\"shift_date\":\"2023-12-20\",\"include_dependent_tasklists\":true,\"status_mapping\":[{\"old_status\":{\"id\":\"4000000062001\"},\"new_status\":{\"id\":\"4000000062001\",\"name\":\"Tasklist\",\"color\":\"#67a0ff\",\"type\":\"open\"}}],\"tags\":[{\"add\":[{\"id\":\"5000000053043\"}],\"remove\":[{\"id\":\"4000000062001\"}],\"id\":\"4000000062001\"}]}" dataUsingEncoding:NSUTF8StringEncoding];
[request setHTTPBody:body];
NSURLSession *session = [NSURLSession sharedSession];
NSURLSessionDataTask *task = [session dataTaskWithRequest:request
completionHandler:^(NSData *data, NSURLResponse *response, NSError *error) {
NSString *result = [[NSString alloc] initWithData:data encoding:NSUTF8StringEncoding];
NSLog(@"%@", result);
}];
[task resume];
open Lwt
open Cohttp_lwt_unix
let () =
let uri = Uri.of_string "https://projects.zoho.com/api/v3/portal/[PORTAL_ID]/projects/23806000097545166/tasklists/clone" in
let headers = Cohttp.Header.init ()
|> fun h -> Cohttp.Header.add h "Authorization" "Bearer 1000.03xxxxxxxxxxxxxxxxxa5317.dxxxxxxxxxxxxxxxxxfa"
|> fun h -> Cohttp.Header.add h "Content-Type" "application/json"
in
let body = Cohttp_lwt.Body.of_string {json|{"source_tasklist":{"id":"5000000075001"},"milestone":{"id":"5000000051031"},"flag":"internal","shift_date":"2023-12-20","include_dependent_tasklists":true,"status_mapping":[{"old_status":{"id":"4000000062001"},"new_status":{"id":"4000000062001","name":"Tasklist","color":"#67a0ff","type":"open"}}],"tags":[{"add":[{"id":"5000000053043"}],"remove":[{"id":"4000000062001"}],"id":"4000000062001"}]}|json} in
Lwt_main.run (
Client.post ~headers ~body uri >>= fun (_, body) ->
Cohttp_lwt.Body.to_string body >|= fun s ->
print_endline s)
$headers = @{
"Authorization" = "Bearer 1000.03xxxxxxxxxxxxxxxxxa5317.dxxxxxxxxxxxxxxxxxfa"
"Content-Type" = "application/json"
}
$body = @'
{"source_tasklist":{"id":"5000000075001"},"milestone":{"id":"5000000051031"},"flag":"internal","shift_date":"2023-12-20","include_dependent_tasklists":true,"status_mapping":[{"old_status":{"id":"4000000062001"},"new_status":{"id":"4000000062001","name":"Tasklist","color":"#67a0ff","type":"open"}}],"tags":[{"add":[{"id":"5000000053043"}],"remove":[{"id":"4000000062001"}],"id":"4000000062001"}]}
'@
$response = Invoke-RestMethod -Uri "https://projects.zoho.com/api/v3/portal/[PORTAL_ID]/projects/23806000097545166/tasklists/clone" -Method POST -Headers $headers -Body $body
$response | ConvertTo-Json
library(httr)
url <- "https://projects.zoho.com/api/v3/portal/[PORTAL_ID]/projects/23806000097545166/tasklists/clone"
response <- POST(
url,
add_headers(Authorization = "Bearer 1000.03xxxxxxxxxxxxxxxxxa5317.dxxxxxxxxxxxxxxxxxfa"),
content_type_json(),
body = "{\"source_tasklist\":{\"id\":\"5000000075001\"},\"milestone\":{\"id\":\"5000000051031\"},\"flag\":\"internal\",\"shift_date\":\"2023-12-20\",\"include_dependent_tasklists\":true,\"status_mapping\":[{\"old_status\":{\"id\":\"4000000062001\"},\"new_status\":{\"id\":\"4000000062001\",\"name\":\"Tasklist\",\"color\":\"#67a0ff\",\"type\":\"open\"}}],\"tags\":[{\"add\":[{\"id\":\"5000000053043\"}],\"remove\":[{\"id\":\"4000000062001\"}],\"id\":\"4000000062001\"}]}"
)
content(response, "text")
import Foundation
let url = URL(string: "https://projects.zoho.com/api/v3/portal/[PORTAL_ID]/projects/23806000097545166/tasklists/clone")!
var request = URLRequest(url: url)
request.httpMethod = "POST"
request.setValue("Bearer 1000.03xxxxxxxxxxxxxxxxxa5317.dxxxxxxxxxxxxxxxxxfa", forHTTPHeaderField: "Authorization")
request.setValue("application/json", forHTTPHeaderField: "Content-Type")
request.httpBody = """
{"source_tasklist":{"id":"5000000075001"},"milestone":{"id":"5000000051031"},"flag":"internal","shift_date":"2023-12-20","include_dependent_tasklists":true,"status_mapping":[{"old_status":{"id":"4000000062001"},"new_status":{"id":"4000000062001","name":"Tasklist","color":"#67a0ff","type":"open"}}],"tags":[{"add":[{"id":"5000000053043"}],"remove":[{"id":"4000000062001"}],"id":"4000000062001"}]}
""".data(using: .utf8)
let semaphore = DispatchSemaphore(value: 0)
let task = URLSession.shared.dataTask(with: request) { data, response, error in
if let data = data, let result = String(data: data, encoding: .utf8) {
print(result)
}
semaphore.signal()
}
task.resume()
semaphore.wait()
Sample Input
Sample Response
Modify details of the task list in a project.
OAuth Scope:
ZohoProjects.tasklists.CREATE
String
requiredUnique, immutable identifier of the portal in Zoho Projects. You can obtain it from the Get Portals API (the "id" field in the response).
String
requiredUnique, immutable identifier of the project within the specified portal. You can obtain it from the Get Projects API (the "id" field in the response).
String
requiredIdentifier of a tasklist. Obtained from the Get Tasklists API - the "id" field in the response corresponds to tasklist_id.
String
max length : 10000Enter the task list name.
JSONObject
Specify the milestone to associate with this task list. Enter the milestone ID.
String
max length : 100Specify the visibility of the task list. Accepted values: internal (hidden from client users) or external (visible to client users).
String
max length : 100Specify the status of the task list. Accepted values: active or completed.
JSONArray
max length : 10000Update the tags associated with this task list. Use add to attach new tags or remove to detach existing ones.
String
Enter the color of the tasklist.
Request Example
curl -X PATCH \
'https://projects.zoho.com/api/v3/portal/[PORTAL_ID]/projects/23806000097545166/tasklists/[TASKLIST_ID]' \
-H 'Authorization: Bearer 1000.03xxxxxxxxxxxxxxxxxa5317.dxxxxxxxxxxxxxxxxxfa' \
-H 'Content-Type: application/json' \
-d '{"name":"Tasklist","milestone":{"id":"4000000062001"},"flag":"internal","status":"active","tags":[{"add":[{"id":"4000000062001"}],"remove":[{"id":"4000000062001"}],"id":"4000000062001"}],"color":"#67a0ff"}'
url = "https://projects.zoho.com/api/v3/portal/[PORTAL_ID]/projects/23806000097545166/tasklists/[TASKLIST_ID]";
params = Map();
params.put("name", "Tasklist");
params.put("milestone", {"id":"4000000062001"});
params.put("flag", "internal");
params.put("status", "active");
params.put("tags", [{"add":[{"id":"4000000062001"}],"remove":[{"id":"4000000062001"}],"id":"4000000062001"}]);
params.put("color", "#67a0ff");
response = invokeUrl
[
url: url
type: PATCH
parameters: params.toString()
connection: "projects"
];
info response;
const https = require('https');
const url = new URL('https://projects.zoho.com/api/v3/portal/[PORTAL_ID]/projects/23806000097545166/tasklists/[TASKLIST_ID]');
const payload = JSON.stringify({"name":"Tasklist","milestone":{"id":"4000000062001"},"flag":"internal","status":"active","tags":[{"add":[{"id":"4000000062001"}],"remove":[{"id":"4000000062001"}],"id":"4000000062001"}],"color":"#67a0ff"});
const options = {
hostname: url.hostname,
path: url.pathname + url.search,
method: 'PATCH',
headers: {
'Authorization': 'Bearer 1000.03xxxxxxxxxxxxxxxxxa5317.dxxxxxxxxxxxxxxxxxfa',
'Content-Type': 'application/json',
'Content-Length': Buffer.byteLength(payload)
}
};
const req = https.request(options, (res) => {
let data = '';
res.on('data', (chunk) => { data += chunk; });
res.on('end', () => { console.log(JSON.parse(data)); });
});
req.on('error', (err) => { console.error(err); });
req.write(payload);
req.end();
require 'net/http'
require 'uri'
require 'json'
url = URI("https://projects.zoho.com/api/v3/portal/[PORTAL_ID]/projects/23806000097545166/tasklists/[TASKLIST_ID]")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Patch.new(url)
request["Authorization"] = "Bearer 1000.03xxxxxxxxxxxxxxxxxa5317.dxxxxxxxxxxxxxxxxxfa"
request["Content-Type"] = "application/json"
request.body = '{"name":"Tasklist","milestone":{"id":"4000000062001"},"flag":"internal","status":"active","tags":[{"add":[{"id":"4000000062001"}],"remove":[{"id":"4000000062001"}],"id":"4000000062001"}],"color":"#67a0ff"}'
response = http.request(request)
puts response.read_body
<?php
$url = "https://projects.zoho.com/api/v3/portal/[PORTAL_ID]/projects/23806000097545166/tasklists/[TASKLIST_ID]";
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => $url,
CURLOPT_RETURNTRANSFER => true,
CURLOPT_CUSTOMREQUEST => "PATCH",
CURLOPT_POSTFIELDS => '{"name":"Tasklist","milestone":{"id":"4000000062001"},"flag":"internal","status":"active","tags":[{"add":[{"id":"4000000062001"}],"remove":[{"id":"4000000062001"}],"id":"4000000062001"}],"color":"#67a0ff"}',
CURLOPT_HTTPHEADER => [
"Authorization: Bearer 1000.03xxxxxxxxxxxxxxxxxa5317.dxxxxxxxxxxxxxxxxxfa",
"Content-Type: application/json"
],
]);
$response = curl_exec($curl);
curl_close($curl);
echo $response;
import requests
url = "https://projects.zoho.com/api/v3/portal/[PORTAL_ID]/projects/23806000097545166/tasklists/[TASKLIST_ID]"
headers = {
"Authorization": "Bearer 1000.03xxxxxxxxxxxxxxxxxa5317.dxxxxxxxxxxxxxxxxxfa",
"Content-Type": "application/json",
}
payload = '{"name":"Tasklist","milestone":{"id":"4000000062001"},"flag":"internal","status":"active","tags":[{"add":[{"id":"4000000062001"}],"remove":[{"id":"4000000062001"}],"id":"4000000062001"}],"color":"#67a0ff"}'
response = requests.patch(url, headers=headers, data=payload)
print(response.json())
#include <stdio.h>
#include <string.h>
#include <curl/curl.h>
int main(void) {
CURL *curl = curl_easy_init();
if (curl) {
struct curl_slist *headers = NULL;
headers = curl_slist_append(headers, "Authorization: Bearer 1000.03xxxxxxxxxxxxxxxxxa5317.dxxxxxxxxxxxxxxxxxfa");
headers = curl_slist_append(headers, "Content-Type: application/json");
curl_easy_setopt(curl, CURLOPT_URL, "https://projects.zoho.com/api/v3/portal/[PORTAL_ID]/projects/23806000097545166/tasklists/[TASKLIST_ID]");
curl_easy_setopt(curl, CURLOPT_HTTPHEADER, headers);
curl_easy_setopt(curl, CURLOPT_CUSTOMREQUEST, "PATCH");
curl_easy_setopt(curl, CURLOPT_POSTFIELDS, "{\"name\":\"Tasklist\",\"milestone\":{\"id\":\"4000000062001\"},\"flag\":\"internal\",\"status\":\"active\",\"tags\":[{\"add\":[{\"id\":\"4000000062001\"}],\"remove\":[{\"id\":\"4000000062001\"}],\"id\":\"4000000062001\"}],\"color\":\"#67a0ff\"}");
CURLcode res = curl_easy_perform(curl);
if (res != CURLE_OK)
fprintf(stderr, "curl failed: %s\n", curl_easy_strerror(res));
curl_slist_free_all(headers);
curl_easy_cleanup(curl);
}
return 0;
}
using System.Net.Http;
using System.Text;
using System.Web;
var client = new HttpClient();
client.DefaultRequestHeaders.Add("Authorization", "Bearer 1000.03xxxxxxxxxxxxxxxxxa5317.dxxxxxxxxxxxxxxxxxfa");
var request = new HttpRequestMessage(HttpMethod.Patch, "https://projects.zoho.com/api/v3/portal/[PORTAL_ID]/projects/23806000097545166/tasklists/[TASKLIST_ID]");
request.Content = new StringContent(
@"{""name"":""Tasklist"",""milestone"":{""id"":""4000000062001""},""flag"":""internal"",""status"":""active"",""tags"":[{""add"":[{""id"":""4000000062001""}],""remove"":[{""id"":""4000000062001""}],""id"":""4000000062001""}],""color"":""#67a0ff""}",
Encoding.UTF8,
"application/json"
);
var response = await client.SendAsync(request);
var body = await response.Content.ReadAsStringAsync();
Console.WriteLine(body);
#include <iostream>
#include <string>
#include <curl/curl.h>
static size_t WriteCallback(void* contents, size_t size, size_t nmemb, std::string* output) {
output->append((char*)contents, size * nmemb);
return size * nmemb;
}
int main() {
CURL* curl = curl_easy_init();
if (curl) {
std::string response;
struct curl_slist* headers = NULL;
headers = curl_slist_append(headers, "Authorization: Bearer 1000.03xxxxxxxxxxxxxxxxxa5317.dxxxxxxxxxxxxxxxxxfa");
headers = curl_slist_append(headers, "Content-Type: application/json");
curl_easy_setopt(curl, CURLOPT_URL, "https://projects.zoho.com/api/v3/portal/[PORTAL_ID]/projects/23806000097545166/tasklists/[TASKLIST_ID]");
curl_easy_setopt(curl, CURLOPT_HTTPHEADER, headers);
curl_easy_setopt(curl, CURLOPT_CUSTOMREQUEST, "PATCH");
curl_easy_setopt(curl, CURLOPT_WRITEFUNCTION, WriteCallback);
curl_easy_setopt(curl, CURLOPT_WRITEDATA, &response);
curl_easy_setopt(curl, CURLOPT_POSTFIELDS, "{\"name\":\"Tasklist\",\"milestone\":{\"id\":\"4000000062001\"},\"flag\":\"internal\",\"status\":\"active\",\"tags\":[{\"add\":[{\"id\":\"4000000062001\"}],\"remove\":[{\"id\":\"4000000062001\"}],\"id\":\"4000000062001\"}],\"color\":\"#67a0ff\"}");
CURLcode res = curl_easy_perform(curl);
if (res == CURLE_OK)
std::cout << response << std::endl;
else
std::cerr << curl_easy_strerror(res) << std::endl;
curl_slist_free_all(headers);
curl_easy_cleanup(curl);
}
return 0;
}
(require '[clj-http.client :as client])
(def response
(client/patch "https://projects.zoho.com/api/v3/portal/[PORTAL_ID]/projects/23806000097545166/tasklists/[TASKLIST_ID]"
{:headers {"Authorization" "Bearer 1000.03xxxxxxxxxxxxxxxxxa5317.dxxxxxxxxxxxxxxxxxfa"
"Content-Type" "application/json"}
:body "{\"name\":\"Tasklist\",\"milestone\":{\"id\":\"4000000062001\"},\"flag\":\"internal\",\"status\":\"active\",\"tags\":[{\"add\":[{\"id\":\"4000000062001\"}],\"remove\":[{\"id\":\"4000000062001\"}],\"id\":\"4000000062001\"}],\"color\":\"#67a0ff\"}"
:as :json}))
(println (:body response))
package main
import (
"fmt"
"io"
"net/http"
"strings"
)
func main() {
payload := strings.NewReader("{\"name\":\"Tasklist\",\"milestone\":{\"id\":\"4000000062001\"},\"flag\":\"internal\",\"status\":\"active\",\"tags\":[{\"add\":[{\"id\":\"4000000062001\"}],\"remove\":[{\"id\":\"4000000062001\"}],\"id\":\"4000000062001\"}],\"color\":\"#67a0ff\"}")
req, _ := http.NewRequest("PATCH", "https://projects.zoho.com/api/v3/portal/[PORTAL_ID]/projects/23806000097545166/tasklists/[TASKLIST_ID]", payload)
req.Header.Add("Authorization", "Bearer 1000.03xxxxxxxxxxxxxxxxxa5317.dxxxxxxxxxxxxxxxxxfa")
req.Header.Add("Content-Type", "application/json")
resp, _ := http.DefaultClient.Do(req)
defer resp.Body.Close()
body, _ := io.ReadAll(resp.Body)
fmt.Println(string(body))
}
PATCH https://projects.zoho.com/api/v3/portal/[PORTAL_ID]/projects/23806000097545166/tasklists/[TASKLIST_ID] HTTP/1.1
Host: https://projects.zoho.com/api/v3/portal/[PORTAL_ID]/projects/23806000097545166/tasklists/[TASKLIST_ID]
Authorization: Bearer 1000.03xxxxxxxxxxxxxxxxxa5317.dxxxxxxxxxxxxxxxxxfa
Content-Type: application/json
{"name":"Tasklist","milestone":{"id":"4000000062001"},"flag":"internal","status":"active","tags":[{"add":[{"id":"4000000062001"}],"remove":[{"id":"4000000062001"}],"id":"4000000062001"}],"color":"#67a0ff"}
HttpClientBuilder httpClientBuilder = HttpClientBuilder.create();
SSLContext sslContext = SSLContext.getDefault();
SSLConnectionSocketFactory sslConnectionSocketFactory = new SSLConnectionSocketFactory(sslContext, NoopHostnameVerifier.INSTANCE);
CloseableHttpClient httpclient = httpClientBuilder.setSSLSocketFactory(sslConnectionSocketFactory).build();
URIBuilder uriBuilder = new URIBuilder("https://projects.zoho.com/api/v3/portal/[PORTAL_ID]/projects/23806000097545166/tasklists/[TASKLIST_ID]");
HttpUriRequest requestObj = new HttpPatch(uriBuilder.build());
requestObj.addHeader("Authorization", "Bearer 1000.03xxxxxxxxxxxxxxxxxa5317.dxxxxxxxxxxxxxxxxxfa");
HttpEntityEnclosingRequestBase requestBase = (HttpEntityEnclosingRequestBase) requestObj;
String requestBody = "{\"name\":\"Tasklist\",\"milestone\":{\"id\":\"4000000062001\"},\"flag\":\"internal\",\"status\":\"active\",\"tags\":[{\"add\":[{\"id\":\"4000000062001\"}],\"remove\":[{\"id\":\"4000000062001\"}],\"id\":\"4000000062001\"}],\"color\":\"#67a0ff\"}";
requestBase.setEntity(new StringEntity(requestBody, HTTP.UTF_8));
HttpResponse response = httpclient.execute(requestObj);
HttpEntity responseEntity = response.getEntity();
Object responseObject = EntityUtils.toString(responseEntity);
String responseString = responseObject.toString();
const url = 'https://projects.zoho.com/api/v3/portal/[PORTAL_ID]/projects/23806000097545166/tasklists/[TASKLIST_ID]';
const options = {
method: 'PATCH',
headers: {
'Authorization': 'Bearer 1000.03xxxxxxxxxxxxxxxxxa5317.dxxxxxxxxxxxxxxxxxfa',
'Content-Type': 'application/json'
},
body: JSON.stringify({"name":"Tasklist","milestone":{"id":"4000000062001"},"flag":"internal","status":"active","tags":[{"add":[{"id":"4000000062001"}],"remove":[{"id":"4000000062001"}],"id":"4000000062001"}],"color":"#67a0ff"})
};
fetch(url, options)
.then(response => response.json())
.then(data => console.log(data))
.catch(error => console.error(error));
{"name":"Tasklist","milestone":{"id":"4000000062001"},"flag":"internal","status":"active","tags":[{"add":[{"id":"4000000062001"}],"remove":[{"id":"4000000062001"}],"id":"4000000062001"}],"color":"#67a0ff"}import java.net.HttpURLConnection
import java.net.URL
import okhttp3.HttpUrl.Companion.toHttpUrl
fun main() {
val url = URL("https://projects.zoho.com/api/v3/portal/[PORTAL_ID]/projects/23806000097545166/tasklists/[TASKLIST_ID]")
val conn = url.openConnection() as HttpURLConnection
conn.requestMethod = "PATCH"
conn.setRequestProperty("Authorization", "Bearer 1000.03xxxxxxxxxxxxxxxxxa5317.dxxxxxxxxxxxxxxxxxfa")
conn.setRequestProperty("Content-Type", "application/json")
conn.doOutput = true
conn.outputStream.bufferedWriter().use { it.write("""{"name":"Tasklist","milestone":{"id":"4000000062001"},"flag":"internal","status":"active","tags":[{"add":[{"id":"4000000062001"}],"remove":[{"id":"4000000062001"}],"id":"4000000062001"}],"color":"#67a0ff"}""") }
val response = conn.inputStream.bufferedReader().readText()
println(response)
}
NSURL *url = [NSURL URLWithString:@"https://projects.zoho.com/api/v3/portal/[PORTAL_ID]/projects/23806000097545166/tasklists/[TASKLIST_ID]"];
NSMutableURLRequest *request = [NSMutableURLRequest requestWithURL:url];
[request setHTTPMethod:@"PATCH"];
[request setValue:@"Bearer 1000.03xxxxxxxxxxxxxxxxxa5317.dxxxxxxxxxxxxxxxxxfa" forHTTPHeaderField:@"Authorization"];
[request setValue:@"application/json" forHTTPHeaderField:@"Content-Type"];
NSData *body = [@"{\"name\":\"Tasklist\",\"milestone\":{\"id\":\"4000000062001\"},\"flag\":\"internal\",\"status\":\"active\",\"tags\":[{\"add\":[{\"id\":\"4000000062001\"}],\"remove\":[{\"id\":\"4000000062001\"}],\"id\":\"4000000062001\"}],\"color\":\"#67a0ff\"}" dataUsingEncoding:NSUTF8StringEncoding];
[request setHTTPBody:body];
NSURLSession *session = [NSURLSession sharedSession];
NSURLSessionDataTask *task = [session dataTaskWithRequest:request
completionHandler:^(NSData *data, NSURLResponse *response, NSError *error) {
NSString *result = [[NSString alloc] initWithData:data encoding:NSUTF8StringEncoding];
NSLog(@"%@", result);
}];
[task resume];
open Lwt
open Cohttp_lwt_unix
let () =
let uri = Uri.of_string "https://projects.zoho.com/api/v3/portal/[PORTAL_ID]/projects/23806000097545166/tasklists/[TASKLIST_ID]" in
let headers = Cohttp.Header.init ()
|> fun h -> Cohttp.Header.add h "Authorization" "Bearer 1000.03xxxxxxxxxxxxxxxxxa5317.dxxxxxxxxxxxxxxxxxfa"
|> fun h -> Cohttp.Header.add h "Content-Type" "application/json"
in
let body = Cohttp_lwt.Body.of_string {json|{"name":"Tasklist","milestone":{"id":"4000000062001"},"flag":"internal","status":"active","tags":[{"add":[{"id":"4000000062001"}],"remove":[{"id":"4000000062001"}],"id":"4000000062001"}],"color":"#67a0ff"}|json} in
Lwt_main.run (
Client.patch ~headers ~body uri >>= fun (_, body) ->
Cohttp_lwt.Body.to_string body >|= fun s ->
print_endline s)
$headers = @{
"Authorization" = "Bearer 1000.03xxxxxxxxxxxxxxxxxa5317.dxxxxxxxxxxxxxxxxxfa"
"Content-Type" = "application/json"
}
$body = @'
{"name":"Tasklist","milestone":{"id":"4000000062001"},"flag":"internal","status":"active","tags":[{"add":[{"id":"4000000062001"}],"remove":[{"id":"4000000062001"}],"id":"4000000062001"}],"color":"#67a0ff"}
'@
$response = Invoke-RestMethod -Uri "https://projects.zoho.com/api/v3/portal/[PORTAL_ID]/projects/23806000097545166/tasklists/[TASKLIST_ID]" -Method PATCH -Headers $headers -Body $body
$response | ConvertTo-Json
library(httr)
url <- "https://projects.zoho.com/api/v3/portal/[PORTAL_ID]/projects/23806000097545166/tasklists/[TASKLIST_ID]"
response <- PATCH(
url,
add_headers(Authorization = "Bearer 1000.03xxxxxxxxxxxxxxxxxa5317.dxxxxxxxxxxxxxxxxxfa"),
content_type_json(),
body = "{\"name\":\"Tasklist\",\"milestone\":{\"id\":\"4000000062001\"},\"flag\":\"internal\",\"status\":\"active\",\"tags\":[{\"add\":[{\"id\":\"4000000062001\"}],\"remove\":[{\"id\":\"4000000062001\"}],\"id\":\"4000000062001\"}],\"color\":\"#67a0ff\"}"
)
content(response, "text")
import Foundation
let url = URL(string: "https://projects.zoho.com/api/v3/portal/[PORTAL_ID]/projects/23806000097545166/tasklists/[TASKLIST_ID]")!
var request = URLRequest(url: url)
request.httpMethod = "PATCH"
request.setValue("Bearer 1000.03xxxxxxxxxxxxxxxxxa5317.dxxxxxxxxxxxxxxxxxfa", forHTTPHeaderField: "Authorization")
request.setValue("application/json", forHTTPHeaderField: "Content-Type")
request.httpBody = """
{"name":"Tasklist","milestone":{"id":"4000000062001"},"flag":"internal","status":"active","tags":[{"add":[{"id":"4000000062001"}],"remove":[{"id":"4000000062001"}],"id":"4000000062001"}],"color":"#67a0ff"}
""".data(using: .utf8)
let semaphore = DispatchSemaphore(value: 0)
let task = URLSession.shared.dataTask(with: request) { data, response, error in
if let data = data, let result = String(data: data, encoding: .utf8) {
print(result)
}
semaphore.signal()
}
task.resume()
semaphore.wait()
Sample Input
Sample Response
Remove a task list from the project.
OAuth Scope:
ZohoProjects.tasklists.DELETE
String
requiredUnique, immutable identifier of the portal in Zoho Projects. You can obtain it from the Get Portals API (the "id" field in the response).
String
requiredUnique, immutable identifier of the project within the specified portal. You can obtain it from the Get Projects API (the "id" field in the response).
String
requiredIdentifier of a tasklist. Obtained from the Get Tasklists API - the "id" field in the response corresponds to tasklist_id.
Request Example
curl -X DELETE \
'https://projects.zoho.com/api/v3/portal/[PORTAL_ID]/projects/23806000097545166/tasklists/[TASKLIST_ID]' \
-H 'Authorization: Bearer 1000.03xxxxxxxxxxxxxxxxxa5317.dxxxxxxxxxxxxxxxxxfa'
url = "https://projects.zoho.com/api/v3/portal/[PORTAL_ID]/projects/23806000097545166/tasklists/[TASKLIST_ID]";
response = invokeUrl
[
url: url
type: DELETE
connection: "projects"
];
info response;
const https = require('https');
const url = new URL('https://projects.zoho.com/api/v3/portal/[PORTAL_ID]/projects/23806000097545166/tasklists/[TASKLIST_ID]');
const options = {
hostname: url.hostname,
path: url.pathname + url.search,
method: 'DELETE',
headers: {
'Authorization': 'Bearer 1000.03xxxxxxxxxxxxxxxxxa5317.dxxxxxxxxxxxxxxxxxfa'
}
};
const req = https.request(options, (res) => {
let data = '';
res.on('data', (chunk) => { data += chunk; });
res.on('end', () => { console.log(JSON.parse(data)); });
});
req.on('error', (err) => { console.error(err); });
req.end();
require 'net/http'
require 'uri'
require 'json'
url = URI("https://projects.zoho.com/api/v3/portal/[PORTAL_ID]/projects/23806000097545166/tasklists/[TASKLIST_ID]")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Delete.new(url)
request["Authorization"] = "Bearer 1000.03xxxxxxxxxxxxxxxxxa5317.dxxxxxxxxxxxxxxxxxfa"
response = http.request(request)
puts response.read_body
<?php
$url = "https://projects.zoho.com/api/v3/portal/[PORTAL_ID]/projects/23806000097545166/tasklists/[TASKLIST_ID]";
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => $url,
CURLOPT_RETURNTRANSFER => true,
CURLOPT_CUSTOMREQUEST => "DELETE",
CURLOPT_HTTPHEADER => [
"Authorization: Bearer 1000.03xxxxxxxxxxxxxxxxxa5317.dxxxxxxxxxxxxxxxxxfa"
],
]);
$response = curl_exec($curl);
curl_close($curl);
echo $response;
import requests
url = "https://projects.zoho.com/api/v3/portal/[PORTAL_ID]/projects/23806000097545166/tasklists/[TASKLIST_ID]"
headers = {
"Authorization": "Bearer 1000.03xxxxxxxxxxxxxxxxxa5317.dxxxxxxxxxxxxxxxxxfa",
}
response = requests.delete(url, headers=headers)
print(response.json())
#include <stdio.h>
#include <string.h>
#include <curl/curl.h>
int main(void) {
CURL *curl = curl_easy_init();
if (curl) {
struct curl_slist *headers = NULL;
headers = curl_slist_append(headers, "Authorization: Bearer 1000.03xxxxxxxxxxxxxxxxxa5317.dxxxxxxxxxxxxxxxxxfa");
curl_easy_setopt(curl, CURLOPT_URL, "https://projects.zoho.com/api/v3/portal/[PORTAL_ID]/projects/23806000097545166/tasklists/[TASKLIST_ID]");
curl_easy_setopt(curl, CURLOPT_HTTPHEADER, headers);
curl_easy_setopt(curl, CURLOPT_CUSTOMREQUEST, "DELETE");
CURLcode res = curl_easy_perform(curl);
if (res != CURLE_OK)
fprintf(stderr, "curl failed: %s\n", curl_easy_strerror(res));
curl_slist_free_all(headers);
curl_easy_cleanup(curl);
}
return 0;
}
using System.Net.Http;
using System.Text;
using System.Web;
var client = new HttpClient();
client.DefaultRequestHeaders.Add("Authorization", "Bearer 1000.03xxxxxxxxxxxxxxxxxa5317.dxxxxxxxxxxxxxxxxxfa");
var request = new HttpRequestMessage(HttpMethod.Delete, "https://projects.zoho.com/api/v3/portal/[PORTAL_ID]/projects/23806000097545166/tasklists/[TASKLIST_ID]");
var response = await client.SendAsync(request);
var body = await response.Content.ReadAsStringAsync();
Console.WriteLine(body);
#include <iostream>
#include <string>
#include <curl/curl.h>
static size_t WriteCallback(void* contents, size_t size, size_t nmemb, std::string* output) {
output->append((char*)contents, size * nmemb);
return size * nmemb;
}
int main() {
CURL* curl = curl_easy_init();
if (curl) {
std::string response;
struct curl_slist* headers = NULL;
headers = curl_slist_append(headers, "Authorization: Bearer 1000.03xxxxxxxxxxxxxxxxxa5317.dxxxxxxxxxxxxxxxxxfa");
curl_easy_setopt(curl, CURLOPT_URL, "https://projects.zoho.com/api/v3/portal/[PORTAL_ID]/projects/23806000097545166/tasklists/[TASKLIST_ID]");
curl_easy_setopt(curl, CURLOPT_HTTPHEADER, headers);
curl_easy_setopt(curl, CURLOPT_CUSTOMREQUEST, "DELETE");
curl_easy_setopt(curl, CURLOPT_WRITEFUNCTION, WriteCallback);
curl_easy_setopt(curl, CURLOPT_WRITEDATA, &response);
CURLcode res = curl_easy_perform(curl);
if (res == CURLE_OK)
std::cout << response << std::endl;
else
std::cerr << curl_easy_strerror(res) << std::endl;
curl_slist_free_all(headers);
curl_easy_cleanup(curl);
}
return 0;
}
(require '[clj-http.client :as client])
(def response
(client/delete "https://projects.zoho.com/api/v3/portal/[PORTAL_ID]/projects/23806000097545166/tasklists/[TASKLIST_ID]"
{:headers {"Authorization" "Bearer 1000.03xxxxxxxxxxxxxxxxxa5317.dxxxxxxxxxxxxxxxxxfa"}
:as :json}))
(println (:body response))
package main
import (
"fmt"
"io"
"net/http"
)
func main() {
req, _ := http.NewRequest("DELETE", "https://projects.zoho.com/api/v3/portal/[PORTAL_ID]/projects/23806000097545166/tasklists/[TASKLIST_ID]", nil)
req.Header.Add("Authorization", "Bearer 1000.03xxxxxxxxxxxxxxxxxa5317.dxxxxxxxxxxxxxxxxxfa")
resp, _ := http.DefaultClient.Do(req)
defer resp.Body.Close()
body, _ := io.ReadAll(resp.Body)
fmt.Println(string(body))
}
DELETE https://projects.zoho.com/api/v3/portal/[PORTAL_ID]/projects/23806000097545166/tasklists/[TASKLIST_ID] HTTP/1.1
Host: https://projects.zoho.com/api/v3/portal/[PORTAL_ID]/projects/23806000097545166/tasklists/[TASKLIST_ID]
Authorization: Bearer 1000.03xxxxxxxxxxxxxxxxxa5317.dxxxxxxxxxxxxxxxxxfa
HttpClientBuilder httpClientBuilder = HttpClientBuilder.create();
SSLContext sslContext = SSLContext.getDefault();
SSLConnectionSocketFactory sslConnectionSocketFactory = new SSLConnectionSocketFactory(sslContext, NoopHostnameVerifier.INSTANCE);
CloseableHttpClient httpclient = httpClientBuilder.setSSLSocketFactory(sslConnectionSocketFactory).build();
URIBuilder uriBuilder = new URIBuilder("https://projects.zoho.com/api/v3/portal/[PORTAL_ID]/projects/23806000097545166/tasklists/[TASKLIST_ID]");
HttpUriRequest requestObj = new HttpDelete(uriBuilder.build());
requestObj.addHeader("Authorization", "Bearer 1000.03xxxxxxxxxxxxxxxxxa5317.dxxxxxxxxxxxxxxxxxfa");
HttpResponse response = httpclient.execute(requestObj);
HttpEntity responseEntity = response.getEntity();
Object responseObject = EntityUtils.toString(responseEntity);
String responseString = responseObject.toString();
const url = 'https://projects.zoho.com/api/v3/portal/[PORTAL_ID]/projects/23806000097545166/tasklists/[TASKLIST_ID]';
const options = {
method: 'DELETE',
headers: {
'Authorization': 'Bearer 1000.03xxxxxxxxxxxxxxxxxa5317.dxxxxxxxxxxxxxxxxxfa'
}
};
fetch(url, options)
.then(response => response.json())
.then(data => console.log(data))
.catch(error => console.error(error));
import java.net.HttpURLConnection
import java.net.URL
import okhttp3.HttpUrl.Companion.toHttpUrl
fun main() {
val url = URL("https://projects.zoho.com/api/v3/portal/[PORTAL_ID]/projects/23806000097545166/tasklists/[TASKLIST_ID]")
val conn = url.openConnection() as HttpURLConnection
conn.requestMethod = "DELETE"
conn.setRequestProperty("Authorization", "Bearer 1000.03xxxxxxxxxxxxxxxxxa5317.dxxxxxxxxxxxxxxxxxfa")
val response = conn.inputStream.bufferedReader().readText()
println(response)
}
NSURL *url = [NSURL URLWithString:@"https://projects.zoho.com/api/v3/portal/[PORTAL_ID]/projects/23806000097545166/tasklists/[TASKLIST_ID]"];
NSMutableURLRequest *request = [NSMutableURLRequest requestWithURL:url];
[request setHTTPMethod:@"DELETE"];
[request setValue:@"Bearer 1000.03xxxxxxxxxxxxxxxxxa5317.dxxxxxxxxxxxxxxxxxfa" forHTTPHeaderField:@"Authorization"];
NSURLSession *session = [NSURLSession sharedSession];
NSURLSessionDataTask *task = [session dataTaskWithRequest:request
completionHandler:^(NSData *data, NSURLResponse *response, NSError *error) {
NSString *result = [[NSString alloc] initWithData:data encoding:NSUTF8StringEncoding];
NSLog(@"%@", result);
}];
[task resume];
open Lwt
open Cohttp_lwt_unix
let () =
let uri = Uri.of_string "https://projects.zoho.com/api/v3/portal/[PORTAL_ID]/projects/23806000097545166/tasklists/[TASKLIST_ID]" in
let headers = Cohttp.Header.init ()
|> fun h -> Cohttp.Header.add h "Authorization" "Bearer 1000.03xxxxxxxxxxxxxxxxxa5317.dxxxxxxxxxxxxxxxxxfa"
in
Lwt_main.run (
Client.delete ~headers uri >>= fun (_, body) ->
Cohttp_lwt.Body.to_string body >|= fun s ->
print_endline s)
$headers = @{
"Authorization" = "Bearer 1000.03xxxxxxxxxxxxxxxxxa5317.dxxxxxxxxxxxxxxxxxfa"
}
$response = Invoke-RestMethod -Uri "https://projects.zoho.com/api/v3/portal/[PORTAL_ID]/projects/23806000097545166/tasklists/[TASKLIST_ID]" -Method DELETE -Headers $headers
$response | ConvertTo-Json
library(httr)
url <- "https://projects.zoho.com/api/v3/portal/[PORTAL_ID]/projects/23806000097545166/tasklists/[TASKLIST_ID]"
response <- DELETE(
url,
add_headers(Authorization = "Bearer 1000.03xxxxxxxxxxxxxxxxxa5317.dxxxxxxxxxxxxxxxxxfa")
)
content(response, "text")
import Foundation
let url = URL(string: "https://projects.zoho.com/api/v3/portal/[PORTAL_ID]/projects/23806000097545166/tasklists/[TASKLIST_ID]")!
var request = URLRequest(url: url)
request.httpMethod = "DELETE"
request.setValue("Bearer 1000.03xxxxxxxxxxxxxxxxxa5317.dxxxxxxxxxxxxxxxxxfa", forHTTPHeaderField: "Authorization")
let semaphore = DispatchSemaphore(value: 0)
let task = URLSession.shared.dataTask(with: request) { data, response, error in
if let data = data, let result = String(data: data, encoding: .utf8) {
print(result)
}
semaphore.signal()
}
task.resume()
semaphore.wait()
Sample Response
Create Default tasklist for a Project
OAuth Scope:
ZohoProjects.tasklists.CREATE
String
requiredUnique, immutable identifier of the portal in Zoho Projects. You can obtain it from the Get Portals API (the "id" field in the response).
String
requiredUnique, immutable identifier of the project within the specified portal. You can obtain it from the Get Projects API (the "id" field in the response).
String
requiredSet the task list flag. Accepted values: internal,external .
Request Example
curl -X POST \
'https://projects.zoho.com/api/v3/portal/[PORTAL_ID]/projects/23806000097545166/default-tasklists' \
-H 'Authorization: Bearer 1000.03xxxxxxxxxxxxxxxxxa5317.dxxxxxxxxxxxxxxxxxfa' \
-H 'Content-Type: application/json' \
-d '{"flag":"internal"}'
url = "https://projects.zoho.com/api/v3/portal/[PORTAL_ID]/projects/23806000097545166/default-tasklists";
params = Map();
params.put("flag", "internal");
response = invokeUrl
[
url: url
type: POST
parameters: params.toString()
connection: "projects"
];
info response;
const https = require('https');
const url = new URL('https://projects.zoho.com/api/v3/portal/[PORTAL_ID]/projects/23806000097545166/default-tasklists');
const payload = JSON.stringify({"flag":"internal"});
const options = {
hostname: url.hostname,
path: url.pathname + url.search,
method: 'POST',
headers: {
'Authorization': 'Bearer 1000.03xxxxxxxxxxxxxxxxxa5317.dxxxxxxxxxxxxxxxxxfa',
'Content-Type': 'application/json',
'Content-Length': Buffer.byteLength(payload)
}
};
const req = https.request(options, (res) => {
let data = '';
res.on('data', (chunk) => { data += chunk; });
res.on('end', () => { console.log(JSON.parse(data)); });
});
req.on('error', (err) => { console.error(err); });
req.write(payload);
req.end();
require 'net/http'
require 'uri'
require 'json'
url = URI("https://projects.zoho.com/api/v3/portal/[PORTAL_ID]/projects/23806000097545166/default-tasklists")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = "Bearer 1000.03xxxxxxxxxxxxxxxxxa5317.dxxxxxxxxxxxxxxxxxfa"
request["Content-Type"] = "application/json"
request.body = '{"flag":"internal"}'
response = http.request(request)
puts response.read_body
<?php
$url = "https://projects.zoho.com/api/v3/portal/[PORTAL_ID]/projects/23806000097545166/default-tasklists";
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => $url,
CURLOPT_RETURNTRANSFER => true,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => '{"flag":"internal"}',
CURLOPT_HTTPHEADER => [
"Authorization: Bearer 1000.03xxxxxxxxxxxxxxxxxa5317.dxxxxxxxxxxxxxxxxxfa",
"Content-Type: application/json"
],
]);
$response = curl_exec($curl);
curl_close($curl);
echo $response;
import requests
url = "https://projects.zoho.com/api/v3/portal/[PORTAL_ID]/projects/23806000097545166/default-tasklists"
headers = {
"Authorization": "Bearer 1000.03xxxxxxxxxxxxxxxxxa5317.dxxxxxxxxxxxxxxxxxfa",
"Content-Type": "application/json",
}
payload = '{"flag":"internal"}'
response = requests.post(url, headers=headers, data=payload)
print(response.json())
#include <stdio.h>
#include <string.h>
#include <curl/curl.h>
int main(void) {
CURL *curl = curl_easy_init();
if (curl) {
struct curl_slist *headers = NULL;
headers = curl_slist_append(headers, "Authorization: Bearer 1000.03xxxxxxxxxxxxxxxxxa5317.dxxxxxxxxxxxxxxxxxfa");
headers = curl_slist_append(headers, "Content-Type: application/json");
curl_easy_setopt(curl, CURLOPT_URL, "https://projects.zoho.com/api/v3/portal/[PORTAL_ID]/projects/23806000097545166/default-tasklists");
curl_easy_setopt(curl, CURLOPT_HTTPHEADER, headers);
curl_easy_setopt(curl, CURLOPT_CUSTOMREQUEST, "POST");
curl_easy_setopt(curl, CURLOPT_POSTFIELDS, "{\"flag\":\"internal\"}");
CURLcode res = curl_easy_perform(curl);
if (res != CURLE_OK)
fprintf(stderr, "curl failed: %s\n", curl_easy_strerror(res));
curl_slist_free_all(headers);
curl_easy_cleanup(curl);
}
return 0;
}
using System.Net.Http;
using System.Text;
using System.Web;
var client = new HttpClient();
client.DefaultRequestHeaders.Add("Authorization", "Bearer 1000.03xxxxxxxxxxxxxxxxxa5317.dxxxxxxxxxxxxxxxxxfa");
var request = new HttpRequestMessage(HttpMethod.Post, "https://projects.zoho.com/api/v3/portal/[PORTAL_ID]/projects/23806000097545166/default-tasklists");
request.Content = new StringContent(
@"{""flag"":""internal""}",
Encoding.UTF8,
"application/json"
);
var response = await client.SendAsync(request);
var body = await response.Content.ReadAsStringAsync();
Console.WriteLine(body);
#include <iostream>
#include <string>
#include <curl/curl.h>
static size_t WriteCallback(void* contents, size_t size, size_t nmemb, std::string* output) {
output->append((char*)contents, size * nmemb);
return size * nmemb;
}
int main() {
CURL* curl = curl_easy_init();
if (curl) {
std::string response;
struct curl_slist* headers = NULL;
headers = curl_slist_append(headers, "Authorization: Bearer 1000.03xxxxxxxxxxxxxxxxxa5317.dxxxxxxxxxxxxxxxxxfa");
headers = curl_slist_append(headers, "Content-Type: application/json");
curl_easy_setopt(curl, CURLOPT_URL, "https://projects.zoho.com/api/v3/portal/[PORTAL_ID]/projects/23806000097545166/default-tasklists");
curl_easy_setopt(curl, CURLOPT_HTTPHEADER, headers);
curl_easy_setopt(curl, CURLOPT_CUSTOMREQUEST, "POST");
curl_easy_setopt(curl, CURLOPT_WRITEFUNCTION, WriteCallback);
curl_easy_setopt(curl, CURLOPT_WRITEDATA, &response);
curl_easy_setopt(curl, CURLOPT_POSTFIELDS, "{\"flag\":\"internal\"}");
CURLcode res = curl_easy_perform(curl);
if (res == CURLE_OK)
std::cout << response << std::endl;
else
std::cerr << curl_easy_strerror(res) << std::endl;
curl_slist_free_all(headers);
curl_easy_cleanup(curl);
}
return 0;
}
(require '[clj-http.client :as client])
(def response
(client/post "https://projects.zoho.com/api/v3/portal/[PORTAL_ID]/projects/23806000097545166/default-tasklists"
{:headers {"Authorization" "Bearer 1000.03xxxxxxxxxxxxxxxxxa5317.dxxxxxxxxxxxxxxxxxfa"
"Content-Type" "application/json"}
:body "{\"flag\":\"internal\"}"
:as :json}))
(println (:body response))
package main
import (
"fmt"
"io"
"net/http"
"strings"
)
func main() {
payload := strings.NewReader("{\"flag\":\"internal\"}")
req, _ := http.NewRequest("POST", "https://projects.zoho.com/api/v3/portal/[PORTAL_ID]/projects/23806000097545166/default-tasklists", payload)
req.Header.Add("Authorization", "Bearer 1000.03xxxxxxxxxxxxxxxxxa5317.dxxxxxxxxxxxxxxxxxfa")
req.Header.Add("Content-Type", "application/json")
resp, _ := http.DefaultClient.Do(req)
defer resp.Body.Close()
body, _ := io.ReadAll(resp.Body)
fmt.Println(string(body))
}
POST https://projects.zoho.com/api/v3/portal/[PORTAL_ID]/projects/23806000097545166/default-tasklists HTTP/1.1
Host: https://projects.zoho.com/api/v3/portal/[PORTAL_ID]/projects/23806000097545166/default-tasklists
Authorization: Bearer 1000.03xxxxxxxxxxxxxxxxxa5317.dxxxxxxxxxxxxxxxxxfa
Content-Type: application/json
{"flag":"internal"}
HttpClientBuilder httpClientBuilder = HttpClientBuilder.create();
SSLContext sslContext = SSLContext.getDefault();
SSLConnectionSocketFactory sslConnectionSocketFactory = new SSLConnectionSocketFactory(sslContext, NoopHostnameVerifier.INSTANCE);
CloseableHttpClient httpclient = httpClientBuilder.setSSLSocketFactory(sslConnectionSocketFactory).build();
URIBuilder uriBuilder = new URIBuilder("https://projects.zoho.com/api/v3/portal/[PORTAL_ID]/projects/23806000097545166/default-tasklists");
HttpUriRequest requestObj = new HttpPost(uriBuilder.build());
requestObj.addHeader("Authorization", "Bearer 1000.03xxxxxxxxxxxxxxxxxa5317.dxxxxxxxxxxxxxxxxxfa");
HttpEntityEnclosingRequestBase requestBase = (HttpEntityEnclosingRequestBase) requestObj;
String requestBody = "{\"flag\":\"internal\"}";
requestBase.setEntity(new StringEntity(requestBody, HTTP.UTF_8));
HttpResponse response = httpclient.execute(requestObj);
HttpEntity responseEntity = response.getEntity();
Object responseObject = EntityUtils.toString(responseEntity);
String responseString = responseObject.toString();
const url = 'https://projects.zoho.com/api/v3/portal/[PORTAL_ID]/projects/23806000097545166/default-tasklists';
const options = {
method: 'POST',
headers: {
'Authorization': 'Bearer 1000.03xxxxxxxxxxxxxxxxxa5317.dxxxxxxxxxxxxxxxxxfa',
'Content-Type': 'application/json'
},
body: JSON.stringify({"flag":"internal"})
};
fetch(url, options)
.then(response => response.json())
.then(data => console.log(data))
.catch(error => console.error(error));
{"flag":"internal"}import java.net.HttpURLConnection
import java.net.URL
import okhttp3.HttpUrl.Companion.toHttpUrl
fun main() {
val url = URL("https://projects.zoho.com/api/v3/portal/[PORTAL_ID]/projects/23806000097545166/default-tasklists")
val conn = url.openConnection() as HttpURLConnection
conn.requestMethod = "POST"
conn.setRequestProperty("Authorization", "Bearer 1000.03xxxxxxxxxxxxxxxxxa5317.dxxxxxxxxxxxxxxxxxfa")
conn.setRequestProperty("Content-Type", "application/json")
conn.doOutput = true
conn.outputStream.bufferedWriter().use { it.write("""{"flag":"internal"}""") }
val response = conn.inputStream.bufferedReader().readText()
println(response)
}
NSURL *url = [NSURL URLWithString:@"https://projects.zoho.com/api/v3/portal/[PORTAL_ID]/projects/23806000097545166/default-tasklists"];
NSMutableURLRequest *request = [NSMutableURLRequest requestWithURL:url];
[request setHTTPMethod:@"POST"];
[request setValue:@"Bearer 1000.03xxxxxxxxxxxxxxxxxa5317.dxxxxxxxxxxxxxxxxxfa" forHTTPHeaderField:@"Authorization"];
[request setValue:@"application/json" forHTTPHeaderField:@"Content-Type"];
NSData *body = [@"{\"flag\":\"internal\"}" dataUsingEncoding:NSUTF8StringEncoding];
[request setHTTPBody:body];
NSURLSession *session = [NSURLSession sharedSession];
NSURLSessionDataTask *task = [session dataTaskWithRequest:request
completionHandler:^(NSData *data, NSURLResponse *response, NSError *error) {
NSString *result = [[NSString alloc] initWithData:data encoding:NSUTF8StringEncoding];
NSLog(@"%@", result);
}];
[task resume];
open Lwt
open Cohttp_lwt_unix
let () =
let uri = Uri.of_string "https://projects.zoho.com/api/v3/portal/[PORTAL_ID]/projects/23806000097545166/default-tasklists" in
let headers = Cohttp.Header.init ()
|> fun h -> Cohttp.Header.add h "Authorization" "Bearer 1000.03xxxxxxxxxxxxxxxxxa5317.dxxxxxxxxxxxxxxxxxfa"
|> fun h -> Cohttp.Header.add h "Content-Type" "application/json"
in
let body = Cohttp_lwt.Body.of_string {json|{"flag":"internal"}|json} in
Lwt_main.run (
Client.post ~headers ~body uri >>= fun (_, body) ->
Cohttp_lwt.Body.to_string body >|= fun s ->
print_endline s)
$headers = @{
"Authorization" = "Bearer 1000.03xxxxxxxxxxxxxxxxxa5317.dxxxxxxxxxxxxxxxxxfa"
"Content-Type" = "application/json"
}
$body = @'
{"flag":"internal"}
'@
$response = Invoke-RestMethod -Uri "https://projects.zoho.com/api/v3/portal/[PORTAL_ID]/projects/23806000097545166/default-tasklists" -Method POST -Headers $headers -Body $body
$response | ConvertTo-Json
library(httr)
url <- "https://projects.zoho.com/api/v3/portal/[PORTAL_ID]/projects/23806000097545166/default-tasklists"
response <- POST(
url,
add_headers(Authorization = "Bearer 1000.03xxxxxxxxxxxxxxxxxa5317.dxxxxxxxxxxxxxxxxxfa"),
content_type_json(),
body = "{\"flag\":\"internal\"}"
)
content(response, "text")
import Foundation
let url = URL(string: "https://projects.zoho.com/api/v3/portal/[PORTAL_ID]/projects/23806000097545166/default-tasklists")!
var request = URLRequest(url: url)
request.httpMethod = "POST"
request.setValue("Bearer 1000.03xxxxxxxxxxxxxxxxxa5317.dxxxxxxxxxxxxxxxxxfa", forHTTPHeaderField: "Authorization")
request.setValue("application/json", forHTTPHeaderField: "Content-Type")
request.httpBody = """
{"flag":"internal"}
""".data(using: .utf8)
let semaphore = DispatchSemaphore(value: 0)
let task = URLSession.shared.dataTask(with: request) { data, response, error in
if let data = data, let result = String(data: data, encoding: .utf8) {
print(result)
}
semaphore.signal()
}
task.resume()
semaphore.wait()
Sample Input
Sample Response
Modify status of the task list as closed in a project.
OAuth Scope:
ZohoProjects.tasklists.UPDATE
String
requiredUnique, immutable identifier of the portal in Zoho Projects. You can obtain it from the Get Portals API (the "id" field in the response).
String
requiredUnique, immutable identifier of the project within the specified portal. You can obtain it from the Get Projects API (the "id" field in the response).
String
requiredIdentifier of a tasklist. Obtained from the Get Tasklists API - the "id" field in the response corresponds to tasklist_id.
Request Example
curl -X POST \
'https://projects.zoho.com/api/v3/portal/[PORTAL_ID]/projects/23806000097545166/tasklists/[TASKLIST_ID]/mark-as-closed' \
-H 'Authorization: Bearer 1000.03xxxxxxxxxxxxxxxxxa5317.dxxxxxxxxxxxxxxxxxfa'
url = "https://projects.zoho.com/api/v3/portal/[PORTAL_ID]/projects/23806000097545166/tasklists/[TASKLIST_ID]/mark-as-closed";
response = invokeUrl
[
url: url
type: POST
connection: "projects"
];
info response;
const https = require('https');
const url = new URL('https://projects.zoho.com/api/v3/portal/[PORTAL_ID]/projects/23806000097545166/tasklists/[TASKLIST_ID]/mark-as-closed');
const options = {
hostname: url.hostname,
path: url.pathname + url.search,
method: 'POST',
headers: {
'Authorization': 'Bearer 1000.03xxxxxxxxxxxxxxxxxa5317.dxxxxxxxxxxxxxxxxxfa'
}
};
const req = https.request(options, (res) => {
let data = '';
res.on('data', (chunk) => { data += chunk; });
res.on('end', () => { console.log(JSON.parse(data)); });
});
req.on('error', (err) => { console.error(err); });
req.end();
require 'net/http'
require 'uri'
require 'json'
url = URI("https://projects.zoho.com/api/v3/portal/[PORTAL_ID]/projects/23806000097545166/tasklists/[TASKLIST_ID]/mark-as-closed")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = "Bearer 1000.03xxxxxxxxxxxxxxxxxa5317.dxxxxxxxxxxxxxxxxxfa"
response = http.request(request)
puts response.read_body
<?php
$url = "https://projects.zoho.com/api/v3/portal/[PORTAL_ID]/projects/23806000097545166/tasklists/[TASKLIST_ID]/mark-as-closed";
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => $url,
CURLOPT_RETURNTRANSFER => true,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_HTTPHEADER => [
"Authorization: Bearer 1000.03xxxxxxxxxxxxxxxxxa5317.dxxxxxxxxxxxxxxxxxfa"
],
]);
$response = curl_exec($curl);
curl_close($curl);
echo $response;
import requests
url = "https://projects.zoho.com/api/v3/portal/[PORTAL_ID]/projects/23806000097545166/tasklists/[TASKLIST_ID]/mark-as-closed"
headers = {
"Authorization": "Bearer 1000.03xxxxxxxxxxxxxxxxxa5317.dxxxxxxxxxxxxxxxxxfa",
}
response = requests.post(url, headers=headers)
print(response.json())
#include <stdio.h>
#include <string.h>
#include <curl/curl.h>
int main(void) {
CURL *curl = curl_easy_init();
if (curl) {
struct curl_slist *headers = NULL;
headers = curl_slist_append(headers, "Authorization: Bearer 1000.03xxxxxxxxxxxxxxxxxa5317.dxxxxxxxxxxxxxxxxxfa");
curl_easy_setopt(curl, CURLOPT_URL, "https://projects.zoho.com/api/v3/portal/[PORTAL_ID]/projects/23806000097545166/tasklists/[TASKLIST_ID]/mark-as-closed");
curl_easy_setopt(curl, CURLOPT_HTTPHEADER, headers);
curl_easy_setopt(curl, CURLOPT_CUSTOMREQUEST, "POST");
CURLcode res = curl_easy_perform(curl);
if (res != CURLE_OK)
fprintf(stderr, "curl failed: %s\n", curl_easy_strerror(res));
curl_slist_free_all(headers);
curl_easy_cleanup(curl);
}
return 0;
}
using System.Net.Http;
using System.Text;
using System.Web;
var client = new HttpClient();
client.DefaultRequestHeaders.Add("Authorization", "Bearer 1000.03xxxxxxxxxxxxxxxxxa5317.dxxxxxxxxxxxxxxxxxfa");
var request = new HttpRequestMessage(HttpMethod.Post, "https://projects.zoho.com/api/v3/portal/[PORTAL_ID]/projects/23806000097545166/tasklists/[TASKLIST_ID]/mark-as-closed");
var response = await client.SendAsync(request);
var body = await response.Content.ReadAsStringAsync();
Console.WriteLine(body);
#include <iostream>
#include <string>
#include <curl/curl.h>
static size_t WriteCallback(void* contents, size_t size, size_t nmemb, std::string* output) {
output->append((char*)contents, size * nmemb);
return size * nmemb;
}
int main() {
CURL* curl = curl_easy_init();
if (curl) {
std::string response;
struct curl_slist* headers = NULL;
headers = curl_slist_append(headers, "Authorization: Bearer 1000.03xxxxxxxxxxxxxxxxxa5317.dxxxxxxxxxxxxxxxxxfa");
curl_easy_setopt(curl, CURLOPT_URL, "https://projects.zoho.com/api/v3/portal/[PORTAL_ID]/projects/23806000097545166/tasklists/[TASKLIST_ID]/mark-as-closed");
curl_easy_setopt(curl, CURLOPT_HTTPHEADER, headers);
curl_easy_setopt(curl, CURLOPT_CUSTOMREQUEST, "POST");
curl_easy_setopt(curl, CURLOPT_WRITEFUNCTION, WriteCallback);
curl_easy_setopt(curl, CURLOPT_WRITEDATA, &response);
CURLcode res = curl_easy_perform(curl);
if (res == CURLE_OK)
std::cout << response << std::endl;
else
std::cerr << curl_easy_strerror(res) << std::endl;
curl_slist_free_all(headers);
curl_easy_cleanup(curl);
}
return 0;
}
(require '[clj-http.client :as client])
(def response
(client/post "https://projects.zoho.com/api/v3/portal/[PORTAL_ID]/projects/23806000097545166/tasklists/[TASKLIST_ID]/mark-as-closed"
{:headers {"Authorization" "Bearer 1000.03xxxxxxxxxxxxxxxxxa5317.dxxxxxxxxxxxxxxxxxfa"}
:as :json}))
(println (:body response))
package main
import (
"fmt"
"io"
"net/http"
)
func main() {
req, _ := http.NewRequest("POST", "https://projects.zoho.com/api/v3/portal/[PORTAL_ID]/projects/23806000097545166/tasklists/[TASKLIST_ID]/mark-as-closed", nil)
req.Header.Add("Authorization", "Bearer 1000.03xxxxxxxxxxxxxxxxxa5317.dxxxxxxxxxxxxxxxxxfa")
resp, _ := http.DefaultClient.Do(req)
defer resp.Body.Close()
body, _ := io.ReadAll(resp.Body)
fmt.Println(string(body))
}
POST https://projects.zoho.com/api/v3/portal/[PORTAL_ID]/projects/23806000097545166/tasklists/[TASKLIST_ID]/mark-as-closed HTTP/1.1
Host: https://projects.zoho.com/api/v3/portal/[PORTAL_ID]/projects/23806000097545166/tasklists/[TASKLIST_ID]/mark-as-closed
Authorization: Bearer 1000.03xxxxxxxxxxxxxxxxxa5317.dxxxxxxxxxxxxxxxxxfa
HttpClientBuilder httpClientBuilder = HttpClientBuilder.create();
SSLContext sslContext = SSLContext.getDefault();
SSLConnectionSocketFactory sslConnectionSocketFactory = new SSLConnectionSocketFactory(sslContext, NoopHostnameVerifier.INSTANCE);
CloseableHttpClient httpclient = httpClientBuilder.setSSLSocketFactory(sslConnectionSocketFactory).build();
URIBuilder uriBuilder = new URIBuilder("https://projects.zoho.com/api/v3/portal/[PORTAL_ID]/projects/23806000097545166/tasklists/[TASKLIST_ID]/mark-as-closed");
HttpUriRequest requestObj = new HttpPost(uriBuilder.build());
requestObj.addHeader("Authorization", "Bearer 1000.03xxxxxxxxxxxxxxxxxa5317.dxxxxxxxxxxxxxxxxxfa");
HttpResponse response = httpclient.execute(requestObj);
HttpEntity responseEntity = response.getEntity();
Object responseObject = EntityUtils.toString(responseEntity);
String responseString = responseObject.toString();
const url = 'https://projects.zoho.com/api/v3/portal/[PORTAL_ID]/projects/23806000097545166/tasklists/[TASKLIST_ID]/mark-as-closed';
const options = {
method: 'POST',
headers: {
'Authorization': 'Bearer 1000.03xxxxxxxxxxxxxxxxxa5317.dxxxxxxxxxxxxxxxxxfa'
}
};
fetch(url, options)
.then(response => response.json())
.then(data => console.log(data))
.catch(error => console.error(error));
import java.net.HttpURLConnection
import java.net.URL
import okhttp3.HttpUrl.Companion.toHttpUrl
fun main() {
val url = URL("https://projects.zoho.com/api/v3/portal/[PORTAL_ID]/projects/23806000097545166/tasklists/[TASKLIST_ID]/mark-as-closed")
val conn = url.openConnection() as HttpURLConnection
conn.requestMethod = "POST"
conn.setRequestProperty("Authorization", "Bearer 1000.03xxxxxxxxxxxxxxxxxa5317.dxxxxxxxxxxxxxxxxxfa")
val response = conn.inputStream.bufferedReader().readText()
println(response)
}
NSURL *url = [NSURL URLWithString:@"https://projects.zoho.com/api/v3/portal/[PORTAL_ID]/projects/23806000097545166/tasklists/[TASKLIST_ID]/mark-as-closed"];
NSMutableURLRequest *request = [NSMutableURLRequest requestWithURL:url];
[request setHTTPMethod:@"POST"];
[request setValue:@"Bearer 1000.03xxxxxxxxxxxxxxxxxa5317.dxxxxxxxxxxxxxxxxxfa" forHTTPHeaderField:@"Authorization"];
NSURLSession *session = [NSURLSession sharedSession];
NSURLSessionDataTask *task = [session dataTaskWithRequest:request
completionHandler:^(NSData *data, NSURLResponse *response, NSError *error) {
NSString *result = [[NSString alloc] initWithData:data encoding:NSUTF8StringEncoding];
NSLog(@"%@", result);
}];
[task resume];
open Lwt
open Cohttp_lwt_unix
let () =
let uri = Uri.of_string "https://projects.zoho.com/api/v3/portal/[PORTAL_ID]/projects/23806000097545166/tasklists/[TASKLIST_ID]/mark-as-closed" in
let headers = Cohttp.Header.init ()
|> fun h -> Cohttp.Header.add h "Authorization" "Bearer 1000.03xxxxxxxxxxxxxxxxxa5317.dxxxxxxxxxxxxxxxxxfa"
in
Lwt_main.run (
Client.post ~headers uri >>= fun (_, body) ->
Cohttp_lwt.Body.to_string body >|= fun s ->
print_endline s)
$headers = @{
"Authorization" = "Bearer 1000.03xxxxxxxxxxxxxxxxxa5317.dxxxxxxxxxxxxxxxxxfa"
}
$response = Invoke-RestMethod -Uri "https://projects.zoho.com/api/v3/portal/[PORTAL_ID]/projects/23806000097545166/tasklists/[TASKLIST_ID]/mark-as-closed" -Method POST -Headers $headers
$response | ConvertTo-Json
library(httr)
url <- "https://projects.zoho.com/api/v3/portal/[PORTAL_ID]/projects/23806000097545166/tasklists/[TASKLIST_ID]/mark-as-closed"
response <- POST(
url,
add_headers(Authorization = "Bearer 1000.03xxxxxxxxxxxxxxxxxa5317.dxxxxxxxxxxxxxxxxxfa")
)
content(response, "text")
import Foundation
let url = URL(string: "https://projects.zoho.com/api/v3/portal/[PORTAL_ID]/projects/23806000097545166/tasklists/[TASKLIST_ID]/mark-as-closed")!
var request = URLRequest(url: url)
request.httpMethod = "POST"
request.setValue("Bearer 1000.03xxxxxxxxxxxxxxxxxa5317.dxxxxxxxxxxxxxxxxxfa", forHTTPHeaderField: "Authorization")
let semaphore = DispatchSemaphore(value: 0)
let task = URLSession.shared.dataTask(with: request) { data, response, error in
if let data = data, let result = String(data: data, encoding: .utf8) {
print(result)
}
semaphore.signal()
}
task.resume()
semaphore.wait()
Sample Response