Tasks
This module covers task-related operations within Zoho Projects. Use this API to create, copy, move, delete, or get task details, manage baselines, set dependencies, and retrieve status or layout-specific work hour details.
This module covers task-related operations within Zoho Projects. Use this API to create, copy, move, delete, or get task details, manage baselines, set dependencies, and retrieve status or layout-specific work hour details.
Retrieve all tasks across the Zoho Projects portal. Use this API to fetch tasks from all projects within a portal.
OAuth Scope:
ZohoProjects.tasks.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).
int
default : 1Enter the page number to retrieve.
int
limit : 1-200Enter the number of entries to display per page.
JSONObject
Specify the filter criteria to apply to the task list.
String
Enter the sort criteria. Accepted values: ASC(field_name) or DESC(field_name). Fields you can sort by include id, name, start_date, end_date, completion_percentage, created_time, last_modified_time, created_by and is_completed.
String
Enter the custom view ID.
String
regex : ISO-8601Enter the start date of the task
Request Example
curl -X GET \
'https://projects.zoho.com/api/v3/portal/[PORTAL_ID]/tasks?page=1&per_page=10&filter=%7B%22criteria%22%3A%5B%7B%22field_name%22%3A%22name%22%2C%22criteria_condition%22%3A%22contains%22%2C%22value%22%3A%5B%22Design%22%5D%2C%22module_name%22%3A%22bug%22%7D%5D%2C%22pattern%22%3A%221%22%7D&sort_by=ASC%28last_modified_time%29&view_id=23806000074760021&last_modified_time=1631538698839' \
-H 'Authorization: Bearer 1000.03xxxxxxxxxxxxxxxxxa5317.dxxxxxxxxxxxxxxxxxfa'
url = "https://projects.zoho.com/api/v3/portal/[PORTAL_ID]/tasks";
filter_value = {"criteria":[{"field_name":"name","criteria_condition":"contains","value":["Design"],"module_name":"bug"}],"pattern":"1"};
params = Map();
params.put("page", 1);
params.put("per_page", 10);
params.put("filter", filter_value);
params.put("sort_by", "ASC(last_modified_time)");
params.put("view_id", "23806000074760021");
params.put("last_modified_time", "1631538698839");
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]/tasks');
url.searchParams.append('page', '1');
url.searchParams.append('per_page', '10');
url.searchParams.append('filter', '{"criteria":[{"field_name":"name","criteria_condition":"contains","value":["Design"],"module_name":"bug"}],"pattern":"1"}');
url.searchParams.append('sort_by', 'ASC(last_modified_time)');
url.searchParams.append('view_id', '23806000074760021');
url.searchParams.append('last_modified_time', '1631538698839');
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]/tasks")
params = {
"page" => "1",
"per_page" => "10",
"filter" => "{\"criteria\":[{\"field_name\":\"name\",\"criteria_condition\":\"contains\",\"value\":[\"Design\"],\"module_name\":\"bug\"}],\"pattern\":\"1\"}",
"sort_by" => "ASC(last_modified_time)",
"view_id" => "23806000074760021",
"last_modified_time" => "1631538698839"
}
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 = [
'page' => '1',
'per_page' => '10',
'filter' => '{"criteria":[{"field_name":"name","criteria_condition":"contains","value":["Design"],"module_name":"bug"}],"pattern":"1"}',
'sort_by' => 'ASC(last_modified_time)',
'view_id' => '23806000074760021',
'last_modified_time' => '1631538698839',
];
$url = "https://projects.zoho.com/api/v3/portal/[PORTAL_ID]/tasks" . "?" . 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]/tasks"
params = {
"page": "1",
"per_page": "10",
"filter": "{\"criteria\":[{\"field_name\":\"name\",\"criteria_condition\":\"contains\",\"value\":[\"Design\"],\"module_name\":\"bug\"}],\"pattern\":\"1\"}",
"sort_by": "ASC(last_modified_time)",
"view_id": "23806000074760021",
"last_modified_time": "1631538698839"
}
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_page = curl_easy_escape(curl, "1", 0);
char *enc_per_page = curl_easy_escape(curl, "10", 0);
char *enc_filter = curl_easy_escape(curl, "{\"criteria\":[{\"field_name\":\"name\",\"criteria_condition\":\"contains\",\"value\":[\"Design\"],\"module_name\":\"bug\"}],\"pattern\":\"1\"}", 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 *enc_last_modified_time = curl_easy_escape(curl, "1631538698839", 0);
char url[2048];
snprintf(url, sizeof(url), "https://projects.zoho.com/api/v3/portal/[PORTAL_ID]/tasks?page=%s&per_page=%s&filter=%s&sort_by=%s&view_id=%s&last_modified_time=%s", enc_page, enc_per_page, enc_filter, enc_sort_by, enc_view_id, enc_last_modified_time);
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_page);
curl_free(enc_per_page);
curl_free(enc_filter);
curl_free(enc_sort_by);
curl_free(enc_view_id);
curl_free(enc_last_modified_time);
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["page"] = "1";
query["per_page"] = "10";
query["filter"] = "{\"criteria\":[{\"field_name\":\"name\",\"criteria_condition\":\"contains\",\"value\":[\"Design\"],\"module_name\":\"bug\"}],\"pattern\":\"1\"}";
query["sort_by"] = "ASC(last_modified_time)";
query["view_id"] = "23806000074760021";
query["last_modified_time"] = "1631538698839";
var uriBuilder = new UriBuilder("https://projects.zoho.com/api/v3/portal/[PORTAL_ID]/tasks") { 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_page = curl_easy_escape(curl, "1", 0);
char* enc_per_page = curl_easy_escape(curl, "10", 0);
char* enc_filter = curl_easy_escape(curl, "{\"criteria\":[{\"field_name\":\"name\",\"criteria_condition\":\"contains\",\"value\":[\"Design\"],\"module_name\":\"bug\"}],\"pattern\":\"1\"}", 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* enc_last_modified_time = curl_easy_escape(curl, "1631538698839", 0);
std::string url = "https://projects.zoho.com/api/v3/portal/[PORTAL_ID]/tasks";
url += "?page=" + std::string(enc_page);
url += "&per_page=" + std::string(enc_per_page);
url += "&filter=" + std::string(enc_filter);
url += "&sort_by=" + std::string(enc_sort_by);
url += "&view_id=" + std::string(enc_view_id);
url += "&last_modified_time=" + std::string(enc_last_modified_time);
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_page);
curl_free(enc_per_page);
curl_free(enc_filter);
curl_free(enc_sort_by);
curl_free(enc_view_id);
curl_free(enc_last_modified_time);
curl_slist_free_all(headers);
curl_easy_cleanup(curl);
}
return 0;
}
(require '[clj-http.client :as client])
(let [enc-page (java.net.URLEncoder/encode "1" "UTF-8")
enc-per_page (java.net.URLEncoder/encode "10" "UTF-8")
enc-filter (java.net.URLEncoder/encode "{\"criteria\":[{\"field_name\":\"name\",\"criteria_condition\":\"contains\",\"value\":[\"Design\"],\"module_name\":\"bug\"}],\"pattern\":\"1\"}" "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")
enc-last_modified_time (java.net.URLEncoder/encode "1631538698839" "UTF-8")
url (str "https://projects.zoho.com/api/v3/portal/[PORTAL_ID]/tasks" "?page=" enc-page "&per_page=" enc-per_page "&filter=" enc-filter "&sort_by=" enc-sort_by "&view_id=" enc-view_id "&last_modified_time=" enc-last_modified_time)]
(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]/tasks", nil)
q := req.URL.Query()
q.Add("page", "1")
q.Add("per_page", "10")
q.Add("filter", "{\"criteria\":[{\"field_name\":\"name\",\"criteria_condition\":\"contains\",\"value\":[\"Design\"],\"module_name\":\"bug\"}],\"pattern\":\"1\"}")
q.Add("sort_by", "ASC(last_modified_time)")
q.Add("view_id", "23806000074760021")
q.Add("last_modified_time", "1631538698839")
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]/tasks?page=1&per_page=10&filter=%7B%22criteria%22%3A%5B%7B%22field_name%22%3A%22name%22%2C%22criteria_condition%22%3A%22contains%22%2C%22value%22%3A%5B%22Design%22%5D%2C%22module_name%22%3A%22bug%22%7D%5D%2C%22pattern%22%3A%221%22%7D&sort_by=ASC%28last_modified_time%29&view_id=23806000074760021&last_modified_time=1631538698839 HTTP/1.1
Host: https://projects.zoho.com/api/v3/portal/[PORTAL_ID]/tasks?page=1&per_page=10&filter=%7B%22criteria%22%3A%5B%7B%22field_name%22%3A%22name%22%2C%22criteria_condition%22%3A%22contains%22%2C%22value%22%3A%5B%22Design%22%5D%2C%22module_name%22%3A%22bug%22%7D%5D%2C%22pattern%22%3A%221%22%7D&sort_by=ASC%28last_modified_time%29&view_id=23806000074760021&last_modified_time=1631538698839
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]/tasks");
uriBuilder.addParameter("page", "1");
uriBuilder.addParameter("per_page", "10");
uriBuilder.addParameter("filter", "{\"criteria\":[{\"field_name\":\"name\",\"criteria_condition\":\"contains\",\"value\":[\"Design\"],\"module_name\":\"bug\"}],\"pattern\":\"1\"}");
uriBuilder.addParameter("sort_by", "ASC(last_modified_time)");
uriBuilder.addParameter("view_id", "23806000074760021");
uriBuilder.addParameter("last_modified_time", "1631538698839");
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]/tasks';
const params = new URLSearchParams({
'page': '1',
'per_page': '10',
'filter': '{"criteria":[{"field_name":"name","criteria_condition":"contains","value":["Design"],"module_name":"bug"}],"pattern":"1"}',
'sort_by': 'ASC(last_modified_time)',
'view_id': '23806000074760021',
'last_modified_time': '1631538698839'
});
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));
page = 1
per_page = 10
filter = {"criteria":[{"field_name":"name","criteria_condition":"contains","value":["Design"],"module_name":"bug"}],"pattern":"1"}
sort_by = "ASC(last_modified_time)"
view_id = "23806000074760021"
last_modified_time = "1631538698839"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]/tasks".toHttpUrl().newBuilder()
urlBuilder.addQueryParameter("page", "1")
urlBuilder.addQueryParameter("per_page", "10")
urlBuilder.addQueryParameter("filter", "{\"criteria\":[{\"field_name\":\"name\",\"criteria_condition\":\"contains\",\"value\":[\"Design\"],\"module_name\":\"bug\"}],\"pattern\":\"1\"}")
urlBuilder.addQueryParameter("sort_by", "ASC(last_modified_time)")
urlBuilder.addQueryParameter("view_id", "23806000074760021")
urlBuilder.addQueryParameter("last_modified_time", "1631538698839")
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 *encodedPage = [@"1" stringByAddingPercentEncodingWithAllowedCharacters:[NSCharacterSet URLQueryAllowedCharacterSet]];
NSString *encodedPer_page = [@"10" stringByAddingPercentEncodingWithAllowedCharacters:[NSCharacterSet URLQueryAllowedCharacterSet]];
NSString *encodedFilter = [@"{\"criteria\":[{\"field_name\":\"name\",\"criteria_condition\":\"contains\",\"value\":[\"Design\"],\"module_name\":\"bug\"}],\"pattern\":\"1\"}" stringByAddingPercentEncodingWithAllowedCharacters:[NSCharacterSet URLQueryAllowedCharacterSet]];
NSString *encodedSort_by = [@"ASC(last_modified_time)" stringByAddingPercentEncodingWithAllowedCharacters:[NSCharacterSet URLQueryAllowedCharacterSet]];
NSString *encodedView_id = [@"23806000074760021" stringByAddingPercentEncodingWithAllowedCharacters:[NSCharacterSet URLQueryAllowedCharacterSet]];
NSString *encodedLast_modified_time = [@"1631538698839" stringByAddingPercentEncodingWithAllowedCharacters:[NSCharacterSet URLQueryAllowedCharacterSet]];
NSString *urlString = [NSString stringWithFormat:@"https://projects.zoho.com/api/v3/portal/[PORTAL_ID]/tasks?page=%@&per_page=%@&filter=%@&sort_by=%@&view_id=%@&last_modified_time=%@", encodedPage, encodedPer_page, encodedFilter, encodedSort_by, encodedView_id, encodedLast_modified_time];
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_page = Uri.pct_encode "1" in
let enc_per_page = Uri.pct_encode "10" in
let enc_filter = Uri.pct_encode "{\"criteria\":[{\"field_name\":\"name\",\"criteria_condition\":\"contains\",\"value\":[\"Design\"],\"module_name\":\"bug\"}],\"pattern\":\"1\"}" in
let enc_sort_by = Uri.pct_encode "ASC(last_modified_time)" in
let enc_view_id = Uri.pct_encode "23806000074760021" in
let enc_last_modified_time = Uri.pct_encode "1631538698839" in
let uri = Uri.of_string ("https://projects.zoho.com/api/v3/portal/[PORTAL_ID]/tasks" ^ "?page=" ^ enc_page ^ "&per_page=" ^ enc_per_page ^ "&filter=" ^ enc_filter ^ "&sort_by=" ^ enc_sort_by ^ "&view_id=" ^ enc_view_id ^ "&last_modified_time=" ^ enc_last_modified_time) 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 = @{
page = "1"
per_page = "10"
filter = "{`"criteria`":[{`"field_name`":`"name`",`"criteria_condition`":`"contains`",`"value`":[`"Design`"],`"module_name`":`"bug`"}],`"pattern`":`"1`"}"
sort_by = "ASC(last_modified_time)"
view_id = "23806000074760021"
last_modified_time = "1631538698839"
}
$queryString = ($params.GetEnumerator() | ForEach-Object { "$($_.Key)=$([System.Uri]::EscapeDataString($_.Value))" }) -join "&"
$url = "https://projects.zoho.com/api/v3/portal/[PORTAL_ID]/tasks" + "?" + $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]/tasks"
params <- list(
page = "1",
per_page = "10",
filter = "{\"criteria\":[{\"field_name\":\"name\",\"criteria_condition\":\"contains\",\"value\":[\"Design\"],\"module_name\":\"bug\"}],\"pattern\":\"1\"}",
sort_by = "ASC(last_modified_time)",
view_id = "23806000074760021",
last_modified_time = "1631538698839"
)
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]/tasks")!
components.queryItems = [
URLQueryItem(name: "page", value: "1"),
URLQueryItem(name: "per_page", value: "10"),
URLQueryItem(name: "filter", value: "{\"criteria\":[{\"field_name\":\"name\",\"criteria_condition\":\"contains\",\"value\":[\"Design\"],\"module_name\":\"bug\"}],\"pattern\":\"1\"}"),
URLQueryItem(name: "sort_by", value: "ASC(last_modified_time)"),
URLQueryItem(name: "view_id", value: "23806000074760021"),
URLQueryItem(name: "last_modified_time", value: "1631538698839")
]
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 all tasks from a specific project. Use this API to list tasks within a project.
OAuth Scope:
ZohoProjects.tasks.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).
int
default : 1Enter the page number to retrieve.
int
limit : 1-200Enter the number of entries to display per page.
JSONObject
Specify the filter criteria to apply to the task list.
String
Enter the sort criteria. Accepted values: ASC(field_name) or DESC(field_name). Fields you can sort by include id, name, start_date, end_date, completion_percentage, created_time, last_modified_time, created_by and is_completed.
String
Enter the custom view ID. You can obtain it from the Get Task Custom Views API (the "id" field in the response).
String
regex : ISO-8601Enter the start date of the task
Request Example
curl -X GET \
'https://projects.zoho.com/api/v3/portal/[PORTAL_ID]/projects/23806000097545166/tasks?page=1&per_page=10&filter=%7B%22criteria%22%3A%5B%7B%22field_name%22%3A%22name%22%2C%22criteria_condition%22%3A%22contains%22%2C%22value%22%3A%5B%22Design%22%5D%2C%22module_name%22%3A%22bug%22%7D%5D%2C%22pattern%22%3A%221%22%7D&sort_by=ASC%28last_modified_time%29&view_id=23806000074760021&last_modified_time=1631538698839' \
-H 'Authorization: Bearer 1000.03xxxxxxxxxxxxxxxxxa5317.dxxxxxxxxxxxxxxxxxfa'
url = "https://projects.zoho.com/api/v3/portal/[PORTAL_ID]/projects/23806000097545166/tasks";
filter_value = {"criteria":[{"field_name":"name","criteria_condition":"contains","value":["Design"],"module_name":"bug"}],"pattern":"1"};
params = Map();
params.put("page", 1);
params.put("per_page", 10);
params.put("filter", filter_value);
params.put("sort_by", "ASC(last_modified_time)");
params.put("view_id", "23806000074760021");
params.put("last_modified_time", "1631538698839");
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/tasks');
url.searchParams.append('page', '1');
url.searchParams.append('per_page', '10');
url.searchParams.append('filter', '{"criteria":[{"field_name":"name","criteria_condition":"contains","value":["Design"],"module_name":"bug"}],"pattern":"1"}');
url.searchParams.append('sort_by', 'ASC(last_modified_time)');
url.searchParams.append('view_id', '23806000074760021');
url.searchParams.append('last_modified_time', '1631538698839');
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/tasks")
params = {
"page" => "1",
"per_page" => "10",
"filter" => "{\"criteria\":[{\"field_name\":\"name\",\"criteria_condition\":\"contains\",\"value\":[\"Design\"],\"module_name\":\"bug\"}],\"pattern\":\"1\"}",
"sort_by" => "ASC(last_modified_time)",
"view_id" => "23806000074760021",
"last_modified_time" => "1631538698839"
}
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 = [
'page' => '1',
'per_page' => '10',
'filter' => '{"criteria":[{"field_name":"name","criteria_condition":"contains","value":["Design"],"module_name":"bug"}],"pattern":"1"}',
'sort_by' => 'ASC(last_modified_time)',
'view_id' => '23806000074760021',
'last_modified_time' => '1631538698839',
];
$url = "https://projects.zoho.com/api/v3/portal/[PORTAL_ID]/projects/23806000097545166/tasks" . "?" . 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/tasks"
params = {
"page": "1",
"per_page": "10",
"filter": "{\"criteria\":[{\"field_name\":\"name\",\"criteria_condition\":\"contains\",\"value\":[\"Design\"],\"module_name\":\"bug\"}],\"pattern\":\"1\"}",
"sort_by": "ASC(last_modified_time)",
"view_id": "23806000074760021",
"last_modified_time": "1631538698839"
}
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_page = curl_easy_escape(curl, "1", 0);
char *enc_per_page = curl_easy_escape(curl, "10", 0);
char *enc_filter = curl_easy_escape(curl, "{\"criteria\":[{\"field_name\":\"name\",\"criteria_condition\":\"contains\",\"value\":[\"Design\"],\"module_name\":\"bug\"}],\"pattern\":\"1\"}", 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 *enc_last_modified_time = curl_easy_escape(curl, "1631538698839", 0);
char url[2048];
snprintf(url, sizeof(url), "https://projects.zoho.com/api/v3/portal/[PORTAL_ID]/projects/23806000097545166/tasks?page=%s&per_page=%s&filter=%s&sort_by=%s&view_id=%s&last_modified_time=%s", enc_page, enc_per_page, enc_filter, enc_sort_by, enc_view_id, enc_last_modified_time);
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_page);
curl_free(enc_per_page);
curl_free(enc_filter);
curl_free(enc_sort_by);
curl_free(enc_view_id);
curl_free(enc_last_modified_time);
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["page"] = "1";
query["per_page"] = "10";
query["filter"] = "{\"criteria\":[{\"field_name\":\"name\",\"criteria_condition\":\"contains\",\"value\":[\"Design\"],\"module_name\":\"bug\"}],\"pattern\":\"1\"}";
query["sort_by"] = "ASC(last_modified_time)";
query["view_id"] = "23806000074760021";
query["last_modified_time"] = "1631538698839";
var uriBuilder = new UriBuilder("https://projects.zoho.com/api/v3/portal/[PORTAL_ID]/projects/23806000097545166/tasks") { 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_page = curl_easy_escape(curl, "1", 0);
char* enc_per_page = curl_easy_escape(curl, "10", 0);
char* enc_filter = curl_easy_escape(curl, "{\"criteria\":[{\"field_name\":\"name\",\"criteria_condition\":\"contains\",\"value\":[\"Design\"],\"module_name\":\"bug\"}],\"pattern\":\"1\"}", 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* enc_last_modified_time = curl_easy_escape(curl, "1631538698839", 0);
std::string url = "https://projects.zoho.com/api/v3/portal/[PORTAL_ID]/projects/23806000097545166/tasks";
url += "?page=" + std::string(enc_page);
url += "&per_page=" + std::string(enc_per_page);
url += "&filter=" + std::string(enc_filter);
url += "&sort_by=" + std::string(enc_sort_by);
url += "&view_id=" + std::string(enc_view_id);
url += "&last_modified_time=" + std::string(enc_last_modified_time);
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_page);
curl_free(enc_per_page);
curl_free(enc_filter);
curl_free(enc_sort_by);
curl_free(enc_view_id);
curl_free(enc_last_modified_time);
curl_slist_free_all(headers);
curl_easy_cleanup(curl);
}
return 0;
}
(require '[clj-http.client :as client])
(let [enc-page (java.net.URLEncoder/encode "1" "UTF-8")
enc-per_page (java.net.URLEncoder/encode "10" "UTF-8")
enc-filter (java.net.URLEncoder/encode "{\"criteria\":[{\"field_name\":\"name\",\"criteria_condition\":\"contains\",\"value\":[\"Design\"],\"module_name\":\"bug\"}],\"pattern\":\"1\"}" "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")
enc-last_modified_time (java.net.URLEncoder/encode "1631538698839" "UTF-8")
url (str "https://projects.zoho.com/api/v3/portal/[PORTAL_ID]/projects/23806000097545166/tasks" "?page=" enc-page "&per_page=" enc-per_page "&filter=" enc-filter "&sort_by=" enc-sort_by "&view_id=" enc-view_id "&last_modified_time=" enc-last_modified_time)]
(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/tasks", nil)
q := req.URL.Query()
q.Add("page", "1")
q.Add("per_page", "10")
q.Add("filter", "{\"criteria\":[{\"field_name\":\"name\",\"criteria_condition\":\"contains\",\"value\":[\"Design\"],\"module_name\":\"bug\"}],\"pattern\":\"1\"}")
q.Add("sort_by", "ASC(last_modified_time)")
q.Add("view_id", "23806000074760021")
q.Add("last_modified_time", "1631538698839")
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/tasks?page=1&per_page=10&filter=%7B%22criteria%22%3A%5B%7B%22field_name%22%3A%22name%22%2C%22criteria_condition%22%3A%22contains%22%2C%22value%22%3A%5B%22Design%22%5D%2C%22module_name%22%3A%22bug%22%7D%5D%2C%22pattern%22%3A%221%22%7D&sort_by=ASC%28last_modified_time%29&view_id=23806000074760021&last_modified_time=1631538698839 HTTP/1.1
Host: https://projects.zoho.com/api/v3/portal/[PORTAL_ID]/projects/23806000097545166/tasks?page=1&per_page=10&filter=%7B%22criteria%22%3A%5B%7B%22field_name%22%3A%22name%22%2C%22criteria_condition%22%3A%22contains%22%2C%22value%22%3A%5B%22Design%22%5D%2C%22module_name%22%3A%22bug%22%7D%5D%2C%22pattern%22%3A%221%22%7D&sort_by=ASC%28last_modified_time%29&view_id=23806000074760021&last_modified_time=1631538698839
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/tasks");
uriBuilder.addParameter("page", "1");
uriBuilder.addParameter("per_page", "10");
uriBuilder.addParameter("filter", "{\"criteria\":[{\"field_name\":\"name\",\"criteria_condition\":\"contains\",\"value\":[\"Design\"],\"module_name\":\"bug\"}],\"pattern\":\"1\"}");
uriBuilder.addParameter("sort_by", "ASC(last_modified_time)");
uriBuilder.addParameter("view_id", "23806000074760021");
uriBuilder.addParameter("last_modified_time", "1631538698839");
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/tasks';
const params = new URLSearchParams({
'page': '1',
'per_page': '10',
'filter': '{"criteria":[{"field_name":"name","criteria_condition":"contains","value":["Design"],"module_name":"bug"}],"pattern":"1"}',
'sort_by': 'ASC(last_modified_time)',
'view_id': '23806000074760021',
'last_modified_time': '1631538698839'
});
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));
page = 1
per_page = 10
filter = {"criteria":[{"field_name":"name","criteria_condition":"contains","value":["Design"],"module_name":"bug"}],"pattern":"1"}
sort_by = "ASC(last_modified_time)"
view_id = "23806000074760021"
last_modified_time = "1631538698839"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/tasks".toHttpUrl().newBuilder()
urlBuilder.addQueryParameter("page", "1")
urlBuilder.addQueryParameter("per_page", "10")
urlBuilder.addQueryParameter("filter", "{\"criteria\":[{\"field_name\":\"name\",\"criteria_condition\":\"contains\",\"value\":[\"Design\"],\"module_name\":\"bug\"}],\"pattern\":\"1\"}")
urlBuilder.addQueryParameter("sort_by", "ASC(last_modified_time)")
urlBuilder.addQueryParameter("view_id", "23806000074760021")
urlBuilder.addQueryParameter("last_modified_time", "1631538698839")
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 *encodedPage = [@"1" stringByAddingPercentEncodingWithAllowedCharacters:[NSCharacterSet URLQueryAllowedCharacterSet]];
NSString *encodedPer_page = [@"10" stringByAddingPercentEncodingWithAllowedCharacters:[NSCharacterSet URLQueryAllowedCharacterSet]];
NSString *encodedFilter = [@"{\"criteria\":[{\"field_name\":\"name\",\"criteria_condition\":\"contains\",\"value\":[\"Design\"],\"module_name\":\"bug\"}],\"pattern\":\"1\"}" stringByAddingPercentEncodingWithAllowedCharacters:[NSCharacterSet URLQueryAllowedCharacterSet]];
NSString *encodedSort_by = [@"ASC(last_modified_time)" stringByAddingPercentEncodingWithAllowedCharacters:[NSCharacterSet URLQueryAllowedCharacterSet]];
NSString *encodedView_id = [@"23806000074760021" stringByAddingPercentEncodingWithAllowedCharacters:[NSCharacterSet URLQueryAllowedCharacterSet]];
NSString *encodedLast_modified_time = [@"1631538698839" stringByAddingPercentEncodingWithAllowedCharacters:[NSCharacterSet URLQueryAllowedCharacterSet]];
NSString *urlString = [NSString stringWithFormat:@"https://projects.zoho.com/api/v3/portal/[PORTAL_ID]/projects/23806000097545166/tasks?page=%@&per_page=%@&filter=%@&sort_by=%@&view_id=%@&last_modified_time=%@", encodedPage, encodedPer_page, encodedFilter, encodedSort_by, encodedView_id, encodedLast_modified_time];
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_page = Uri.pct_encode "1" in
let enc_per_page = Uri.pct_encode "10" in
let enc_filter = Uri.pct_encode "{\"criteria\":[{\"field_name\":\"name\",\"criteria_condition\":\"contains\",\"value\":[\"Design\"],\"module_name\":\"bug\"}],\"pattern\":\"1\"}" in
let enc_sort_by = Uri.pct_encode "ASC(last_modified_time)" in
let enc_view_id = Uri.pct_encode "23806000074760021" in
let enc_last_modified_time = Uri.pct_encode "1631538698839" in
let uri = Uri.of_string ("https://projects.zoho.com/api/v3/portal/[PORTAL_ID]/projects/23806000097545166/tasks" ^ "?page=" ^ enc_page ^ "&per_page=" ^ enc_per_page ^ "&filter=" ^ enc_filter ^ "&sort_by=" ^ enc_sort_by ^ "&view_id=" ^ enc_view_id ^ "&last_modified_time=" ^ enc_last_modified_time) 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 = @{
page = "1"
per_page = "10"
filter = "{`"criteria`":[{`"field_name`":`"name`",`"criteria_condition`":`"contains`",`"value`":[`"Design`"],`"module_name`":`"bug`"}],`"pattern`":`"1`"}"
sort_by = "ASC(last_modified_time)"
view_id = "23806000074760021"
last_modified_time = "1631538698839"
}
$queryString = ($params.GetEnumerator() | ForEach-Object { "$($_.Key)=$([System.Uri]::EscapeDataString($_.Value))" }) -join "&"
$url = "https://projects.zoho.com/api/v3/portal/[PORTAL_ID]/projects/23806000097545166/tasks" + "?" + $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/tasks"
params <- list(
page = "1",
per_page = "10",
filter = "{\"criteria\":[{\"field_name\":\"name\",\"criteria_condition\":\"contains\",\"value\":[\"Design\"],\"module_name\":\"bug\"}],\"pattern\":\"1\"}",
sort_by = "ASC(last_modified_time)",
view_id = "23806000074760021",
last_modified_time = "1631538698839"
)
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/tasks")!
components.queryItems = [
URLQueryItem(name: "page", value: "1"),
URLQueryItem(name: "per_page", value: "10"),
URLQueryItem(name: "filter", value: "{\"criteria\":[{\"field_name\":\"name\",\"criteria_condition\":\"contains\",\"value\":[\"Design\"],\"module_name\":\"bug\"}],\"pattern\":\"1\"}"),
URLQueryItem(name: "sort_by", value: "ASC(last_modified_time)"),
URLQueryItem(name: "view_id", value: "23806000074760021"),
URLQueryItem(name: "last_modified_time", value: "1631538698839")
]
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 in a project. Use this API to fetch metadata such as assignee, status, priority, and dates for a given task.
OAuth Scope:
ZohoProjects.tasks.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
requiredUnique, immutable identifier of the task within the specified project. You can obtain it from the Get Tasks API (the "id" field in the response).
Request Example
curl -X GET \
'https://projects.zoho.com/api/v3/portal/[PORTAL_ID]/projects/23806000097545166/tasks/[TASK_ID]' \
-H 'Authorization: Bearer 1000.03xxxxxxxxxxxxxxxxxa5317.dxxxxxxxxxxxxxxxxxfa'
url = "https://projects.zoho.com/api/v3/portal/[PORTAL_ID]/projects/23806000097545166/tasks/[TASK_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/tasks/[TASK_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/tasks/[TASK_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/tasks/[TASK_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/tasks/[TASK_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/tasks/[TASK_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/tasks/[TASK_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/tasks/[TASK_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/tasks/[TASK_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/tasks/[TASK_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/tasks/[TASK_ID] HTTP/1.1
Host: https://projects.zoho.com/api/v3/portal/[PORTAL_ID]/projects/23806000097545166/tasks/[TASK_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/tasks/[TASK_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/tasks/[TASK_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/tasks/[TASK_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/tasks/[TASK_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/tasks/[TASK_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/tasks/[TASK_ID]" -Method GET -Headers $headers
$response | ConvertTo-Json
library(httr)
url <- "https://projects.zoho.com/api/v3/portal/[PORTAL_ID]/projects/23806000097545166/tasks/[TASK_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/tasks/[TASK_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
Possible Errors
Add a task to the project
OAuth Scope:
ZohoProjects.tasks.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
Enter the milestone details to associate with the task.
JSONObject
Enter the task list details. Uses the general task list when task list details are not provided; the project must have a general task list or an exception is thrown. To create one, use the Create Default Task List
JSONObject
Enter parent task details if sub task is need to be created
String
requiredEnter the task name
String
max length : 80000Enter the task description
JSONObject
max length : 1000Enter the task status details if not provided default open will be taken
String
Enter the task priority Possible values are none,low,medium,high
JSONObject
Enter the start after of the task
String
regex : ISO-8601Enter the start date of the task in ISO 8601 format. Use yyyy-MM-dd'T'HH:mm:ss'Z' for UTC or yyyy-MM-dd'T'HH:mm:ss[+|-]HH:mm for other time zones.
String
regex : ISO-8601Enter the end date of the task in ISO 8601 format. Use yyyy-MM-dd'T'HH:mm:ss'Z' for UTC or yyyy-MM-dd'T'HH:mm:ss[+|-]HH:mm for other time zones.
JSONObject
Enter the duration of the task
int
Enter the task completion percentage
String
Enter the billing type for the task Possible values are none,billable,non_billable
JSONArray
max length : 10000Enter the IDs of files to be uploaded You can obtain it from the Get Project Attachments API (the "attachment_id" field in the response).
JSONArray
max length : 2500Enter the WorkDrive resource IDs of the files to associate. The WorkDrive resource ID is different from the attachment ID in Zoho Projects. You can pass up to 50 IDs. To get the thirdPartyId, refer to the WorkDrive API User who does not have upload permission to the folder/team folder can upload file upto 20 MB only.
JSONObject
max length : 1600000Enter the task owner name and work details
JSONArray
max length : 10000Enter the tags for the task
JSONArray
max length : 100000Add or remove teams associated with the task
JSONObject
max length : 100000Enter recurrence details of the task
JSONObject
max length : 100000Enter the Reminder details of the task
JSONObject
max length : 100000Enter the Budget details of the task
String
Enter the value for a task custom field. Replace <field_name> with the custom field's API name in snake_case, as listed in the Custom Fields Guide.
Note: The type is shown as String by default since most basic custom fields accept string values. The actual expected value format and input structure depend on the custom field type.
Refer to the Custom Fields Guide for details.
Request Example
curl -X POST \
'https://projects.zoho.com/api/v3/portal/[PORTAL_ID]/projects/23806000097545166/tasks' \
-H 'Authorization: Bearer 1000.03xxxxxxxxxxxxxxxxxa5317.dxxxxxxxxxxxxxxxxxfa' \
-H 'Content-Type: application/json' \
-d '{"milestone":{"id":"4000000062001"},"tasklist":{"id":"4000000062001"},"parental_info":{"parent_task_id":"4000000005670"},"name":"Set Up CI/CD Pipeline for Staging Environment","description":false,"status":{"id":"4000000062001"},"priority":"high","start_after":{"value":"5","unit":"hours_per_day"},"start_date":"2024-12-16T09:00:00.000Z","end_date":"2024-12-19T18:00:00.000Z","duration":{"value":"5","type":"days"},"completion_percentage":0,"billing_type":false,"attachments":false,"thirdparty_id":["9if2g8aa1c0f0e1234567890abcdef123456"],"owners_and_work":{"owners":[{"add":[{"zpuid":["4000000002055"],"zuid":"16469208","email":"richard.santos@zylker.com","work_values":"08:00"}],"remove":[{"zpuid":["4000000002055"],"zuid":"16469208","email":"richard.santos@zylker.com"}],"zpuid":["4000000002055"],"zuid":"16469208","email":"richard.santos@zylker.com","work_values":"08:00"}],"work_type":"standard","unit":"hours_per_day","copy_task_duration":"true","refresh_business_hours":"false"},"tags":[{"add":[{"id":"4000000062001"}],"remove":[{"id":"4000000062001"}],"id":"4000000062001"}],"teams":[{"add":[{"id":"4000000062001"}],"remove":[{"id":"4000000062001"}],"id":"4000000062001"}],"recurrence":{"frequency":"daily","interval":1,"end_after_occurrences":"10","set_to_previous_businessday":"false","next_recurrence_after_close":"true","trigger_type":"first_to_occur","date_based":{"name":"Set Up CI/CD Pipeline for Staging Environment","schedule_datetime":"2024-12-16T09:00:00.000Z","repetative_type":"daily","time_span":1,"days_of_week":["1"],"months_of_year":["1"],"repeat_on_type":0,"repeat_on_value":"1","ends_after_type":"none","ends_after_value":"20","skip_type":"skip","mail_to_user":{"zpuid":["4000000002055"]},"duration_type":"days","no_of_duration":"2","field_name":"status","time":"22:00"},"scheduler_based":{"name":"Set Up CI/CD Pipeline for Staging Environment","schedule_datetime":"2024-12-16T09:00:00.000Z","repetative_type":"daily","time_span":1,"days_of_week":["1"],"months_of_year":["1"],"repeat_on_type":0,"repeat_on_value":"1","ends_after_type":"none","ends_after_value":"20","skip_type":"skip","mail_to_user":{"zpuid":["4000000002055"]},"duration_type":"days","no_of_duration":"2","field_name":"status","time":"22:00"},"retain_comments":"false","retain_subtasks":"false","retain_config":{"comments":false,"billing_type":false,"followers":false,"description":false,"subtasks":false,"tags":false,"attachments":false,"teams":false}},"reminder":{"reminder_criteria":"on","field_type":"start_date","custom_date":"2023-12-20","no_of_duration":"2","time":"22:00","duration_type":"days","emailtemplate_id":"4000000008003","reminder_notify_users":[{"type":"days","values":["4000000002055"]}]},"budget_info":{"rate_per_hour":50,"budget":"12345:00","threshold":"234:00","hourly_budget":"40:00","hourly_budget_threshold":"35:00","revenue_budget":5000,"cost_rate_per_hour":30},"<field_name>":"In Progress"}'
url = "https://projects.zoho.com/api/v3/portal/[PORTAL_ID]/projects/23806000097545166/tasks";
params = Map();
params.put("milestone", {"id":"4000000062001"});
params.put("tasklist", {"id":"4000000062001"});
params.put("parental_info", {"parent_task_id":"4000000005670"});
params.put("name", "Set Up CI/CD Pipeline for Staging Environment");
params.put("description", false);
params.put("status", {"id":"4000000062001"});
params.put("priority", "high");
params.put("start_after", {"value":"5","unit":"hours_per_day"});
params.put("start_date", "2024-12-16T09:00:00.000Z");
params.put("end_date", "2024-12-19T18:00:00.000Z");
params.put("duration", {"value":"5","type":"days"});
params.put("completion_percentage", 0);
params.put("billing_type", false);
params.put("attachments", false);
params.put("thirdparty_id", ["9if2g8aa1c0f0e1234567890abcdef123456"]);
params.put("owners_and_work", {"owners":[{"add":[{"zpuid":["4000000002055"],"zuid":"16469208","email":"richard.santos@zylker.com","work_values":"08:00"}],"remove":[{"zpuid":["4000000002055"],"zuid":"16469208","email":"richard.santos@zylker.com"}],"zpuid":["4000000002055"],"zuid":"16469208","email":"richard.santos@zylker.com","work_values":"08:00"}],"work_type":"standard","unit":"hours_per_day","copy_task_duration":"true","refresh_business_hours":"false"});
params.put("tags", [{"add":[{"id":"4000000062001"}],"remove":[{"id":"4000000062001"}],"id":"4000000062001"}]);
params.put("teams", [{"add":[{"id":"4000000062001"}],"remove":[{"id":"4000000062001"}],"id":"4000000062001"}]);
params.put("recurrence", {"frequency":"daily","interval":1,"end_after_occurrences":"10","set_to_previous_businessday":"false","next_recurrence_after_close":"true","trigger_type":"first_to_occur","date_based":{"name":"Set Up CI/CD Pipeline for Staging Environment","schedule_datetime":"2024-12-16T09:00:00.000Z","repetative_type":"daily","time_span":1,"days_of_week":["1"],"months_of_year":["1"],"repeat_on_type":0,"repeat_on_value":"1","ends_after_type":"none","ends_after_value":"20","skip_type":"skip","mail_to_user":{"zpuid":["4000000002055"]},"duration_type":"days","no_of_duration":"2","field_name":"status","time":"22:00"},"scheduler_based":{"name":"Set Up CI/CD Pipeline for Staging Environment","schedule_datetime":"2024-12-16T09:00:00.000Z","repetative_type":"daily","time_span":1,"days_of_week":["1"],"months_of_year":["1"],"repeat_on_type":0,"repeat_on_value":"1","ends_after_type":"none","ends_after_value":"20","skip_type":"skip","mail_to_user":{"zpuid":["4000000002055"]},"duration_type":"days","no_of_duration":"2","field_name":"status","time":"22:00"},"retain_comments":"false","retain_subtasks":"false","retain_config":{"comments":false,"billing_type":false,"followers":false,"description":false,"subtasks":false,"tags":false,"attachments":false,"teams":false}});
params.put("reminder", {"reminder_criteria":"on","field_type":"start_date","custom_date":"2023-12-20","no_of_duration":"2","time":"22:00","duration_type":"days","emailtemplate_id":"4000000008003","reminder_notify_users":[{"type":"days","values":["4000000002055"]}]});
params.put("budget_info", {"rate_per_hour":50,"budget":"12345:00","threshold":"234:00","hourly_budget":"40:00","hourly_budget_threshold":"35:00","revenue_budget":5000,"cost_rate_per_hour":30});
params.put("<field_name>", "In Progress");
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/tasks');
const payload = JSON.stringify({"milestone":{"id":"4000000062001"},"tasklist":{"id":"4000000062001"},"parental_info":{"parent_task_id":"4000000005670"},"name":"Set Up CI/CD Pipeline for Staging Environment","description":false,"status":{"id":"4000000062001"},"priority":"high","start_after":{"value":"5","unit":"hours_per_day"},"start_date":"2024-12-16T09:00:00.000Z","end_date":"2024-12-19T18:00:00.000Z","duration":{"value":"5","type":"days"},"completion_percentage":0,"billing_type":false,"attachments":false,"thirdparty_id":["9if2g8aa1c0f0e1234567890abcdef123456"],"owners_and_work":{"owners":[{"add":[{"zpuid":["4000000002055"],"zuid":"16469208","email":"richard.santos@zylker.com","work_values":"08:00"}],"remove":[{"zpuid":["4000000002055"],"zuid":"16469208","email":"richard.santos@zylker.com"}],"zpuid":["4000000002055"],"zuid":"16469208","email":"richard.santos@zylker.com","work_values":"08:00"}],"work_type":"standard","unit":"hours_per_day","copy_task_duration":"true","refresh_business_hours":"false"},"tags":[{"add":[{"id":"4000000062001"}],"remove":[{"id":"4000000062001"}],"id":"4000000062001"}],"teams":[{"add":[{"id":"4000000062001"}],"remove":[{"id":"4000000062001"}],"id":"4000000062001"}],"recurrence":{"frequency":"daily","interval":1,"end_after_occurrences":"10","set_to_previous_businessday":"false","next_recurrence_after_close":"true","trigger_type":"first_to_occur","date_based":{"name":"Set Up CI/CD Pipeline for Staging Environment","schedule_datetime":"2024-12-16T09:00:00.000Z","repetative_type":"daily","time_span":1,"days_of_week":["1"],"months_of_year":["1"],"repeat_on_type":0,"repeat_on_value":"1","ends_after_type":"none","ends_after_value":"20","skip_type":"skip","mail_to_user":{"zpuid":["4000000002055"]},"duration_type":"days","no_of_duration":"2","field_name":"status","time":"22:00"},"scheduler_based":{"name":"Set Up CI/CD Pipeline for Staging Environment","schedule_datetime":"2024-12-16T09:00:00.000Z","repetative_type":"daily","time_span":1,"days_of_week":["1"],"months_of_year":["1"],"repeat_on_type":0,"repeat_on_value":"1","ends_after_type":"none","ends_after_value":"20","skip_type":"skip","mail_to_user":{"zpuid":["4000000002055"]},"duration_type":"days","no_of_duration":"2","field_name":"status","time":"22:00"},"retain_comments":"false","retain_subtasks":"false","retain_config":{"comments":false,"billing_type":false,"followers":false,"description":false,"subtasks":false,"tags":false,"attachments":false,"teams":false}},"reminder":{"reminder_criteria":"on","field_type":"start_date","custom_date":"2023-12-20","no_of_duration":"2","time":"22:00","duration_type":"days","emailtemplate_id":"4000000008003","reminder_notify_users":[{"type":"days","values":["4000000002055"]}]},"budget_info":{"rate_per_hour":50,"budget":"12345:00","threshold":"234:00","hourly_budget":"40:00","hourly_budget_threshold":"35:00","revenue_budget":5000,"cost_rate_per_hour":30},"<field_name>":"In Progress"});
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/tasks")
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 = '{"milestone":{"id":"4000000062001"},"tasklist":{"id":"4000000062001"},"parental_info":{"parent_task_id":"4000000005670"},"name":"Set Up CI/CD Pipeline for Staging Environment","description":false,"status":{"id":"4000000062001"},"priority":"high","start_after":{"value":"5","unit":"hours_per_day"},"start_date":"2024-12-16T09:00:00.000Z","end_date":"2024-12-19T18:00:00.000Z","duration":{"value":"5","type":"days"},"completion_percentage":0,"billing_type":false,"attachments":false,"thirdparty_id":["9if2g8aa1c0f0e1234567890abcdef123456"],"owners_and_work":{"owners":[{"add":[{"zpuid":["4000000002055"],"zuid":"16469208","email":"richard.santos@zylker.com","work_values":"08:00"}],"remove":[{"zpuid":["4000000002055"],"zuid":"16469208","email":"richard.santos@zylker.com"}],"zpuid":["4000000002055"],"zuid":"16469208","email":"richard.santos@zylker.com","work_values":"08:00"}],"work_type":"standard","unit":"hours_per_day","copy_task_duration":"true","refresh_business_hours":"false"},"tags":[{"add":[{"id":"4000000062001"}],"remove":[{"id":"4000000062001"}],"id":"4000000062001"}],"teams":[{"add":[{"id":"4000000062001"}],"remove":[{"id":"4000000062001"}],"id":"4000000062001"}],"recurrence":{"frequency":"daily","interval":1,"end_after_occurrences":"10","set_to_previous_businessday":"false","next_recurrence_after_close":"true","trigger_type":"first_to_occur","date_based":{"name":"Set Up CI/CD Pipeline for Staging Environment","schedule_datetime":"2024-12-16T09:00:00.000Z","repetative_type":"daily","time_span":1,"days_of_week":["1"],"months_of_year":["1"],"repeat_on_type":0,"repeat_on_value":"1","ends_after_type":"none","ends_after_value":"20","skip_type":"skip","mail_to_user":{"zpuid":["4000000002055"]},"duration_type":"days","no_of_duration":"2","field_name":"status","time":"22:00"},"scheduler_based":{"name":"Set Up CI/CD Pipeline for Staging Environment","schedule_datetime":"2024-12-16T09:00:00.000Z","repetative_type":"daily","time_span":1,"days_of_week":["1"],"months_of_year":["1"],"repeat_on_type":0,"repeat_on_value":"1","ends_after_type":"none","ends_after_value":"20","skip_type":"skip","mail_to_user":{"zpuid":["4000000002055"]},"duration_type":"days","no_of_duration":"2","field_name":"status","time":"22:00"},"retain_comments":"false","retain_subtasks":"false","retain_config":{"comments":false,"billing_type":false,"followers":false,"description":false,"subtasks":false,"tags":false,"attachments":false,"teams":false}},"reminder":{"reminder_criteria":"on","field_type":"start_date","custom_date":"2023-12-20","no_of_duration":"2","time":"22:00","duration_type":"days","emailtemplate_id":"4000000008003","reminder_notify_users":[{"type":"days","values":["4000000002055"]}]},"budget_info":{"rate_per_hour":50,"budget":"12345:00","threshold":"234:00","hourly_budget":"40:00","hourly_budget_threshold":"35:00","revenue_budget":5000,"cost_rate_per_hour":30},"<field_name>":"In Progress"}'
response = http.request(request)
puts response.read_body
<?php
$url = "https://projects.zoho.com/api/v3/portal/[PORTAL_ID]/projects/23806000097545166/tasks";
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => $url,
CURLOPT_RETURNTRANSFER => true,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => '{"milestone":{"id":"4000000062001"},"tasklist":{"id":"4000000062001"},"parental_info":{"parent_task_id":"4000000005670"},"name":"Set Up CI/CD Pipeline for Staging Environment","description":false,"status":{"id":"4000000062001"},"priority":"high","start_after":{"value":"5","unit":"hours_per_day"},"start_date":"2024-12-16T09:00:00.000Z","end_date":"2024-12-19T18:00:00.000Z","duration":{"value":"5","type":"days"},"completion_percentage":0,"billing_type":false,"attachments":false,"thirdparty_id":["9if2g8aa1c0f0e1234567890abcdef123456"],"owners_and_work":{"owners":[{"add":[{"zpuid":["4000000002055"],"zuid":"16469208","email":"richard.santos@zylker.com","work_values":"08:00"}],"remove":[{"zpuid":["4000000002055"],"zuid":"16469208","email":"richard.santos@zylker.com"}],"zpuid":["4000000002055"],"zuid":"16469208","email":"richard.santos@zylker.com","work_values":"08:00"}],"work_type":"standard","unit":"hours_per_day","copy_task_duration":"true","refresh_business_hours":"false"},"tags":[{"add":[{"id":"4000000062001"}],"remove":[{"id":"4000000062001"}],"id":"4000000062001"}],"teams":[{"add":[{"id":"4000000062001"}],"remove":[{"id":"4000000062001"}],"id":"4000000062001"}],"recurrence":{"frequency":"daily","interval":1,"end_after_occurrences":"10","set_to_previous_businessday":"false","next_recurrence_after_close":"true","trigger_type":"first_to_occur","date_based":{"name":"Set Up CI/CD Pipeline for Staging Environment","schedule_datetime":"2024-12-16T09:00:00.000Z","repetative_type":"daily","time_span":1,"days_of_week":["1"],"months_of_year":["1"],"repeat_on_type":0,"repeat_on_value":"1","ends_after_type":"none","ends_after_value":"20","skip_type":"skip","mail_to_user":{"zpuid":["4000000002055"]},"duration_type":"days","no_of_duration":"2","field_name":"status","time":"22:00"},"scheduler_based":{"name":"Set Up CI/CD Pipeline for Staging Environment","schedule_datetime":"2024-12-16T09:00:00.000Z","repetative_type":"daily","time_span":1,"days_of_week":["1"],"months_of_year":["1"],"repeat_on_type":0,"repeat_on_value":"1","ends_after_type":"none","ends_after_value":"20","skip_type":"skip","mail_to_user":{"zpuid":["4000000002055"]},"duration_type":"days","no_of_duration":"2","field_name":"status","time":"22:00"},"retain_comments":"false","retain_subtasks":"false","retain_config":{"comments":false,"billing_type":false,"followers":false,"description":false,"subtasks":false,"tags":false,"attachments":false,"teams":false}},"reminder":{"reminder_criteria":"on","field_type":"start_date","custom_date":"2023-12-20","no_of_duration":"2","time":"22:00","duration_type":"days","emailtemplate_id":"4000000008003","reminder_notify_users":[{"type":"days","values":["4000000002055"]}]},"budget_info":{"rate_per_hour":50,"budget":"12345:00","threshold":"234:00","hourly_budget":"40:00","hourly_budget_threshold":"35:00","revenue_budget":5000,"cost_rate_per_hour":30},"<field_name>":"In Progress"}',
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/tasks"
headers = {
"Authorization": "Bearer 1000.03xxxxxxxxxxxxxxxxxa5317.dxxxxxxxxxxxxxxxxxfa",
"Content-Type": "application/json",
}
payload = '{"milestone":{"id":"4000000062001"},"tasklist":{"id":"4000000062001"},"parental_info":{"parent_task_id":"4000000005670"},"name":"Set Up CI/CD Pipeline for Staging Environment","description":false,"status":{"id":"4000000062001"},"priority":"high","start_after":{"value":"5","unit":"hours_per_day"},"start_date":"2024-12-16T09:00:00.000Z","end_date":"2024-12-19T18:00:00.000Z","duration":{"value":"5","type":"days"},"completion_percentage":0,"billing_type":false,"attachments":false,"thirdparty_id":["9if2g8aa1c0f0e1234567890abcdef123456"],"owners_and_work":{"owners":[{"add":[{"zpuid":["4000000002055"],"zuid":"16469208","email":"richard.santos@zylker.com","work_values":"08:00"}],"remove":[{"zpuid":["4000000002055"],"zuid":"16469208","email":"richard.santos@zylker.com"}],"zpuid":["4000000002055"],"zuid":"16469208","email":"richard.santos@zylker.com","work_values":"08:00"}],"work_type":"standard","unit":"hours_per_day","copy_task_duration":"true","refresh_business_hours":"false"},"tags":[{"add":[{"id":"4000000062001"}],"remove":[{"id":"4000000062001"}],"id":"4000000062001"}],"teams":[{"add":[{"id":"4000000062001"}],"remove":[{"id":"4000000062001"}],"id":"4000000062001"}],"recurrence":{"frequency":"daily","interval":1,"end_after_occurrences":"10","set_to_previous_businessday":"false","next_recurrence_after_close":"true","trigger_type":"first_to_occur","date_based":{"name":"Set Up CI/CD Pipeline for Staging Environment","schedule_datetime":"2024-12-16T09:00:00.000Z","repetative_type":"daily","time_span":1,"days_of_week":["1"],"months_of_year":["1"],"repeat_on_type":0,"repeat_on_value":"1","ends_after_type":"none","ends_after_value":"20","skip_type":"skip","mail_to_user":{"zpuid":["4000000002055"]},"duration_type":"days","no_of_duration":"2","field_name":"status","time":"22:00"},"scheduler_based":{"name":"Set Up CI/CD Pipeline for Staging Environment","schedule_datetime":"2024-12-16T09:00:00.000Z","repetative_type":"daily","time_span":1,"days_of_week":["1"],"months_of_year":["1"],"repeat_on_type":0,"repeat_on_value":"1","ends_after_type":"none","ends_after_value":"20","skip_type":"skip","mail_to_user":{"zpuid":["4000000002055"]},"duration_type":"days","no_of_duration":"2","field_name":"status","time":"22:00"},"retain_comments":"false","retain_subtasks":"false","retain_config":{"comments":false,"billing_type":false,"followers":false,"description":false,"subtasks":false,"tags":false,"attachments":false,"teams":false}},"reminder":{"reminder_criteria":"on","field_type":"start_date","custom_date":"2023-12-20","no_of_duration":"2","time":"22:00","duration_type":"days","emailtemplate_id":"4000000008003","reminder_notify_users":[{"type":"days","values":["4000000002055"]}]},"budget_info":{"rate_per_hour":50,"budget":"12345:00","threshold":"234:00","hourly_budget":"40:00","hourly_budget_threshold":"35:00","revenue_budget":5000,"cost_rate_per_hour":30},"<field_name>":"In Progress"}'
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/tasks");
curl_easy_setopt(curl, CURLOPT_HTTPHEADER, headers);
curl_easy_setopt(curl, CURLOPT_CUSTOMREQUEST, "POST");
curl_easy_setopt(curl, CURLOPT_POSTFIELDS, "{\"milestone\":{\"id\":\"4000000062001\"},\"tasklist\":{\"id\":\"4000000062001\"},\"parental_info\":{\"parent_task_id\":\"4000000005670\"},\"name\":\"Set Up CI/CD Pipeline for Staging Environment\",\"description\":false,\"status\":{\"id\":\"4000000062001\"},\"priority\":\"high\",\"start_after\":{\"value\":\"5\",\"unit\":\"hours_per_day\"},\"start_date\":\"2024-12-16T09:00:00.000Z\",\"end_date\":\"2024-12-19T18:00:00.000Z\",\"duration\":{\"value\":\"5\",\"type\":\"days\"},\"completion_percentage\":0,\"billing_type\":false,\"attachments\":false,\"thirdparty_id\":[\"9if2g8aa1c0f0e1234567890abcdef123456\"],\"owners_and_work\":{\"owners\":[{\"add\":[{\"zpuid\":[\"4000000002055\"],\"zuid\":\"16469208\",\"email\":\"richard.santos@zylker.com\",\"work_values\":\"08:00\"}],\"remove\":[{\"zpuid\":[\"4000000002055\"],\"zuid\":\"16469208\",\"email\":\"richard.santos@zylker.com\"}],\"zpuid\":[\"4000000002055\"],\"zuid\":\"16469208\",\"email\":\"richard.santos@zylker.com\",\"work_values\":\"08:00\"}],\"work_type\":\"standard\",\"unit\":\"hours_per_day\",\"copy_task_duration\":\"true\",\"refresh_business_hours\":\"false\"},\"tags\":[{\"add\":[{\"id\":\"4000000062001\"}],\"remove\":[{\"id\":\"4000000062001\"}],\"id\":\"4000000062001\"}],\"teams\":[{\"add\":[{\"id\":\"4000000062001\"}],\"remove\":[{\"id\":\"4000000062001\"}],\"id\":\"4000000062001\"}],\"recurrence\":{\"frequency\":\"daily\",\"interval\":1,\"end_after_occurrences\":\"10\",\"set_to_previous_businessday\":\"false\",\"next_recurrence_after_close\":\"true\",\"trigger_type\":\"first_to_occur\",\"date_based\":{\"name\":\"Set Up CI/CD Pipeline for Staging Environment\",\"schedule_datetime\":\"2024-12-16T09:00:00.000Z\",\"repetative_type\":\"daily\",\"time_span\":1,\"days_of_week\":[\"1\"],\"months_of_year\":[\"1\"],\"repeat_on_type\":0,\"repeat_on_value\":\"1\",\"ends_after_type\":\"none\",\"ends_after_value\":\"20\",\"skip_type\":\"skip\",\"mail_to_user\":{\"zpuid\":[\"4000000002055\"]},\"duration_type\":\"days\",\"no_of_duration\":\"2\",\"field_name\":\"status\",\"time\":\"22:00\"},\"scheduler_based\":{\"name\":\"Set Up CI/CD Pipeline for Staging Environment\",\"schedule_datetime\":\"2024-12-16T09:00:00.000Z\",\"repetative_type\":\"daily\",\"time_span\":1,\"days_of_week\":[\"1\"],\"months_of_year\":[\"1\"],\"repeat_on_type\":0,\"repeat_on_value\":\"1\",\"ends_after_type\":\"none\",\"ends_after_value\":\"20\",\"skip_type\":\"skip\",\"mail_to_user\":{\"zpuid\":[\"4000000002055\"]},\"duration_type\":\"days\",\"no_of_duration\":\"2\",\"field_name\":\"status\",\"time\":\"22:00\"},\"retain_comments\":\"false\",\"retain_subtasks\":\"false\",\"retain_config\":{\"comments\":false,\"billing_type\":false,\"followers\":false,\"description\":false,\"subtasks\":false,\"tags\":false,\"attachments\":false,\"teams\":false}},\"reminder\":{\"reminder_criteria\":\"on\",\"field_type\":\"start_date\",\"custom_date\":\"2023-12-20\",\"no_of_duration\":\"2\",\"time\":\"22:00\",\"duration_type\":\"days\",\"emailtemplate_id\":\"4000000008003\",\"reminder_notify_users\":[{\"type\":\"days\",\"values\":[\"4000000002055\"]}]},\"budget_info\":{\"rate_per_hour\":50,\"budget\":\"12345:00\",\"threshold\":\"234:00\",\"hourly_budget\":\"40:00\",\"hourly_budget_threshold\":\"35:00\",\"revenue_budget\":5000,\"cost_rate_per_hour\":30},\"<field_name>\":\"In Progress\"}");
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/tasks");
request.Content = new StringContent(
@"{""milestone"":{""id"":""4000000062001""},""tasklist"":{""id"":""4000000062001""},""parental_info"":{""parent_task_id"":""4000000005670""},""name"":""Set Up CI/CD Pipeline for Staging Environment"",""description"":false,""status"":{""id"":""4000000062001""},""priority"":""high"",""start_after"":{""value"":""5"",""unit"":""hours_per_day""},""start_date"":""2024-12-16T09:00:00.000Z"",""end_date"":""2024-12-19T18:00:00.000Z"",""duration"":{""value"":""5"",""type"":""days""},""completion_percentage"":0,""billing_type"":false,""attachments"":false,""thirdparty_id"":[""9if2g8aa1c0f0e1234567890abcdef123456""],""owners_and_work"":{""owners"":[{""add"":[{""zpuid"":[""4000000002055""],""zuid"":""16469208"",""email"":""richard.santos@zylker.com"",""work_values"":""08:00""}],""remove"":[{""zpuid"":[""4000000002055""],""zuid"":""16469208"",""email"":""richard.santos@zylker.com""}],""zpuid"":[""4000000002055""],""zuid"":""16469208"",""email"":""richard.santos@zylker.com"",""work_values"":""08:00""}],""work_type"":""standard"",""unit"":""hours_per_day"",""copy_task_duration"":""true"",""refresh_business_hours"":""false""},""tags"":[{""add"":[{""id"":""4000000062001""}],""remove"":[{""id"":""4000000062001""}],""id"":""4000000062001""}],""teams"":[{""add"":[{""id"":""4000000062001""}],""remove"":[{""id"":""4000000062001""}],""id"":""4000000062001""}],""recurrence"":{""frequency"":""daily"",""interval"":1,""end_after_occurrences"":""10"",""set_to_previous_businessday"":""false"",""next_recurrence_after_close"":""true"",""trigger_type"":""first_to_occur"",""date_based"":{""name"":""Set Up CI/CD Pipeline for Staging Environment"",""schedule_datetime"":""2024-12-16T09:00:00.000Z"",""repetative_type"":""daily"",""time_span"":1,""days_of_week"":[""1""],""months_of_year"":[""1""],""repeat_on_type"":0,""repeat_on_value"":""1"",""ends_after_type"":""none"",""ends_after_value"":""20"",""skip_type"":""skip"",""mail_to_user"":{""zpuid"":[""4000000002055""]},""duration_type"":""days"",""no_of_duration"":""2"",""field_name"":""status"",""time"":""22:00""},""scheduler_based"":{""name"":""Set Up CI/CD Pipeline for Staging Environment"",""schedule_datetime"":""2024-12-16T09:00:00.000Z"",""repetative_type"":""daily"",""time_span"":1,""days_of_week"":[""1""],""months_of_year"":[""1""],""repeat_on_type"":0,""repeat_on_value"":""1"",""ends_after_type"":""none"",""ends_after_value"":""20"",""skip_type"":""skip"",""mail_to_user"":{""zpuid"":[""4000000002055""]},""duration_type"":""days"",""no_of_duration"":""2"",""field_name"":""status"",""time"":""22:00""},""retain_comments"":""false"",""retain_subtasks"":""false"",""retain_config"":{""comments"":false,""billing_type"":false,""followers"":false,""description"":false,""subtasks"":false,""tags"":false,""attachments"":false,""teams"":false}},""reminder"":{""reminder_criteria"":""on"",""field_type"":""start_date"",""custom_date"":""2023-12-20"",""no_of_duration"":""2"",""time"":""22:00"",""duration_type"":""days"",""emailtemplate_id"":""4000000008003"",""reminder_notify_users"":[{""type"":""days"",""values"":[""4000000002055""]}]},""budget_info"":{""rate_per_hour"":50,""budget"":""12345:00"",""threshold"":""234:00"",""hourly_budget"":""40:00"",""hourly_budget_threshold"":""35:00"",""revenue_budget"":5000,""cost_rate_per_hour"":30},""<field_name>"":""In Progress""}",
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/tasks");
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, "{\"milestone\":{\"id\":\"4000000062001\"},\"tasklist\":{\"id\":\"4000000062001\"},\"parental_info\":{\"parent_task_id\":\"4000000005670\"},\"name\":\"Set Up CI/CD Pipeline for Staging Environment\",\"description\":false,\"status\":{\"id\":\"4000000062001\"},\"priority\":\"high\",\"start_after\":{\"value\":\"5\",\"unit\":\"hours_per_day\"},\"start_date\":\"2024-12-16T09:00:00.000Z\",\"end_date\":\"2024-12-19T18:00:00.000Z\",\"duration\":{\"value\":\"5\",\"type\":\"days\"},\"completion_percentage\":0,\"billing_type\":false,\"attachments\":false,\"thirdparty_id\":[\"9if2g8aa1c0f0e1234567890abcdef123456\"],\"owners_and_work\":{\"owners\":[{\"add\":[{\"zpuid\":[\"4000000002055\"],\"zuid\":\"16469208\",\"email\":\"richard.santos@zylker.com\",\"work_values\":\"08:00\"}],\"remove\":[{\"zpuid\":[\"4000000002055\"],\"zuid\":\"16469208\",\"email\":\"richard.santos@zylker.com\"}],\"zpuid\":[\"4000000002055\"],\"zuid\":\"16469208\",\"email\":\"richard.santos@zylker.com\",\"work_values\":\"08:00\"}],\"work_type\":\"standard\",\"unit\":\"hours_per_day\",\"copy_task_duration\":\"true\",\"refresh_business_hours\":\"false\"},\"tags\":[{\"add\":[{\"id\":\"4000000062001\"}],\"remove\":[{\"id\":\"4000000062001\"}],\"id\":\"4000000062001\"}],\"teams\":[{\"add\":[{\"id\":\"4000000062001\"}],\"remove\":[{\"id\":\"4000000062001\"}],\"id\":\"4000000062001\"}],\"recurrence\":{\"frequency\":\"daily\",\"interval\":1,\"end_after_occurrences\":\"10\",\"set_to_previous_businessday\":\"false\",\"next_recurrence_after_close\":\"true\",\"trigger_type\":\"first_to_occur\",\"date_based\":{\"name\":\"Set Up CI/CD Pipeline for Staging Environment\",\"schedule_datetime\":\"2024-12-16T09:00:00.000Z\",\"repetative_type\":\"daily\",\"time_span\":1,\"days_of_week\":[\"1\"],\"months_of_year\":[\"1\"],\"repeat_on_type\":0,\"repeat_on_value\":\"1\",\"ends_after_type\":\"none\",\"ends_after_value\":\"20\",\"skip_type\":\"skip\",\"mail_to_user\":{\"zpuid\":[\"4000000002055\"]},\"duration_type\":\"days\",\"no_of_duration\":\"2\",\"field_name\":\"status\",\"time\":\"22:00\"},\"scheduler_based\":{\"name\":\"Set Up CI/CD Pipeline for Staging Environment\",\"schedule_datetime\":\"2024-12-16T09:00:00.000Z\",\"repetative_type\":\"daily\",\"time_span\":1,\"days_of_week\":[\"1\"],\"months_of_year\":[\"1\"],\"repeat_on_type\":0,\"repeat_on_value\":\"1\",\"ends_after_type\":\"none\",\"ends_after_value\":\"20\",\"skip_type\":\"skip\",\"mail_to_user\":{\"zpuid\":[\"4000000002055\"]},\"duration_type\":\"days\",\"no_of_duration\":\"2\",\"field_name\":\"status\",\"time\":\"22:00\"},\"retain_comments\":\"false\",\"retain_subtasks\":\"false\",\"retain_config\":{\"comments\":false,\"billing_type\":false,\"followers\":false,\"description\":false,\"subtasks\":false,\"tags\":false,\"attachments\":false,\"teams\":false}},\"reminder\":{\"reminder_criteria\":\"on\",\"field_type\":\"start_date\",\"custom_date\":\"2023-12-20\",\"no_of_duration\":\"2\",\"time\":\"22:00\",\"duration_type\":\"days\",\"emailtemplate_id\":\"4000000008003\",\"reminder_notify_users\":[{\"type\":\"days\",\"values\":[\"4000000002055\"]}]},\"budget_info\":{\"rate_per_hour\":50,\"budget\":\"12345:00\",\"threshold\":\"234:00\",\"hourly_budget\":\"40:00\",\"hourly_budget_threshold\":\"35:00\",\"revenue_budget\":5000,\"cost_rate_per_hour\":30},\"<field_name>\":\"In Progress\"}");
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/tasks"
{:headers {"Authorization" "Bearer 1000.03xxxxxxxxxxxxxxxxxa5317.dxxxxxxxxxxxxxxxxxfa"
"Content-Type" "application/json"}
:body "{\"milestone\":{\"id\":\"4000000062001\"},\"tasklist\":{\"id\":\"4000000062001\"},\"parental_info\":{\"parent_task_id\":\"4000000005670\"},\"name\":\"Set Up CI/CD Pipeline for Staging Environment\",\"description\":false,\"status\":{\"id\":\"4000000062001\"},\"priority\":\"high\",\"start_after\":{\"value\":\"5\",\"unit\":\"hours_per_day\"},\"start_date\":\"2024-12-16T09:00:00.000Z\",\"end_date\":\"2024-12-19T18:00:00.000Z\",\"duration\":{\"value\":\"5\",\"type\":\"days\"},\"completion_percentage\":0,\"billing_type\":false,\"attachments\":false,\"thirdparty_id\":[\"9if2g8aa1c0f0e1234567890abcdef123456\"],\"owners_and_work\":{\"owners\":[{\"add\":[{\"zpuid\":[\"4000000002055\"],\"zuid\":\"16469208\",\"email\":\"richard.santos@zylker.com\",\"work_values\":\"08:00\"}],\"remove\":[{\"zpuid\":[\"4000000002055\"],\"zuid\":\"16469208\",\"email\":\"richard.santos@zylker.com\"}],\"zpuid\":[\"4000000002055\"],\"zuid\":\"16469208\",\"email\":\"richard.santos@zylker.com\",\"work_values\":\"08:00\"}],\"work_type\":\"standard\",\"unit\":\"hours_per_day\",\"copy_task_duration\":\"true\",\"refresh_business_hours\":\"false\"},\"tags\":[{\"add\":[{\"id\":\"4000000062001\"}],\"remove\":[{\"id\":\"4000000062001\"}],\"id\":\"4000000062001\"}],\"teams\":[{\"add\":[{\"id\":\"4000000062001\"}],\"remove\":[{\"id\":\"4000000062001\"}],\"id\":\"4000000062001\"}],\"recurrence\":{\"frequency\":\"daily\",\"interval\":1,\"end_after_occurrences\":\"10\",\"set_to_previous_businessday\":\"false\",\"next_recurrence_after_close\":\"true\",\"trigger_type\":\"first_to_occur\",\"date_based\":{\"name\":\"Set Up CI/CD Pipeline for Staging Environment\",\"schedule_datetime\":\"2024-12-16T09:00:00.000Z\",\"repetative_type\":\"daily\",\"time_span\":1,\"days_of_week\":[\"1\"],\"months_of_year\":[\"1\"],\"repeat_on_type\":0,\"repeat_on_value\":\"1\",\"ends_after_type\":\"none\",\"ends_after_value\":\"20\",\"skip_type\":\"skip\",\"mail_to_user\":{\"zpuid\":[\"4000000002055\"]},\"duration_type\":\"days\",\"no_of_duration\":\"2\",\"field_name\":\"status\",\"time\":\"22:00\"},\"scheduler_based\":{\"name\":\"Set Up CI/CD Pipeline for Staging Environment\",\"schedule_datetime\":\"2024-12-16T09:00:00.000Z\",\"repetative_type\":\"daily\",\"time_span\":1,\"days_of_week\":[\"1\"],\"months_of_year\":[\"1\"],\"repeat_on_type\":0,\"repeat_on_value\":\"1\",\"ends_after_type\":\"none\",\"ends_after_value\":\"20\",\"skip_type\":\"skip\",\"mail_to_user\":{\"zpuid\":[\"4000000002055\"]},\"duration_type\":\"days\",\"no_of_duration\":\"2\",\"field_name\":\"status\",\"time\":\"22:00\"},\"retain_comments\":\"false\",\"retain_subtasks\":\"false\",\"retain_config\":{\"comments\":false,\"billing_type\":false,\"followers\":false,\"description\":false,\"subtasks\":false,\"tags\":false,\"attachments\":false,\"teams\":false}},\"reminder\":{\"reminder_criteria\":\"on\",\"field_type\":\"start_date\",\"custom_date\":\"2023-12-20\",\"no_of_duration\":\"2\",\"time\":\"22:00\",\"duration_type\":\"days\",\"emailtemplate_id\":\"4000000008003\",\"reminder_notify_users\":[{\"type\":\"days\",\"values\":[\"4000000002055\"]}]},\"budget_info\":{\"rate_per_hour\":50,\"budget\":\"12345:00\",\"threshold\":\"234:00\",\"hourly_budget\":\"40:00\",\"hourly_budget_threshold\":\"35:00\",\"revenue_budget\":5000,\"cost_rate_per_hour\":30},\"<field_name>\":\"In Progress\"}"
:as :json}))
(println (:body response))
package main
import (
"fmt"
"io"
"net/http"
"strings"
)
func main() {
payload := strings.NewReader("{\"milestone\":{\"id\":\"4000000062001\"},\"tasklist\":{\"id\":\"4000000062001\"},\"parental_info\":{\"parent_task_id\":\"4000000005670\"},\"name\":\"Set Up CI/CD Pipeline for Staging Environment\",\"description\":false,\"status\":{\"id\":\"4000000062001\"},\"priority\":\"high\",\"start_after\":{\"value\":\"5\",\"unit\":\"hours_per_day\"},\"start_date\":\"2024-12-16T09:00:00.000Z\",\"end_date\":\"2024-12-19T18:00:00.000Z\",\"duration\":{\"value\":\"5\",\"type\":\"days\"},\"completion_percentage\":0,\"billing_type\":false,\"attachments\":false,\"thirdparty_id\":[\"9if2g8aa1c0f0e1234567890abcdef123456\"],\"owners_and_work\":{\"owners\":[{\"add\":[{\"zpuid\":[\"4000000002055\"],\"zuid\":\"16469208\",\"email\":\"richard.santos@zylker.com\",\"work_values\":\"08:00\"}],\"remove\":[{\"zpuid\":[\"4000000002055\"],\"zuid\":\"16469208\",\"email\":\"richard.santos@zylker.com\"}],\"zpuid\":[\"4000000002055\"],\"zuid\":\"16469208\",\"email\":\"richard.santos@zylker.com\",\"work_values\":\"08:00\"}],\"work_type\":\"standard\",\"unit\":\"hours_per_day\",\"copy_task_duration\":\"true\",\"refresh_business_hours\":\"false\"},\"tags\":[{\"add\":[{\"id\":\"4000000062001\"}],\"remove\":[{\"id\":\"4000000062001\"}],\"id\":\"4000000062001\"}],\"teams\":[{\"add\":[{\"id\":\"4000000062001\"}],\"remove\":[{\"id\":\"4000000062001\"}],\"id\":\"4000000062001\"}],\"recurrence\":{\"frequency\":\"daily\",\"interval\":1,\"end_after_occurrences\":\"10\",\"set_to_previous_businessday\":\"false\",\"next_recurrence_after_close\":\"true\",\"trigger_type\":\"first_to_occur\",\"date_based\":{\"name\":\"Set Up CI/CD Pipeline for Staging Environment\",\"schedule_datetime\":\"2024-12-16T09:00:00.000Z\",\"repetative_type\":\"daily\",\"time_span\":1,\"days_of_week\":[\"1\"],\"months_of_year\":[\"1\"],\"repeat_on_type\":0,\"repeat_on_value\":\"1\",\"ends_after_type\":\"none\",\"ends_after_value\":\"20\",\"skip_type\":\"skip\",\"mail_to_user\":{\"zpuid\":[\"4000000002055\"]},\"duration_type\":\"days\",\"no_of_duration\":\"2\",\"field_name\":\"status\",\"time\":\"22:00\"},\"scheduler_based\":{\"name\":\"Set Up CI/CD Pipeline for Staging Environment\",\"schedule_datetime\":\"2024-12-16T09:00:00.000Z\",\"repetative_type\":\"daily\",\"time_span\":1,\"days_of_week\":[\"1\"],\"months_of_year\":[\"1\"],\"repeat_on_type\":0,\"repeat_on_value\":\"1\",\"ends_after_type\":\"none\",\"ends_after_value\":\"20\",\"skip_type\":\"skip\",\"mail_to_user\":{\"zpuid\":[\"4000000002055\"]},\"duration_type\":\"days\",\"no_of_duration\":\"2\",\"field_name\":\"status\",\"time\":\"22:00\"},\"retain_comments\":\"false\",\"retain_subtasks\":\"false\",\"retain_config\":{\"comments\":false,\"billing_type\":false,\"followers\":false,\"description\":false,\"subtasks\":false,\"tags\":false,\"attachments\":false,\"teams\":false}},\"reminder\":{\"reminder_criteria\":\"on\",\"field_type\":\"start_date\",\"custom_date\":\"2023-12-20\",\"no_of_duration\":\"2\",\"time\":\"22:00\",\"duration_type\":\"days\",\"emailtemplate_id\":\"4000000008003\",\"reminder_notify_users\":[{\"type\":\"days\",\"values\":[\"4000000002055\"]}]},\"budget_info\":{\"rate_per_hour\":50,\"budget\":\"12345:00\",\"threshold\":\"234:00\",\"hourly_budget\":\"40:00\",\"hourly_budget_threshold\":\"35:00\",\"revenue_budget\":5000,\"cost_rate_per_hour\":30},\"<field_name>\":\"In Progress\"}")
req, _ := http.NewRequest("POST", "https://projects.zoho.com/api/v3/portal/[PORTAL_ID]/projects/23806000097545166/tasks", 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/tasks HTTP/1.1
Host: https://projects.zoho.com/api/v3/portal/[PORTAL_ID]/projects/23806000097545166/tasks
Authorization: Bearer 1000.03xxxxxxxxxxxxxxxxxa5317.dxxxxxxxxxxxxxxxxxfa
Content-Type: application/json
{"milestone":{"id":"4000000062001"},"tasklist":{"id":"4000000062001"},"parental_info":{"parent_task_id":"4000000005670"},"name":"Set Up CI/CD Pipeline for Staging Environment","description":false,"status":{"id":"4000000062001"},"priority":"high","start_after":{"value":"5","unit":"hours_per_day"},"start_date":"2024-12-16T09:00:00.000Z","end_date":"2024-12-19T18:00:00.000Z","duration":{"value":"5","type":"days"},"completion_percentage":0,"billing_type":false,"attachments":false,"thirdparty_id":["9if2g8aa1c0f0e1234567890abcdef123456"],"owners_and_work":{"owners":[{"add":[{"zpuid":["4000000002055"],"zuid":"16469208","email":"richard.santos@zylker.com","work_values":"08:00"}],"remove":[{"zpuid":["4000000002055"],"zuid":"16469208","email":"richard.santos@zylker.com"}],"zpuid":["4000000002055"],"zuid":"16469208","email":"richard.santos@zylker.com","work_values":"08:00"}],"work_type":"standard","unit":"hours_per_day","copy_task_duration":"true","refresh_business_hours":"false"},"tags":[{"add":[{"id":"4000000062001"}],"remove":[{"id":"4000000062001"}],"id":"4000000062001"}],"teams":[{"add":[{"id":"4000000062001"}],"remove":[{"id":"4000000062001"}],"id":"4000000062001"}],"recurrence":{"frequency":"daily","interval":1,"end_after_occurrences":"10","set_to_previous_businessday":"false","next_recurrence_after_close":"true","trigger_type":"first_to_occur","date_based":{"name":"Set Up CI/CD Pipeline for Staging Environment","schedule_datetime":"2024-12-16T09:00:00.000Z","repetative_type":"daily","time_span":1,"days_of_week":["1"],"months_of_year":["1"],"repeat_on_type":0,"repeat_on_value":"1","ends_after_type":"none","ends_after_value":"20","skip_type":"skip","mail_to_user":{"zpuid":["4000000002055"]},"duration_type":"days","no_of_duration":"2","field_name":"status","time":"22:00"},"scheduler_based":{"name":"Set Up CI/CD Pipeline for Staging Environment","schedule_datetime":"2024-12-16T09:00:00.000Z","repetative_type":"daily","time_span":1,"days_of_week":["1"],"months_of_year":["1"],"repeat_on_type":0,"repeat_on_value":"1","ends_after_type":"none","ends_after_value":"20","skip_type":"skip","mail_to_user":{"zpuid":["4000000002055"]},"duration_type":"days","no_of_duration":"2","field_name":"status","time":"22:00"},"retain_comments":"false","retain_subtasks":"false","retain_config":{"comments":false,"billing_type":false,"followers":false,"description":false,"subtasks":false,"tags":false,"attachments":false,"teams":false}},"reminder":{"reminder_criteria":"on","field_type":"start_date","custom_date":"2023-12-20","no_of_duration":"2","time":"22:00","duration_type":"days","emailtemplate_id":"4000000008003","reminder_notify_users":[{"type":"days","values":["4000000002055"]}]},"budget_info":{"rate_per_hour":50,"budget":"12345:00","threshold":"234:00","hourly_budget":"40:00","hourly_budget_threshold":"35:00","revenue_budget":5000,"cost_rate_per_hour":30},"<field_name>":"In Progress"}
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/tasks");
HttpUriRequest requestObj = new HttpPost(uriBuilder.build());
requestObj.addHeader("Authorization", "Bearer 1000.03xxxxxxxxxxxxxxxxxa5317.dxxxxxxxxxxxxxxxxxfa");
HttpEntityEnclosingRequestBase requestBase = (HttpEntityEnclosingRequestBase) requestObj;
String requestBody = "{\"milestone\":{\"id\":\"4000000062001\"},\"tasklist\":{\"id\":\"4000000062001\"},\"parental_info\":{\"parent_task_id\":\"4000000005670\"},\"name\":\"Set Up CI\/CD Pipeline for Staging Environment\",\"description\":false,\"status\":{\"id\":\"4000000062001\"},\"priority\":\"high\",\"start_after\":{\"value\":\"5\",\"unit\":\"hours_per_day\"},\"start_date\":\"2024-12-16T09:00:00.000Z\",\"end_date\":\"2024-12-19T18:00:00.000Z\",\"duration\":{\"value\":\"5\",\"type\":\"days\"},\"completion_percentage\":0,\"billing_type\":false,\"attachments\":false,\"thirdparty_id\":[\"9if2g8aa1c0f0e1234567890abcdef123456\"],\"owners_and_work\":{\"owners\":[{\"add\":[{\"zpuid\":[\"4000000002055\"],\"zuid\":\"16469208\",\"email\":\"richard.santos@zylker.com\",\"work_values\":\"08:00\"}],\"remove\":[{\"zpuid\":[\"4000000002055\"],\"zuid\":\"16469208\",\"email\":\"richard.santos@zylker.com\"}],\"zpuid\":[\"4000000002055\"],\"zuid\":\"16469208\",\"email\":\"richard.santos@zylker.com\",\"work_values\":\"08:00\"}],\"work_type\":\"standard\",\"unit\":\"hours_per_day\",\"copy_task_duration\":\"true\",\"refresh_business_hours\":\"false\"},\"tags\":[{\"add\":[{\"id\":\"4000000062001\"}],\"remove\":[{\"id\":\"4000000062001\"}],\"id\":\"4000000062001\"}],\"teams\":[{\"add\":[{\"id\":\"4000000062001\"}],\"remove\":[{\"id\":\"4000000062001\"}],\"id\":\"4000000062001\"}],\"recurrence\":{\"frequency\":\"daily\",\"interval\":1,\"end_after_occurrences\":\"10\",\"set_to_previous_businessday\":\"false\",\"next_recurrence_after_close\":\"true\",\"trigger_type\":\"first_to_occur\",\"date_based\":{\"name\":\"Set Up CI\/CD Pipeline for Staging Environment\",\"schedule_datetime\":\"2024-12-16T09:00:00.000Z\",\"repetative_type\":\"daily\",\"time_span\":1,\"days_of_week\":[\"1\"],\"months_of_year\":[\"1\"],\"repeat_on_type\":0,\"repeat_on_value\":\"1\",\"ends_after_type\":\"none\",\"ends_after_value\":\"20\",\"skip_type\":\"skip\",\"mail_to_user\":{\"zpuid\":[\"4000000002055\"]},\"duration_type\":\"days\",\"no_of_duration\":\"2\",\"field_name\":\"status\",\"time\":\"22:00\"},\"scheduler_based\":{\"name\":\"Set Up CI\/CD Pipeline for Staging Environment\",\"schedule_datetime\":\"2024-12-16T09:00:00.000Z\",\"repetative_type\":\"daily\",\"time_span\":1,\"days_of_week\":[\"1\"],\"months_of_year\":[\"1\"],\"repeat_on_type\":0,\"repeat_on_value\":\"1\",\"ends_after_type\":\"none\",\"ends_after_value\":\"20\",\"skip_type\":\"skip\",\"mail_to_user\":{\"zpuid\":[\"4000000002055\"]},\"duration_type\":\"days\",\"no_of_duration\":\"2\",\"field_name\":\"status\",\"time\":\"22:00\"},\"retain_comments\":\"false\",\"retain_subtasks\":\"false\",\"retain_config\":{\"comments\":false,\"billing_type\":false,\"followers\":false,\"description\":false,\"subtasks\":false,\"tags\":false,\"attachments\":false,\"teams\":false}},\"reminder\":{\"reminder_criteria\":\"on\",\"field_type\":\"start_date\",\"custom_date\":\"2023-12-20\",\"no_of_duration\":\"2\",\"time\":\"22:00\",\"duration_type\":\"days\",\"emailtemplate_id\":\"4000000008003\",\"reminder_notify_users\":[{\"type\":\"days\",\"values\":[\"4000000002055\"]}]},\"budget_info\":{\"rate_per_hour\":50,\"budget\":\"12345:00\",\"threshold\":\"234:00\",\"hourly_budget\":\"40:00\",\"hourly_budget_threshold\":\"35:00\",\"revenue_budget\":5000,\"cost_rate_per_hour\":30},\"<field_name>\":\"In Progress\"}";
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/tasks';
const options = {
method: 'POST',
headers: {
'Authorization': 'Bearer 1000.03xxxxxxxxxxxxxxxxxa5317.dxxxxxxxxxxxxxxxxxfa',
'Content-Type': 'application/json'
},
body: JSON.stringify({"milestone":{"id":"4000000062001"},"tasklist":{"id":"4000000062001"},"parental_info":{"parent_task_id":"4000000005670"},"name":"Set Up CI/CD Pipeline for Staging Environment","description":false,"status":{"id":"4000000062001"},"priority":"high","start_after":{"value":"5","unit":"hours_per_day"},"start_date":"2024-12-16T09:00:00.000Z","end_date":"2024-12-19T18:00:00.000Z","duration":{"value":"5","type":"days"},"completion_percentage":0,"billing_type":false,"attachments":false,"thirdparty_id":["9if2g8aa1c0f0e1234567890abcdef123456"],"owners_and_work":{"owners":[{"add":[{"zpuid":["4000000002055"],"zuid":"16469208","email":"richard.santos@zylker.com","work_values":"08:00"}],"remove":[{"zpuid":["4000000002055"],"zuid":"16469208","email":"richard.santos@zylker.com"}],"zpuid":["4000000002055"],"zuid":"16469208","email":"richard.santos@zylker.com","work_values":"08:00"}],"work_type":"standard","unit":"hours_per_day","copy_task_duration":"true","refresh_business_hours":"false"},"tags":[{"add":[{"id":"4000000062001"}],"remove":[{"id":"4000000062001"}],"id":"4000000062001"}],"teams":[{"add":[{"id":"4000000062001"}],"remove":[{"id":"4000000062001"}],"id":"4000000062001"}],"recurrence":{"frequency":"daily","interval":1,"end_after_occurrences":"10","set_to_previous_businessday":"false","next_recurrence_after_close":"true","trigger_type":"first_to_occur","date_based":{"name":"Set Up CI/CD Pipeline for Staging Environment","schedule_datetime":"2024-12-16T09:00:00.000Z","repetative_type":"daily","time_span":1,"days_of_week":["1"],"months_of_year":["1"],"repeat_on_type":0,"repeat_on_value":"1","ends_after_type":"none","ends_after_value":"20","skip_type":"skip","mail_to_user":{"zpuid":["4000000002055"]},"duration_type":"days","no_of_duration":"2","field_name":"status","time":"22:00"},"scheduler_based":{"name":"Set Up CI/CD Pipeline for Staging Environment","schedule_datetime":"2024-12-16T09:00:00.000Z","repetative_type":"daily","time_span":1,"days_of_week":["1"],"months_of_year":["1"],"repeat_on_type":0,"repeat_on_value":"1","ends_after_type":"none","ends_after_value":"20","skip_type":"skip","mail_to_user":{"zpuid":["4000000002055"]},"duration_type":"days","no_of_duration":"2","field_name":"status","time":"22:00"},"retain_comments":"false","retain_subtasks":"false","retain_config":{"comments":false,"billing_type":false,"followers":false,"description":false,"subtasks":false,"tags":false,"attachments":false,"teams":false}},"reminder":{"reminder_criteria":"on","field_type":"start_date","custom_date":"2023-12-20","no_of_duration":"2","time":"22:00","duration_type":"days","emailtemplate_id":"4000000008003","reminder_notify_users":[{"type":"days","values":["4000000002055"]}]},"budget_info":{"rate_per_hour":50,"budget":"12345:00","threshold":"234:00","hourly_budget":"40:00","hourly_budget_threshold":"35:00","revenue_budget":5000,"cost_rate_per_hour":30},"<field_name>":"In Progress"})
};
fetch(url, options)
.then(response => response.json())
.then(data => console.log(data))
.catch(error => console.error(error));
{"milestone":{"id":"4000000062001"},"tasklist":{"id":"4000000062001"},"parental_info":{"parent_task_id":"4000000005670"},"name":"Set Up CI/CD Pipeline for Staging Environment","description":false,"status":{"id":"4000000062001"},"priority":"high","start_after":{"value":"5","unit":"hours_per_day"},"start_date":"2024-12-16T09:00:00.000Z","end_date":"2024-12-19T18:00:00.000Z","duration":{"value":"5","type":"days"},"completion_percentage":0,"billing_type":false,"attachments":false,"thirdparty_id":["9if2g8aa1c0f0e1234567890abcdef123456"],"owners_and_work":{"owners":[{"add":[{"zpuid":["4000000002055"],"zuid":"16469208","email":"richard.santos@zylker.com","work_values":"08:00"}],"remove":[{"zpuid":["4000000002055"],"zuid":"16469208","email":"richard.santos@zylker.com"}],"zpuid":["4000000002055"],"zuid":"16469208","email":"richard.santos@zylker.com","work_values":"08:00"}],"work_type":"standard","unit":"hours_per_day","copy_task_duration":"true","refresh_business_hours":"false"},"tags":[{"add":[{"id":"4000000062001"}],"remove":[{"id":"4000000062001"}],"id":"4000000062001"}],"teams":[{"add":[{"id":"4000000062001"}],"remove":[{"id":"4000000062001"}],"id":"4000000062001"}],"recurrence":{"frequency":"daily","interval":1,"end_after_occurrences":"10","set_to_previous_businessday":"false","next_recurrence_after_close":"true","trigger_type":"first_to_occur","date_based":{"name":"Set Up CI/CD Pipeline for Staging Environment","schedule_datetime":"2024-12-16T09:00:00.000Z","repetative_type":"daily","time_span":1,"days_of_week":["1"],"months_of_year":["1"],"repeat_on_type":0,"repeat_on_value":"1","ends_after_type":"none","ends_after_value":"20","skip_type":"skip","mail_to_user":{"zpuid":["4000000002055"]},"duration_type":"days","no_of_duration":"2","field_name":"status","time":"22:00"},"scheduler_based":{"name":"Set Up CI/CD Pipeline for Staging Environment","schedule_datetime":"2024-12-16T09:00:00.000Z","repetative_type":"daily","time_span":1,"days_of_week":["1"],"months_of_year":["1"],"repeat_on_type":0,"repeat_on_value":"1","ends_after_type":"none","ends_after_value":"20","skip_type":"skip","mail_to_user":{"zpuid":["4000000002055"]},"duration_type":"days","no_of_duration":"2","field_name":"status","time":"22:00"},"retain_comments":"false","retain_subtasks":"false","retain_config":{"comments":false,"billing_type":false,"followers":false,"description":false,"subtasks":false,"tags":false,"attachments":false,"teams":false}},"reminder":{"reminder_criteria":"on","field_type":"start_date","custom_date":"2023-12-20","no_of_duration":"2","time":"22:00","duration_type":"days","emailtemplate_id":"4000000008003","reminder_notify_users":[{"type":"days","values":["4000000002055"]}]},"budget_info":{"rate_per_hour":50,"budget":"12345:00","threshold":"234:00","hourly_budget":"40:00","hourly_budget_threshold":"35:00","revenue_budget":5000,"cost_rate_per_hour":30},"<field_name>":"In Progress"}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/tasks")
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("""{"milestone":{"id":"4000000062001"},"tasklist":{"id":"4000000062001"},"parental_info":{"parent_task_id":"4000000005670"},"name":"Set Up CI/CD Pipeline for Staging Environment","description":false,"status":{"id":"4000000062001"},"priority":"high","start_after":{"value":"5","unit":"hours_per_day"},"start_date":"2024-12-16T09:00:00.000Z","end_date":"2024-12-19T18:00:00.000Z","duration":{"value":"5","type":"days"},"completion_percentage":0,"billing_type":false,"attachments":false,"thirdparty_id":["9if2g8aa1c0f0e1234567890abcdef123456"],"owners_and_work":{"owners":[{"add":[{"zpuid":["4000000002055"],"zuid":"16469208","email":"richard.santos@zylker.com","work_values":"08:00"}],"remove":[{"zpuid":["4000000002055"],"zuid":"16469208","email":"richard.santos@zylker.com"}],"zpuid":["4000000002055"],"zuid":"16469208","email":"richard.santos@zylker.com","work_values":"08:00"}],"work_type":"standard","unit":"hours_per_day","copy_task_duration":"true","refresh_business_hours":"false"},"tags":[{"add":[{"id":"4000000062001"}],"remove":[{"id":"4000000062001"}],"id":"4000000062001"}],"teams":[{"add":[{"id":"4000000062001"}],"remove":[{"id":"4000000062001"}],"id":"4000000062001"}],"recurrence":{"frequency":"daily","interval":1,"end_after_occurrences":"10","set_to_previous_businessday":"false","next_recurrence_after_close":"true","trigger_type":"first_to_occur","date_based":{"name":"Set Up CI/CD Pipeline for Staging Environment","schedule_datetime":"2024-12-16T09:00:00.000Z","repetative_type":"daily","time_span":1,"days_of_week":["1"],"months_of_year":["1"],"repeat_on_type":0,"repeat_on_value":"1","ends_after_type":"none","ends_after_value":"20","skip_type":"skip","mail_to_user":{"zpuid":["4000000002055"]},"duration_type":"days","no_of_duration":"2","field_name":"status","time":"22:00"},"scheduler_based":{"name":"Set Up CI/CD Pipeline for Staging Environment","schedule_datetime":"2024-12-16T09:00:00.000Z","repetative_type":"daily","time_span":1,"days_of_week":["1"],"months_of_year":["1"],"repeat_on_type":0,"repeat_on_value":"1","ends_after_type":"none","ends_after_value":"20","skip_type":"skip","mail_to_user":{"zpuid":["4000000002055"]},"duration_type":"days","no_of_duration":"2","field_name":"status","time":"22:00"},"retain_comments":"false","retain_subtasks":"false","retain_config":{"comments":false,"billing_type":false,"followers":false,"description":false,"subtasks":false,"tags":false,"attachments":false,"teams":false}},"reminder":{"reminder_criteria":"on","field_type":"start_date","custom_date":"2023-12-20","no_of_duration":"2","time":"22:00","duration_type":"days","emailtemplate_id":"4000000008003","reminder_notify_users":[{"type":"days","values":["4000000002055"]}]},"budget_info":{"rate_per_hour":50,"budget":"12345:00","threshold":"234:00","hourly_budget":"40:00","hourly_budget_threshold":"35:00","revenue_budget":5000,"cost_rate_per_hour":30},"<field_name>":"In Progress"}""") }
val response = conn.inputStream.bufferedReader().readText()
println(response)
}
NSURL *url = [NSURL URLWithString:@"https://projects.zoho.com/api/v3/portal/[PORTAL_ID]/projects/23806000097545166/tasks"];
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 = [@"{\"milestone\":{\"id\":\"4000000062001\"},\"tasklist\":{\"id\":\"4000000062001\"},\"parental_info\":{\"parent_task_id\":\"4000000005670\"},\"name\":\"Set Up CI/CD Pipeline for Staging Environment\",\"description\":false,\"status\":{\"id\":\"4000000062001\"},\"priority\":\"high\",\"start_after\":{\"value\":\"5\",\"unit\":\"hours_per_day\"},\"start_date\":\"2024-12-16T09:00:00.000Z\",\"end_date\":\"2024-12-19T18:00:00.000Z\",\"duration\":{\"value\":\"5\",\"type\":\"days\"},\"completion_percentage\":0,\"billing_type\":false,\"attachments\":false,\"thirdparty_id\":[\"9if2g8aa1c0f0e1234567890abcdef123456\"],\"owners_and_work\":{\"owners\":[{\"add\":[{\"zpuid\":[\"4000000002055\"],\"zuid\":\"16469208\",\"email\":\"richard.santos@zylker.com\",\"work_values\":\"08:00\"}],\"remove\":[{\"zpuid\":[\"4000000002055\"],\"zuid\":\"16469208\",\"email\":\"richard.santos@zylker.com\"}],\"zpuid\":[\"4000000002055\"],\"zuid\":\"16469208\",\"email\":\"richard.santos@zylker.com\",\"work_values\":\"08:00\"}],\"work_type\":\"standard\",\"unit\":\"hours_per_day\",\"copy_task_duration\":\"true\",\"refresh_business_hours\":\"false\"},\"tags\":[{\"add\":[{\"id\":\"4000000062001\"}],\"remove\":[{\"id\":\"4000000062001\"}],\"id\":\"4000000062001\"}],\"teams\":[{\"add\":[{\"id\":\"4000000062001\"}],\"remove\":[{\"id\":\"4000000062001\"}],\"id\":\"4000000062001\"}],\"recurrence\":{\"frequency\":\"daily\",\"interval\":1,\"end_after_occurrences\":\"10\",\"set_to_previous_businessday\":\"false\",\"next_recurrence_after_close\":\"true\",\"trigger_type\":\"first_to_occur\",\"date_based\":{\"name\":\"Set Up CI/CD Pipeline for Staging Environment\",\"schedule_datetime\":\"2024-12-16T09:00:00.000Z\",\"repetative_type\":\"daily\",\"time_span\":1,\"days_of_week\":[\"1\"],\"months_of_year\":[\"1\"],\"repeat_on_type\":0,\"repeat_on_value\":\"1\",\"ends_after_type\":\"none\",\"ends_after_value\":\"20\",\"skip_type\":\"skip\",\"mail_to_user\":{\"zpuid\":[\"4000000002055\"]},\"duration_type\":\"days\",\"no_of_duration\":\"2\",\"field_name\":\"status\",\"time\":\"22:00\"},\"scheduler_based\":{\"name\":\"Set Up CI/CD Pipeline for Staging Environment\",\"schedule_datetime\":\"2024-12-16T09:00:00.000Z\",\"repetative_type\":\"daily\",\"time_span\":1,\"days_of_week\":[\"1\"],\"months_of_year\":[\"1\"],\"repeat_on_type\":0,\"repeat_on_value\":\"1\",\"ends_after_type\":\"none\",\"ends_after_value\":\"20\",\"skip_type\":\"skip\",\"mail_to_user\":{\"zpuid\":[\"4000000002055\"]},\"duration_type\":\"days\",\"no_of_duration\":\"2\",\"field_name\":\"status\",\"time\":\"22:00\"},\"retain_comments\":\"false\",\"retain_subtasks\":\"false\",\"retain_config\":{\"comments\":false,\"billing_type\":false,\"followers\":false,\"description\":false,\"subtasks\":false,\"tags\":false,\"attachments\":false,\"teams\":false}},\"reminder\":{\"reminder_criteria\":\"on\",\"field_type\":\"start_date\",\"custom_date\":\"2023-12-20\",\"no_of_duration\":\"2\",\"time\":\"22:00\",\"duration_type\":\"days\",\"emailtemplate_id\":\"4000000008003\",\"reminder_notify_users\":[{\"type\":\"days\",\"values\":[\"4000000002055\"]}]},\"budget_info\":{\"rate_per_hour\":50,\"budget\":\"12345:00\",\"threshold\":\"234:00\",\"hourly_budget\":\"40:00\",\"hourly_budget_threshold\":\"35:00\",\"revenue_budget\":5000,\"cost_rate_per_hour\":30},\"<field_name>\":\"In Progress\"}" 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/tasks" 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|{"milestone":{"id":"4000000062001"},"tasklist":{"id":"4000000062001"},"parental_info":{"parent_task_id":"4000000005670"},"name":"Set Up CI/CD Pipeline for Staging Environment","description":false,"status":{"id":"4000000062001"},"priority":"high","start_after":{"value":"5","unit":"hours_per_day"},"start_date":"2024-12-16T09:00:00.000Z","end_date":"2024-12-19T18:00:00.000Z","duration":{"value":"5","type":"days"},"completion_percentage":0,"billing_type":false,"attachments":false,"thirdparty_id":["9if2g8aa1c0f0e1234567890abcdef123456"],"owners_and_work":{"owners":[{"add":[{"zpuid":["4000000002055"],"zuid":"16469208","email":"richard.santos@zylker.com","work_values":"08:00"}],"remove":[{"zpuid":["4000000002055"],"zuid":"16469208","email":"richard.santos@zylker.com"}],"zpuid":["4000000002055"],"zuid":"16469208","email":"richard.santos@zylker.com","work_values":"08:00"}],"work_type":"standard","unit":"hours_per_day","copy_task_duration":"true","refresh_business_hours":"false"},"tags":[{"add":[{"id":"4000000062001"}],"remove":[{"id":"4000000062001"}],"id":"4000000062001"}],"teams":[{"add":[{"id":"4000000062001"}],"remove":[{"id":"4000000062001"}],"id":"4000000062001"}],"recurrence":{"frequency":"daily","interval":1,"end_after_occurrences":"10","set_to_previous_businessday":"false","next_recurrence_after_close":"true","trigger_type":"first_to_occur","date_based":{"name":"Set Up CI/CD Pipeline for Staging Environment","schedule_datetime":"2024-12-16T09:00:00.000Z","repetative_type":"daily","time_span":1,"days_of_week":["1"],"months_of_year":["1"],"repeat_on_type":0,"repeat_on_value":"1","ends_after_type":"none","ends_after_value":"20","skip_type":"skip","mail_to_user":{"zpuid":["4000000002055"]},"duration_type":"days","no_of_duration":"2","field_name":"status","time":"22:00"},"scheduler_based":{"name":"Set Up CI/CD Pipeline for Staging Environment","schedule_datetime":"2024-12-16T09:00:00.000Z","repetative_type":"daily","time_span":1,"days_of_week":["1"],"months_of_year":["1"],"repeat_on_type":0,"repeat_on_value":"1","ends_after_type":"none","ends_after_value":"20","skip_type":"skip","mail_to_user":{"zpuid":["4000000002055"]},"duration_type":"days","no_of_duration":"2","field_name":"status","time":"22:00"},"retain_comments":"false","retain_subtasks":"false","retain_config":{"comments":false,"billing_type":false,"followers":false,"description":false,"subtasks":false,"tags":false,"attachments":false,"teams":false}},"reminder":{"reminder_criteria":"on","field_type":"start_date","custom_date":"2023-12-20","no_of_duration":"2","time":"22:00","duration_type":"days","emailtemplate_id":"4000000008003","reminder_notify_users":[{"type":"days","values":["4000000002055"]}]},"budget_info":{"rate_per_hour":50,"budget":"12345:00","threshold":"234:00","hourly_budget":"40:00","hourly_budget_threshold":"35:00","revenue_budget":5000,"cost_rate_per_hour":30},"<field_name>":"In Progress"}|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 = @'
{"milestone":{"id":"4000000062001"},"tasklist":{"id":"4000000062001"},"parental_info":{"parent_task_id":"4000000005670"},"name":"Set Up CI/CD Pipeline for Staging Environment","description":false,"status":{"id":"4000000062001"},"priority":"high","start_after":{"value":"5","unit":"hours_per_day"},"start_date":"2024-12-16T09:00:00.000Z","end_date":"2024-12-19T18:00:00.000Z","duration":{"value":"5","type":"days"},"completion_percentage":0,"billing_type":false,"attachments":false,"thirdparty_id":["9if2g8aa1c0f0e1234567890abcdef123456"],"owners_and_work":{"owners":[{"add":[{"zpuid":["4000000002055"],"zuid":"16469208","email":"richard.santos@zylker.com","work_values":"08:00"}],"remove":[{"zpuid":["4000000002055"],"zuid":"16469208","email":"richard.santos@zylker.com"}],"zpuid":["4000000002055"],"zuid":"16469208","email":"richard.santos@zylker.com","work_values":"08:00"}],"work_type":"standard","unit":"hours_per_day","copy_task_duration":"true","refresh_business_hours":"false"},"tags":[{"add":[{"id":"4000000062001"}],"remove":[{"id":"4000000062001"}],"id":"4000000062001"}],"teams":[{"add":[{"id":"4000000062001"}],"remove":[{"id":"4000000062001"}],"id":"4000000062001"}],"recurrence":{"frequency":"daily","interval":1,"end_after_occurrences":"10","set_to_previous_businessday":"false","next_recurrence_after_close":"true","trigger_type":"first_to_occur","date_based":{"name":"Set Up CI/CD Pipeline for Staging Environment","schedule_datetime":"2024-12-16T09:00:00.000Z","repetative_type":"daily","time_span":1,"days_of_week":["1"],"months_of_year":["1"],"repeat_on_type":0,"repeat_on_value":"1","ends_after_type":"none","ends_after_value":"20","skip_type":"skip","mail_to_user":{"zpuid":["4000000002055"]},"duration_type":"days","no_of_duration":"2","field_name":"status","time":"22:00"},"scheduler_based":{"name":"Set Up CI/CD Pipeline for Staging Environment","schedule_datetime":"2024-12-16T09:00:00.000Z","repetative_type":"daily","time_span":1,"days_of_week":["1"],"months_of_year":["1"],"repeat_on_type":0,"repeat_on_value":"1","ends_after_type":"none","ends_after_value":"20","skip_type":"skip","mail_to_user":{"zpuid":["4000000002055"]},"duration_type":"days","no_of_duration":"2","field_name":"status","time":"22:00"},"retain_comments":"false","retain_subtasks":"false","retain_config":{"comments":false,"billing_type":false,"followers":false,"description":false,"subtasks":false,"tags":false,"attachments":false,"teams":false}},"reminder":{"reminder_criteria":"on","field_type":"start_date","custom_date":"2023-12-20","no_of_duration":"2","time":"22:00","duration_type":"days","emailtemplate_id":"4000000008003","reminder_notify_users":[{"type":"days","values":["4000000002055"]}]},"budget_info":{"rate_per_hour":50,"budget":"12345:00","threshold":"234:00","hourly_budget":"40:00","hourly_budget_threshold":"35:00","revenue_budget":5000,"cost_rate_per_hour":30},"<field_name>":"In Progress"}
'@
$response = Invoke-RestMethod -Uri "https://projects.zoho.com/api/v3/portal/[PORTAL_ID]/projects/23806000097545166/tasks" -Method POST -Headers $headers -Body $body
$response | ConvertTo-Json
library(httr)
url <- "https://projects.zoho.com/api/v3/portal/[PORTAL_ID]/projects/23806000097545166/tasks"
response <- POST(
url,
add_headers(Authorization = "Bearer 1000.03xxxxxxxxxxxxxxxxxa5317.dxxxxxxxxxxxxxxxxxfa"),
content_type_json(),
body = "{\"milestone\":{\"id\":\"4000000062001\"},\"tasklist\":{\"id\":\"4000000062001\"},\"parental_info\":{\"parent_task_id\":\"4000000005670\"},\"name\":\"Set Up CI/CD Pipeline for Staging Environment\",\"description\":false,\"status\":{\"id\":\"4000000062001\"},\"priority\":\"high\",\"start_after\":{\"value\":\"5\",\"unit\":\"hours_per_day\"},\"start_date\":\"2024-12-16T09:00:00.000Z\",\"end_date\":\"2024-12-19T18:00:00.000Z\",\"duration\":{\"value\":\"5\",\"type\":\"days\"},\"completion_percentage\":0,\"billing_type\":false,\"attachments\":false,\"thirdparty_id\":[\"9if2g8aa1c0f0e1234567890abcdef123456\"],\"owners_and_work\":{\"owners\":[{\"add\":[{\"zpuid\":[\"4000000002055\"],\"zuid\":\"16469208\",\"email\":\"richard.santos@zylker.com\",\"work_values\":\"08:00\"}],\"remove\":[{\"zpuid\":[\"4000000002055\"],\"zuid\":\"16469208\",\"email\":\"richard.santos@zylker.com\"}],\"zpuid\":[\"4000000002055\"],\"zuid\":\"16469208\",\"email\":\"richard.santos@zylker.com\",\"work_values\":\"08:00\"}],\"work_type\":\"standard\",\"unit\":\"hours_per_day\",\"copy_task_duration\":\"true\",\"refresh_business_hours\":\"false\"},\"tags\":[{\"add\":[{\"id\":\"4000000062001\"}],\"remove\":[{\"id\":\"4000000062001\"}],\"id\":\"4000000062001\"}],\"teams\":[{\"add\":[{\"id\":\"4000000062001\"}],\"remove\":[{\"id\":\"4000000062001\"}],\"id\":\"4000000062001\"}],\"recurrence\":{\"frequency\":\"daily\",\"interval\":1,\"end_after_occurrences\":\"10\",\"set_to_previous_businessday\":\"false\",\"next_recurrence_after_close\":\"true\",\"trigger_type\":\"first_to_occur\",\"date_based\":{\"name\":\"Set Up CI/CD Pipeline for Staging Environment\",\"schedule_datetime\":\"2024-12-16T09:00:00.000Z\",\"repetative_type\":\"daily\",\"time_span\":1,\"days_of_week\":[\"1\"],\"months_of_year\":[\"1\"],\"repeat_on_type\":0,\"repeat_on_value\":\"1\",\"ends_after_type\":\"none\",\"ends_after_value\":\"20\",\"skip_type\":\"skip\",\"mail_to_user\":{\"zpuid\":[\"4000000002055\"]},\"duration_type\":\"days\",\"no_of_duration\":\"2\",\"field_name\":\"status\",\"time\":\"22:00\"},\"scheduler_based\":{\"name\":\"Set Up CI/CD Pipeline for Staging Environment\",\"schedule_datetime\":\"2024-12-16T09:00:00.000Z\",\"repetative_type\":\"daily\",\"time_span\":1,\"days_of_week\":[\"1\"],\"months_of_year\":[\"1\"],\"repeat_on_type\":0,\"repeat_on_value\":\"1\",\"ends_after_type\":\"none\",\"ends_after_value\":\"20\",\"skip_type\":\"skip\",\"mail_to_user\":{\"zpuid\":[\"4000000002055\"]},\"duration_type\":\"days\",\"no_of_duration\":\"2\",\"field_name\":\"status\",\"time\":\"22:00\"},\"retain_comments\":\"false\",\"retain_subtasks\":\"false\",\"retain_config\":{\"comments\":false,\"billing_type\":false,\"followers\":false,\"description\":false,\"subtasks\":false,\"tags\":false,\"attachments\":false,\"teams\":false}},\"reminder\":{\"reminder_criteria\":\"on\",\"field_type\":\"start_date\",\"custom_date\":\"2023-12-20\",\"no_of_duration\":\"2\",\"time\":\"22:00\",\"duration_type\":\"days\",\"emailtemplate_id\":\"4000000008003\",\"reminder_notify_users\":[{\"type\":\"days\",\"values\":[\"4000000002055\"]}]},\"budget_info\":{\"rate_per_hour\":50,\"budget\":\"12345:00\",\"threshold\":\"234:00\",\"hourly_budget\":\"40:00\",\"hourly_budget_threshold\":\"35:00\",\"revenue_budget\":5000,\"cost_rate_per_hour\":30},\"<field_name>\":\"In Progress\"}"
)
content(response, "text")
import Foundation
let url = URL(string: "https://projects.zoho.com/api/v3/portal/[PORTAL_ID]/projects/23806000097545166/tasks")!
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 = """
{"milestone":{"id":"4000000062001"},"tasklist":{"id":"4000000062001"},"parental_info":{"parent_task_id":"4000000005670"},"name":"Set Up CI/CD Pipeline for Staging Environment","description":false,"status":{"id":"4000000062001"},"priority":"high","start_after":{"value":"5","unit":"hours_per_day"},"start_date":"2024-12-16T09:00:00.000Z","end_date":"2024-12-19T18:00:00.000Z","duration":{"value":"5","type":"days"},"completion_percentage":0,"billing_type":false,"attachments":false,"thirdparty_id":["9if2g8aa1c0f0e1234567890abcdef123456"],"owners_and_work":{"owners":[{"add":[{"zpuid":["4000000002055"],"zuid":"16469208","email":"richard.santos@zylker.com","work_values":"08:00"}],"remove":[{"zpuid":["4000000002055"],"zuid":"16469208","email":"richard.santos@zylker.com"}],"zpuid":["4000000002055"],"zuid":"16469208","email":"richard.santos@zylker.com","work_values":"08:00"}],"work_type":"standard","unit":"hours_per_day","copy_task_duration":"true","refresh_business_hours":"false"},"tags":[{"add":[{"id":"4000000062001"}],"remove":[{"id":"4000000062001"}],"id":"4000000062001"}],"teams":[{"add":[{"id":"4000000062001"}],"remove":[{"id":"4000000062001"}],"id":"4000000062001"}],"recurrence":{"frequency":"daily","interval":1,"end_after_occurrences":"10","set_to_previous_businessday":"false","next_recurrence_after_close":"true","trigger_type":"first_to_occur","date_based":{"name":"Set Up CI/CD Pipeline for Staging Environment","schedule_datetime":"2024-12-16T09:00:00.000Z","repetative_type":"daily","time_span":1,"days_of_week":["1"],"months_of_year":["1"],"repeat_on_type":0,"repeat_on_value":"1","ends_after_type":"none","ends_after_value":"20","skip_type":"skip","mail_to_user":{"zpuid":["4000000002055"]},"duration_type":"days","no_of_duration":"2","field_name":"status","time":"22:00"},"scheduler_based":{"name":"Set Up CI/CD Pipeline for Staging Environment","schedule_datetime":"2024-12-16T09:00:00.000Z","repetative_type":"daily","time_span":1,"days_of_week":["1"],"months_of_year":["1"],"repeat_on_type":0,"repeat_on_value":"1","ends_after_type":"none","ends_after_value":"20","skip_type":"skip","mail_to_user":{"zpuid":["4000000002055"]},"duration_type":"days","no_of_duration":"2","field_name":"status","time":"22:00"},"retain_comments":"false","retain_subtasks":"false","retain_config":{"comments":false,"billing_type":false,"followers":false,"description":false,"subtasks":false,"tags":false,"attachments":false,"teams":false}},"reminder":{"reminder_criteria":"on","field_type":"start_date","custom_date":"2023-12-20","no_of_duration":"2","time":"22:00","duration_type":"days","emailtemplate_id":"4000000008003","reminder_notify_users":[{"type":"days","values":["4000000002055"]}]},"budget_info":{"rate_per_hour":50,"budget":"12345:00","threshold":"234:00","hourly_budget":"40:00","hourly_budget_threshold":"35:00","revenue_budget":5000,"cost_rate_per_hour":30},"<field_name>":"In Progress"}
""".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
Possible Errors
Add a task to the project
OAuth Scope:
ZohoProjects.tasks.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).
JSONArray
max length : 50000000Enter associated task data
boolean
Skip any mandatory fields. Accepted values: true or false
Request Example
curl -X POST \
'https://projects.zoho.com/api/v3/portal/[PORTAL_ID]/projects/23806000097545166/bulk-tasks' \
-H 'Authorization: Bearer 1000.03xxxxxxxxxxxxxxxxxa5317.dxxxxxxxxxxxxxxxxxfa' \
-H 'Content-Type: application/json' \
-d '{"tasks":[{"id":"4000000062001","tasklist":{"id":"4000000062001"},"parental_info":{"parent_task_id":"4000000005670"},"name":"Set Up CI/CD Pipeline for Staging Environment","description":"false","status":{"id":"4000000062001"},"priority":"high","start_date":"2024-12-16T09:00:00.000Z","end_date":"2024-12-19T18:00:00.000Z","duration":{"value":"[4000000000485]","type":"days"},"completion_percentage":0,"billing_type":"false","attachments":"false","owners_and_work":{"owners":[{"add":[{"zpuid":["4000000002055"],"work_values":"08:00"}],"remove":[{"zpuid":["4000000002055"]}],"zpuid":["4000000002055"],"work_values":"08:00","zuid":"21705927","email":"mark.taylor@zylker.com"}],"work_type":"standard","unit":"hours_per_day","copy_task_duration":"true","refresh_business_hours":"false"},"tags":[{"add":[{"id":"4000000062001"}],"remove":[{"id":"4000000062001"}],"id":"4000000062001"}],"teams":[{"add":[{"id":"4000000062001"}],"remove":[{"id":"4000000062001"}],"id":"4000000062001"}],"recurrence":{"frequency":"none","interval":1,"end_after_occurrences":"never","set_to_previous_businessday":"false","retain_comments":"false","retain_subtasks":"false","next_recurrence_after_close":"true","trigger_type":"on_schedule","date_based":{"name":"Set Up CI/CD Pipeline for Staging Environment","schedule_datetime":"2026-12-16T09:00:00.000Z","repetative_type":"weekly","time_span":4,"days_of_week":[4,5],"months_of_year":[12],"repeat_on_type":0,"repeat_on_value":"4","ends_after_type":"date","ends_after_value":"2026-12-31","skip_type":"execute","mail_to_user":{"zpuid":["4000000002055"]},"duration_type":"days","no_of_duration":"2","field_name":"start_date","time":"22:00"},"scheduler_based":{"name":"Set Up CI/CD Pipeline for Staging Environment","schedule_datetime":"2026-12-16T09:00:00.000Z","repetative_type":"weekly","time_span":4,"days_of_week":[4,5],"months_of_year":[12],"repeat_on_type":0,"repeat_on_value":"4","ends_after_type":"date","ends_after_value":"2026-12-31","skip_type":"execute","mail_to_user":{"zpuid":["4000000002055"]},"duration_type":"days","no_of_duration":"2","field_name":"start_date","time":"22:00"},"retain_config":{"comments":"false","billing_type":"false","followers":"false","description":"false","subtasks":"false","tags":"false","attachments":"false","teams":"false"}},"reminder":{"reminder_criteria":"on","field_type":"start_date","custom_date":"2023-12-20","no_of_duration":"2","time":"22:00","duration_type":"days","emailtemplate_id":"4000000008003","reminder_notify_users":[{"type":"days","values":["4000000002055"]}]},"budget_info":{"rate_per_hour":0,"budget":"12345:00","threshold":"234:00","hourly_budget":"100:00","hourly_budget_threshold":"50:00","revenue_budget":0,"cost_rate_per_hour":0}}],"skip_mandatory_parameters":false}'
url = "https://projects.zoho.com/api/v3/portal/[PORTAL_ID]/projects/23806000097545166/bulk-tasks";
params = Map();
params.put("tasks", [{"id":"4000000062001","tasklist":{"id":"4000000062001"},"parental_info":{"parent_task_id":"4000000005670"},"name":"Set Up CI/CD Pipeline for Staging Environment","description":"false","status":{"id":"4000000062001"},"priority":"high","start_date":"2024-12-16T09:00:00.000Z","end_date":"2024-12-19T18:00:00.000Z","duration":{"value":"[4000000000485]","type":"days"},"completion_percentage":0,"billing_type":"false","attachments":"false","owners_and_work":{"owners":[{"add":[{"zpuid":["4000000002055"],"work_values":"08:00"}],"remove":[{"zpuid":["4000000002055"]}],"zpuid":["4000000002055"],"work_values":"08:00","zuid":"21705927","email":"mark.taylor@zylker.com"}],"work_type":"standard","unit":"hours_per_day","copy_task_duration":"true","refresh_business_hours":"false"},"tags":[{"add":[{"id":"4000000062001"}],"remove":[{"id":"4000000062001"}],"id":"4000000062001"}],"teams":[{"add":[{"id":"4000000062001"}],"remove":[{"id":"4000000062001"}],"id":"4000000062001"}],"recurrence":{"frequency":"none","interval":1,"end_after_occurrences":"never","set_to_previous_businessday":"false","retain_comments":"false","retain_subtasks":"false","next_recurrence_after_close":"true","trigger_type":"on_schedule","date_based":{"name":"Set Up CI/CD Pipeline for Staging Environment","schedule_datetime":"2026-12-16T09:00:00.000Z","repetative_type":"weekly","time_span":4,"days_of_week":[4,5],"months_of_year":[12],"repeat_on_type":0,"repeat_on_value":"4","ends_after_type":"date","ends_after_value":"2026-12-31","skip_type":"execute","mail_to_user":{"zpuid":["4000000002055"]},"duration_type":"days","no_of_duration":"2","field_name":"start_date","time":"22:00"},"scheduler_based":{"name":"Set Up CI/CD Pipeline for Staging Environment","schedule_datetime":"2026-12-16T09:00:00.000Z","repetative_type":"weekly","time_span":4,"days_of_week":[4,5],"months_of_year":[12],"repeat_on_type":0,"repeat_on_value":"4","ends_after_type":"date","ends_after_value":"2026-12-31","skip_type":"execute","mail_to_user":{"zpuid":["4000000002055"]},"duration_type":"days","no_of_duration":"2","field_name":"start_date","time":"22:00"},"retain_config":{"comments":"false","billing_type":"false","followers":"false","description":"false","subtasks":"false","tags":"false","attachments":"false","teams":"false"}},"reminder":{"reminder_criteria":"on","field_type":"start_date","custom_date":"2023-12-20","no_of_duration":"2","time":"22:00","duration_type":"days","emailtemplate_id":"4000000008003","reminder_notify_users":[{"type":"days","values":["4000000002055"]}]},"budget_info":{"rate_per_hour":0,"budget":"12345:00","threshold":"234:00","hourly_budget":"100:00","hourly_budget_threshold":"50:00","revenue_budget":0,"cost_rate_per_hour":0}}]);
params.put("skip_mandatory_parameters", false);
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/bulk-tasks');
const payload = JSON.stringify({"tasks":[{"id":"4000000062001","tasklist":{"id":"4000000062001"},"parental_info":{"parent_task_id":"4000000005670"},"name":"Set Up CI/CD Pipeline for Staging Environment","description":"false","status":{"id":"4000000062001"},"priority":"high","start_date":"2024-12-16T09:00:00.000Z","end_date":"2024-12-19T18:00:00.000Z","duration":{"value":"[4000000000485]","type":"days"},"completion_percentage":0,"billing_type":"false","attachments":"false","owners_and_work":{"owners":[{"add":[{"zpuid":["4000000002055"],"work_values":"08:00"}],"remove":[{"zpuid":["4000000002055"]}],"zpuid":["4000000002055"],"work_values":"08:00","zuid":"21705927","email":"mark.taylor@zylker.com"}],"work_type":"standard","unit":"hours_per_day","copy_task_duration":"true","refresh_business_hours":"false"},"tags":[{"add":[{"id":"4000000062001"}],"remove":[{"id":"4000000062001"}],"id":"4000000062001"}],"teams":[{"add":[{"id":"4000000062001"}],"remove":[{"id":"4000000062001"}],"id":"4000000062001"}],"recurrence":{"frequency":"none","interval":1,"end_after_occurrences":"never","set_to_previous_businessday":"false","retain_comments":"false","retain_subtasks":"false","next_recurrence_after_close":"true","trigger_type":"on_schedule","date_based":{"name":"Set Up CI/CD Pipeline for Staging Environment","schedule_datetime":"2026-12-16T09:00:00.000Z","repetative_type":"weekly","time_span":4,"days_of_week":[4,5],"months_of_year":[12],"repeat_on_type":0,"repeat_on_value":"4","ends_after_type":"date","ends_after_value":"2026-12-31","skip_type":"execute","mail_to_user":{"zpuid":["4000000002055"]},"duration_type":"days","no_of_duration":"2","field_name":"start_date","time":"22:00"},"scheduler_based":{"name":"Set Up CI/CD Pipeline for Staging Environment","schedule_datetime":"2026-12-16T09:00:00.000Z","repetative_type":"weekly","time_span":4,"days_of_week":[4,5],"months_of_year":[12],"repeat_on_type":0,"repeat_on_value":"4","ends_after_type":"date","ends_after_value":"2026-12-31","skip_type":"execute","mail_to_user":{"zpuid":["4000000002055"]},"duration_type":"days","no_of_duration":"2","field_name":"start_date","time":"22:00"},"retain_config":{"comments":"false","billing_type":"false","followers":"false","description":"false","subtasks":"false","tags":"false","attachments":"false","teams":"false"}},"reminder":{"reminder_criteria":"on","field_type":"start_date","custom_date":"2023-12-20","no_of_duration":"2","time":"22:00","duration_type":"days","emailtemplate_id":"4000000008003","reminder_notify_users":[{"type":"days","values":["4000000002055"]}]},"budget_info":{"rate_per_hour":0,"budget":"12345:00","threshold":"234:00","hourly_budget":"100:00","hourly_budget_threshold":"50:00","revenue_budget":0,"cost_rate_per_hour":0}}],"skip_mandatory_parameters":false});
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/bulk-tasks")
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 = '{"tasks":[{"id":"4000000062001","tasklist":{"id":"4000000062001"},"parental_info":{"parent_task_id":"4000000005670"},"name":"Set Up CI/CD Pipeline for Staging Environment","description":"false","status":{"id":"4000000062001"},"priority":"high","start_date":"2024-12-16T09:00:00.000Z","end_date":"2024-12-19T18:00:00.000Z","duration":{"value":"[4000000000485]","type":"days"},"completion_percentage":0,"billing_type":"false","attachments":"false","owners_and_work":{"owners":[{"add":[{"zpuid":["4000000002055"],"work_values":"08:00"}],"remove":[{"zpuid":["4000000002055"]}],"zpuid":["4000000002055"],"work_values":"08:00","zuid":"21705927","email":"mark.taylor@zylker.com"}],"work_type":"standard","unit":"hours_per_day","copy_task_duration":"true","refresh_business_hours":"false"},"tags":[{"add":[{"id":"4000000062001"}],"remove":[{"id":"4000000062001"}],"id":"4000000062001"}],"teams":[{"add":[{"id":"4000000062001"}],"remove":[{"id":"4000000062001"}],"id":"4000000062001"}],"recurrence":{"frequency":"none","interval":1,"end_after_occurrences":"never","set_to_previous_businessday":"false","retain_comments":"false","retain_subtasks":"false","next_recurrence_after_close":"true","trigger_type":"on_schedule","date_based":{"name":"Set Up CI/CD Pipeline for Staging Environment","schedule_datetime":"2026-12-16T09:00:00.000Z","repetative_type":"weekly","time_span":4,"days_of_week":[4,5],"months_of_year":[12],"repeat_on_type":0,"repeat_on_value":"4","ends_after_type":"date","ends_after_value":"2026-12-31","skip_type":"execute","mail_to_user":{"zpuid":["4000000002055"]},"duration_type":"days","no_of_duration":"2","field_name":"start_date","time":"22:00"},"scheduler_based":{"name":"Set Up CI/CD Pipeline for Staging Environment","schedule_datetime":"2026-12-16T09:00:00.000Z","repetative_type":"weekly","time_span":4,"days_of_week":[4,5],"months_of_year":[12],"repeat_on_type":0,"repeat_on_value":"4","ends_after_type":"date","ends_after_value":"2026-12-31","skip_type":"execute","mail_to_user":{"zpuid":["4000000002055"]},"duration_type":"days","no_of_duration":"2","field_name":"start_date","time":"22:00"},"retain_config":{"comments":"false","billing_type":"false","followers":"false","description":"false","subtasks":"false","tags":"false","attachments":"false","teams":"false"}},"reminder":{"reminder_criteria":"on","field_type":"start_date","custom_date":"2023-12-20","no_of_duration":"2","time":"22:00","duration_type":"days","emailtemplate_id":"4000000008003","reminder_notify_users":[{"type":"days","values":["4000000002055"]}]},"budget_info":{"rate_per_hour":0,"budget":"12345:00","threshold":"234:00","hourly_budget":"100:00","hourly_budget_threshold":"50:00","revenue_budget":0,"cost_rate_per_hour":0}}],"skip_mandatory_parameters":false}'
response = http.request(request)
puts response.read_body
<?php
$url = "https://projects.zoho.com/api/v3/portal/[PORTAL_ID]/projects/23806000097545166/bulk-tasks";
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => $url,
CURLOPT_RETURNTRANSFER => true,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => '{"tasks":[{"id":"4000000062001","tasklist":{"id":"4000000062001"},"parental_info":{"parent_task_id":"4000000005670"},"name":"Set Up CI/CD Pipeline for Staging Environment","description":"false","status":{"id":"4000000062001"},"priority":"high","start_date":"2024-12-16T09:00:00.000Z","end_date":"2024-12-19T18:00:00.000Z","duration":{"value":"[4000000000485]","type":"days"},"completion_percentage":0,"billing_type":"false","attachments":"false","owners_and_work":{"owners":[{"add":[{"zpuid":["4000000002055"],"work_values":"08:00"}],"remove":[{"zpuid":["4000000002055"]}],"zpuid":["4000000002055"],"work_values":"08:00","zuid":"21705927","email":"mark.taylor@zylker.com"}],"work_type":"standard","unit":"hours_per_day","copy_task_duration":"true","refresh_business_hours":"false"},"tags":[{"add":[{"id":"4000000062001"}],"remove":[{"id":"4000000062001"}],"id":"4000000062001"}],"teams":[{"add":[{"id":"4000000062001"}],"remove":[{"id":"4000000062001"}],"id":"4000000062001"}],"recurrence":{"frequency":"none","interval":1,"end_after_occurrences":"never","set_to_previous_businessday":"false","retain_comments":"false","retain_subtasks":"false","next_recurrence_after_close":"true","trigger_type":"on_schedule","date_based":{"name":"Set Up CI/CD Pipeline for Staging Environment","schedule_datetime":"2026-12-16T09:00:00.000Z","repetative_type":"weekly","time_span":4,"days_of_week":[4,5],"months_of_year":[12],"repeat_on_type":0,"repeat_on_value":"4","ends_after_type":"date","ends_after_value":"2026-12-31","skip_type":"execute","mail_to_user":{"zpuid":["4000000002055"]},"duration_type":"days","no_of_duration":"2","field_name":"start_date","time":"22:00"},"scheduler_based":{"name":"Set Up CI/CD Pipeline for Staging Environment","schedule_datetime":"2026-12-16T09:00:00.000Z","repetative_type":"weekly","time_span":4,"days_of_week":[4,5],"months_of_year":[12],"repeat_on_type":0,"repeat_on_value":"4","ends_after_type":"date","ends_after_value":"2026-12-31","skip_type":"execute","mail_to_user":{"zpuid":["4000000002055"]},"duration_type":"days","no_of_duration":"2","field_name":"start_date","time":"22:00"},"retain_config":{"comments":"false","billing_type":"false","followers":"false","description":"false","subtasks":"false","tags":"false","attachments":"false","teams":"false"}},"reminder":{"reminder_criteria":"on","field_type":"start_date","custom_date":"2023-12-20","no_of_duration":"2","time":"22:00","duration_type":"days","emailtemplate_id":"4000000008003","reminder_notify_users":[{"type":"days","values":["4000000002055"]}]},"budget_info":{"rate_per_hour":0,"budget":"12345:00","threshold":"234:00","hourly_budget":"100:00","hourly_budget_threshold":"50:00","revenue_budget":0,"cost_rate_per_hour":0}}],"skip_mandatory_parameters":false}',
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/bulk-tasks"
headers = {
"Authorization": "Bearer 1000.03xxxxxxxxxxxxxxxxxa5317.dxxxxxxxxxxxxxxxxxfa",
"Content-Type": "application/json",
}
payload = '{"tasks":[{"id":"4000000062001","tasklist":{"id":"4000000062001"},"parental_info":{"parent_task_id":"4000000005670"},"name":"Set Up CI/CD Pipeline for Staging Environment","description":"false","status":{"id":"4000000062001"},"priority":"high","start_date":"2024-12-16T09:00:00.000Z","end_date":"2024-12-19T18:00:00.000Z","duration":{"value":"[4000000000485]","type":"days"},"completion_percentage":0,"billing_type":"false","attachments":"false","owners_and_work":{"owners":[{"add":[{"zpuid":["4000000002055"],"work_values":"08:00"}],"remove":[{"zpuid":["4000000002055"]}],"zpuid":["4000000002055"],"work_values":"08:00","zuid":"21705927","email":"mark.taylor@zylker.com"}],"work_type":"standard","unit":"hours_per_day","copy_task_duration":"true","refresh_business_hours":"false"},"tags":[{"add":[{"id":"4000000062001"}],"remove":[{"id":"4000000062001"}],"id":"4000000062001"}],"teams":[{"add":[{"id":"4000000062001"}],"remove":[{"id":"4000000062001"}],"id":"4000000062001"}],"recurrence":{"frequency":"none","interval":1,"end_after_occurrences":"never","set_to_previous_businessday":"false","retain_comments":"false","retain_subtasks":"false","next_recurrence_after_close":"true","trigger_type":"on_schedule","date_based":{"name":"Set Up CI/CD Pipeline for Staging Environment","schedule_datetime":"2026-12-16T09:00:00.000Z","repetative_type":"weekly","time_span":4,"days_of_week":[4,5],"months_of_year":[12],"repeat_on_type":0,"repeat_on_value":"4","ends_after_type":"date","ends_after_value":"2026-12-31","skip_type":"execute","mail_to_user":{"zpuid":["4000000002055"]},"duration_type":"days","no_of_duration":"2","field_name":"start_date","time":"22:00"},"scheduler_based":{"name":"Set Up CI/CD Pipeline for Staging Environment","schedule_datetime":"2026-12-16T09:00:00.000Z","repetative_type":"weekly","time_span":4,"days_of_week":[4,5],"months_of_year":[12],"repeat_on_type":0,"repeat_on_value":"4","ends_after_type":"date","ends_after_value":"2026-12-31","skip_type":"execute","mail_to_user":{"zpuid":["4000000002055"]},"duration_type":"days","no_of_duration":"2","field_name":"start_date","time":"22:00"},"retain_config":{"comments":"false","billing_type":"false","followers":"false","description":"false","subtasks":"false","tags":"false","attachments":"false","teams":"false"}},"reminder":{"reminder_criteria":"on","field_type":"start_date","custom_date":"2023-12-20","no_of_duration":"2","time":"22:00","duration_type":"days","emailtemplate_id":"4000000008003","reminder_notify_users":[{"type":"days","values":["4000000002055"]}]},"budget_info":{"rate_per_hour":0,"budget":"12345:00","threshold":"234:00","hourly_budget":"100:00","hourly_budget_threshold":"50:00","revenue_budget":0,"cost_rate_per_hour":0}}],"skip_mandatory_parameters":false}'
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/bulk-tasks");
curl_easy_setopt(curl, CURLOPT_HTTPHEADER, headers);
curl_easy_setopt(curl, CURLOPT_CUSTOMREQUEST, "POST");
curl_easy_setopt(curl, CURLOPT_POSTFIELDS, "{\"tasks\":[{\"id\":\"4000000062001\",\"tasklist\":{\"id\":\"4000000062001\"},\"parental_info\":{\"parent_task_id\":\"4000000005670\"},\"name\":\"Set Up CI/CD Pipeline for Staging Environment\",\"description\":\"false\",\"status\":{\"id\":\"4000000062001\"},\"priority\":\"high\",\"start_date\":\"2024-12-16T09:00:00.000Z\",\"end_date\":\"2024-12-19T18:00:00.000Z\",\"duration\":{\"value\":\"[4000000000485]\",\"type\":\"days\"},\"completion_percentage\":0,\"billing_type\":\"false\",\"attachments\":\"false\",\"owners_and_work\":{\"owners\":[{\"add\":[{\"zpuid\":[\"4000000002055\"],\"work_values\":\"08:00\"}],\"remove\":[{\"zpuid\":[\"4000000002055\"]}],\"zpuid\":[\"4000000002055\"],\"work_values\":\"08:00\",\"zuid\":\"21705927\",\"email\":\"mark.taylor@zylker.com\"}],\"work_type\":\"standard\",\"unit\":\"hours_per_day\",\"copy_task_duration\":\"true\",\"refresh_business_hours\":\"false\"},\"tags\":[{\"add\":[{\"id\":\"4000000062001\"}],\"remove\":[{\"id\":\"4000000062001\"}],\"id\":\"4000000062001\"}],\"teams\":[{\"add\":[{\"id\":\"4000000062001\"}],\"remove\":[{\"id\":\"4000000062001\"}],\"id\":\"4000000062001\"}],\"recurrence\":{\"frequency\":\"none\",\"interval\":1,\"end_after_occurrences\":\"never\",\"set_to_previous_businessday\":\"false\",\"retain_comments\":\"false\",\"retain_subtasks\":\"false\",\"next_recurrence_after_close\":\"true\",\"trigger_type\":\"on_schedule\",\"date_based\":{\"name\":\"Set Up CI/CD Pipeline for Staging Environment\",\"schedule_datetime\":\"2026-12-16T09:00:00.000Z\",\"repetative_type\":\"weekly\",\"time_span\":4,\"days_of_week\":[4,5],\"months_of_year\":[12],\"repeat_on_type\":0,\"repeat_on_value\":\"4\",\"ends_after_type\":\"date\",\"ends_after_value\":\"2026-12-31\",\"skip_type\":\"execute\",\"mail_to_user\":{\"zpuid\":[\"4000000002055\"]},\"duration_type\":\"days\",\"no_of_duration\":\"2\",\"field_name\":\"start_date\",\"time\":\"22:00\"},\"scheduler_based\":{\"name\":\"Set Up CI/CD Pipeline for Staging Environment\",\"schedule_datetime\":\"2026-12-16T09:00:00.000Z\",\"repetative_type\":\"weekly\",\"time_span\":4,\"days_of_week\":[4,5],\"months_of_year\":[12],\"repeat_on_type\":0,\"repeat_on_value\":\"4\",\"ends_after_type\":\"date\",\"ends_after_value\":\"2026-12-31\",\"skip_type\":\"execute\",\"mail_to_user\":{\"zpuid\":[\"4000000002055\"]},\"duration_type\":\"days\",\"no_of_duration\":\"2\",\"field_name\":\"start_date\",\"time\":\"22:00\"},\"retain_config\":{\"comments\":\"false\",\"billing_type\":\"false\",\"followers\":\"false\",\"description\":\"false\",\"subtasks\":\"false\",\"tags\":\"false\",\"attachments\":\"false\",\"teams\":\"false\"}},\"reminder\":{\"reminder_criteria\":\"on\",\"field_type\":\"start_date\",\"custom_date\":\"2023-12-20\",\"no_of_duration\":\"2\",\"time\":\"22:00\",\"duration_type\":\"days\",\"emailtemplate_id\":\"4000000008003\",\"reminder_notify_users\":[{\"type\":\"days\",\"values\":[\"4000000002055\"]}]},\"budget_info\":{\"rate_per_hour\":0,\"budget\":\"12345:00\",\"threshold\":\"234:00\",\"hourly_budget\":\"100:00\",\"hourly_budget_threshold\":\"50:00\",\"revenue_budget\":0,\"cost_rate_per_hour\":0}}],\"skip_mandatory_parameters\":false}");
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/bulk-tasks");
request.Content = new StringContent(
@"{""tasks"":[{""id"":""4000000062001"",""tasklist"":{""id"":""4000000062001""},""parental_info"":{""parent_task_id"":""4000000005670""},""name"":""Set Up CI/CD Pipeline for Staging Environment"",""description"":""false"",""status"":{""id"":""4000000062001""},""priority"":""high"",""start_date"":""2024-12-16T09:00:00.000Z"",""end_date"":""2024-12-19T18:00:00.000Z"",""duration"":{""value"":""[4000000000485]"",""type"":""days""},""completion_percentage"":0,""billing_type"":""false"",""attachments"":""false"",""owners_and_work"":{""owners"":[{""add"":[{""zpuid"":[""4000000002055""],""work_values"":""08:00""}],""remove"":[{""zpuid"":[""4000000002055""]}],""zpuid"":[""4000000002055""],""work_values"":""08:00"",""zuid"":""21705927"",""email"":""mark.taylor@zylker.com""}],""work_type"":""standard"",""unit"":""hours_per_day"",""copy_task_duration"":""true"",""refresh_business_hours"":""false""},""tags"":[{""add"":[{""id"":""4000000062001""}],""remove"":[{""id"":""4000000062001""}],""id"":""4000000062001""}],""teams"":[{""add"":[{""id"":""4000000062001""}],""remove"":[{""id"":""4000000062001""}],""id"":""4000000062001""}],""recurrence"":{""frequency"":""none"",""interval"":1,""end_after_occurrences"":""never"",""set_to_previous_businessday"":""false"",""retain_comments"":""false"",""retain_subtasks"":""false"",""next_recurrence_after_close"":""true"",""trigger_type"":""on_schedule"",""date_based"":{""name"":""Set Up CI/CD Pipeline for Staging Environment"",""schedule_datetime"":""2026-12-16T09:00:00.000Z"",""repetative_type"":""weekly"",""time_span"":4,""days_of_week"":[4,5],""months_of_year"":[12],""repeat_on_type"":0,""repeat_on_value"":""4"",""ends_after_type"":""date"",""ends_after_value"":""2026-12-31"",""skip_type"":""execute"",""mail_to_user"":{""zpuid"":[""4000000002055""]},""duration_type"":""days"",""no_of_duration"":""2"",""field_name"":""start_date"",""time"":""22:00""},""scheduler_based"":{""name"":""Set Up CI/CD Pipeline for Staging Environment"",""schedule_datetime"":""2026-12-16T09:00:00.000Z"",""repetative_type"":""weekly"",""time_span"":4,""days_of_week"":[4,5],""months_of_year"":[12],""repeat_on_type"":0,""repeat_on_value"":""4"",""ends_after_type"":""date"",""ends_after_value"":""2026-12-31"",""skip_type"":""execute"",""mail_to_user"":{""zpuid"":[""4000000002055""]},""duration_type"":""days"",""no_of_duration"":""2"",""field_name"":""start_date"",""time"":""22:00""},""retain_config"":{""comments"":""false"",""billing_type"":""false"",""followers"":""false"",""description"":""false"",""subtasks"":""false"",""tags"":""false"",""attachments"":""false"",""teams"":""false""}},""reminder"":{""reminder_criteria"":""on"",""field_type"":""start_date"",""custom_date"":""2023-12-20"",""no_of_duration"":""2"",""time"":""22:00"",""duration_type"":""days"",""emailtemplate_id"":""4000000008003"",""reminder_notify_users"":[{""type"":""days"",""values"":[""4000000002055""]}]},""budget_info"":{""rate_per_hour"":0,""budget"":""12345:00"",""threshold"":""234:00"",""hourly_budget"":""100:00"",""hourly_budget_threshold"":""50:00"",""revenue_budget"":0,""cost_rate_per_hour"":0}}],""skip_mandatory_parameters"":false}",
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/bulk-tasks");
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, "{\"tasks\":[{\"id\":\"4000000062001\",\"tasklist\":{\"id\":\"4000000062001\"},\"parental_info\":{\"parent_task_id\":\"4000000005670\"},\"name\":\"Set Up CI/CD Pipeline for Staging Environment\",\"description\":\"false\",\"status\":{\"id\":\"4000000062001\"},\"priority\":\"high\",\"start_date\":\"2024-12-16T09:00:00.000Z\",\"end_date\":\"2024-12-19T18:00:00.000Z\",\"duration\":{\"value\":\"[4000000000485]\",\"type\":\"days\"},\"completion_percentage\":0,\"billing_type\":\"false\",\"attachments\":\"false\",\"owners_and_work\":{\"owners\":[{\"add\":[{\"zpuid\":[\"4000000002055\"],\"work_values\":\"08:00\"}],\"remove\":[{\"zpuid\":[\"4000000002055\"]}],\"zpuid\":[\"4000000002055\"],\"work_values\":\"08:00\",\"zuid\":\"21705927\",\"email\":\"mark.taylor@zylker.com\"}],\"work_type\":\"standard\",\"unit\":\"hours_per_day\",\"copy_task_duration\":\"true\",\"refresh_business_hours\":\"false\"},\"tags\":[{\"add\":[{\"id\":\"4000000062001\"}],\"remove\":[{\"id\":\"4000000062001\"}],\"id\":\"4000000062001\"}],\"teams\":[{\"add\":[{\"id\":\"4000000062001\"}],\"remove\":[{\"id\":\"4000000062001\"}],\"id\":\"4000000062001\"}],\"recurrence\":{\"frequency\":\"none\",\"interval\":1,\"end_after_occurrences\":\"never\",\"set_to_previous_businessday\":\"false\",\"retain_comments\":\"false\",\"retain_subtasks\":\"false\",\"next_recurrence_after_close\":\"true\",\"trigger_type\":\"on_schedule\",\"date_based\":{\"name\":\"Set Up CI/CD Pipeline for Staging Environment\",\"schedule_datetime\":\"2026-12-16T09:00:00.000Z\",\"repetative_type\":\"weekly\",\"time_span\":4,\"days_of_week\":[4,5],\"months_of_year\":[12],\"repeat_on_type\":0,\"repeat_on_value\":\"4\",\"ends_after_type\":\"date\",\"ends_after_value\":\"2026-12-31\",\"skip_type\":\"execute\",\"mail_to_user\":{\"zpuid\":[\"4000000002055\"]},\"duration_type\":\"days\",\"no_of_duration\":\"2\",\"field_name\":\"start_date\",\"time\":\"22:00\"},\"scheduler_based\":{\"name\":\"Set Up CI/CD Pipeline for Staging Environment\",\"schedule_datetime\":\"2026-12-16T09:00:00.000Z\",\"repetative_type\":\"weekly\",\"time_span\":4,\"days_of_week\":[4,5],\"months_of_year\":[12],\"repeat_on_type\":0,\"repeat_on_value\":\"4\",\"ends_after_type\":\"date\",\"ends_after_value\":\"2026-12-31\",\"skip_type\":\"execute\",\"mail_to_user\":{\"zpuid\":[\"4000000002055\"]},\"duration_type\":\"days\",\"no_of_duration\":\"2\",\"field_name\":\"start_date\",\"time\":\"22:00\"},\"retain_config\":{\"comments\":\"false\",\"billing_type\":\"false\",\"followers\":\"false\",\"description\":\"false\",\"subtasks\":\"false\",\"tags\":\"false\",\"attachments\":\"false\",\"teams\":\"false\"}},\"reminder\":{\"reminder_criteria\":\"on\",\"field_type\":\"start_date\",\"custom_date\":\"2023-12-20\",\"no_of_duration\":\"2\",\"time\":\"22:00\",\"duration_type\":\"days\",\"emailtemplate_id\":\"4000000008003\",\"reminder_notify_users\":[{\"type\":\"days\",\"values\":[\"4000000002055\"]}]},\"budget_info\":{\"rate_per_hour\":0,\"budget\":\"12345:00\",\"threshold\":\"234:00\",\"hourly_budget\":\"100:00\",\"hourly_budget_threshold\":\"50:00\",\"revenue_budget\":0,\"cost_rate_per_hour\":0}}],\"skip_mandatory_parameters\":false}");
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/bulk-tasks"
{:headers {"Authorization" "Bearer 1000.03xxxxxxxxxxxxxxxxxa5317.dxxxxxxxxxxxxxxxxxfa"
"Content-Type" "application/json"}
:body "{\"tasks\":[{\"id\":\"4000000062001\",\"tasklist\":{\"id\":\"4000000062001\"},\"parental_info\":{\"parent_task_id\":\"4000000005670\"},\"name\":\"Set Up CI/CD Pipeline for Staging Environment\",\"description\":\"false\",\"status\":{\"id\":\"4000000062001\"},\"priority\":\"high\",\"start_date\":\"2024-12-16T09:00:00.000Z\",\"end_date\":\"2024-12-19T18:00:00.000Z\",\"duration\":{\"value\":\"[4000000000485]\",\"type\":\"days\"},\"completion_percentage\":0,\"billing_type\":\"false\",\"attachments\":\"false\",\"owners_and_work\":{\"owners\":[{\"add\":[{\"zpuid\":[\"4000000002055\"],\"work_values\":\"08:00\"}],\"remove\":[{\"zpuid\":[\"4000000002055\"]}],\"zpuid\":[\"4000000002055\"],\"work_values\":\"08:00\",\"zuid\":\"21705927\",\"email\":\"mark.taylor@zylker.com\"}],\"work_type\":\"standard\",\"unit\":\"hours_per_day\",\"copy_task_duration\":\"true\",\"refresh_business_hours\":\"false\"},\"tags\":[{\"add\":[{\"id\":\"4000000062001\"}],\"remove\":[{\"id\":\"4000000062001\"}],\"id\":\"4000000062001\"}],\"teams\":[{\"add\":[{\"id\":\"4000000062001\"}],\"remove\":[{\"id\":\"4000000062001\"}],\"id\":\"4000000062001\"}],\"recurrence\":{\"frequency\":\"none\",\"interval\":1,\"end_after_occurrences\":\"never\",\"set_to_previous_businessday\":\"false\",\"retain_comments\":\"false\",\"retain_subtasks\":\"false\",\"next_recurrence_after_close\":\"true\",\"trigger_type\":\"on_schedule\",\"date_based\":{\"name\":\"Set Up CI/CD Pipeline for Staging Environment\",\"schedule_datetime\":\"2026-12-16T09:00:00.000Z\",\"repetative_type\":\"weekly\",\"time_span\":4,\"days_of_week\":[4,5],\"months_of_year\":[12],\"repeat_on_type\":0,\"repeat_on_value\":\"4\",\"ends_after_type\":\"date\",\"ends_after_value\":\"2026-12-31\",\"skip_type\":\"execute\",\"mail_to_user\":{\"zpuid\":[\"4000000002055\"]},\"duration_type\":\"days\",\"no_of_duration\":\"2\",\"field_name\":\"start_date\",\"time\":\"22:00\"},\"scheduler_based\":{\"name\":\"Set Up CI/CD Pipeline for Staging Environment\",\"schedule_datetime\":\"2026-12-16T09:00:00.000Z\",\"repetative_type\":\"weekly\",\"time_span\":4,\"days_of_week\":[4,5],\"months_of_year\":[12],\"repeat_on_type\":0,\"repeat_on_value\":\"4\",\"ends_after_type\":\"date\",\"ends_after_value\":\"2026-12-31\",\"skip_type\":\"execute\",\"mail_to_user\":{\"zpuid\":[\"4000000002055\"]},\"duration_type\":\"days\",\"no_of_duration\":\"2\",\"field_name\":\"start_date\",\"time\":\"22:00\"},\"retain_config\":{\"comments\":\"false\",\"billing_type\":\"false\",\"followers\":\"false\",\"description\":\"false\",\"subtasks\":\"false\",\"tags\":\"false\",\"attachments\":\"false\",\"teams\":\"false\"}},\"reminder\":{\"reminder_criteria\":\"on\",\"field_type\":\"start_date\",\"custom_date\":\"2023-12-20\",\"no_of_duration\":\"2\",\"time\":\"22:00\",\"duration_type\":\"days\",\"emailtemplate_id\":\"4000000008003\",\"reminder_notify_users\":[{\"type\":\"days\",\"values\":[\"4000000002055\"]}]},\"budget_info\":{\"rate_per_hour\":0,\"budget\":\"12345:00\",\"threshold\":\"234:00\",\"hourly_budget\":\"100:00\",\"hourly_budget_threshold\":\"50:00\",\"revenue_budget\":0,\"cost_rate_per_hour\":0}}],\"skip_mandatory_parameters\":false}"
:as :json}))
(println (:body response))
package main
import (
"fmt"
"io"
"net/http"
"strings"
)
func main() {
payload := strings.NewReader("{\"tasks\":[{\"id\":\"4000000062001\",\"tasklist\":{\"id\":\"4000000062001\"},\"parental_info\":{\"parent_task_id\":\"4000000005670\"},\"name\":\"Set Up CI/CD Pipeline for Staging Environment\",\"description\":\"false\",\"status\":{\"id\":\"4000000062001\"},\"priority\":\"high\",\"start_date\":\"2024-12-16T09:00:00.000Z\",\"end_date\":\"2024-12-19T18:00:00.000Z\",\"duration\":{\"value\":\"[4000000000485]\",\"type\":\"days\"},\"completion_percentage\":0,\"billing_type\":\"false\",\"attachments\":\"false\",\"owners_and_work\":{\"owners\":[{\"add\":[{\"zpuid\":[\"4000000002055\"],\"work_values\":\"08:00\"}],\"remove\":[{\"zpuid\":[\"4000000002055\"]}],\"zpuid\":[\"4000000002055\"],\"work_values\":\"08:00\",\"zuid\":\"21705927\",\"email\":\"mark.taylor@zylker.com\"}],\"work_type\":\"standard\",\"unit\":\"hours_per_day\",\"copy_task_duration\":\"true\",\"refresh_business_hours\":\"false\"},\"tags\":[{\"add\":[{\"id\":\"4000000062001\"}],\"remove\":[{\"id\":\"4000000062001\"}],\"id\":\"4000000062001\"}],\"teams\":[{\"add\":[{\"id\":\"4000000062001\"}],\"remove\":[{\"id\":\"4000000062001\"}],\"id\":\"4000000062001\"}],\"recurrence\":{\"frequency\":\"none\",\"interval\":1,\"end_after_occurrences\":\"never\",\"set_to_previous_businessday\":\"false\",\"retain_comments\":\"false\",\"retain_subtasks\":\"false\",\"next_recurrence_after_close\":\"true\",\"trigger_type\":\"on_schedule\",\"date_based\":{\"name\":\"Set Up CI/CD Pipeline for Staging Environment\",\"schedule_datetime\":\"2026-12-16T09:00:00.000Z\",\"repetative_type\":\"weekly\",\"time_span\":4,\"days_of_week\":[4,5],\"months_of_year\":[12],\"repeat_on_type\":0,\"repeat_on_value\":\"4\",\"ends_after_type\":\"date\",\"ends_after_value\":\"2026-12-31\",\"skip_type\":\"execute\",\"mail_to_user\":{\"zpuid\":[\"4000000002055\"]},\"duration_type\":\"days\",\"no_of_duration\":\"2\",\"field_name\":\"start_date\",\"time\":\"22:00\"},\"scheduler_based\":{\"name\":\"Set Up CI/CD Pipeline for Staging Environment\",\"schedule_datetime\":\"2026-12-16T09:00:00.000Z\",\"repetative_type\":\"weekly\",\"time_span\":4,\"days_of_week\":[4,5],\"months_of_year\":[12],\"repeat_on_type\":0,\"repeat_on_value\":\"4\",\"ends_after_type\":\"date\",\"ends_after_value\":\"2026-12-31\",\"skip_type\":\"execute\",\"mail_to_user\":{\"zpuid\":[\"4000000002055\"]},\"duration_type\":\"days\",\"no_of_duration\":\"2\",\"field_name\":\"start_date\",\"time\":\"22:00\"},\"retain_config\":{\"comments\":\"false\",\"billing_type\":\"false\",\"followers\":\"false\",\"description\":\"false\",\"subtasks\":\"false\",\"tags\":\"false\",\"attachments\":\"false\",\"teams\":\"false\"}},\"reminder\":{\"reminder_criteria\":\"on\",\"field_type\":\"start_date\",\"custom_date\":\"2023-12-20\",\"no_of_duration\":\"2\",\"time\":\"22:00\",\"duration_type\":\"days\",\"emailtemplate_id\":\"4000000008003\",\"reminder_notify_users\":[{\"type\":\"days\",\"values\":[\"4000000002055\"]}]},\"budget_info\":{\"rate_per_hour\":0,\"budget\":\"12345:00\",\"threshold\":\"234:00\",\"hourly_budget\":\"100:00\",\"hourly_budget_threshold\":\"50:00\",\"revenue_budget\":0,\"cost_rate_per_hour\":0}}],\"skip_mandatory_parameters\":false}")
req, _ := http.NewRequest("POST", "https://projects.zoho.com/api/v3/portal/[PORTAL_ID]/projects/23806000097545166/bulk-tasks", 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/bulk-tasks HTTP/1.1
Host: https://projects.zoho.com/api/v3/portal/[PORTAL_ID]/projects/23806000097545166/bulk-tasks
Authorization: Bearer 1000.03xxxxxxxxxxxxxxxxxa5317.dxxxxxxxxxxxxxxxxxfa
Content-Type: application/json
{"tasks":[{"id":"4000000062001","tasklist":{"id":"4000000062001"},"parental_info":{"parent_task_id":"4000000005670"},"name":"Set Up CI/CD Pipeline for Staging Environment","description":"false","status":{"id":"4000000062001"},"priority":"high","start_date":"2024-12-16T09:00:00.000Z","end_date":"2024-12-19T18:00:00.000Z","duration":{"value":"[4000000000485]","type":"days"},"completion_percentage":0,"billing_type":"false","attachments":"false","owners_and_work":{"owners":[{"add":[{"zpuid":["4000000002055"],"work_values":"08:00"}],"remove":[{"zpuid":["4000000002055"]}],"zpuid":["4000000002055"],"work_values":"08:00","zuid":"21705927","email":"mark.taylor@zylker.com"}],"work_type":"standard","unit":"hours_per_day","copy_task_duration":"true","refresh_business_hours":"false"},"tags":[{"add":[{"id":"4000000062001"}],"remove":[{"id":"4000000062001"}],"id":"4000000062001"}],"teams":[{"add":[{"id":"4000000062001"}],"remove":[{"id":"4000000062001"}],"id":"4000000062001"}],"recurrence":{"frequency":"none","interval":1,"end_after_occurrences":"never","set_to_previous_businessday":"false","retain_comments":"false","retain_subtasks":"false","next_recurrence_after_close":"true","trigger_type":"on_schedule","date_based":{"name":"Set Up CI/CD Pipeline for Staging Environment","schedule_datetime":"2026-12-16T09:00:00.000Z","repetative_type":"weekly","time_span":4,"days_of_week":[4,5],"months_of_year":[12],"repeat_on_type":0,"repeat_on_value":"4","ends_after_type":"date","ends_after_value":"2026-12-31","skip_type":"execute","mail_to_user":{"zpuid":["4000000002055"]},"duration_type":"days","no_of_duration":"2","field_name":"start_date","time":"22:00"},"scheduler_based":{"name":"Set Up CI/CD Pipeline for Staging Environment","schedule_datetime":"2026-12-16T09:00:00.000Z","repetative_type":"weekly","time_span":4,"days_of_week":[4,5],"months_of_year":[12],"repeat_on_type":0,"repeat_on_value":"4","ends_after_type":"date","ends_after_value":"2026-12-31","skip_type":"execute","mail_to_user":{"zpuid":["4000000002055"]},"duration_type":"days","no_of_duration":"2","field_name":"start_date","time":"22:00"},"retain_config":{"comments":"false","billing_type":"false","followers":"false","description":"false","subtasks":"false","tags":"false","attachments":"false","teams":"false"}},"reminder":{"reminder_criteria":"on","field_type":"start_date","custom_date":"2023-12-20","no_of_duration":"2","time":"22:00","duration_type":"days","emailtemplate_id":"4000000008003","reminder_notify_users":[{"type":"days","values":["4000000002055"]}]},"budget_info":{"rate_per_hour":0,"budget":"12345:00","threshold":"234:00","hourly_budget":"100:00","hourly_budget_threshold":"50:00","revenue_budget":0,"cost_rate_per_hour":0}}],"skip_mandatory_parameters":false}
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/bulk-tasks");
HttpUriRequest requestObj = new HttpPost(uriBuilder.build());
requestObj.addHeader("Authorization", "Bearer 1000.03xxxxxxxxxxxxxxxxxa5317.dxxxxxxxxxxxxxxxxxfa");
HttpEntityEnclosingRequestBase requestBase = (HttpEntityEnclosingRequestBase) requestObj;
String requestBody = "{\"tasks\":[{\"id\":\"4000000062001\",\"tasklist\":{\"id\":\"4000000062001\"},\"parental_info\":{\"parent_task_id\":\"4000000005670\"},\"name\":\"Set Up CI\/CD Pipeline for Staging Environment\",\"description\":\"false\",\"status\":{\"id\":\"4000000062001\"},\"priority\":\"high\",\"start_date\":\"2024-12-16T09:00:00.000Z\",\"end_date\":\"2024-12-19T18:00:00.000Z\",\"duration\":{\"value\":\"[4000000000485]\",\"type\":\"days\"},\"completion_percentage\":0,\"billing_type\":\"false\",\"attachments\":\"false\",\"owners_and_work\":{\"owners\":[{\"add\":[{\"zpuid\":[\"4000000002055\"],\"work_values\":\"08:00\"}],\"remove\":[{\"zpuid\":[\"4000000002055\"]}],\"zpuid\":[\"4000000002055\"],\"work_values\":\"08:00\",\"zuid\":\"21705927\",\"email\":\"mark.taylor@zylker.com\"}],\"work_type\":\"standard\",\"unit\":\"hours_per_day\",\"copy_task_duration\":\"true\",\"refresh_business_hours\":\"false\"},\"tags\":[{\"add\":[{\"id\":\"4000000062001\"}],\"remove\":[{\"id\":\"4000000062001\"}],\"id\":\"4000000062001\"}],\"teams\":[{\"add\":[{\"id\":\"4000000062001\"}],\"remove\":[{\"id\":\"4000000062001\"}],\"id\":\"4000000062001\"}],\"recurrence\":{\"frequency\":\"none\",\"interval\":1,\"end_after_occurrences\":\"never\",\"set_to_previous_businessday\":\"false\",\"retain_comments\":\"false\",\"retain_subtasks\":\"false\",\"next_recurrence_after_close\":\"true\",\"trigger_type\":\"on_schedule\",\"date_based\":{\"name\":\"Set Up CI\/CD Pipeline for Staging Environment\",\"schedule_datetime\":\"2026-12-16T09:00:00.000Z\",\"repetative_type\":\"weekly\",\"time_span\":4,\"days_of_week\":[4,5],\"months_of_year\":[12],\"repeat_on_type\":0,\"repeat_on_value\":\"4\",\"ends_after_type\":\"date\",\"ends_after_value\":\"2026-12-31\",\"skip_type\":\"execute\",\"mail_to_user\":{\"zpuid\":[\"4000000002055\"]},\"duration_type\":\"days\",\"no_of_duration\":\"2\",\"field_name\":\"start_date\",\"time\":\"22:00\"},\"scheduler_based\":{\"name\":\"Set Up CI\/CD Pipeline for Staging Environment\",\"schedule_datetime\":\"2026-12-16T09:00:00.000Z\",\"repetative_type\":\"weekly\",\"time_span\":4,\"days_of_week\":[4,5],\"months_of_year\":[12],\"repeat_on_type\":0,\"repeat_on_value\":\"4\",\"ends_after_type\":\"date\",\"ends_after_value\":\"2026-12-31\",\"skip_type\":\"execute\",\"mail_to_user\":{\"zpuid\":[\"4000000002055\"]},\"duration_type\":\"days\",\"no_of_duration\":\"2\",\"field_name\":\"start_date\",\"time\":\"22:00\"},\"retain_config\":{\"comments\":\"false\",\"billing_type\":\"false\",\"followers\":\"false\",\"description\":\"false\",\"subtasks\":\"false\",\"tags\":\"false\",\"attachments\":\"false\",\"teams\":\"false\"}},\"reminder\":{\"reminder_criteria\":\"on\",\"field_type\":\"start_date\",\"custom_date\":\"2023-12-20\",\"no_of_duration\":\"2\",\"time\":\"22:00\",\"duration_type\":\"days\",\"emailtemplate_id\":\"4000000008003\",\"reminder_notify_users\":[{\"type\":\"days\",\"values\":[\"4000000002055\"]}]},\"budget_info\":{\"rate_per_hour\":0,\"budget\":\"12345:00\",\"threshold\":\"234:00\",\"hourly_budget\":\"100:00\",\"hourly_budget_threshold\":\"50:00\",\"revenue_budget\":0,\"cost_rate_per_hour\":0}}],\"skip_mandatory_parameters\":false}";
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/bulk-tasks';
const options = {
method: 'POST',
headers: {
'Authorization': 'Bearer 1000.03xxxxxxxxxxxxxxxxxa5317.dxxxxxxxxxxxxxxxxxfa',
'Content-Type': 'application/json'
},
body: JSON.stringify({"tasks":[{"id":"4000000062001","tasklist":{"id":"4000000062001"},"parental_info":{"parent_task_id":"4000000005670"},"name":"Set Up CI/CD Pipeline for Staging Environment","description":"false","status":{"id":"4000000062001"},"priority":"high","start_date":"2024-12-16T09:00:00.000Z","end_date":"2024-12-19T18:00:00.000Z","duration":{"value":"[4000000000485]","type":"days"},"completion_percentage":0,"billing_type":"false","attachments":"false","owners_and_work":{"owners":[{"add":[{"zpuid":["4000000002055"],"work_values":"08:00"}],"remove":[{"zpuid":["4000000002055"]}],"zpuid":["4000000002055"],"work_values":"08:00","zuid":"21705927","email":"mark.taylor@zylker.com"}],"work_type":"standard","unit":"hours_per_day","copy_task_duration":"true","refresh_business_hours":"false"},"tags":[{"add":[{"id":"4000000062001"}],"remove":[{"id":"4000000062001"}],"id":"4000000062001"}],"teams":[{"add":[{"id":"4000000062001"}],"remove":[{"id":"4000000062001"}],"id":"4000000062001"}],"recurrence":{"frequency":"none","interval":1,"end_after_occurrences":"never","set_to_previous_businessday":"false","retain_comments":"false","retain_subtasks":"false","next_recurrence_after_close":"true","trigger_type":"on_schedule","date_based":{"name":"Set Up CI/CD Pipeline for Staging Environment","schedule_datetime":"2026-12-16T09:00:00.000Z","repetative_type":"weekly","time_span":4,"days_of_week":[4,5],"months_of_year":[12],"repeat_on_type":0,"repeat_on_value":"4","ends_after_type":"date","ends_after_value":"2026-12-31","skip_type":"execute","mail_to_user":{"zpuid":["4000000002055"]},"duration_type":"days","no_of_duration":"2","field_name":"start_date","time":"22:00"},"scheduler_based":{"name":"Set Up CI/CD Pipeline for Staging Environment","schedule_datetime":"2026-12-16T09:00:00.000Z","repetative_type":"weekly","time_span":4,"days_of_week":[4,5],"months_of_year":[12],"repeat_on_type":0,"repeat_on_value":"4","ends_after_type":"date","ends_after_value":"2026-12-31","skip_type":"execute","mail_to_user":{"zpuid":["4000000002055"]},"duration_type":"days","no_of_duration":"2","field_name":"start_date","time":"22:00"},"retain_config":{"comments":"false","billing_type":"false","followers":"false","description":"false","subtasks":"false","tags":"false","attachments":"false","teams":"false"}},"reminder":{"reminder_criteria":"on","field_type":"start_date","custom_date":"2023-12-20","no_of_duration":"2","time":"22:00","duration_type":"days","emailtemplate_id":"4000000008003","reminder_notify_users":[{"type":"days","values":["4000000002055"]}]},"budget_info":{"rate_per_hour":0,"budget":"12345:00","threshold":"234:00","hourly_budget":"100:00","hourly_budget_threshold":"50:00","revenue_budget":0,"cost_rate_per_hour":0}}],"skip_mandatory_parameters":false})
};
fetch(url, options)
.then(response => response.json())
.then(data => console.log(data))
.catch(error => console.error(error));
{"tasks":[{"id":"4000000062001","tasklist":{"id":"4000000062001"},"parental_info":{"parent_task_id":"4000000005670"},"name":"Set Up CI/CD Pipeline for Staging Environment","description":"false","status":{"id":"4000000062001"},"priority":"high","start_date":"2024-12-16T09:00:00.000Z","end_date":"2024-12-19T18:00:00.000Z","duration":{"value":"[4000000000485]","type":"days"},"completion_percentage":0,"billing_type":"false","attachments":"false","owners_and_work":{"owners":[{"add":[{"zpuid":["4000000002055"],"work_values":"08:00"}],"remove":[{"zpuid":["4000000002055"]}],"zpuid":["4000000002055"],"work_values":"08:00","zuid":"21705927","email":"mark.taylor@zylker.com"}],"work_type":"standard","unit":"hours_per_day","copy_task_duration":"true","refresh_business_hours":"false"},"tags":[{"add":[{"id":"4000000062001"}],"remove":[{"id":"4000000062001"}],"id":"4000000062001"}],"teams":[{"add":[{"id":"4000000062001"}],"remove":[{"id":"4000000062001"}],"id":"4000000062001"}],"recurrence":{"frequency":"none","interval":1,"end_after_occurrences":"never","set_to_previous_businessday":"false","retain_comments":"false","retain_subtasks":"false","next_recurrence_after_close":"true","trigger_type":"on_schedule","date_based":{"name":"Set Up CI/CD Pipeline for Staging Environment","schedule_datetime":"2026-12-16T09:00:00.000Z","repetative_type":"weekly","time_span":4,"days_of_week":[4,5],"months_of_year":[12],"repeat_on_type":0,"repeat_on_value":"4","ends_after_type":"date","ends_after_value":"2026-12-31","skip_type":"execute","mail_to_user":{"zpuid":["4000000002055"]},"duration_type":"days","no_of_duration":"2","field_name":"start_date","time":"22:00"},"scheduler_based":{"name":"Set Up CI/CD Pipeline for Staging Environment","schedule_datetime":"2026-12-16T09:00:00.000Z","repetative_type":"weekly","time_span":4,"days_of_week":[4,5],"months_of_year":[12],"repeat_on_type":0,"repeat_on_value":"4","ends_after_type":"date","ends_after_value":"2026-12-31","skip_type":"execute","mail_to_user":{"zpuid":["4000000002055"]},"duration_type":"days","no_of_duration":"2","field_name":"start_date","time":"22:00"},"retain_config":{"comments":"false","billing_type":"false","followers":"false","description":"false","subtasks":"false","tags":"false","attachments":"false","teams":"false"}},"reminder":{"reminder_criteria":"on","field_type":"start_date","custom_date":"2023-12-20","no_of_duration":"2","time":"22:00","duration_type":"days","emailtemplate_id":"4000000008003","reminder_notify_users":[{"type":"days","values":["4000000002055"]}]},"budget_info":{"rate_per_hour":0,"budget":"12345:00","threshold":"234:00","hourly_budget":"100:00","hourly_budget_threshold":"50:00","revenue_budget":0,"cost_rate_per_hour":0}}],"skip_mandatory_parameters":false}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/bulk-tasks")
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("""{"tasks":[{"id":"4000000062001","tasklist":{"id":"4000000062001"},"parental_info":{"parent_task_id":"4000000005670"},"name":"Set Up CI/CD Pipeline for Staging Environment","description":"false","status":{"id":"4000000062001"},"priority":"high","start_date":"2024-12-16T09:00:00.000Z","end_date":"2024-12-19T18:00:00.000Z","duration":{"value":"[4000000000485]","type":"days"},"completion_percentage":0,"billing_type":"false","attachments":"false","owners_and_work":{"owners":[{"add":[{"zpuid":["4000000002055"],"work_values":"08:00"}],"remove":[{"zpuid":["4000000002055"]}],"zpuid":["4000000002055"],"work_values":"08:00","zuid":"21705927","email":"mark.taylor@zylker.com"}],"work_type":"standard","unit":"hours_per_day","copy_task_duration":"true","refresh_business_hours":"false"},"tags":[{"add":[{"id":"4000000062001"}],"remove":[{"id":"4000000062001"}],"id":"4000000062001"}],"teams":[{"add":[{"id":"4000000062001"}],"remove":[{"id":"4000000062001"}],"id":"4000000062001"}],"recurrence":{"frequency":"none","interval":1,"end_after_occurrences":"never","set_to_previous_businessday":"false","retain_comments":"false","retain_subtasks":"false","next_recurrence_after_close":"true","trigger_type":"on_schedule","date_based":{"name":"Set Up CI/CD Pipeline for Staging Environment","schedule_datetime":"2026-12-16T09:00:00.000Z","repetative_type":"weekly","time_span":4,"days_of_week":[4,5],"months_of_year":[12],"repeat_on_type":0,"repeat_on_value":"4","ends_after_type":"date","ends_after_value":"2026-12-31","skip_type":"execute","mail_to_user":{"zpuid":["4000000002055"]},"duration_type":"days","no_of_duration":"2","field_name":"start_date","time":"22:00"},"scheduler_based":{"name":"Set Up CI/CD Pipeline for Staging Environment","schedule_datetime":"2026-12-16T09:00:00.000Z","repetative_type":"weekly","time_span":4,"days_of_week":[4,5],"months_of_year":[12],"repeat_on_type":0,"repeat_on_value":"4","ends_after_type":"date","ends_after_value":"2026-12-31","skip_type":"execute","mail_to_user":{"zpuid":["4000000002055"]},"duration_type":"days","no_of_duration":"2","field_name":"start_date","time":"22:00"},"retain_config":{"comments":"false","billing_type":"false","followers":"false","description":"false","subtasks":"false","tags":"false","attachments":"false","teams":"false"}},"reminder":{"reminder_criteria":"on","field_type":"start_date","custom_date":"2023-12-20","no_of_duration":"2","time":"22:00","duration_type":"days","emailtemplate_id":"4000000008003","reminder_notify_users":[{"type":"days","values":["4000000002055"]}]},"budget_info":{"rate_per_hour":0,"budget":"12345:00","threshold":"234:00","hourly_budget":"100:00","hourly_budget_threshold":"50:00","revenue_budget":0,"cost_rate_per_hour":0}}],"skip_mandatory_parameters":false}""") }
val response = conn.inputStream.bufferedReader().readText()
println(response)
}
NSURL *url = [NSURL URLWithString:@"https://projects.zoho.com/api/v3/portal/[PORTAL_ID]/projects/23806000097545166/bulk-tasks"];
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 = [@"{\"tasks\":[{\"id\":\"4000000062001\",\"tasklist\":{\"id\":\"4000000062001\"},\"parental_info\":{\"parent_task_id\":\"4000000005670\"},\"name\":\"Set Up CI/CD Pipeline for Staging Environment\",\"description\":\"false\",\"status\":{\"id\":\"4000000062001\"},\"priority\":\"high\",\"start_date\":\"2024-12-16T09:00:00.000Z\",\"end_date\":\"2024-12-19T18:00:00.000Z\",\"duration\":{\"value\":\"[4000000000485]\",\"type\":\"days\"},\"completion_percentage\":0,\"billing_type\":\"false\",\"attachments\":\"false\",\"owners_and_work\":{\"owners\":[{\"add\":[{\"zpuid\":[\"4000000002055\"],\"work_values\":\"08:00\"}],\"remove\":[{\"zpuid\":[\"4000000002055\"]}],\"zpuid\":[\"4000000002055\"],\"work_values\":\"08:00\",\"zuid\":\"21705927\",\"email\":\"mark.taylor@zylker.com\"}],\"work_type\":\"standard\",\"unit\":\"hours_per_day\",\"copy_task_duration\":\"true\",\"refresh_business_hours\":\"false\"},\"tags\":[{\"add\":[{\"id\":\"4000000062001\"}],\"remove\":[{\"id\":\"4000000062001\"}],\"id\":\"4000000062001\"}],\"teams\":[{\"add\":[{\"id\":\"4000000062001\"}],\"remove\":[{\"id\":\"4000000062001\"}],\"id\":\"4000000062001\"}],\"recurrence\":{\"frequency\":\"none\",\"interval\":1,\"end_after_occurrences\":\"never\",\"set_to_previous_businessday\":\"false\",\"retain_comments\":\"false\",\"retain_subtasks\":\"false\",\"next_recurrence_after_close\":\"true\",\"trigger_type\":\"on_schedule\",\"date_based\":{\"name\":\"Set Up CI/CD Pipeline for Staging Environment\",\"schedule_datetime\":\"2026-12-16T09:00:00.000Z\",\"repetative_type\":\"weekly\",\"time_span\":4,\"days_of_week\":[4,5],\"months_of_year\":[12],\"repeat_on_type\":0,\"repeat_on_value\":\"4\",\"ends_after_type\":\"date\",\"ends_after_value\":\"2026-12-31\",\"skip_type\":\"execute\",\"mail_to_user\":{\"zpuid\":[\"4000000002055\"]},\"duration_type\":\"days\",\"no_of_duration\":\"2\",\"field_name\":\"start_date\",\"time\":\"22:00\"},\"scheduler_based\":{\"name\":\"Set Up CI/CD Pipeline for Staging Environment\",\"schedule_datetime\":\"2026-12-16T09:00:00.000Z\",\"repetative_type\":\"weekly\",\"time_span\":4,\"days_of_week\":[4,5],\"months_of_year\":[12],\"repeat_on_type\":0,\"repeat_on_value\":\"4\",\"ends_after_type\":\"date\",\"ends_after_value\":\"2026-12-31\",\"skip_type\":\"execute\",\"mail_to_user\":{\"zpuid\":[\"4000000002055\"]},\"duration_type\":\"days\",\"no_of_duration\":\"2\",\"field_name\":\"start_date\",\"time\":\"22:00\"},\"retain_config\":{\"comments\":\"false\",\"billing_type\":\"false\",\"followers\":\"false\",\"description\":\"false\",\"subtasks\":\"false\",\"tags\":\"false\",\"attachments\":\"false\",\"teams\":\"false\"}},\"reminder\":{\"reminder_criteria\":\"on\",\"field_type\":\"start_date\",\"custom_date\":\"2023-12-20\",\"no_of_duration\":\"2\",\"time\":\"22:00\",\"duration_type\":\"days\",\"emailtemplate_id\":\"4000000008003\",\"reminder_notify_users\":[{\"type\":\"days\",\"values\":[\"4000000002055\"]}]},\"budget_info\":{\"rate_per_hour\":0,\"budget\":\"12345:00\",\"threshold\":\"234:00\",\"hourly_budget\":\"100:00\",\"hourly_budget_threshold\":\"50:00\",\"revenue_budget\":0,\"cost_rate_per_hour\":0}}],\"skip_mandatory_parameters\":false}" 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/bulk-tasks" 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|{"tasks":[{"id":"4000000062001","tasklist":{"id":"4000000062001"},"parental_info":{"parent_task_id":"4000000005670"},"name":"Set Up CI/CD Pipeline for Staging Environment","description":"false","status":{"id":"4000000062001"},"priority":"high","start_date":"2024-12-16T09:00:00.000Z","end_date":"2024-12-19T18:00:00.000Z","duration":{"value":"[4000000000485]","type":"days"},"completion_percentage":0,"billing_type":"false","attachments":"false","owners_and_work":{"owners":[{"add":[{"zpuid":["4000000002055"],"work_values":"08:00"}],"remove":[{"zpuid":["4000000002055"]}],"zpuid":["4000000002055"],"work_values":"08:00","zuid":"21705927","email":"mark.taylor@zylker.com"}],"work_type":"standard","unit":"hours_per_day","copy_task_duration":"true","refresh_business_hours":"false"},"tags":[{"add":[{"id":"4000000062001"}],"remove":[{"id":"4000000062001"}],"id":"4000000062001"}],"teams":[{"add":[{"id":"4000000062001"}],"remove":[{"id":"4000000062001"}],"id":"4000000062001"}],"recurrence":{"frequency":"none","interval":1,"end_after_occurrences":"never","set_to_previous_businessday":"false","retain_comments":"false","retain_subtasks":"false","next_recurrence_after_close":"true","trigger_type":"on_schedule","date_based":{"name":"Set Up CI/CD Pipeline for Staging Environment","schedule_datetime":"2026-12-16T09:00:00.000Z","repetative_type":"weekly","time_span":4,"days_of_week":[4,5],"months_of_year":[12],"repeat_on_type":0,"repeat_on_value":"4","ends_after_type":"date","ends_after_value":"2026-12-31","skip_type":"execute","mail_to_user":{"zpuid":["4000000002055"]},"duration_type":"days","no_of_duration":"2","field_name":"start_date","time":"22:00"},"scheduler_based":{"name":"Set Up CI/CD Pipeline for Staging Environment","schedule_datetime":"2026-12-16T09:00:00.000Z","repetative_type":"weekly","time_span":4,"days_of_week":[4,5],"months_of_year":[12],"repeat_on_type":0,"repeat_on_value":"4","ends_after_type":"date","ends_after_value":"2026-12-31","skip_type":"execute","mail_to_user":{"zpuid":["4000000002055"]},"duration_type":"days","no_of_duration":"2","field_name":"start_date","time":"22:00"},"retain_config":{"comments":"false","billing_type":"false","followers":"false","description":"false","subtasks":"false","tags":"false","attachments":"false","teams":"false"}},"reminder":{"reminder_criteria":"on","field_type":"start_date","custom_date":"2023-12-20","no_of_duration":"2","time":"22:00","duration_type":"days","emailtemplate_id":"4000000008003","reminder_notify_users":[{"type":"days","values":["4000000002055"]}]},"budget_info":{"rate_per_hour":0,"budget":"12345:00","threshold":"234:00","hourly_budget":"100:00","hourly_budget_threshold":"50:00","revenue_budget":0,"cost_rate_per_hour":0}}],"skip_mandatory_parameters":false}|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 = @'
{"tasks":[{"id":"4000000062001","tasklist":{"id":"4000000062001"},"parental_info":{"parent_task_id":"4000000005670"},"name":"Set Up CI/CD Pipeline for Staging Environment","description":"false","status":{"id":"4000000062001"},"priority":"high","start_date":"2024-12-16T09:00:00.000Z","end_date":"2024-12-19T18:00:00.000Z","duration":{"value":"[4000000000485]","type":"days"},"completion_percentage":0,"billing_type":"false","attachments":"false","owners_and_work":{"owners":[{"add":[{"zpuid":["4000000002055"],"work_values":"08:00"}],"remove":[{"zpuid":["4000000002055"]}],"zpuid":["4000000002055"],"work_values":"08:00","zuid":"21705927","email":"mark.taylor@zylker.com"}],"work_type":"standard","unit":"hours_per_day","copy_task_duration":"true","refresh_business_hours":"false"},"tags":[{"add":[{"id":"4000000062001"}],"remove":[{"id":"4000000062001"}],"id":"4000000062001"}],"teams":[{"add":[{"id":"4000000062001"}],"remove":[{"id":"4000000062001"}],"id":"4000000062001"}],"recurrence":{"frequency":"none","interval":1,"end_after_occurrences":"never","set_to_previous_businessday":"false","retain_comments":"false","retain_subtasks":"false","next_recurrence_after_close":"true","trigger_type":"on_schedule","date_based":{"name":"Set Up CI/CD Pipeline for Staging Environment","schedule_datetime":"2026-12-16T09:00:00.000Z","repetative_type":"weekly","time_span":4,"days_of_week":[4,5],"months_of_year":[12],"repeat_on_type":0,"repeat_on_value":"4","ends_after_type":"date","ends_after_value":"2026-12-31","skip_type":"execute","mail_to_user":{"zpuid":["4000000002055"]},"duration_type":"days","no_of_duration":"2","field_name":"start_date","time":"22:00"},"scheduler_based":{"name":"Set Up CI/CD Pipeline for Staging Environment","schedule_datetime":"2026-12-16T09:00:00.000Z","repetative_type":"weekly","time_span":4,"days_of_week":[4,5],"months_of_year":[12],"repeat_on_type":0,"repeat_on_value":"4","ends_after_type":"date","ends_after_value":"2026-12-31","skip_type":"execute","mail_to_user":{"zpuid":["4000000002055"]},"duration_type":"days","no_of_duration":"2","field_name":"start_date","time":"22:00"},"retain_config":{"comments":"false","billing_type":"false","followers":"false","description":"false","subtasks":"false","tags":"false","attachments":"false","teams":"false"}},"reminder":{"reminder_criteria":"on","field_type":"start_date","custom_date":"2023-12-20","no_of_duration":"2","time":"22:00","duration_type":"days","emailtemplate_id":"4000000008003","reminder_notify_users":[{"type":"days","values":["4000000002055"]}]},"budget_info":{"rate_per_hour":0,"budget":"12345:00","threshold":"234:00","hourly_budget":"100:00","hourly_budget_threshold":"50:00","revenue_budget":0,"cost_rate_per_hour":0}}],"skip_mandatory_parameters":false}
'@
$response = Invoke-RestMethod -Uri "https://projects.zoho.com/api/v3/portal/[PORTAL_ID]/projects/23806000097545166/bulk-tasks" -Method POST -Headers $headers -Body $body
$response | ConvertTo-Json
library(httr)
url <- "https://projects.zoho.com/api/v3/portal/[PORTAL_ID]/projects/23806000097545166/bulk-tasks"
response <- POST(
url,
add_headers(Authorization = "Bearer 1000.03xxxxxxxxxxxxxxxxxa5317.dxxxxxxxxxxxxxxxxxfa"),
content_type_json(),
body = "{\"tasks\":[{\"id\":\"4000000062001\",\"tasklist\":{\"id\":\"4000000062001\"},\"parental_info\":{\"parent_task_id\":\"4000000005670\"},\"name\":\"Set Up CI/CD Pipeline for Staging Environment\",\"description\":\"false\",\"status\":{\"id\":\"4000000062001\"},\"priority\":\"high\",\"start_date\":\"2024-12-16T09:00:00.000Z\",\"end_date\":\"2024-12-19T18:00:00.000Z\",\"duration\":{\"value\":\"[4000000000485]\",\"type\":\"days\"},\"completion_percentage\":0,\"billing_type\":\"false\",\"attachments\":\"false\",\"owners_and_work\":{\"owners\":[{\"add\":[{\"zpuid\":[\"4000000002055\"],\"work_values\":\"08:00\"}],\"remove\":[{\"zpuid\":[\"4000000002055\"]}],\"zpuid\":[\"4000000002055\"],\"work_values\":\"08:00\",\"zuid\":\"21705927\",\"email\":\"mark.taylor@zylker.com\"}],\"work_type\":\"standard\",\"unit\":\"hours_per_day\",\"copy_task_duration\":\"true\",\"refresh_business_hours\":\"false\"},\"tags\":[{\"add\":[{\"id\":\"4000000062001\"}],\"remove\":[{\"id\":\"4000000062001\"}],\"id\":\"4000000062001\"}],\"teams\":[{\"add\":[{\"id\":\"4000000062001\"}],\"remove\":[{\"id\":\"4000000062001\"}],\"id\":\"4000000062001\"}],\"recurrence\":{\"frequency\":\"none\",\"interval\":1,\"end_after_occurrences\":\"never\",\"set_to_previous_businessday\":\"false\",\"retain_comments\":\"false\",\"retain_subtasks\":\"false\",\"next_recurrence_after_close\":\"true\",\"trigger_type\":\"on_schedule\",\"date_based\":{\"name\":\"Set Up CI/CD Pipeline for Staging Environment\",\"schedule_datetime\":\"2026-12-16T09:00:00.000Z\",\"repetative_type\":\"weekly\",\"time_span\":4,\"days_of_week\":[4,5],\"months_of_year\":[12],\"repeat_on_type\":0,\"repeat_on_value\":\"4\",\"ends_after_type\":\"date\",\"ends_after_value\":\"2026-12-31\",\"skip_type\":\"execute\",\"mail_to_user\":{\"zpuid\":[\"4000000002055\"]},\"duration_type\":\"days\",\"no_of_duration\":\"2\",\"field_name\":\"start_date\",\"time\":\"22:00\"},\"scheduler_based\":{\"name\":\"Set Up CI/CD Pipeline for Staging Environment\",\"schedule_datetime\":\"2026-12-16T09:00:00.000Z\",\"repetative_type\":\"weekly\",\"time_span\":4,\"days_of_week\":[4,5],\"months_of_year\":[12],\"repeat_on_type\":0,\"repeat_on_value\":\"4\",\"ends_after_type\":\"date\",\"ends_after_value\":\"2026-12-31\",\"skip_type\":\"execute\",\"mail_to_user\":{\"zpuid\":[\"4000000002055\"]},\"duration_type\":\"days\",\"no_of_duration\":\"2\",\"field_name\":\"start_date\",\"time\":\"22:00\"},\"retain_config\":{\"comments\":\"false\",\"billing_type\":\"false\",\"followers\":\"false\",\"description\":\"false\",\"subtasks\":\"false\",\"tags\":\"false\",\"attachments\":\"false\",\"teams\":\"false\"}},\"reminder\":{\"reminder_criteria\":\"on\",\"field_type\":\"start_date\",\"custom_date\":\"2023-12-20\",\"no_of_duration\":\"2\",\"time\":\"22:00\",\"duration_type\":\"days\",\"emailtemplate_id\":\"4000000008003\",\"reminder_notify_users\":[{\"type\":\"days\",\"values\":[\"4000000002055\"]}]},\"budget_info\":{\"rate_per_hour\":0,\"budget\":\"12345:00\",\"threshold\":\"234:00\",\"hourly_budget\":\"100:00\",\"hourly_budget_threshold\":\"50:00\",\"revenue_budget\":0,\"cost_rate_per_hour\":0}}],\"skip_mandatory_parameters\":false}"
)
content(response, "text")
import Foundation
let url = URL(string: "https://projects.zoho.com/api/v3/portal/[PORTAL_ID]/projects/23806000097545166/bulk-tasks")!
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 = """
{"tasks":[{"id":"4000000062001","tasklist":{"id":"4000000062001"},"parental_info":{"parent_task_id":"4000000005670"},"name":"Set Up CI/CD Pipeline for Staging Environment","description":"false","status":{"id":"4000000062001"},"priority":"high","start_date":"2024-12-16T09:00:00.000Z","end_date":"2024-12-19T18:00:00.000Z","duration":{"value":"[4000000000485]","type":"days"},"completion_percentage":0,"billing_type":"false","attachments":"false","owners_and_work":{"owners":[{"add":[{"zpuid":["4000000002055"],"work_values":"08:00"}],"remove":[{"zpuid":["4000000002055"]}],"zpuid":["4000000002055"],"work_values":"08:00","zuid":"21705927","email":"mark.taylor@zylker.com"}],"work_type":"standard","unit":"hours_per_day","copy_task_duration":"true","refresh_business_hours":"false"},"tags":[{"add":[{"id":"4000000062001"}],"remove":[{"id":"4000000062001"}],"id":"4000000062001"}],"teams":[{"add":[{"id":"4000000062001"}],"remove":[{"id":"4000000062001"}],"id":"4000000062001"}],"recurrence":{"frequency":"none","interval":1,"end_after_occurrences":"never","set_to_previous_businessday":"false","retain_comments":"false","retain_subtasks":"false","next_recurrence_after_close":"true","trigger_type":"on_schedule","date_based":{"name":"Set Up CI/CD Pipeline for Staging Environment","schedule_datetime":"2026-12-16T09:00:00.000Z","repetative_type":"weekly","time_span":4,"days_of_week":[4,5],"months_of_year":[12],"repeat_on_type":0,"repeat_on_value":"4","ends_after_type":"date","ends_after_value":"2026-12-31","skip_type":"execute","mail_to_user":{"zpuid":["4000000002055"]},"duration_type":"days","no_of_duration":"2","field_name":"start_date","time":"22:00"},"scheduler_based":{"name":"Set Up CI/CD Pipeline for Staging Environment","schedule_datetime":"2026-12-16T09:00:00.000Z","repetative_type":"weekly","time_span":4,"days_of_week":[4,5],"months_of_year":[12],"repeat_on_type":0,"repeat_on_value":"4","ends_after_type":"date","ends_after_value":"2026-12-31","skip_type":"execute","mail_to_user":{"zpuid":["4000000002055"]},"duration_type":"days","no_of_duration":"2","field_name":"start_date","time":"22:00"},"retain_config":{"comments":"false","billing_type":"false","followers":"false","description":"false","subtasks":"false","tags":"false","attachments":"false","teams":"false"}},"reminder":{"reminder_criteria":"on","field_type":"start_date","custom_date":"2023-12-20","no_of_duration":"2","time":"22:00","duration_type":"days","emailtemplate_id":"4000000008003","reminder_notify_users":[{"type":"days","values":["4000000002055"]}]},"budget_info":{"rate_per_hour":0,"budget":"12345:00","threshold":"234:00","hourly_budget":"100:00","hourly_budget_threshold":"50:00","revenue_budget":0,"cost_rate_per_hour":0}}],"skip_mandatory_parameters":false}
""".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 in a project.
OAuth Scope:
ZohoProjects.tasks.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
requiredUnique, immutable identifier of the task within the specified project. You can obtain it from the Get Tasks API (the "id" field in the response).
JSONObject
Enter the task list details. Uses the general task list when task list details are not provided; the project must have a general task list or an exception is thrown. To create one, use the Create Default Task List
JSONObject
Enter parent task details if sub task is need to be created
String
max length : 10000Enter the task name
String
max length : 80000Enter the task description
JSONObject
max length : 1000Enter the task status details if not provided default open will be taken
String
Enter the task priority Possible values are none,low,medium,high
String
regex : ISO-8601Enter the start date of the task in ISO 8601 format. Use yyyy-MM-dd'T'HH:mm:ss'Z' for UTC or yyyy-MM-dd'T'HH:mm:ss[+|-]HH:mm for other time zones.
String
regex : ISO-8601Enter the end date of the task in ISO 8601 format. Use yyyy-MM-dd'T'HH:mm:ss'Z' for UTC or yyyy-MM-dd'T'HH:mm:ss[+|-]HH:mm for other time zones.
JSONObject
Enter the duration of the task
int
Enter the task completion percentage
String
Enter the billing type for the task Possible values are none,billable,non_billable
JSONArray
max length : 10000Enter the IDs of files to be uploaded You can obtain it from the Get Project Attachments API (the "attachment_id" field in the response).
JSONArray
max length : 2500Enter the WorkDrive resource IDs of the files to associate. The WorkDrive resource ID is different from the attachment ID in Zoho Projects. You can pass up to 50 IDs. To get the thirdPartyId, refer to the WorkDrive API User who does not have upload permission to the folder/team folder can upload file upto 20 MB only.
JSONObject
max length : 1600000Enter the task owner name and work details
JSONArray
max length : 100000Enter the tags for the task
JSONArray
max length : 100000Add or remove teams associated with the task
JSONObject
max length : 100000Enter the recurrence details for the task. To remove recurrence from the task, pass an empty object.
JSONObject
max length : 100000Enter the Reminder details of the task
JSONObject
max length : 100000Enter the Budget details of the task
String
Enter the color of the task.
String
Enter the value for a task custom field. Replace <field_name> with the custom field's API name in snake_case, as listed in the Custom Fields Guide.
Note: The type is shown as String by default since most basic custom fields accept string values. The actual expected value format and input structure depend on the custom field type.
Refer to the Custom Fields Guide for details.
boolean
default : falseSpecify whether to forcefully remove the lag from task dependencies. Accepted values: true, false.
Request Example
curl -X PATCH \
'https://projects.zoho.com/api/v3/portal/[PORTAL_ID]/projects/23806000097545166/tasks/[TASK_ID]' \
-H 'Authorization: Bearer 1000.03xxxxxxxxxxxxxxxxxa5317.dxxxxxxxxxxxxxxxxxfa' \
-H 'Content-Type: application/json' \
-d '{"tasklist":{"id":"4000000062001"},"parental_info":{"parent_task_id":"4000000005670"},"name":"Set Up CI/CD Pipeline for Staging Environment","description":false,"status":{"id":"4000000062001"},"priority":"high","start_date":"2024-12-16T09:00:00.000Z","end_date":"2024-12-19T18:00:00.000Z","duration":{"value":"5","type":"days"},"completion_percentage":0,"billing_type":false,"attachments":false,"thirdparty_id":["9if2g8aa1c0f0e1234567890abcdef123456"],"owners_and_work":{"owners":[{"add":[{"zpuid":["4000000002055"],"zuid":"16469208","email":"richard.santos@zylker.com","work_values":"08:00"}],"remove":[{"zpuid":["4000000002055"],"zuid":"16469208","email":"richard.santos@zylker.com"}],"zpuid":["4000000002055"],"zuid":"16469208","email":"richard.santos@zylker.com","work_values":"08:00"}],"work_type":"standard","unit":"hours_per_day","copy_task_duration":"true","refresh_business_hours":"false"},"tags":[{"add":[{"id":"4000000062001"}],"remove":[{"id":"4000000062001"}],"id":"4000000062001"}],"teams":[{"add":[{"id":"4000000062001"}],"remove":[{"id":"4000000062001"}],"id":"4000000062001"}],"recurrence":{"frequency":"daily","interval":1,"end_after_occurrences":"10","set_to_previous_businessday":"false","next_recurrence_after_close":"true","trigger_type":"first_to_occur","date_based":{"name":"Set Up CI/CD Pipeline for Staging Environment","schedule_datetime":"2024-12-16T09:00:00.000Z","repetative_type":"daily","time_span":1,"days_of_week":["1"],"months_of_year":["1"],"repeat_on_type":0,"repeat_on_value":"1","ends_after_type":"none","ends_after_value":"20","skip_type":"skip","mail_to_user":{"zpuid":["4000000002055"]},"duration_type":"days","no_of_duration":"2","field_name":"status","time":"22:00"},"scheduler_based":{"name":"Set Up CI/CD Pipeline for Staging Environment","schedule_datetime":"2024-12-16T09:00:00.000Z","repetative_type":"daily","time_span":1,"days_of_week":["1"],"months_of_year":["1"],"repeat_on_type":0,"repeat_on_value":"1","ends_after_type":"none","ends_after_value":"20","skip_type":"skip","mail_to_user":{"zpuid":["4000000002055"]},"duration_type":"days","no_of_duration":"2","field_name":"status","time":"22:00"},"retain_comments":"false","retain_subtasks":"false","retain_config":{"comments":false,"billing_type":false,"followers":false,"description":false,"subtasks":false,"tags":false,"attachments":false,"teams":false}},"reminder":{"reminder_criteria":"on","field_type":"start_date","custom_date":"2023-12-20","no_of_duration":"2","time":"22:00","duration_type":"days","emailtemplate_id":"4000000008003","reminder_notify_users":[{"type":"days","values":["4000000002055"]}]},"budget_info":{"rate_per_hour":50,"budget":"12345:00","threshold":"234:00","hourly_budget":"40:00","hourly_budget_threshold":"35:00","revenue_budget":5000,"cost_rate_per_hour":30},"color":"#74cb80","<field_name>":"In Progress","remove_dependency_lag":false}'
url = "https://projects.zoho.com/api/v3/portal/[PORTAL_ID]/projects/23806000097545166/tasks/[TASK_ID]";
params = Map();
params.put("tasklist", {"id":"4000000062001"});
params.put("parental_info", {"parent_task_id":"4000000005670"});
params.put("name", "Set Up CI/CD Pipeline for Staging Environment");
params.put("description", false);
params.put("status", {"id":"4000000062001"});
params.put("priority", "high");
params.put("start_date", "2024-12-16T09:00:00.000Z");
params.put("end_date", "2024-12-19T18:00:00.000Z");
params.put("duration", {"value":"5","type":"days"});
params.put("completion_percentage", 0);
params.put("billing_type", false);
params.put("attachments", false);
params.put("thirdparty_id", ["9if2g8aa1c0f0e1234567890abcdef123456"]);
params.put("owners_and_work", {"owners":[{"add":[{"zpuid":["4000000002055"],"zuid":"16469208","email":"richard.santos@zylker.com","work_values":"08:00"}],"remove":[{"zpuid":["4000000002055"],"zuid":"16469208","email":"richard.santos@zylker.com"}],"zpuid":["4000000002055"],"zuid":"16469208","email":"richard.santos@zylker.com","work_values":"08:00"}],"work_type":"standard","unit":"hours_per_day","copy_task_duration":"true","refresh_business_hours":"false"});
params.put("tags", [{"add":[{"id":"4000000062001"}],"remove":[{"id":"4000000062001"}],"id":"4000000062001"}]);
params.put("teams", [{"add":[{"id":"4000000062001"}],"remove":[{"id":"4000000062001"}],"id":"4000000062001"}]);
params.put("recurrence", {"frequency":"daily","interval":1,"end_after_occurrences":"10","set_to_previous_businessday":"false","next_recurrence_after_close":"true","trigger_type":"first_to_occur","date_based":{"name":"Set Up CI/CD Pipeline for Staging Environment","schedule_datetime":"2024-12-16T09:00:00.000Z","repetative_type":"daily","time_span":1,"days_of_week":["1"],"months_of_year":["1"],"repeat_on_type":0,"repeat_on_value":"1","ends_after_type":"none","ends_after_value":"20","skip_type":"skip","mail_to_user":{"zpuid":["4000000002055"]},"duration_type":"days","no_of_duration":"2","field_name":"status","time":"22:00"},"scheduler_based":{"name":"Set Up CI/CD Pipeline for Staging Environment","schedule_datetime":"2024-12-16T09:00:00.000Z","repetative_type":"daily","time_span":1,"days_of_week":["1"],"months_of_year":["1"],"repeat_on_type":0,"repeat_on_value":"1","ends_after_type":"none","ends_after_value":"20","skip_type":"skip","mail_to_user":{"zpuid":["4000000002055"]},"duration_type":"days","no_of_duration":"2","field_name":"status","time":"22:00"},"retain_comments":"false","retain_subtasks":"false","retain_config":{"comments":false,"billing_type":false,"followers":false,"description":false,"subtasks":false,"tags":false,"attachments":false,"teams":false}});
params.put("reminder", {"reminder_criteria":"on","field_type":"start_date","custom_date":"2023-12-20","no_of_duration":"2","time":"22:00","duration_type":"days","emailtemplate_id":"4000000008003","reminder_notify_users":[{"type":"days","values":["4000000002055"]}]});
params.put("budget_info", {"rate_per_hour":50,"budget":"12345:00","threshold":"234:00","hourly_budget":"40:00","hourly_budget_threshold":"35:00","revenue_budget":5000,"cost_rate_per_hour":30});
params.put("color", "#74cb80");
params.put("<field_name>", "In Progress");
params.put("remove_dependency_lag", false);
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/tasks/[TASK_ID]');
const payload = JSON.stringify({"tasklist":{"id":"4000000062001"},"parental_info":{"parent_task_id":"4000000005670"},"name":"Set Up CI/CD Pipeline for Staging Environment","description":false,"status":{"id":"4000000062001"},"priority":"high","start_date":"2024-12-16T09:00:00.000Z","end_date":"2024-12-19T18:00:00.000Z","duration":{"value":"5","type":"days"},"completion_percentage":0,"billing_type":false,"attachments":false,"thirdparty_id":["9if2g8aa1c0f0e1234567890abcdef123456"],"owners_and_work":{"owners":[{"add":[{"zpuid":["4000000002055"],"zuid":"16469208","email":"richard.santos@zylker.com","work_values":"08:00"}],"remove":[{"zpuid":["4000000002055"],"zuid":"16469208","email":"richard.santos@zylker.com"}],"zpuid":["4000000002055"],"zuid":"16469208","email":"richard.santos@zylker.com","work_values":"08:00"}],"work_type":"standard","unit":"hours_per_day","copy_task_duration":"true","refresh_business_hours":"false"},"tags":[{"add":[{"id":"4000000062001"}],"remove":[{"id":"4000000062001"}],"id":"4000000062001"}],"teams":[{"add":[{"id":"4000000062001"}],"remove":[{"id":"4000000062001"}],"id":"4000000062001"}],"recurrence":{"frequency":"daily","interval":1,"end_after_occurrences":"10","set_to_previous_businessday":"false","next_recurrence_after_close":"true","trigger_type":"first_to_occur","date_based":{"name":"Set Up CI/CD Pipeline for Staging Environment","schedule_datetime":"2024-12-16T09:00:00.000Z","repetative_type":"daily","time_span":1,"days_of_week":["1"],"months_of_year":["1"],"repeat_on_type":0,"repeat_on_value":"1","ends_after_type":"none","ends_after_value":"20","skip_type":"skip","mail_to_user":{"zpuid":["4000000002055"]},"duration_type":"days","no_of_duration":"2","field_name":"status","time":"22:00"},"scheduler_based":{"name":"Set Up CI/CD Pipeline for Staging Environment","schedule_datetime":"2024-12-16T09:00:00.000Z","repetative_type":"daily","time_span":1,"days_of_week":["1"],"months_of_year":["1"],"repeat_on_type":0,"repeat_on_value":"1","ends_after_type":"none","ends_after_value":"20","skip_type":"skip","mail_to_user":{"zpuid":["4000000002055"]},"duration_type":"days","no_of_duration":"2","field_name":"status","time":"22:00"},"retain_comments":"false","retain_subtasks":"false","retain_config":{"comments":false,"billing_type":false,"followers":false,"description":false,"subtasks":false,"tags":false,"attachments":false,"teams":false}},"reminder":{"reminder_criteria":"on","field_type":"start_date","custom_date":"2023-12-20","no_of_duration":"2","time":"22:00","duration_type":"days","emailtemplate_id":"4000000008003","reminder_notify_users":[{"type":"days","values":["4000000002055"]}]},"budget_info":{"rate_per_hour":50,"budget":"12345:00","threshold":"234:00","hourly_budget":"40:00","hourly_budget_threshold":"35:00","revenue_budget":5000,"cost_rate_per_hour":30},"color":"#74cb80","<field_name>":"In Progress","remove_dependency_lag":false});
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/tasks/[TASK_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 = '{"tasklist":{"id":"4000000062001"},"parental_info":{"parent_task_id":"4000000005670"},"name":"Set Up CI/CD Pipeline for Staging Environment","description":false,"status":{"id":"4000000062001"},"priority":"high","start_date":"2024-12-16T09:00:00.000Z","end_date":"2024-12-19T18:00:00.000Z","duration":{"value":"5","type":"days"},"completion_percentage":0,"billing_type":false,"attachments":false,"thirdparty_id":["9if2g8aa1c0f0e1234567890abcdef123456"],"owners_and_work":{"owners":[{"add":[{"zpuid":["4000000002055"],"zuid":"16469208","email":"richard.santos@zylker.com","work_values":"08:00"}],"remove":[{"zpuid":["4000000002055"],"zuid":"16469208","email":"richard.santos@zylker.com"}],"zpuid":["4000000002055"],"zuid":"16469208","email":"richard.santos@zylker.com","work_values":"08:00"}],"work_type":"standard","unit":"hours_per_day","copy_task_duration":"true","refresh_business_hours":"false"},"tags":[{"add":[{"id":"4000000062001"}],"remove":[{"id":"4000000062001"}],"id":"4000000062001"}],"teams":[{"add":[{"id":"4000000062001"}],"remove":[{"id":"4000000062001"}],"id":"4000000062001"}],"recurrence":{"frequency":"daily","interval":1,"end_after_occurrences":"10","set_to_previous_businessday":"false","next_recurrence_after_close":"true","trigger_type":"first_to_occur","date_based":{"name":"Set Up CI/CD Pipeline for Staging Environment","schedule_datetime":"2024-12-16T09:00:00.000Z","repetative_type":"daily","time_span":1,"days_of_week":["1"],"months_of_year":["1"],"repeat_on_type":0,"repeat_on_value":"1","ends_after_type":"none","ends_after_value":"20","skip_type":"skip","mail_to_user":{"zpuid":["4000000002055"]},"duration_type":"days","no_of_duration":"2","field_name":"status","time":"22:00"},"scheduler_based":{"name":"Set Up CI/CD Pipeline for Staging Environment","schedule_datetime":"2024-12-16T09:00:00.000Z","repetative_type":"daily","time_span":1,"days_of_week":["1"],"months_of_year":["1"],"repeat_on_type":0,"repeat_on_value":"1","ends_after_type":"none","ends_after_value":"20","skip_type":"skip","mail_to_user":{"zpuid":["4000000002055"]},"duration_type":"days","no_of_duration":"2","field_name":"status","time":"22:00"},"retain_comments":"false","retain_subtasks":"false","retain_config":{"comments":false,"billing_type":false,"followers":false,"description":false,"subtasks":false,"tags":false,"attachments":false,"teams":false}},"reminder":{"reminder_criteria":"on","field_type":"start_date","custom_date":"2023-12-20","no_of_duration":"2","time":"22:00","duration_type":"days","emailtemplate_id":"4000000008003","reminder_notify_users":[{"type":"days","values":["4000000002055"]}]},"budget_info":{"rate_per_hour":50,"budget":"12345:00","threshold":"234:00","hourly_budget":"40:00","hourly_budget_threshold":"35:00","revenue_budget":5000,"cost_rate_per_hour":30},"color":"#74cb80","<field_name>":"In Progress","remove_dependency_lag":false}'
response = http.request(request)
puts response.read_body
<?php
$url = "https://projects.zoho.com/api/v3/portal/[PORTAL_ID]/projects/23806000097545166/tasks/[TASK_ID]";
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => $url,
CURLOPT_RETURNTRANSFER => true,
CURLOPT_CUSTOMREQUEST => "PATCH",
CURLOPT_POSTFIELDS => '{"tasklist":{"id":"4000000062001"},"parental_info":{"parent_task_id":"4000000005670"},"name":"Set Up CI/CD Pipeline for Staging Environment","description":false,"status":{"id":"4000000062001"},"priority":"high","start_date":"2024-12-16T09:00:00.000Z","end_date":"2024-12-19T18:00:00.000Z","duration":{"value":"5","type":"days"},"completion_percentage":0,"billing_type":false,"attachments":false,"thirdparty_id":["9if2g8aa1c0f0e1234567890abcdef123456"],"owners_and_work":{"owners":[{"add":[{"zpuid":["4000000002055"],"zuid":"16469208","email":"richard.santos@zylker.com","work_values":"08:00"}],"remove":[{"zpuid":["4000000002055"],"zuid":"16469208","email":"richard.santos@zylker.com"}],"zpuid":["4000000002055"],"zuid":"16469208","email":"richard.santos@zylker.com","work_values":"08:00"}],"work_type":"standard","unit":"hours_per_day","copy_task_duration":"true","refresh_business_hours":"false"},"tags":[{"add":[{"id":"4000000062001"}],"remove":[{"id":"4000000062001"}],"id":"4000000062001"}],"teams":[{"add":[{"id":"4000000062001"}],"remove":[{"id":"4000000062001"}],"id":"4000000062001"}],"recurrence":{"frequency":"daily","interval":1,"end_after_occurrences":"10","set_to_previous_businessday":"false","next_recurrence_after_close":"true","trigger_type":"first_to_occur","date_based":{"name":"Set Up CI/CD Pipeline for Staging Environment","schedule_datetime":"2024-12-16T09:00:00.000Z","repetative_type":"daily","time_span":1,"days_of_week":["1"],"months_of_year":["1"],"repeat_on_type":0,"repeat_on_value":"1","ends_after_type":"none","ends_after_value":"20","skip_type":"skip","mail_to_user":{"zpuid":["4000000002055"]},"duration_type":"days","no_of_duration":"2","field_name":"status","time":"22:00"},"scheduler_based":{"name":"Set Up CI/CD Pipeline for Staging Environment","schedule_datetime":"2024-12-16T09:00:00.000Z","repetative_type":"daily","time_span":1,"days_of_week":["1"],"months_of_year":["1"],"repeat_on_type":0,"repeat_on_value":"1","ends_after_type":"none","ends_after_value":"20","skip_type":"skip","mail_to_user":{"zpuid":["4000000002055"]},"duration_type":"days","no_of_duration":"2","field_name":"status","time":"22:00"},"retain_comments":"false","retain_subtasks":"false","retain_config":{"comments":false,"billing_type":false,"followers":false,"description":false,"subtasks":false,"tags":false,"attachments":false,"teams":false}},"reminder":{"reminder_criteria":"on","field_type":"start_date","custom_date":"2023-12-20","no_of_duration":"2","time":"22:00","duration_type":"days","emailtemplate_id":"4000000008003","reminder_notify_users":[{"type":"days","values":["4000000002055"]}]},"budget_info":{"rate_per_hour":50,"budget":"12345:00","threshold":"234:00","hourly_budget":"40:00","hourly_budget_threshold":"35:00","revenue_budget":5000,"cost_rate_per_hour":30},"color":"#74cb80","<field_name>":"In Progress","remove_dependency_lag":false}',
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/tasks/[TASK_ID]"
headers = {
"Authorization": "Bearer 1000.03xxxxxxxxxxxxxxxxxa5317.dxxxxxxxxxxxxxxxxxfa",
"Content-Type": "application/json",
}
payload = '{"tasklist":{"id":"4000000062001"},"parental_info":{"parent_task_id":"4000000005670"},"name":"Set Up CI/CD Pipeline for Staging Environment","description":false,"status":{"id":"4000000062001"},"priority":"high","start_date":"2024-12-16T09:00:00.000Z","end_date":"2024-12-19T18:00:00.000Z","duration":{"value":"5","type":"days"},"completion_percentage":0,"billing_type":false,"attachments":false,"thirdparty_id":["9if2g8aa1c0f0e1234567890abcdef123456"],"owners_and_work":{"owners":[{"add":[{"zpuid":["4000000002055"],"zuid":"16469208","email":"richard.santos@zylker.com","work_values":"08:00"}],"remove":[{"zpuid":["4000000002055"],"zuid":"16469208","email":"richard.santos@zylker.com"}],"zpuid":["4000000002055"],"zuid":"16469208","email":"richard.santos@zylker.com","work_values":"08:00"}],"work_type":"standard","unit":"hours_per_day","copy_task_duration":"true","refresh_business_hours":"false"},"tags":[{"add":[{"id":"4000000062001"}],"remove":[{"id":"4000000062001"}],"id":"4000000062001"}],"teams":[{"add":[{"id":"4000000062001"}],"remove":[{"id":"4000000062001"}],"id":"4000000062001"}],"recurrence":{"frequency":"daily","interval":1,"end_after_occurrences":"10","set_to_previous_businessday":"false","next_recurrence_after_close":"true","trigger_type":"first_to_occur","date_based":{"name":"Set Up CI/CD Pipeline for Staging Environment","schedule_datetime":"2024-12-16T09:00:00.000Z","repetative_type":"daily","time_span":1,"days_of_week":["1"],"months_of_year":["1"],"repeat_on_type":0,"repeat_on_value":"1","ends_after_type":"none","ends_after_value":"20","skip_type":"skip","mail_to_user":{"zpuid":["4000000002055"]},"duration_type":"days","no_of_duration":"2","field_name":"status","time":"22:00"},"scheduler_based":{"name":"Set Up CI/CD Pipeline for Staging Environment","schedule_datetime":"2024-12-16T09:00:00.000Z","repetative_type":"daily","time_span":1,"days_of_week":["1"],"months_of_year":["1"],"repeat_on_type":0,"repeat_on_value":"1","ends_after_type":"none","ends_after_value":"20","skip_type":"skip","mail_to_user":{"zpuid":["4000000002055"]},"duration_type":"days","no_of_duration":"2","field_name":"status","time":"22:00"},"retain_comments":"false","retain_subtasks":"false","retain_config":{"comments":false,"billing_type":false,"followers":false,"description":false,"subtasks":false,"tags":false,"attachments":false,"teams":false}},"reminder":{"reminder_criteria":"on","field_type":"start_date","custom_date":"2023-12-20","no_of_duration":"2","time":"22:00","duration_type":"days","emailtemplate_id":"4000000008003","reminder_notify_users":[{"type":"days","values":["4000000002055"]}]},"budget_info":{"rate_per_hour":50,"budget":"12345:00","threshold":"234:00","hourly_budget":"40:00","hourly_budget_threshold":"35:00","revenue_budget":5000,"cost_rate_per_hour":30},"color":"#74cb80","<field_name>":"In Progress","remove_dependency_lag":false}'
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/tasks/[TASK_ID]");
curl_easy_setopt(curl, CURLOPT_HTTPHEADER, headers);
curl_easy_setopt(curl, CURLOPT_CUSTOMREQUEST, "PATCH");
curl_easy_setopt(curl, CURLOPT_POSTFIELDS, "{\"tasklist\":{\"id\":\"4000000062001\"},\"parental_info\":{\"parent_task_id\":\"4000000005670\"},\"name\":\"Set Up CI/CD Pipeline for Staging Environment\",\"description\":false,\"status\":{\"id\":\"4000000062001\"},\"priority\":\"high\",\"start_date\":\"2024-12-16T09:00:00.000Z\",\"end_date\":\"2024-12-19T18:00:00.000Z\",\"duration\":{\"value\":\"5\",\"type\":\"days\"},\"completion_percentage\":0,\"billing_type\":false,\"attachments\":false,\"thirdparty_id\":[\"9if2g8aa1c0f0e1234567890abcdef123456\"],\"owners_and_work\":{\"owners\":[{\"add\":[{\"zpuid\":[\"4000000002055\"],\"zuid\":\"16469208\",\"email\":\"richard.santos@zylker.com\",\"work_values\":\"08:00\"}],\"remove\":[{\"zpuid\":[\"4000000002055\"],\"zuid\":\"16469208\",\"email\":\"richard.santos@zylker.com\"}],\"zpuid\":[\"4000000002055\"],\"zuid\":\"16469208\",\"email\":\"richard.santos@zylker.com\",\"work_values\":\"08:00\"}],\"work_type\":\"standard\",\"unit\":\"hours_per_day\",\"copy_task_duration\":\"true\",\"refresh_business_hours\":\"false\"},\"tags\":[{\"add\":[{\"id\":\"4000000062001\"}],\"remove\":[{\"id\":\"4000000062001\"}],\"id\":\"4000000062001\"}],\"teams\":[{\"add\":[{\"id\":\"4000000062001\"}],\"remove\":[{\"id\":\"4000000062001\"}],\"id\":\"4000000062001\"}],\"recurrence\":{\"frequency\":\"daily\",\"interval\":1,\"end_after_occurrences\":\"10\",\"set_to_previous_businessday\":\"false\",\"next_recurrence_after_close\":\"true\",\"trigger_type\":\"first_to_occur\",\"date_based\":{\"name\":\"Set Up CI/CD Pipeline for Staging Environment\",\"schedule_datetime\":\"2024-12-16T09:00:00.000Z\",\"repetative_type\":\"daily\",\"time_span\":1,\"days_of_week\":[\"1\"],\"months_of_year\":[\"1\"],\"repeat_on_type\":0,\"repeat_on_value\":\"1\",\"ends_after_type\":\"none\",\"ends_after_value\":\"20\",\"skip_type\":\"skip\",\"mail_to_user\":{\"zpuid\":[\"4000000002055\"]},\"duration_type\":\"days\",\"no_of_duration\":\"2\",\"field_name\":\"status\",\"time\":\"22:00\"},\"scheduler_based\":{\"name\":\"Set Up CI/CD Pipeline for Staging Environment\",\"schedule_datetime\":\"2024-12-16T09:00:00.000Z\",\"repetative_type\":\"daily\",\"time_span\":1,\"days_of_week\":[\"1\"],\"months_of_year\":[\"1\"],\"repeat_on_type\":0,\"repeat_on_value\":\"1\",\"ends_after_type\":\"none\",\"ends_after_value\":\"20\",\"skip_type\":\"skip\",\"mail_to_user\":{\"zpuid\":[\"4000000002055\"]},\"duration_type\":\"days\",\"no_of_duration\":\"2\",\"field_name\":\"status\",\"time\":\"22:00\"},\"retain_comments\":\"false\",\"retain_subtasks\":\"false\",\"retain_config\":{\"comments\":false,\"billing_type\":false,\"followers\":false,\"description\":false,\"subtasks\":false,\"tags\":false,\"attachments\":false,\"teams\":false}},\"reminder\":{\"reminder_criteria\":\"on\",\"field_type\":\"start_date\",\"custom_date\":\"2023-12-20\",\"no_of_duration\":\"2\",\"time\":\"22:00\",\"duration_type\":\"days\",\"emailtemplate_id\":\"4000000008003\",\"reminder_notify_users\":[{\"type\":\"days\",\"values\":[\"4000000002055\"]}]},\"budget_info\":{\"rate_per_hour\":50,\"budget\":\"12345:00\",\"threshold\":\"234:00\",\"hourly_budget\":\"40:00\",\"hourly_budget_threshold\":\"35:00\",\"revenue_budget\":5000,\"cost_rate_per_hour\":30},\"color\":\"#74cb80\",\"<field_name>\":\"In Progress\",\"remove_dependency_lag\":false}");
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/tasks/[TASK_ID]");
request.Content = new StringContent(
@"{""tasklist"":{""id"":""4000000062001""},""parental_info"":{""parent_task_id"":""4000000005670""},""name"":""Set Up CI/CD Pipeline for Staging Environment"",""description"":false,""status"":{""id"":""4000000062001""},""priority"":""high"",""start_date"":""2024-12-16T09:00:00.000Z"",""end_date"":""2024-12-19T18:00:00.000Z"",""duration"":{""value"":""5"",""type"":""days""},""completion_percentage"":0,""billing_type"":false,""attachments"":false,""thirdparty_id"":[""9if2g8aa1c0f0e1234567890abcdef123456""],""owners_and_work"":{""owners"":[{""add"":[{""zpuid"":[""4000000002055""],""zuid"":""16469208"",""email"":""richard.santos@zylker.com"",""work_values"":""08:00""}],""remove"":[{""zpuid"":[""4000000002055""],""zuid"":""16469208"",""email"":""richard.santos@zylker.com""}],""zpuid"":[""4000000002055""],""zuid"":""16469208"",""email"":""richard.santos@zylker.com"",""work_values"":""08:00""}],""work_type"":""standard"",""unit"":""hours_per_day"",""copy_task_duration"":""true"",""refresh_business_hours"":""false""},""tags"":[{""add"":[{""id"":""4000000062001""}],""remove"":[{""id"":""4000000062001""}],""id"":""4000000062001""}],""teams"":[{""add"":[{""id"":""4000000062001""}],""remove"":[{""id"":""4000000062001""}],""id"":""4000000062001""}],""recurrence"":{""frequency"":""daily"",""interval"":1,""end_after_occurrences"":""10"",""set_to_previous_businessday"":""false"",""next_recurrence_after_close"":""true"",""trigger_type"":""first_to_occur"",""date_based"":{""name"":""Set Up CI/CD Pipeline for Staging Environment"",""schedule_datetime"":""2024-12-16T09:00:00.000Z"",""repetative_type"":""daily"",""time_span"":1,""days_of_week"":[""1""],""months_of_year"":[""1""],""repeat_on_type"":0,""repeat_on_value"":""1"",""ends_after_type"":""none"",""ends_after_value"":""20"",""skip_type"":""skip"",""mail_to_user"":{""zpuid"":[""4000000002055""]},""duration_type"":""days"",""no_of_duration"":""2"",""field_name"":""status"",""time"":""22:00""},""scheduler_based"":{""name"":""Set Up CI/CD Pipeline for Staging Environment"",""schedule_datetime"":""2024-12-16T09:00:00.000Z"",""repetative_type"":""daily"",""time_span"":1,""days_of_week"":[""1""],""months_of_year"":[""1""],""repeat_on_type"":0,""repeat_on_value"":""1"",""ends_after_type"":""none"",""ends_after_value"":""20"",""skip_type"":""skip"",""mail_to_user"":{""zpuid"":[""4000000002055""]},""duration_type"":""days"",""no_of_duration"":""2"",""field_name"":""status"",""time"":""22:00""},""retain_comments"":""false"",""retain_subtasks"":""false"",""retain_config"":{""comments"":false,""billing_type"":false,""followers"":false,""description"":false,""subtasks"":false,""tags"":false,""attachments"":false,""teams"":false}},""reminder"":{""reminder_criteria"":""on"",""field_type"":""start_date"",""custom_date"":""2023-12-20"",""no_of_duration"":""2"",""time"":""22:00"",""duration_type"":""days"",""emailtemplate_id"":""4000000008003"",""reminder_notify_users"":[{""type"":""days"",""values"":[""4000000002055""]}]},""budget_info"":{""rate_per_hour"":50,""budget"":""12345:00"",""threshold"":""234:00"",""hourly_budget"":""40:00"",""hourly_budget_threshold"":""35:00"",""revenue_budget"":5000,""cost_rate_per_hour"":30},""color"":""#74cb80"",""<field_name>"":""In Progress"",""remove_dependency_lag"":false}",
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/tasks/[TASK_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, "{\"tasklist\":{\"id\":\"4000000062001\"},\"parental_info\":{\"parent_task_id\":\"4000000005670\"},\"name\":\"Set Up CI/CD Pipeline for Staging Environment\",\"description\":false,\"status\":{\"id\":\"4000000062001\"},\"priority\":\"high\",\"start_date\":\"2024-12-16T09:00:00.000Z\",\"end_date\":\"2024-12-19T18:00:00.000Z\",\"duration\":{\"value\":\"5\",\"type\":\"days\"},\"completion_percentage\":0,\"billing_type\":false,\"attachments\":false,\"thirdparty_id\":[\"9if2g8aa1c0f0e1234567890abcdef123456\"],\"owners_and_work\":{\"owners\":[{\"add\":[{\"zpuid\":[\"4000000002055\"],\"zuid\":\"16469208\",\"email\":\"richard.santos@zylker.com\",\"work_values\":\"08:00\"}],\"remove\":[{\"zpuid\":[\"4000000002055\"],\"zuid\":\"16469208\",\"email\":\"richard.santos@zylker.com\"}],\"zpuid\":[\"4000000002055\"],\"zuid\":\"16469208\",\"email\":\"richard.santos@zylker.com\",\"work_values\":\"08:00\"}],\"work_type\":\"standard\",\"unit\":\"hours_per_day\",\"copy_task_duration\":\"true\",\"refresh_business_hours\":\"false\"},\"tags\":[{\"add\":[{\"id\":\"4000000062001\"}],\"remove\":[{\"id\":\"4000000062001\"}],\"id\":\"4000000062001\"}],\"teams\":[{\"add\":[{\"id\":\"4000000062001\"}],\"remove\":[{\"id\":\"4000000062001\"}],\"id\":\"4000000062001\"}],\"recurrence\":{\"frequency\":\"daily\",\"interval\":1,\"end_after_occurrences\":\"10\",\"set_to_previous_businessday\":\"false\",\"next_recurrence_after_close\":\"true\",\"trigger_type\":\"first_to_occur\",\"date_based\":{\"name\":\"Set Up CI/CD Pipeline for Staging Environment\",\"schedule_datetime\":\"2024-12-16T09:00:00.000Z\",\"repetative_type\":\"daily\",\"time_span\":1,\"days_of_week\":[\"1\"],\"months_of_year\":[\"1\"],\"repeat_on_type\":0,\"repeat_on_value\":\"1\",\"ends_after_type\":\"none\",\"ends_after_value\":\"20\",\"skip_type\":\"skip\",\"mail_to_user\":{\"zpuid\":[\"4000000002055\"]},\"duration_type\":\"days\",\"no_of_duration\":\"2\",\"field_name\":\"status\",\"time\":\"22:00\"},\"scheduler_based\":{\"name\":\"Set Up CI/CD Pipeline for Staging Environment\",\"schedule_datetime\":\"2024-12-16T09:00:00.000Z\",\"repetative_type\":\"daily\",\"time_span\":1,\"days_of_week\":[\"1\"],\"months_of_year\":[\"1\"],\"repeat_on_type\":0,\"repeat_on_value\":\"1\",\"ends_after_type\":\"none\",\"ends_after_value\":\"20\",\"skip_type\":\"skip\",\"mail_to_user\":{\"zpuid\":[\"4000000002055\"]},\"duration_type\":\"days\",\"no_of_duration\":\"2\",\"field_name\":\"status\",\"time\":\"22:00\"},\"retain_comments\":\"false\",\"retain_subtasks\":\"false\",\"retain_config\":{\"comments\":false,\"billing_type\":false,\"followers\":false,\"description\":false,\"subtasks\":false,\"tags\":false,\"attachments\":false,\"teams\":false}},\"reminder\":{\"reminder_criteria\":\"on\",\"field_type\":\"start_date\",\"custom_date\":\"2023-12-20\",\"no_of_duration\":\"2\",\"time\":\"22:00\",\"duration_type\":\"days\",\"emailtemplate_id\":\"4000000008003\",\"reminder_notify_users\":[{\"type\":\"days\",\"values\":[\"4000000002055\"]}]},\"budget_info\":{\"rate_per_hour\":50,\"budget\":\"12345:00\",\"threshold\":\"234:00\",\"hourly_budget\":\"40:00\",\"hourly_budget_threshold\":\"35:00\",\"revenue_budget\":5000,\"cost_rate_per_hour\":30},\"color\":\"#74cb80\",\"<field_name>\":\"In Progress\",\"remove_dependency_lag\":false}");
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/tasks/[TASK_ID]"
{:headers {"Authorization" "Bearer 1000.03xxxxxxxxxxxxxxxxxa5317.dxxxxxxxxxxxxxxxxxfa"
"Content-Type" "application/json"}
:body "{\"tasklist\":{\"id\":\"4000000062001\"},\"parental_info\":{\"parent_task_id\":\"4000000005670\"},\"name\":\"Set Up CI/CD Pipeline for Staging Environment\",\"description\":false,\"status\":{\"id\":\"4000000062001\"},\"priority\":\"high\",\"start_date\":\"2024-12-16T09:00:00.000Z\",\"end_date\":\"2024-12-19T18:00:00.000Z\",\"duration\":{\"value\":\"5\",\"type\":\"days\"},\"completion_percentage\":0,\"billing_type\":false,\"attachments\":false,\"thirdparty_id\":[\"9if2g8aa1c0f0e1234567890abcdef123456\"],\"owners_and_work\":{\"owners\":[{\"add\":[{\"zpuid\":[\"4000000002055\"],\"zuid\":\"16469208\",\"email\":\"richard.santos@zylker.com\",\"work_values\":\"08:00\"}],\"remove\":[{\"zpuid\":[\"4000000002055\"],\"zuid\":\"16469208\",\"email\":\"richard.santos@zylker.com\"}],\"zpuid\":[\"4000000002055\"],\"zuid\":\"16469208\",\"email\":\"richard.santos@zylker.com\",\"work_values\":\"08:00\"}],\"work_type\":\"standard\",\"unit\":\"hours_per_day\",\"copy_task_duration\":\"true\",\"refresh_business_hours\":\"false\"},\"tags\":[{\"add\":[{\"id\":\"4000000062001\"}],\"remove\":[{\"id\":\"4000000062001\"}],\"id\":\"4000000062001\"}],\"teams\":[{\"add\":[{\"id\":\"4000000062001\"}],\"remove\":[{\"id\":\"4000000062001\"}],\"id\":\"4000000062001\"}],\"recurrence\":{\"frequency\":\"daily\",\"interval\":1,\"end_after_occurrences\":\"10\",\"set_to_previous_businessday\":\"false\",\"next_recurrence_after_close\":\"true\",\"trigger_type\":\"first_to_occur\",\"date_based\":{\"name\":\"Set Up CI/CD Pipeline for Staging Environment\",\"schedule_datetime\":\"2024-12-16T09:00:00.000Z\",\"repetative_type\":\"daily\",\"time_span\":1,\"days_of_week\":[\"1\"],\"months_of_year\":[\"1\"],\"repeat_on_type\":0,\"repeat_on_value\":\"1\",\"ends_after_type\":\"none\",\"ends_after_value\":\"20\",\"skip_type\":\"skip\",\"mail_to_user\":{\"zpuid\":[\"4000000002055\"]},\"duration_type\":\"days\",\"no_of_duration\":\"2\",\"field_name\":\"status\",\"time\":\"22:00\"},\"scheduler_based\":{\"name\":\"Set Up CI/CD Pipeline for Staging Environment\",\"schedule_datetime\":\"2024-12-16T09:00:00.000Z\",\"repetative_type\":\"daily\",\"time_span\":1,\"days_of_week\":[\"1\"],\"months_of_year\":[\"1\"],\"repeat_on_type\":0,\"repeat_on_value\":\"1\",\"ends_after_type\":\"none\",\"ends_after_value\":\"20\",\"skip_type\":\"skip\",\"mail_to_user\":{\"zpuid\":[\"4000000002055\"]},\"duration_type\":\"days\",\"no_of_duration\":\"2\",\"field_name\":\"status\",\"time\":\"22:00\"},\"retain_comments\":\"false\",\"retain_subtasks\":\"false\",\"retain_config\":{\"comments\":false,\"billing_type\":false,\"followers\":false,\"description\":false,\"subtasks\":false,\"tags\":false,\"attachments\":false,\"teams\":false}},\"reminder\":{\"reminder_criteria\":\"on\",\"field_type\":\"start_date\",\"custom_date\":\"2023-12-20\",\"no_of_duration\":\"2\",\"time\":\"22:00\",\"duration_type\":\"days\",\"emailtemplate_id\":\"4000000008003\",\"reminder_notify_users\":[{\"type\":\"days\",\"values\":[\"4000000002055\"]}]},\"budget_info\":{\"rate_per_hour\":50,\"budget\":\"12345:00\",\"threshold\":\"234:00\",\"hourly_budget\":\"40:00\",\"hourly_budget_threshold\":\"35:00\",\"revenue_budget\":5000,\"cost_rate_per_hour\":30},\"color\":\"#74cb80\",\"<field_name>\":\"In Progress\",\"remove_dependency_lag\":false}"
:as :json}))
(println (:body response))
package main
import (
"fmt"
"io"
"net/http"
"strings"
)
func main() {
payload := strings.NewReader("{\"tasklist\":{\"id\":\"4000000062001\"},\"parental_info\":{\"parent_task_id\":\"4000000005670\"},\"name\":\"Set Up CI/CD Pipeline for Staging Environment\",\"description\":false,\"status\":{\"id\":\"4000000062001\"},\"priority\":\"high\",\"start_date\":\"2024-12-16T09:00:00.000Z\",\"end_date\":\"2024-12-19T18:00:00.000Z\",\"duration\":{\"value\":\"5\",\"type\":\"days\"},\"completion_percentage\":0,\"billing_type\":false,\"attachments\":false,\"thirdparty_id\":[\"9if2g8aa1c0f0e1234567890abcdef123456\"],\"owners_and_work\":{\"owners\":[{\"add\":[{\"zpuid\":[\"4000000002055\"],\"zuid\":\"16469208\",\"email\":\"richard.santos@zylker.com\",\"work_values\":\"08:00\"}],\"remove\":[{\"zpuid\":[\"4000000002055\"],\"zuid\":\"16469208\",\"email\":\"richard.santos@zylker.com\"}],\"zpuid\":[\"4000000002055\"],\"zuid\":\"16469208\",\"email\":\"richard.santos@zylker.com\",\"work_values\":\"08:00\"}],\"work_type\":\"standard\",\"unit\":\"hours_per_day\",\"copy_task_duration\":\"true\",\"refresh_business_hours\":\"false\"},\"tags\":[{\"add\":[{\"id\":\"4000000062001\"}],\"remove\":[{\"id\":\"4000000062001\"}],\"id\":\"4000000062001\"}],\"teams\":[{\"add\":[{\"id\":\"4000000062001\"}],\"remove\":[{\"id\":\"4000000062001\"}],\"id\":\"4000000062001\"}],\"recurrence\":{\"frequency\":\"daily\",\"interval\":1,\"end_after_occurrences\":\"10\",\"set_to_previous_businessday\":\"false\",\"next_recurrence_after_close\":\"true\",\"trigger_type\":\"first_to_occur\",\"date_based\":{\"name\":\"Set Up CI/CD Pipeline for Staging Environment\",\"schedule_datetime\":\"2024-12-16T09:00:00.000Z\",\"repetative_type\":\"daily\",\"time_span\":1,\"days_of_week\":[\"1\"],\"months_of_year\":[\"1\"],\"repeat_on_type\":0,\"repeat_on_value\":\"1\",\"ends_after_type\":\"none\",\"ends_after_value\":\"20\",\"skip_type\":\"skip\",\"mail_to_user\":{\"zpuid\":[\"4000000002055\"]},\"duration_type\":\"days\",\"no_of_duration\":\"2\",\"field_name\":\"status\",\"time\":\"22:00\"},\"scheduler_based\":{\"name\":\"Set Up CI/CD Pipeline for Staging Environment\",\"schedule_datetime\":\"2024-12-16T09:00:00.000Z\",\"repetative_type\":\"daily\",\"time_span\":1,\"days_of_week\":[\"1\"],\"months_of_year\":[\"1\"],\"repeat_on_type\":0,\"repeat_on_value\":\"1\",\"ends_after_type\":\"none\",\"ends_after_value\":\"20\",\"skip_type\":\"skip\",\"mail_to_user\":{\"zpuid\":[\"4000000002055\"]},\"duration_type\":\"days\",\"no_of_duration\":\"2\",\"field_name\":\"status\",\"time\":\"22:00\"},\"retain_comments\":\"false\",\"retain_subtasks\":\"false\",\"retain_config\":{\"comments\":false,\"billing_type\":false,\"followers\":false,\"description\":false,\"subtasks\":false,\"tags\":false,\"attachments\":false,\"teams\":false}},\"reminder\":{\"reminder_criteria\":\"on\",\"field_type\":\"start_date\",\"custom_date\":\"2023-12-20\",\"no_of_duration\":\"2\",\"time\":\"22:00\",\"duration_type\":\"days\",\"emailtemplate_id\":\"4000000008003\",\"reminder_notify_users\":[{\"type\":\"days\",\"values\":[\"4000000002055\"]}]},\"budget_info\":{\"rate_per_hour\":50,\"budget\":\"12345:00\",\"threshold\":\"234:00\",\"hourly_budget\":\"40:00\",\"hourly_budget_threshold\":\"35:00\",\"revenue_budget\":5000,\"cost_rate_per_hour\":30},\"color\":\"#74cb80\",\"<field_name>\":\"In Progress\",\"remove_dependency_lag\":false}")
req, _ := http.NewRequest("PATCH", "https://projects.zoho.com/api/v3/portal/[PORTAL_ID]/projects/23806000097545166/tasks/[TASK_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/tasks/[TASK_ID] HTTP/1.1
Host: https://projects.zoho.com/api/v3/portal/[PORTAL_ID]/projects/23806000097545166/tasks/[TASK_ID]
Authorization: Bearer 1000.03xxxxxxxxxxxxxxxxxa5317.dxxxxxxxxxxxxxxxxxfa
Content-Type: application/json
{"tasklist":{"id":"4000000062001"},"parental_info":{"parent_task_id":"4000000005670"},"name":"Set Up CI/CD Pipeline for Staging Environment","description":false,"status":{"id":"4000000062001"},"priority":"high","start_date":"2024-12-16T09:00:00.000Z","end_date":"2024-12-19T18:00:00.000Z","duration":{"value":"5","type":"days"},"completion_percentage":0,"billing_type":false,"attachments":false,"thirdparty_id":["9if2g8aa1c0f0e1234567890abcdef123456"],"owners_and_work":{"owners":[{"add":[{"zpuid":["4000000002055"],"zuid":"16469208","email":"richard.santos@zylker.com","work_values":"08:00"}],"remove":[{"zpuid":["4000000002055"],"zuid":"16469208","email":"richard.santos@zylker.com"}],"zpuid":["4000000002055"],"zuid":"16469208","email":"richard.santos@zylker.com","work_values":"08:00"}],"work_type":"standard","unit":"hours_per_day","copy_task_duration":"true","refresh_business_hours":"false"},"tags":[{"add":[{"id":"4000000062001"}],"remove":[{"id":"4000000062001"}],"id":"4000000062001"}],"teams":[{"add":[{"id":"4000000062001"}],"remove":[{"id":"4000000062001"}],"id":"4000000062001"}],"recurrence":{"frequency":"daily","interval":1,"end_after_occurrences":"10","set_to_previous_businessday":"false","next_recurrence_after_close":"true","trigger_type":"first_to_occur","date_based":{"name":"Set Up CI/CD Pipeline for Staging Environment","schedule_datetime":"2024-12-16T09:00:00.000Z","repetative_type":"daily","time_span":1,"days_of_week":["1"],"months_of_year":["1"],"repeat_on_type":0,"repeat_on_value":"1","ends_after_type":"none","ends_after_value":"20","skip_type":"skip","mail_to_user":{"zpuid":["4000000002055"]},"duration_type":"days","no_of_duration":"2","field_name":"status","time":"22:00"},"scheduler_based":{"name":"Set Up CI/CD Pipeline for Staging Environment","schedule_datetime":"2024-12-16T09:00:00.000Z","repetative_type":"daily","time_span":1,"days_of_week":["1"],"months_of_year":["1"],"repeat_on_type":0,"repeat_on_value":"1","ends_after_type":"none","ends_after_value":"20","skip_type":"skip","mail_to_user":{"zpuid":["4000000002055"]},"duration_type":"days","no_of_duration":"2","field_name":"status","time":"22:00"},"retain_comments":"false","retain_subtasks":"false","retain_config":{"comments":false,"billing_type":false,"followers":false,"description":false,"subtasks":false,"tags":false,"attachments":false,"teams":false}},"reminder":{"reminder_criteria":"on","field_type":"start_date","custom_date":"2023-12-20","no_of_duration":"2","time":"22:00","duration_type":"days","emailtemplate_id":"4000000008003","reminder_notify_users":[{"type":"days","values":["4000000002055"]}]},"budget_info":{"rate_per_hour":50,"budget":"12345:00","threshold":"234:00","hourly_budget":"40:00","hourly_budget_threshold":"35:00","revenue_budget":5000,"cost_rate_per_hour":30},"color":"#74cb80","<field_name>":"In Progress","remove_dependency_lag":false}
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/tasks/[TASK_ID]");
HttpUriRequest requestObj = new HttpPatch(uriBuilder.build());
requestObj.addHeader("Authorization", "Bearer 1000.03xxxxxxxxxxxxxxxxxa5317.dxxxxxxxxxxxxxxxxxfa");
HttpEntityEnclosingRequestBase requestBase = (HttpEntityEnclosingRequestBase) requestObj;
String requestBody = "{\"tasklist\":{\"id\":\"4000000062001\"},\"parental_info\":{\"parent_task_id\":\"4000000005670\"},\"name\":\"Set Up CI\/CD Pipeline for Staging Environment\",\"description\":false,\"status\":{\"id\":\"4000000062001\"},\"priority\":\"high\",\"start_date\":\"2024-12-16T09:00:00.000Z\",\"end_date\":\"2024-12-19T18:00:00.000Z\",\"duration\":{\"value\":\"5\",\"type\":\"days\"},\"completion_percentage\":0,\"billing_type\":false,\"attachments\":false,\"thirdparty_id\":[\"9if2g8aa1c0f0e1234567890abcdef123456\"],\"owners_and_work\":{\"owners\":[{\"add\":[{\"zpuid\":[\"4000000002055\"],\"zuid\":\"16469208\",\"email\":\"richard.santos@zylker.com\",\"work_values\":\"08:00\"}],\"remove\":[{\"zpuid\":[\"4000000002055\"],\"zuid\":\"16469208\",\"email\":\"richard.santos@zylker.com\"}],\"zpuid\":[\"4000000002055\"],\"zuid\":\"16469208\",\"email\":\"richard.santos@zylker.com\",\"work_values\":\"08:00\"}],\"work_type\":\"standard\",\"unit\":\"hours_per_day\",\"copy_task_duration\":\"true\",\"refresh_business_hours\":\"false\"},\"tags\":[{\"add\":[{\"id\":\"4000000062001\"}],\"remove\":[{\"id\":\"4000000062001\"}],\"id\":\"4000000062001\"}],\"teams\":[{\"add\":[{\"id\":\"4000000062001\"}],\"remove\":[{\"id\":\"4000000062001\"}],\"id\":\"4000000062001\"}],\"recurrence\":{\"frequency\":\"daily\",\"interval\":1,\"end_after_occurrences\":\"10\",\"set_to_previous_businessday\":\"false\",\"next_recurrence_after_close\":\"true\",\"trigger_type\":\"first_to_occur\",\"date_based\":{\"name\":\"Set Up CI\/CD Pipeline for Staging Environment\",\"schedule_datetime\":\"2024-12-16T09:00:00.000Z\",\"repetative_type\":\"daily\",\"time_span\":1,\"days_of_week\":[\"1\"],\"months_of_year\":[\"1\"],\"repeat_on_type\":0,\"repeat_on_value\":\"1\",\"ends_after_type\":\"none\",\"ends_after_value\":\"20\",\"skip_type\":\"skip\",\"mail_to_user\":{\"zpuid\":[\"4000000002055\"]},\"duration_type\":\"days\",\"no_of_duration\":\"2\",\"field_name\":\"status\",\"time\":\"22:00\"},\"scheduler_based\":{\"name\":\"Set Up CI\/CD Pipeline for Staging Environment\",\"schedule_datetime\":\"2024-12-16T09:00:00.000Z\",\"repetative_type\":\"daily\",\"time_span\":1,\"days_of_week\":[\"1\"],\"months_of_year\":[\"1\"],\"repeat_on_type\":0,\"repeat_on_value\":\"1\",\"ends_after_type\":\"none\",\"ends_after_value\":\"20\",\"skip_type\":\"skip\",\"mail_to_user\":{\"zpuid\":[\"4000000002055\"]},\"duration_type\":\"days\",\"no_of_duration\":\"2\",\"field_name\":\"status\",\"time\":\"22:00\"},\"retain_comments\":\"false\",\"retain_subtasks\":\"false\",\"retain_config\":{\"comments\":false,\"billing_type\":false,\"followers\":false,\"description\":false,\"subtasks\":false,\"tags\":false,\"attachments\":false,\"teams\":false}},\"reminder\":{\"reminder_criteria\":\"on\",\"field_type\":\"start_date\",\"custom_date\":\"2023-12-20\",\"no_of_duration\":\"2\",\"time\":\"22:00\",\"duration_type\":\"days\",\"emailtemplate_id\":\"4000000008003\",\"reminder_notify_users\":[{\"type\":\"days\",\"values\":[\"4000000002055\"]}]},\"budget_info\":{\"rate_per_hour\":50,\"budget\":\"12345:00\",\"threshold\":\"234:00\",\"hourly_budget\":\"40:00\",\"hourly_budget_threshold\":\"35:00\",\"revenue_budget\":5000,\"cost_rate_per_hour\":30},\"color\":\"#74cb80\",\"<field_name>\":\"In Progress\",\"remove_dependency_lag\":false}";
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/tasks/[TASK_ID]';
const options = {
method: 'PATCH',
headers: {
'Authorization': 'Bearer 1000.03xxxxxxxxxxxxxxxxxa5317.dxxxxxxxxxxxxxxxxxfa',
'Content-Type': 'application/json'
},
body: JSON.stringify({"tasklist":{"id":"4000000062001"},"parental_info":{"parent_task_id":"4000000005670"},"name":"Set Up CI/CD Pipeline for Staging Environment","description":false,"status":{"id":"4000000062001"},"priority":"high","start_date":"2024-12-16T09:00:00.000Z","end_date":"2024-12-19T18:00:00.000Z","duration":{"value":"5","type":"days"},"completion_percentage":0,"billing_type":false,"attachments":false,"thirdparty_id":["9if2g8aa1c0f0e1234567890abcdef123456"],"owners_and_work":{"owners":[{"add":[{"zpuid":["4000000002055"],"zuid":"16469208","email":"richard.santos@zylker.com","work_values":"08:00"}],"remove":[{"zpuid":["4000000002055"],"zuid":"16469208","email":"richard.santos@zylker.com"}],"zpuid":["4000000002055"],"zuid":"16469208","email":"richard.santos@zylker.com","work_values":"08:00"}],"work_type":"standard","unit":"hours_per_day","copy_task_duration":"true","refresh_business_hours":"false"},"tags":[{"add":[{"id":"4000000062001"}],"remove":[{"id":"4000000062001"}],"id":"4000000062001"}],"teams":[{"add":[{"id":"4000000062001"}],"remove":[{"id":"4000000062001"}],"id":"4000000062001"}],"recurrence":{"frequency":"daily","interval":1,"end_after_occurrences":"10","set_to_previous_businessday":"false","next_recurrence_after_close":"true","trigger_type":"first_to_occur","date_based":{"name":"Set Up CI/CD Pipeline for Staging Environment","schedule_datetime":"2024-12-16T09:00:00.000Z","repetative_type":"daily","time_span":1,"days_of_week":["1"],"months_of_year":["1"],"repeat_on_type":0,"repeat_on_value":"1","ends_after_type":"none","ends_after_value":"20","skip_type":"skip","mail_to_user":{"zpuid":["4000000002055"]},"duration_type":"days","no_of_duration":"2","field_name":"status","time":"22:00"},"scheduler_based":{"name":"Set Up CI/CD Pipeline for Staging Environment","schedule_datetime":"2024-12-16T09:00:00.000Z","repetative_type":"daily","time_span":1,"days_of_week":["1"],"months_of_year":["1"],"repeat_on_type":0,"repeat_on_value":"1","ends_after_type":"none","ends_after_value":"20","skip_type":"skip","mail_to_user":{"zpuid":["4000000002055"]},"duration_type":"days","no_of_duration":"2","field_name":"status","time":"22:00"},"retain_comments":"false","retain_subtasks":"false","retain_config":{"comments":false,"billing_type":false,"followers":false,"description":false,"subtasks":false,"tags":false,"attachments":false,"teams":false}},"reminder":{"reminder_criteria":"on","field_type":"start_date","custom_date":"2023-12-20","no_of_duration":"2","time":"22:00","duration_type":"days","emailtemplate_id":"4000000008003","reminder_notify_users":[{"type":"days","values":["4000000002055"]}]},"budget_info":{"rate_per_hour":50,"budget":"12345:00","threshold":"234:00","hourly_budget":"40:00","hourly_budget_threshold":"35:00","revenue_budget":5000,"cost_rate_per_hour":30},"color":"#74cb80","<field_name>":"In Progress","remove_dependency_lag":false})
};
fetch(url, options)
.then(response => response.json())
.then(data => console.log(data))
.catch(error => console.error(error));
{"tasklist":{"id":"4000000062001"},"parental_info":{"parent_task_id":"4000000005670"},"name":"Set Up CI/CD Pipeline for Staging Environment","description":false,"status":{"id":"4000000062001"},"priority":"high","start_date":"2024-12-16T09:00:00.000Z","end_date":"2024-12-19T18:00:00.000Z","duration":{"value":"5","type":"days"},"completion_percentage":0,"billing_type":false,"attachments":false,"thirdparty_id":["9if2g8aa1c0f0e1234567890abcdef123456"],"owners_and_work":{"owners":[{"add":[{"zpuid":["4000000002055"],"zuid":"16469208","email":"richard.santos@zylker.com","work_values":"08:00"}],"remove":[{"zpuid":["4000000002055"],"zuid":"16469208","email":"richard.santos@zylker.com"}],"zpuid":["4000000002055"],"zuid":"16469208","email":"richard.santos@zylker.com","work_values":"08:00"}],"work_type":"standard","unit":"hours_per_day","copy_task_duration":"true","refresh_business_hours":"false"},"tags":[{"add":[{"id":"4000000062001"}],"remove":[{"id":"4000000062001"}],"id":"4000000062001"}],"teams":[{"add":[{"id":"4000000062001"}],"remove":[{"id":"4000000062001"}],"id":"4000000062001"}],"recurrence":{"frequency":"daily","interval":1,"end_after_occurrences":"10","set_to_previous_businessday":"false","next_recurrence_after_close":"true","trigger_type":"first_to_occur","date_based":{"name":"Set Up CI/CD Pipeline for Staging Environment","schedule_datetime":"2024-12-16T09:00:00.000Z","repetative_type":"daily","time_span":1,"days_of_week":["1"],"months_of_year":["1"],"repeat_on_type":0,"repeat_on_value":"1","ends_after_type":"none","ends_after_value":"20","skip_type":"skip","mail_to_user":{"zpuid":["4000000002055"]},"duration_type":"days","no_of_duration":"2","field_name":"status","time":"22:00"},"scheduler_based":{"name":"Set Up CI/CD Pipeline for Staging Environment","schedule_datetime":"2024-12-16T09:00:00.000Z","repetative_type":"daily","time_span":1,"days_of_week":["1"],"months_of_year":["1"],"repeat_on_type":0,"repeat_on_value":"1","ends_after_type":"none","ends_after_value":"20","skip_type":"skip","mail_to_user":{"zpuid":["4000000002055"]},"duration_type":"days","no_of_duration":"2","field_name":"status","time":"22:00"},"retain_comments":"false","retain_subtasks":"false","retain_config":{"comments":false,"billing_type":false,"followers":false,"description":false,"subtasks":false,"tags":false,"attachments":false,"teams":false}},"reminder":{"reminder_criteria":"on","field_type":"start_date","custom_date":"2023-12-20","no_of_duration":"2","time":"22:00","duration_type":"days","emailtemplate_id":"4000000008003","reminder_notify_users":[{"type":"days","values":["4000000002055"]}]},"budget_info":{"rate_per_hour":50,"budget":"12345:00","threshold":"234:00","hourly_budget":"40:00","hourly_budget_threshold":"35:00","revenue_budget":5000,"cost_rate_per_hour":30},"color":"#74cb80","<field_name>":"In Progress","remove_dependency_lag":false}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/tasks/[TASK_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("""{"tasklist":{"id":"4000000062001"},"parental_info":{"parent_task_id":"4000000005670"},"name":"Set Up CI/CD Pipeline for Staging Environment","description":false,"status":{"id":"4000000062001"},"priority":"high","start_date":"2024-12-16T09:00:00.000Z","end_date":"2024-12-19T18:00:00.000Z","duration":{"value":"5","type":"days"},"completion_percentage":0,"billing_type":false,"attachments":false,"thirdparty_id":["9if2g8aa1c0f0e1234567890abcdef123456"],"owners_and_work":{"owners":[{"add":[{"zpuid":["4000000002055"],"zuid":"16469208","email":"richard.santos@zylker.com","work_values":"08:00"}],"remove":[{"zpuid":["4000000002055"],"zuid":"16469208","email":"richard.santos@zylker.com"}],"zpuid":["4000000002055"],"zuid":"16469208","email":"richard.santos@zylker.com","work_values":"08:00"}],"work_type":"standard","unit":"hours_per_day","copy_task_duration":"true","refresh_business_hours":"false"},"tags":[{"add":[{"id":"4000000062001"}],"remove":[{"id":"4000000062001"}],"id":"4000000062001"}],"teams":[{"add":[{"id":"4000000062001"}],"remove":[{"id":"4000000062001"}],"id":"4000000062001"}],"recurrence":{"frequency":"daily","interval":1,"end_after_occurrences":"10","set_to_previous_businessday":"false","next_recurrence_after_close":"true","trigger_type":"first_to_occur","date_based":{"name":"Set Up CI/CD Pipeline for Staging Environment","schedule_datetime":"2024-12-16T09:00:00.000Z","repetative_type":"daily","time_span":1,"days_of_week":["1"],"months_of_year":["1"],"repeat_on_type":0,"repeat_on_value":"1","ends_after_type":"none","ends_after_value":"20","skip_type":"skip","mail_to_user":{"zpuid":["4000000002055"]},"duration_type":"days","no_of_duration":"2","field_name":"status","time":"22:00"},"scheduler_based":{"name":"Set Up CI/CD Pipeline for Staging Environment","schedule_datetime":"2024-12-16T09:00:00.000Z","repetative_type":"daily","time_span":1,"days_of_week":["1"],"months_of_year":["1"],"repeat_on_type":0,"repeat_on_value":"1","ends_after_type":"none","ends_after_value":"20","skip_type":"skip","mail_to_user":{"zpuid":["4000000002055"]},"duration_type":"days","no_of_duration":"2","field_name":"status","time":"22:00"},"retain_comments":"false","retain_subtasks":"false","retain_config":{"comments":false,"billing_type":false,"followers":false,"description":false,"subtasks":false,"tags":false,"attachments":false,"teams":false}},"reminder":{"reminder_criteria":"on","field_type":"start_date","custom_date":"2023-12-20","no_of_duration":"2","time":"22:00","duration_type":"days","emailtemplate_id":"4000000008003","reminder_notify_users":[{"type":"days","values":["4000000002055"]}]},"budget_info":{"rate_per_hour":50,"budget":"12345:00","threshold":"234:00","hourly_budget":"40:00","hourly_budget_threshold":"35:00","revenue_budget":5000,"cost_rate_per_hour":30},"color":"#74cb80","<field_name>":"In Progress","remove_dependency_lag":false}""") }
val response = conn.inputStream.bufferedReader().readText()
println(response)
}
NSURL *url = [NSURL URLWithString:@"https://projects.zoho.com/api/v3/portal/[PORTAL_ID]/projects/23806000097545166/tasks/[TASK_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 = [@"{\"tasklist\":{\"id\":\"4000000062001\"},\"parental_info\":{\"parent_task_id\":\"4000000005670\"},\"name\":\"Set Up CI/CD Pipeline for Staging Environment\",\"description\":false,\"status\":{\"id\":\"4000000062001\"},\"priority\":\"high\",\"start_date\":\"2024-12-16T09:00:00.000Z\",\"end_date\":\"2024-12-19T18:00:00.000Z\",\"duration\":{\"value\":\"5\",\"type\":\"days\"},\"completion_percentage\":0,\"billing_type\":false,\"attachments\":false,\"thirdparty_id\":[\"9if2g8aa1c0f0e1234567890abcdef123456\"],\"owners_and_work\":{\"owners\":[{\"add\":[{\"zpuid\":[\"4000000002055\"],\"zuid\":\"16469208\",\"email\":\"richard.santos@zylker.com\",\"work_values\":\"08:00\"}],\"remove\":[{\"zpuid\":[\"4000000002055\"],\"zuid\":\"16469208\",\"email\":\"richard.santos@zylker.com\"}],\"zpuid\":[\"4000000002055\"],\"zuid\":\"16469208\",\"email\":\"richard.santos@zylker.com\",\"work_values\":\"08:00\"}],\"work_type\":\"standard\",\"unit\":\"hours_per_day\",\"copy_task_duration\":\"true\",\"refresh_business_hours\":\"false\"},\"tags\":[{\"add\":[{\"id\":\"4000000062001\"}],\"remove\":[{\"id\":\"4000000062001\"}],\"id\":\"4000000062001\"}],\"teams\":[{\"add\":[{\"id\":\"4000000062001\"}],\"remove\":[{\"id\":\"4000000062001\"}],\"id\":\"4000000062001\"}],\"recurrence\":{\"frequency\":\"daily\",\"interval\":1,\"end_after_occurrences\":\"10\",\"set_to_previous_businessday\":\"false\",\"next_recurrence_after_close\":\"true\",\"trigger_type\":\"first_to_occur\",\"date_based\":{\"name\":\"Set Up CI/CD Pipeline for Staging Environment\",\"schedule_datetime\":\"2024-12-16T09:00:00.000Z\",\"repetative_type\":\"daily\",\"time_span\":1,\"days_of_week\":[\"1\"],\"months_of_year\":[\"1\"],\"repeat_on_type\":0,\"repeat_on_value\":\"1\",\"ends_after_type\":\"none\",\"ends_after_value\":\"20\",\"skip_type\":\"skip\",\"mail_to_user\":{\"zpuid\":[\"4000000002055\"]},\"duration_type\":\"days\",\"no_of_duration\":\"2\",\"field_name\":\"status\",\"time\":\"22:00\"},\"scheduler_based\":{\"name\":\"Set Up CI/CD Pipeline for Staging Environment\",\"schedule_datetime\":\"2024-12-16T09:00:00.000Z\",\"repetative_type\":\"daily\",\"time_span\":1,\"days_of_week\":[\"1\"],\"months_of_year\":[\"1\"],\"repeat_on_type\":0,\"repeat_on_value\":\"1\",\"ends_after_type\":\"none\",\"ends_after_value\":\"20\",\"skip_type\":\"skip\",\"mail_to_user\":{\"zpuid\":[\"4000000002055\"]},\"duration_type\":\"days\",\"no_of_duration\":\"2\",\"field_name\":\"status\",\"time\":\"22:00\"},\"retain_comments\":\"false\",\"retain_subtasks\":\"false\",\"retain_config\":{\"comments\":false,\"billing_type\":false,\"followers\":false,\"description\":false,\"subtasks\":false,\"tags\":false,\"attachments\":false,\"teams\":false}},\"reminder\":{\"reminder_criteria\":\"on\",\"field_type\":\"start_date\",\"custom_date\":\"2023-12-20\",\"no_of_duration\":\"2\",\"time\":\"22:00\",\"duration_type\":\"days\",\"emailtemplate_id\":\"4000000008003\",\"reminder_notify_users\":[{\"type\":\"days\",\"values\":[\"4000000002055\"]}]},\"budget_info\":{\"rate_per_hour\":50,\"budget\":\"12345:00\",\"threshold\":\"234:00\",\"hourly_budget\":\"40:00\",\"hourly_budget_threshold\":\"35:00\",\"revenue_budget\":5000,\"cost_rate_per_hour\":30},\"color\":\"#74cb80\",\"<field_name>\":\"In Progress\",\"remove_dependency_lag\":false}" 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/tasks/[TASK_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|{"tasklist":{"id":"4000000062001"},"parental_info":{"parent_task_id":"4000000005670"},"name":"Set Up CI/CD Pipeline for Staging Environment","description":false,"status":{"id":"4000000062001"},"priority":"high","start_date":"2024-12-16T09:00:00.000Z","end_date":"2024-12-19T18:00:00.000Z","duration":{"value":"5","type":"days"},"completion_percentage":0,"billing_type":false,"attachments":false,"thirdparty_id":["9if2g8aa1c0f0e1234567890abcdef123456"],"owners_and_work":{"owners":[{"add":[{"zpuid":["4000000002055"],"zuid":"16469208","email":"richard.santos@zylker.com","work_values":"08:00"}],"remove":[{"zpuid":["4000000002055"],"zuid":"16469208","email":"richard.santos@zylker.com"}],"zpuid":["4000000002055"],"zuid":"16469208","email":"richard.santos@zylker.com","work_values":"08:00"}],"work_type":"standard","unit":"hours_per_day","copy_task_duration":"true","refresh_business_hours":"false"},"tags":[{"add":[{"id":"4000000062001"}],"remove":[{"id":"4000000062001"}],"id":"4000000062001"}],"teams":[{"add":[{"id":"4000000062001"}],"remove":[{"id":"4000000062001"}],"id":"4000000062001"}],"recurrence":{"frequency":"daily","interval":1,"end_after_occurrences":"10","set_to_previous_businessday":"false","next_recurrence_after_close":"true","trigger_type":"first_to_occur","date_based":{"name":"Set Up CI/CD Pipeline for Staging Environment","schedule_datetime":"2024-12-16T09:00:00.000Z","repetative_type":"daily","time_span":1,"days_of_week":["1"],"months_of_year":["1"],"repeat_on_type":0,"repeat_on_value":"1","ends_after_type":"none","ends_after_value":"20","skip_type":"skip","mail_to_user":{"zpuid":["4000000002055"]},"duration_type":"days","no_of_duration":"2","field_name":"status","time":"22:00"},"scheduler_based":{"name":"Set Up CI/CD Pipeline for Staging Environment","schedule_datetime":"2024-12-16T09:00:00.000Z","repetative_type":"daily","time_span":1,"days_of_week":["1"],"months_of_year":["1"],"repeat_on_type":0,"repeat_on_value":"1","ends_after_type":"none","ends_after_value":"20","skip_type":"skip","mail_to_user":{"zpuid":["4000000002055"]},"duration_type":"days","no_of_duration":"2","field_name":"status","time":"22:00"},"retain_comments":"false","retain_subtasks":"false","retain_config":{"comments":false,"billing_type":false,"followers":false,"description":false,"subtasks":false,"tags":false,"attachments":false,"teams":false}},"reminder":{"reminder_criteria":"on","field_type":"start_date","custom_date":"2023-12-20","no_of_duration":"2","time":"22:00","duration_type":"days","emailtemplate_id":"4000000008003","reminder_notify_users":[{"type":"days","values":["4000000002055"]}]},"budget_info":{"rate_per_hour":50,"budget":"12345:00","threshold":"234:00","hourly_budget":"40:00","hourly_budget_threshold":"35:00","revenue_budget":5000,"cost_rate_per_hour":30},"color":"#74cb80","<field_name>":"In Progress","remove_dependency_lag":false}|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 = @'
{"tasklist":{"id":"4000000062001"},"parental_info":{"parent_task_id":"4000000005670"},"name":"Set Up CI/CD Pipeline for Staging Environment","description":false,"status":{"id":"4000000062001"},"priority":"high","start_date":"2024-12-16T09:00:00.000Z","end_date":"2024-12-19T18:00:00.000Z","duration":{"value":"5","type":"days"},"completion_percentage":0,"billing_type":false,"attachments":false,"thirdparty_id":["9if2g8aa1c0f0e1234567890abcdef123456"],"owners_and_work":{"owners":[{"add":[{"zpuid":["4000000002055"],"zuid":"16469208","email":"richard.santos@zylker.com","work_values":"08:00"}],"remove":[{"zpuid":["4000000002055"],"zuid":"16469208","email":"richard.santos@zylker.com"}],"zpuid":["4000000002055"],"zuid":"16469208","email":"richard.santos@zylker.com","work_values":"08:00"}],"work_type":"standard","unit":"hours_per_day","copy_task_duration":"true","refresh_business_hours":"false"},"tags":[{"add":[{"id":"4000000062001"}],"remove":[{"id":"4000000062001"}],"id":"4000000062001"}],"teams":[{"add":[{"id":"4000000062001"}],"remove":[{"id":"4000000062001"}],"id":"4000000062001"}],"recurrence":{"frequency":"daily","interval":1,"end_after_occurrences":"10","set_to_previous_businessday":"false","next_recurrence_after_close":"true","trigger_type":"first_to_occur","date_based":{"name":"Set Up CI/CD Pipeline for Staging Environment","schedule_datetime":"2024-12-16T09:00:00.000Z","repetative_type":"daily","time_span":1,"days_of_week":["1"],"months_of_year":["1"],"repeat_on_type":0,"repeat_on_value":"1","ends_after_type":"none","ends_after_value":"20","skip_type":"skip","mail_to_user":{"zpuid":["4000000002055"]},"duration_type":"days","no_of_duration":"2","field_name":"status","time":"22:00"},"scheduler_based":{"name":"Set Up CI/CD Pipeline for Staging Environment","schedule_datetime":"2024-12-16T09:00:00.000Z","repetative_type":"daily","time_span":1,"days_of_week":["1"],"months_of_year":["1"],"repeat_on_type":0,"repeat_on_value":"1","ends_after_type":"none","ends_after_value":"20","skip_type":"skip","mail_to_user":{"zpuid":["4000000002055"]},"duration_type":"days","no_of_duration":"2","field_name":"status","time":"22:00"},"retain_comments":"false","retain_subtasks":"false","retain_config":{"comments":false,"billing_type":false,"followers":false,"description":false,"subtasks":false,"tags":false,"attachments":false,"teams":false}},"reminder":{"reminder_criteria":"on","field_type":"start_date","custom_date":"2023-12-20","no_of_duration":"2","time":"22:00","duration_type":"days","emailtemplate_id":"4000000008003","reminder_notify_users":[{"type":"days","values":["4000000002055"]}]},"budget_info":{"rate_per_hour":50,"budget":"12345:00","threshold":"234:00","hourly_budget":"40:00","hourly_budget_threshold":"35:00","revenue_budget":5000,"cost_rate_per_hour":30},"color":"#74cb80","<field_name>":"In Progress","remove_dependency_lag":false}
'@
$response = Invoke-RestMethod -Uri "https://projects.zoho.com/api/v3/portal/[PORTAL_ID]/projects/23806000097545166/tasks/[TASK_ID]" -Method PATCH -Headers $headers -Body $body
$response | ConvertTo-Json
library(httr)
url <- "https://projects.zoho.com/api/v3/portal/[PORTAL_ID]/projects/23806000097545166/tasks/[TASK_ID]"
response <- PATCH(
url,
add_headers(Authorization = "Bearer 1000.03xxxxxxxxxxxxxxxxxa5317.dxxxxxxxxxxxxxxxxxfa"),
content_type_json(),
body = "{\"tasklist\":{\"id\":\"4000000062001\"},\"parental_info\":{\"parent_task_id\":\"4000000005670\"},\"name\":\"Set Up CI/CD Pipeline for Staging Environment\",\"description\":false,\"status\":{\"id\":\"4000000062001\"},\"priority\":\"high\",\"start_date\":\"2024-12-16T09:00:00.000Z\",\"end_date\":\"2024-12-19T18:00:00.000Z\",\"duration\":{\"value\":\"5\",\"type\":\"days\"},\"completion_percentage\":0,\"billing_type\":false,\"attachments\":false,\"thirdparty_id\":[\"9if2g8aa1c0f0e1234567890abcdef123456\"],\"owners_and_work\":{\"owners\":[{\"add\":[{\"zpuid\":[\"4000000002055\"],\"zuid\":\"16469208\",\"email\":\"richard.santos@zylker.com\",\"work_values\":\"08:00\"}],\"remove\":[{\"zpuid\":[\"4000000002055\"],\"zuid\":\"16469208\",\"email\":\"richard.santos@zylker.com\"}],\"zpuid\":[\"4000000002055\"],\"zuid\":\"16469208\",\"email\":\"richard.santos@zylker.com\",\"work_values\":\"08:00\"}],\"work_type\":\"standard\",\"unit\":\"hours_per_day\",\"copy_task_duration\":\"true\",\"refresh_business_hours\":\"false\"},\"tags\":[{\"add\":[{\"id\":\"4000000062001\"}],\"remove\":[{\"id\":\"4000000062001\"}],\"id\":\"4000000062001\"}],\"teams\":[{\"add\":[{\"id\":\"4000000062001\"}],\"remove\":[{\"id\":\"4000000062001\"}],\"id\":\"4000000062001\"}],\"recurrence\":{\"frequency\":\"daily\",\"interval\":1,\"end_after_occurrences\":\"10\",\"set_to_previous_businessday\":\"false\",\"next_recurrence_after_close\":\"true\",\"trigger_type\":\"first_to_occur\",\"date_based\":{\"name\":\"Set Up CI/CD Pipeline for Staging Environment\",\"schedule_datetime\":\"2024-12-16T09:00:00.000Z\",\"repetative_type\":\"daily\",\"time_span\":1,\"days_of_week\":[\"1\"],\"months_of_year\":[\"1\"],\"repeat_on_type\":0,\"repeat_on_value\":\"1\",\"ends_after_type\":\"none\",\"ends_after_value\":\"20\",\"skip_type\":\"skip\",\"mail_to_user\":{\"zpuid\":[\"4000000002055\"]},\"duration_type\":\"days\",\"no_of_duration\":\"2\",\"field_name\":\"status\",\"time\":\"22:00\"},\"scheduler_based\":{\"name\":\"Set Up CI/CD Pipeline for Staging Environment\",\"schedule_datetime\":\"2024-12-16T09:00:00.000Z\",\"repetative_type\":\"daily\",\"time_span\":1,\"days_of_week\":[\"1\"],\"months_of_year\":[\"1\"],\"repeat_on_type\":0,\"repeat_on_value\":\"1\",\"ends_after_type\":\"none\",\"ends_after_value\":\"20\",\"skip_type\":\"skip\",\"mail_to_user\":{\"zpuid\":[\"4000000002055\"]},\"duration_type\":\"days\",\"no_of_duration\":\"2\",\"field_name\":\"status\",\"time\":\"22:00\"},\"retain_comments\":\"false\",\"retain_subtasks\":\"false\",\"retain_config\":{\"comments\":false,\"billing_type\":false,\"followers\":false,\"description\":false,\"subtasks\":false,\"tags\":false,\"attachments\":false,\"teams\":false}},\"reminder\":{\"reminder_criteria\":\"on\",\"field_type\":\"start_date\",\"custom_date\":\"2023-12-20\",\"no_of_duration\":\"2\",\"time\":\"22:00\",\"duration_type\":\"days\",\"emailtemplate_id\":\"4000000008003\",\"reminder_notify_users\":[{\"type\":\"days\",\"values\":[\"4000000002055\"]}]},\"budget_info\":{\"rate_per_hour\":50,\"budget\":\"12345:00\",\"threshold\":\"234:00\",\"hourly_budget\":\"40:00\",\"hourly_budget_threshold\":\"35:00\",\"revenue_budget\":5000,\"cost_rate_per_hour\":30},\"color\":\"#74cb80\",\"<field_name>\":\"In Progress\",\"remove_dependency_lag\":false}"
)
content(response, "text")
import Foundation
let url = URL(string: "https://projects.zoho.com/api/v3/portal/[PORTAL_ID]/projects/23806000097545166/tasks/[TASK_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 = """
{"tasklist":{"id":"4000000062001"},"parental_info":{"parent_task_id":"4000000005670"},"name":"Set Up CI/CD Pipeline for Staging Environment","description":false,"status":{"id":"4000000062001"},"priority":"high","start_date":"2024-12-16T09:00:00.000Z","end_date":"2024-12-19T18:00:00.000Z","duration":{"value":"5","type":"days"},"completion_percentage":0,"billing_type":false,"attachments":false,"thirdparty_id":["9if2g8aa1c0f0e1234567890abcdef123456"],"owners_and_work":{"owners":[{"add":[{"zpuid":["4000000002055"],"zuid":"16469208","email":"richard.santos@zylker.com","work_values":"08:00"}],"remove":[{"zpuid":["4000000002055"],"zuid":"16469208","email":"richard.santos@zylker.com"}],"zpuid":["4000000002055"],"zuid":"16469208","email":"richard.santos@zylker.com","work_values":"08:00"}],"work_type":"standard","unit":"hours_per_day","copy_task_duration":"true","refresh_business_hours":"false"},"tags":[{"add":[{"id":"4000000062001"}],"remove":[{"id":"4000000062001"}],"id":"4000000062001"}],"teams":[{"add":[{"id":"4000000062001"}],"remove":[{"id":"4000000062001"}],"id":"4000000062001"}],"recurrence":{"frequency":"daily","interval":1,"end_after_occurrences":"10","set_to_previous_businessday":"false","next_recurrence_after_close":"true","trigger_type":"first_to_occur","date_based":{"name":"Set Up CI/CD Pipeline for Staging Environment","schedule_datetime":"2024-12-16T09:00:00.000Z","repetative_type":"daily","time_span":1,"days_of_week":["1"],"months_of_year":["1"],"repeat_on_type":0,"repeat_on_value":"1","ends_after_type":"none","ends_after_value":"20","skip_type":"skip","mail_to_user":{"zpuid":["4000000002055"]},"duration_type":"days","no_of_duration":"2","field_name":"status","time":"22:00"},"scheduler_based":{"name":"Set Up CI/CD Pipeline for Staging Environment","schedule_datetime":"2024-12-16T09:00:00.000Z","repetative_type":"daily","time_span":1,"days_of_week":["1"],"months_of_year":["1"],"repeat_on_type":0,"repeat_on_value":"1","ends_after_type":"none","ends_after_value":"20","skip_type":"skip","mail_to_user":{"zpuid":["4000000002055"]},"duration_type":"days","no_of_duration":"2","field_name":"status","time":"22:00"},"retain_comments":"false","retain_subtasks":"false","retain_config":{"comments":false,"billing_type":false,"followers":false,"description":false,"subtasks":false,"tags":false,"attachments":false,"teams":false}},"reminder":{"reminder_criteria":"on","field_type":"start_date","custom_date":"2023-12-20","no_of_duration":"2","time":"22:00","duration_type":"days","emailtemplate_id":"4000000008003","reminder_notify_users":[{"type":"days","values":["4000000002055"]}]},"budget_info":{"rate_per_hour":50,"budget":"12345:00","threshold":"234:00","hourly_budget":"40:00","hourly_budget_threshold":"35:00","revenue_budget":5000,"cost_rate_per_hour":30},"color":"#74cb80","<field_name>":"In Progress","remove_dependency_lag":false}
""".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
Possible Errors
Remove a task from the project.
OAuth Scope:
ZohoProjects.tasks.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
requiredUnique, immutable identifier of the task within the specified project. You can obtain it from the Get Tasks API (the "id" field in the response).
Request Example
curl -X DELETE \
'https://projects.zoho.com/api/v3/portal/[PORTAL_ID]/projects/23806000097545166/tasks/[TASK_ID]' \
-H 'Authorization: Bearer 1000.03xxxxxxxxxxxxxxxxxa5317.dxxxxxxxxxxxxxxxxxfa'
url = "https://projects.zoho.com/api/v3/portal/[PORTAL_ID]/projects/23806000097545166/tasks/[TASK_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/tasks/[TASK_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/tasks/[TASK_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/tasks/[TASK_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/tasks/[TASK_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/tasks/[TASK_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/tasks/[TASK_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/tasks/[TASK_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/tasks/[TASK_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/tasks/[TASK_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/tasks/[TASK_ID] HTTP/1.1
Host: https://projects.zoho.com/api/v3/portal/[PORTAL_ID]/projects/23806000097545166/tasks/[TASK_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/tasks/[TASK_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/tasks/[TASK_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/tasks/[TASK_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/tasks/[TASK_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/tasks/[TASK_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/tasks/[TASK_ID]" -Method DELETE -Headers $headers
$response | ConvertTo-Json
library(httr)
url <- "https://projects.zoho.com/api/v3/portal/[PORTAL_ID]/projects/23806000097545166/tasks/[TASK_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/tasks/[TASK_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
Possible Errors
Move a task to a different task list or milestone within a project.
OAuth Scope:
ZohoProjects.tasks.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
requiredUnique, immutable identifier of the task within the specified project. You can obtain it from the Get Tasks API (the "id" field in the response).
String
Identifier of the target task list. You can obtain it from the Get Task Lists API (the "id" field in the response).
String
Identifier of the target milestone. You can obtain it from the Get Project Milestones API (the "id" field in the response).
JSONArray
Status Mapping if status not available in the moved layout
Request Example
curl -X POST \
'https://projects.zoho.com/api/v3/portal/[PORTAL_ID]/projects/23806000097545166/tasks/[TASK_ID]/move' \
-H 'Authorization: Bearer 1000.03xxxxxxxxxxxxxxxxxa5317.dxxxxxxxxxxxxxxxxxfa' \
-H 'Content-Type: application/json' \
-d '{"target_tasklist_id":"4000000217001","target_milestone_id":"4000000091005","status_mapping":[{"old_status":{"id":"4000000062001","name":"Set Up CI/CD Pipeline for Staging Environment","color":"#67a0ff","type":"open"},"new_status":{"id":"4000000062001","name":"Set Up CI/CD Pipeline for Staging Environment","color":"#67a0ff","type":"open"}}]}'
url = "https://projects.zoho.com/api/v3/portal/[PORTAL_ID]/projects/23806000097545166/tasks/[TASK_ID]/move";
params = Map();
params.put("target_tasklist_id", "4000000217001");
params.put("target_milestone_id", "4000000091005");
params.put("status_mapping", [{"old_status":{"id":"4000000062001","name":"Set Up CI/CD Pipeline for Staging Environment","color":"#67a0ff","type":"open"},"new_status":{"id":"4000000062001","name":"Set Up CI/CD Pipeline for Staging Environment","color":"#67a0ff","type":"open"}}]);
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/tasks/[TASK_ID]/move');
const payload = JSON.stringify({"target_tasklist_id":"4000000217001","target_milestone_id":"4000000091005","status_mapping":[{"old_status":{"id":"4000000062001","name":"Set Up CI/CD Pipeline for Staging Environment","color":"#67a0ff","type":"open"},"new_status":{"id":"4000000062001","name":"Set Up CI/CD Pipeline for Staging Environment","color":"#67a0ff","type":"open"}}]});
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/tasks/[TASK_ID]/move")
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 = '{"target_tasklist_id":"4000000217001","target_milestone_id":"4000000091005","status_mapping":[{"old_status":{"id":"4000000062001","name":"Set Up CI/CD Pipeline for Staging Environment","color":"#67a0ff","type":"open"},"new_status":{"id":"4000000062001","name":"Set Up CI/CD Pipeline for Staging Environment","color":"#67a0ff","type":"open"}}]}'
response = http.request(request)
puts response.read_body
<?php
$url = "https://projects.zoho.com/api/v3/portal/[PORTAL_ID]/projects/23806000097545166/tasks/[TASK_ID]/move";
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => $url,
CURLOPT_RETURNTRANSFER => true,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => '{"target_tasklist_id":"4000000217001","target_milestone_id":"4000000091005","status_mapping":[{"old_status":{"id":"4000000062001","name":"Set Up CI/CD Pipeline for Staging Environment","color":"#67a0ff","type":"open"},"new_status":{"id":"4000000062001","name":"Set Up CI/CD Pipeline for Staging Environment","color":"#67a0ff","type":"open"}}]}',
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/tasks/[TASK_ID]/move"
headers = {
"Authorization": "Bearer 1000.03xxxxxxxxxxxxxxxxxa5317.dxxxxxxxxxxxxxxxxxfa",
"Content-Type": "application/json",
}
payload = '{"target_tasklist_id":"4000000217001","target_milestone_id":"4000000091005","status_mapping":[{"old_status":{"id":"4000000062001","name":"Set Up CI/CD Pipeline for Staging Environment","color":"#67a0ff","type":"open"},"new_status":{"id":"4000000062001","name":"Set Up CI/CD Pipeline for Staging Environment","color":"#67a0ff","type":"open"}}]}'
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/tasks/[TASK_ID]/move");
curl_easy_setopt(curl, CURLOPT_HTTPHEADER, headers);
curl_easy_setopt(curl, CURLOPT_CUSTOMREQUEST, "POST");
curl_easy_setopt(curl, CURLOPT_POSTFIELDS, "{\"target_tasklist_id\":\"4000000217001\",\"target_milestone_id\":\"4000000091005\",\"status_mapping\":[{\"old_status\":{\"id\":\"4000000062001\",\"name\":\"Set Up CI/CD Pipeline for Staging Environment\",\"color\":\"#67a0ff\",\"type\":\"open\"},\"new_status\":{\"id\":\"4000000062001\",\"name\":\"Set Up CI/CD Pipeline for Staging Environment\",\"color\":\"#67a0ff\",\"type\":\"open\"}}]}");
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/tasks/[TASK_ID]/move");
request.Content = new StringContent(
@"{""target_tasklist_id"":""4000000217001"",""target_milestone_id"":""4000000091005"",""status_mapping"":[{""old_status"":{""id"":""4000000062001"",""name"":""Set Up CI/CD Pipeline for Staging Environment"",""color"":""#67a0ff"",""type"":""open""},""new_status"":{""id"":""4000000062001"",""name"":""Set Up CI/CD Pipeline for Staging Environment"",""color"":""#67a0ff"",""type"":""open""}}]}",
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/tasks/[TASK_ID]/move");
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, "{\"target_tasklist_id\":\"4000000217001\",\"target_milestone_id\":\"4000000091005\",\"status_mapping\":[{\"old_status\":{\"id\":\"4000000062001\",\"name\":\"Set Up CI/CD Pipeline for Staging Environment\",\"color\":\"#67a0ff\",\"type\":\"open\"},\"new_status\":{\"id\":\"4000000062001\",\"name\":\"Set Up CI/CD Pipeline for Staging Environment\",\"color\":\"#67a0ff\",\"type\":\"open\"}}]}");
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/tasks/[TASK_ID]/move"
{:headers {"Authorization" "Bearer 1000.03xxxxxxxxxxxxxxxxxa5317.dxxxxxxxxxxxxxxxxxfa"
"Content-Type" "application/json"}
:body "{\"target_tasklist_id\":\"4000000217001\",\"target_milestone_id\":\"4000000091005\",\"status_mapping\":[{\"old_status\":{\"id\":\"4000000062001\",\"name\":\"Set Up CI/CD Pipeline for Staging Environment\",\"color\":\"#67a0ff\",\"type\":\"open\"},\"new_status\":{\"id\":\"4000000062001\",\"name\":\"Set Up CI/CD Pipeline for Staging Environment\",\"color\":\"#67a0ff\",\"type\":\"open\"}}]}"
:as :json}))
(println (:body response))
package main
import (
"fmt"
"io"
"net/http"
"strings"
)
func main() {
payload := strings.NewReader("{\"target_tasklist_id\":\"4000000217001\",\"target_milestone_id\":\"4000000091005\",\"status_mapping\":[{\"old_status\":{\"id\":\"4000000062001\",\"name\":\"Set Up CI/CD Pipeline for Staging Environment\",\"color\":\"#67a0ff\",\"type\":\"open\"},\"new_status\":{\"id\":\"4000000062001\",\"name\":\"Set Up CI/CD Pipeline for Staging Environment\",\"color\":\"#67a0ff\",\"type\":\"open\"}}]}")
req, _ := http.NewRequest("POST", "https://projects.zoho.com/api/v3/portal/[PORTAL_ID]/projects/23806000097545166/tasks/[TASK_ID]/move", 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/tasks/[TASK_ID]/move HTTP/1.1
Host: https://projects.zoho.com/api/v3/portal/[PORTAL_ID]/projects/23806000097545166/tasks/[TASK_ID]/move
Authorization: Bearer 1000.03xxxxxxxxxxxxxxxxxa5317.dxxxxxxxxxxxxxxxxxfa
Content-Type: application/json
{"target_tasklist_id":"4000000217001","target_milestone_id":"4000000091005","status_mapping":[{"old_status":{"id":"4000000062001","name":"Set Up CI/CD Pipeline for Staging Environment","color":"#67a0ff","type":"open"},"new_status":{"id":"4000000062001","name":"Set Up CI/CD Pipeline for Staging Environment","color":"#67a0ff","type":"open"}}]}
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/tasks/[TASK_ID]/move");
HttpUriRequest requestObj = new HttpPost(uriBuilder.build());
requestObj.addHeader("Authorization", "Bearer 1000.03xxxxxxxxxxxxxxxxxa5317.dxxxxxxxxxxxxxxxxxfa");
HttpEntityEnclosingRequestBase requestBase = (HttpEntityEnclosingRequestBase) requestObj;
String requestBody = "{\"target_tasklist_id\":\"4000000217001\",\"target_milestone_id\":\"4000000091005\",\"status_mapping\":[{\"old_status\":{\"id\":\"4000000062001\",\"name\":\"Set Up CI\/CD Pipeline for Staging Environment\",\"color\":\"#67a0ff\",\"type\":\"open\"},\"new_status\":{\"id\":\"4000000062001\",\"name\":\"Set Up CI\/CD Pipeline for Staging Environment\",\"color\":\"#67a0ff\",\"type\":\"open\"}}]}";
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/tasks/[TASK_ID]/move';
const options = {
method: 'POST',
headers: {
'Authorization': 'Bearer 1000.03xxxxxxxxxxxxxxxxxa5317.dxxxxxxxxxxxxxxxxxfa',
'Content-Type': 'application/json'
},
body: JSON.stringify({"target_tasklist_id":"4000000217001","target_milestone_id":"4000000091005","status_mapping":[{"old_status":{"id":"4000000062001","name":"Set Up CI/CD Pipeline for Staging Environment","color":"#67a0ff","type":"open"},"new_status":{"id":"4000000062001","name":"Set Up CI/CD Pipeline for Staging Environment","color":"#67a0ff","type":"open"}}]})
};
fetch(url, options)
.then(response => response.json())
.then(data => console.log(data))
.catch(error => console.error(error));
{"target_tasklist_id":"4000000217001","target_milestone_id":"4000000091005","status_mapping":[{"old_status":{"id":"4000000062001","name":"Set Up CI/CD Pipeline for Staging Environment","color":"#67a0ff","type":"open"},"new_status":{"id":"4000000062001","name":"Set Up CI/CD Pipeline for Staging Environment","color":"#67a0ff","type":"open"}}]}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/tasks/[TASK_ID]/move")
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("""{"target_tasklist_id":"4000000217001","target_milestone_id":"4000000091005","status_mapping":[{"old_status":{"id":"4000000062001","name":"Set Up CI/CD Pipeline for Staging Environment","color":"#67a0ff","type":"open"},"new_status":{"id":"4000000062001","name":"Set Up CI/CD Pipeline for Staging Environment","color":"#67a0ff","type":"open"}}]}""") }
val response = conn.inputStream.bufferedReader().readText()
println(response)
}
NSURL *url = [NSURL URLWithString:@"https://projects.zoho.com/api/v3/portal/[PORTAL_ID]/projects/23806000097545166/tasks/[TASK_ID]/move"];
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 = [@"{\"target_tasklist_id\":\"4000000217001\",\"target_milestone_id\":\"4000000091005\",\"status_mapping\":[{\"old_status\":{\"id\":\"4000000062001\",\"name\":\"Set Up CI/CD Pipeline for Staging Environment\",\"color\":\"#67a0ff\",\"type\":\"open\"},\"new_status\":{\"id\":\"4000000062001\",\"name\":\"Set Up CI/CD Pipeline for Staging Environment\",\"color\":\"#67a0ff\",\"type\":\"open\"}}]}" 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/tasks/[TASK_ID]/move" 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|{"target_tasklist_id":"4000000217001","target_milestone_id":"4000000091005","status_mapping":[{"old_status":{"id":"4000000062001","name":"Set Up CI/CD Pipeline for Staging Environment","color":"#67a0ff","type":"open"},"new_status":{"id":"4000000062001","name":"Set Up CI/CD Pipeline for Staging Environment","color":"#67a0ff","type":"open"}}]}|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 = @'
{"target_tasklist_id":"4000000217001","target_milestone_id":"4000000091005","status_mapping":[{"old_status":{"id":"4000000062001","name":"Set Up CI/CD Pipeline for Staging Environment","color":"#67a0ff","type":"open"},"new_status":{"id":"4000000062001","name":"Set Up CI/CD Pipeline for Staging Environment","color":"#67a0ff","type":"open"}}]}
'@
$response = Invoke-RestMethod -Uri "https://projects.zoho.com/api/v3/portal/[PORTAL_ID]/projects/23806000097545166/tasks/[TASK_ID]/move" -Method POST -Headers $headers -Body $body
$response | ConvertTo-Json
library(httr)
url <- "https://projects.zoho.com/api/v3/portal/[PORTAL_ID]/projects/23806000097545166/tasks/[TASK_ID]/move"
response <- POST(
url,
add_headers(Authorization = "Bearer 1000.03xxxxxxxxxxxxxxxxxa5317.dxxxxxxxxxxxxxxxxxfa"),
content_type_json(),
body = "{\"target_tasklist_id\":\"4000000217001\",\"target_milestone_id\":\"4000000091005\",\"status_mapping\":[{\"old_status\":{\"id\":\"4000000062001\",\"name\":\"Set Up CI/CD Pipeline for Staging Environment\",\"color\":\"#67a0ff\",\"type\":\"open\"},\"new_status\":{\"id\":\"4000000062001\",\"name\":\"Set Up CI/CD Pipeline for Staging Environment\",\"color\":\"#67a0ff\",\"type\":\"open\"}}]}"
)
content(response, "text")
import Foundation
let url = URL(string: "https://projects.zoho.com/api/v3/portal/[PORTAL_ID]/projects/23806000097545166/tasks/[TASK_ID]/move")!
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 = """
{"target_tasklist_id":"4000000217001","target_milestone_id":"4000000091005","status_mapping":[{"old_status":{"id":"4000000062001","name":"Set Up CI/CD Pipeline for Staging Environment","color":"#67a0ff","type":"open"},"new_status":{"id":"4000000062001","name":"Set Up CI/CD Pipeline for Staging Environment","color":"#67a0ff","type":"open"}}]}
""".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
Displays the total number of tasks associated with each project.
OAuth Scope:
ZohoProjects.tasks.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
Id of the Custom View You can obtain it from the Get Task Custom Views API (the "id" field in the response).
JSONObject
Specify the filter criteria to apply to the task count.
String
Enter the criteria.
Request Example
curl -X GET \
'https://projects.zoho.com/api/v3/portal/[PORTAL_ID]/projects/23806000097545166/tasks/count?view_id=4000000026001&filter=%7B%22criteria%22%3A%5B%7B%22module%22%3A%22task%22%2C%22field_name%22%3A%22status%22%2C%22module_name%22%3A%22bug%22%2C%22criteria_condition%22%3A%22contains%22%2C%22value%22%3A%5B%22Design%22%5D%2C%22relative_columns%22%3A%5B%7B%22cfid%22%3A%224000000000242%22%2C%22field_name%22%3A%22status%22%2C%22offset%22%3A%221%22%2C%22unit%22%3A%22days%22%2C%22prior%22%3A%22before%22%2C%22is_this_today%22%3A%22-%22%7D%5D%7D%5D%2C%22pattern%22%3A%221%22%7D&criteria=-' \
-H 'Authorization: Bearer 1000.03xxxxxxxxxxxxxxxxxa5317.dxxxxxxxxxxxxxxxxxfa'
url = "https://projects.zoho.com/api/v3/portal/[PORTAL_ID]/projects/23806000097545166/tasks/count";
filter_value = {"criteria":[{"module":"task","field_name":"status","module_name":"bug","criteria_condition":"contains","value":["Design"],"relative_columns":[{"cfid":"4000000000242","field_name":"status","offset":"1","unit":"days","prior":"before","is_this_today":"-"}]}],"pattern":"1"};
params = Map();
params.put("view_id", "4000000026001");
params.put("filter", filter_value);
params.put("criteria", "-");
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/tasks/count');
url.searchParams.append('view_id', '4000000026001');
url.searchParams.append('filter', '{"criteria":[{"module":"task","field_name":"status","module_name":"bug","criteria_condition":"contains","value":["Design"],"relative_columns":[{"cfid":"4000000000242","field_name":"status","offset":"1","unit":"days","prior":"before","is_this_today":"-"}]}],"pattern":"1"}');
url.searchParams.append('criteria', '-');
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/tasks/count")
params = {
"view_id" => "4000000026001",
"filter" => "{\"criteria\":[{\"module\":\"task\",\"field_name\":\"status\",\"module_name\":\"bug\",\"criteria_condition\":\"contains\",\"value\":[\"Design\"],\"relative_columns\":[{\"cfid\":\"4000000000242\",\"field_name\":\"status\",\"offset\":\"1\",\"unit\":\"days\",\"prior\":\"before\",\"is_this_today\":\"-\"}]}],\"pattern\":\"1\"}",
"criteria" => "-"
}
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 = [
'view_id' => '4000000026001',
'filter' => '{"criteria":[{"module":"task","field_name":"status","module_name":"bug","criteria_condition":"contains","value":["Design"],"relative_columns":[{"cfid":"4000000000242","field_name":"status","offset":"1","unit":"days","prior":"before","is_this_today":"-"}]}],"pattern":"1"}',
'criteria' => '-',
];
$url = "https://projects.zoho.com/api/v3/portal/[PORTAL_ID]/projects/23806000097545166/tasks/count" . "?" . 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/tasks/count"
params = {
"view_id": "4000000026001",
"filter": "{\"criteria\":[{\"module\":\"task\",\"field_name\":\"status\",\"module_name\":\"bug\",\"criteria_condition\":\"contains\",\"value\":[\"Design\"],\"relative_columns\":[{\"cfid\":\"4000000000242\",\"field_name\":\"status\",\"offset\":\"1\",\"unit\":\"days\",\"prior\":\"before\",\"is_this_today\":\"-\"}]}],\"pattern\":\"1\"}",
"criteria": "-"
}
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_view_id = curl_easy_escape(curl, "4000000026001", 0);
char *enc_filter = curl_easy_escape(curl, "{\"criteria\":[{\"module\":\"task\",\"field_name\":\"status\",\"module_name\":\"bug\",\"criteria_condition\":\"contains\",\"value\":[\"Design\"],\"relative_columns\":[{\"cfid\":\"4000000000242\",\"field_name\":\"status\",\"offset\":\"1\",\"unit\":\"days\",\"prior\":\"before\",\"is_this_today\":\"-\"}]}],\"pattern\":\"1\"}", 0);
char *enc_criteria = curl_easy_escape(curl, "-", 0);
char url[2048];
snprintf(url, sizeof(url), "https://projects.zoho.com/api/v3/portal/[PORTAL_ID]/projects/23806000097545166/tasks/count?view_id=%s&filter=%s&criteria=%s", enc_view_id, enc_filter, enc_criteria);
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_view_id);
curl_free(enc_filter);
curl_free(enc_criteria);
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["view_id"] = "4000000026001";
query["filter"] = "{\"criteria\":[{\"module\":\"task\",\"field_name\":\"status\",\"module_name\":\"bug\",\"criteria_condition\":\"contains\",\"value\":[\"Design\"],\"relative_columns\":[{\"cfid\":\"4000000000242\",\"field_name\":\"status\",\"offset\":\"1\",\"unit\":\"days\",\"prior\":\"before\",\"is_this_today\":\"-\"}]}],\"pattern\":\"1\"}";
query["criteria"] = "-";
var uriBuilder = new UriBuilder("https://projects.zoho.com/api/v3/portal/[PORTAL_ID]/projects/23806000097545166/tasks/count") { 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_view_id = curl_easy_escape(curl, "4000000026001", 0);
char* enc_filter = curl_easy_escape(curl, "{\"criteria\":[{\"module\":\"task\",\"field_name\":\"status\",\"module_name\":\"bug\",\"criteria_condition\":\"contains\",\"value\":[\"Design\"],\"relative_columns\":[{\"cfid\":\"4000000000242\",\"field_name\":\"status\",\"offset\":\"1\",\"unit\":\"days\",\"prior\":\"before\",\"is_this_today\":\"-\"}]}],\"pattern\":\"1\"}", 0);
char* enc_criteria = curl_easy_escape(curl, "-", 0);
std::string url = "https://projects.zoho.com/api/v3/portal/[PORTAL_ID]/projects/23806000097545166/tasks/count";
url += "?view_id=" + std::string(enc_view_id);
url += "&filter=" + std::string(enc_filter);
url += "&criteria=" + std::string(enc_criteria);
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_view_id);
curl_free(enc_filter);
curl_free(enc_criteria);
curl_slist_free_all(headers);
curl_easy_cleanup(curl);
}
return 0;
}
(require '[clj-http.client :as client])
(let [enc-view_id (java.net.URLEncoder/encode "4000000026001" "UTF-8")
enc-filter (java.net.URLEncoder/encode "{\"criteria\":[{\"module\":\"task\",\"field_name\":\"status\",\"module_name\":\"bug\",\"criteria_condition\":\"contains\",\"value\":[\"Design\"],\"relative_columns\":[{\"cfid\":\"4000000000242\",\"field_name\":\"status\",\"offset\":\"1\",\"unit\":\"days\",\"prior\":\"before\",\"is_this_today\":\"-\"}]}],\"pattern\":\"1\"}" "UTF-8")
enc-criteria (java.net.URLEncoder/encode "-" "UTF-8")
url (str "https://projects.zoho.com/api/v3/portal/[PORTAL_ID]/projects/23806000097545166/tasks/count" "?view_id=" enc-view_id "&filter=" enc-filter "&criteria=" enc-criteria)]
(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/tasks/count", nil)
q := req.URL.Query()
q.Add("view_id", "4000000026001")
q.Add("filter", "{\"criteria\":[{\"module\":\"task\",\"field_name\":\"status\",\"module_name\":\"bug\",\"criteria_condition\":\"contains\",\"value\":[\"Design\"],\"relative_columns\":[{\"cfid\":\"4000000000242\",\"field_name\":\"status\",\"offset\":\"1\",\"unit\":\"days\",\"prior\":\"before\",\"is_this_today\":\"-\"}]}],\"pattern\":\"1\"}")
q.Add("criteria", "-")
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/tasks/count?view_id=4000000026001&filter=%7B%22criteria%22%3A%5B%7B%22module%22%3A%22task%22%2C%22field_name%22%3A%22status%22%2C%22module_name%22%3A%22bug%22%2C%22criteria_condition%22%3A%22contains%22%2C%22value%22%3A%5B%22Design%22%5D%2C%22relative_columns%22%3A%5B%7B%22cfid%22%3A%224000000000242%22%2C%22field_name%22%3A%22status%22%2C%22offset%22%3A%221%22%2C%22unit%22%3A%22days%22%2C%22prior%22%3A%22before%22%2C%22is_this_today%22%3A%22-%22%7D%5D%7D%5D%2C%22pattern%22%3A%221%22%7D&criteria=- HTTP/1.1
Host: https://projects.zoho.com/api/v3/portal/[PORTAL_ID]/projects/23806000097545166/tasks/count?view_id=4000000026001&filter=%7B%22criteria%22%3A%5B%7B%22module%22%3A%22task%22%2C%22field_name%22%3A%22status%22%2C%22module_name%22%3A%22bug%22%2C%22criteria_condition%22%3A%22contains%22%2C%22value%22%3A%5B%22Design%22%5D%2C%22relative_columns%22%3A%5B%7B%22cfid%22%3A%224000000000242%22%2C%22field_name%22%3A%22status%22%2C%22offset%22%3A%221%22%2C%22unit%22%3A%22days%22%2C%22prior%22%3A%22before%22%2C%22is_this_today%22%3A%22-%22%7D%5D%7D%5D%2C%22pattern%22%3A%221%22%7D&criteria=-
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/tasks/count");
uriBuilder.addParameter("view_id", "4000000026001");
uriBuilder.addParameter("filter", "{\"criteria\":[{\"module\":\"task\",\"field_name\":\"status\",\"module_name\":\"bug\",\"criteria_condition\":\"contains\",\"value\":[\"Design\"],\"relative_columns\":[{\"cfid\":\"4000000000242\",\"field_name\":\"status\",\"offset\":\"1\",\"unit\":\"days\",\"prior\":\"before\",\"is_this_today\":\"-\"}]}],\"pattern\":\"1\"}");
uriBuilder.addParameter("criteria", "-");
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/tasks/count';
const params = new URLSearchParams({
'view_id': '4000000026001',
'filter': '{"criteria":[{"module":"task","field_name":"status","module_name":"bug","criteria_condition":"contains","value":["Design"],"relative_columns":[{"cfid":"4000000000242","field_name":"status","offset":"1","unit":"days","prior":"before","is_this_today":"-"}]}],"pattern":"1"}',
'criteria': '-'
});
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));
view_id = "4000000026001"
filter = {"criteria":[{"module":"task","field_name":"status","module_name":"bug","criteria_condition":"contains","value":["Design"],"relative_columns":[{"cfid":"4000000000242","field_name":"status","offset":"1","unit":"days","prior":"before","is_this_today":"-"}]}],"pattern":"1"}
criteria = - 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/tasks/count".toHttpUrl().newBuilder()
urlBuilder.addQueryParameter("view_id", "4000000026001")
urlBuilder.addQueryParameter("filter", "{\"criteria\":[{\"module\":\"task\",\"field_name\":\"status\",\"module_name\":\"bug\",\"criteria_condition\":\"contains\",\"value\":[\"Design\"],\"relative_columns\":[{\"cfid\":\"4000000000242\",\"field_name\":\"status\",\"offset\":\"1\",\"unit\":\"days\",\"prior\":\"before\",\"is_this_today\":\"-\"}]}],\"pattern\":\"1\"}")
urlBuilder.addQueryParameter("criteria", "-")
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 *encodedView_id = [@"4000000026001" stringByAddingPercentEncodingWithAllowedCharacters:[NSCharacterSet URLQueryAllowedCharacterSet]];
NSString *encodedFilter = [@"{\"criteria\":[{\"module\":\"task\",\"field_name\":\"status\",\"module_name\":\"bug\",\"criteria_condition\":\"contains\",\"value\":[\"Design\"],\"relative_columns\":[{\"cfid\":\"4000000000242\",\"field_name\":\"status\",\"offset\":\"1\",\"unit\":\"days\",\"prior\":\"before\",\"is_this_today\":\"-\"}]}],\"pattern\":\"1\"}" stringByAddingPercentEncodingWithAllowedCharacters:[NSCharacterSet URLQueryAllowedCharacterSet]];
NSString *encodedCriteria = [@"-" stringByAddingPercentEncodingWithAllowedCharacters:[NSCharacterSet URLQueryAllowedCharacterSet]];
NSString *urlString = [NSString stringWithFormat:@"https://projects.zoho.com/api/v3/portal/[PORTAL_ID]/projects/23806000097545166/tasks/count?view_id=%@&filter=%@&criteria=%@", encodedView_id, encodedFilter, encodedCriteria];
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_view_id = Uri.pct_encode "4000000026001" in
let enc_filter = Uri.pct_encode "{\"criteria\":[{\"module\":\"task\",\"field_name\":\"status\",\"module_name\":\"bug\",\"criteria_condition\":\"contains\",\"value\":[\"Design\"],\"relative_columns\":[{\"cfid\":\"4000000000242\",\"field_name\":\"status\",\"offset\":\"1\",\"unit\":\"days\",\"prior\":\"before\",\"is_this_today\":\"-\"}]}],\"pattern\":\"1\"}" in
let enc_criteria = Uri.pct_encode "-" in
let uri = Uri.of_string ("https://projects.zoho.com/api/v3/portal/[PORTAL_ID]/projects/23806000097545166/tasks/count" ^ "?view_id=" ^ enc_view_id ^ "&filter=" ^ enc_filter ^ "&criteria=" ^ enc_criteria) 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 = @{
view_id = "4000000026001"
filter = "{`"criteria`":[{`"module`":`"task`",`"field_name`":`"status`",`"module_name`":`"bug`",`"criteria_condition`":`"contains`",`"value`":[`"Design`"],`"relative_columns`":[{`"cfid`":`"4000000000242`",`"field_name`":`"status`",`"offset`":`"1`",`"unit`":`"days`",`"prior`":`"before`",`"is_this_today`":`"-`"}]}],`"pattern`":`"1`"}"
criteria = "-"
}
$queryString = ($params.GetEnumerator() | ForEach-Object { "$($_.Key)=$([System.Uri]::EscapeDataString($_.Value))" }) -join "&"
$url = "https://projects.zoho.com/api/v3/portal/[PORTAL_ID]/projects/23806000097545166/tasks/count" + "?" + $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/tasks/count"
params <- list(
view_id = "4000000026001",
filter = "{\"criteria\":[{\"module\":\"task\",\"field_name\":\"status\",\"module_name\":\"bug\",\"criteria_condition\":\"contains\",\"value\":[\"Design\"],\"relative_columns\":[{\"cfid\":\"4000000000242\",\"field_name\":\"status\",\"offset\":\"1\",\"unit\":\"days\",\"prior\":\"before\",\"is_this_today\":\"-\"}]}],\"pattern\":\"1\"}",
criteria = "-"
)
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/tasks/count")!
components.queryItems = [
URLQueryItem(name: "view_id", value: "4000000026001"),
URLQueryItem(name: "filter", value: "{\"criteria\":[{\"module\":\"task\",\"field_name\":\"status\",\"module_name\":\"bug\",\"criteria_condition\":\"contains\",\"value\":[\"Design\"],\"relative_columns\":[{\"cfid\":\"4000000000242\",\"field_name\":\"status\",\"offset\":\"1\",\"unit\":\"days\",\"prior\":\"before\",\"is_this_today\":\"-\"}]}],\"pattern\":\"1\"}"),
URLQueryItem(name: "criteria", value: "-")
]
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
Clone a task to create multiple instances within the project.
OAuth Scope:
ZohoProjects.tasks.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
requiredUnique, immutable identifier of the task within the specified project. You can obtain it from the Get Tasks API (the "id" field in the response).
int
requiredEnter the number of instances to be created
Request Example
curl -X POST \
'https://projects.zoho.com/api/v3/portal/[PORTAL_ID]/projects/23806000097545166/tasks/[TASK_ID]/clone' \
-H 'Authorization: Bearer 1000.03xxxxxxxxxxxxxxxxxa5317.dxxxxxxxxxxxxxxxxxfa' \
--form-string 'no_of_instances=1'
url = "https://projects.zoho.com/api/v3/portal/[PORTAL_ID]/projects/23806000097545166/tasks/[TASK_ID]/clone";
params = Map();
params.put("no_of_instances", 1);
response = invokeUrl
[
url: url
type: POST
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/tasks/[TASK_ID]/clone');
url.searchParams.append('no_of_instances', '1');
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/tasks/[TASK_ID]/clone")
params = {
"no_of_instances" => "1"
}
url.query = URI.encode_www_form(params)
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
$params = [
'no_of_instances' => '1',
];
$url = "https://projects.zoho.com/api/v3/portal/[PORTAL_ID]/projects/23806000097545166/tasks/[TASK_ID]/clone" . "?" . http_build_query($params);
$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/tasks/[TASK_ID]/clone"
params = {
"no_of_instances": "1"
}
headers = {
"Authorization": "Bearer 1000.03xxxxxxxxxxxxxxxxxa5317.dxxxxxxxxxxxxxxxxxfa",
}
response = requests.post(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_no_of_instances = curl_easy_escape(curl, "1", 0);
char url[2048];
snprintf(url, sizeof(url), "https://projects.zoho.com/api/v3/portal/[PORTAL_ID]/projects/23806000097545166/tasks/[TASK_ID]/clone?no_of_instances=%s", enc_no_of_instances);
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, "POST");
CURLcode res = curl_easy_perform(curl);
if (res != CURLE_OK)
fprintf(stderr, "curl failed: %s\n", curl_easy_strerror(res));
curl_free(enc_no_of_instances);
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["no_of_instances"] = "1";
var uriBuilder = new UriBuilder("https://projects.zoho.com/api/v3/portal/[PORTAL_ID]/projects/23806000097545166/tasks/[TASK_ID]/clone") { Query = query.ToString() };
var request = new HttpRequestMessage(HttpMethod.Post, 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_no_of_instances = curl_easy_escape(curl, "1", 0);
std::string url = "https://projects.zoho.com/api/v3/portal/[PORTAL_ID]/projects/23806000097545166/tasks/[TASK_ID]/clone";
url += "?no_of_instances=" + std::string(enc_no_of_instances);
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, "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_free(enc_no_of_instances);
curl_slist_free_all(headers);
curl_easy_cleanup(curl);
}
return 0;
}
(require '[clj-http.client :as client])
(let [enc-no_of_instances (java.net.URLEncoder/encode "1" "UTF-8")
url (str "https://projects.zoho.com/api/v3/portal/[PORTAL_ID]/projects/23806000097545166/tasks/[TASK_ID]/clone" "?no_of_instances=" enc-no_of_instances)]
(def response
(client/post 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("POST", "https://projects.zoho.com/api/v3/portal/[PORTAL_ID]/projects/23806000097545166/tasks/[TASK_ID]/clone", nil)
q := req.URL.Query()
q.Add("no_of_instances", "1")
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))
}
POST https://projects.zoho.com/api/v3/portal/[PORTAL_ID]/projects/23806000097545166/tasks/[TASK_ID]/clone?no_of_instances=1 HTTP/1.1
Host: https://projects.zoho.com/api/v3/portal/[PORTAL_ID]/projects/23806000097545166/tasks/[TASK_ID]/clone?no_of_instances=1
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/tasks/[TASK_ID]/clone");
uriBuilder.addParameter("no_of_instances", "1");
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/tasks/[TASK_ID]/clone';
const params = new URLSearchParams({
'no_of_instances': '1'
});
const options = {
method: 'POST',
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));
no_of_instances = 1import 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/tasks/[TASK_ID]/clone".toHttpUrl().newBuilder()
urlBuilder.addQueryParameter("no_of_instances", "1")
val url = URL(urlBuilder.build().toString())
val conn = url.openConnection() as HttpURLConnection
conn.requestMethod = "POST"
conn.setRequestProperty("Authorization", "Bearer 1000.03xxxxxxxxxxxxxxxxxa5317.dxxxxxxxxxxxxxxxxxfa")
val response = conn.inputStream.bufferedReader().readText()
println(response)
}
NSString *encodedNo_of_instances = [@"1" stringByAddingPercentEncodingWithAllowedCharacters:[NSCharacterSet URLQueryAllowedCharacterSet]];
NSString *urlString = [NSString stringWithFormat:@"https://projects.zoho.com/api/v3/portal/[PORTAL_ID]/projects/23806000097545166/tasks/[TASK_ID]/clone?no_of_instances=%@", encodedNo_of_instances];
NSURL *url = [NSURL URLWithString:urlString];
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 enc_no_of_instances = Uri.pct_encode "1" in
let uri = Uri.of_string ("https://projects.zoho.com/api/v3/portal/[PORTAL_ID]/projects/23806000097545166/tasks/[TASK_ID]/clone" ^ "?no_of_instances=" ^ enc_no_of_instances) 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"
}
$params = @{
no_of_instances = "1"
}
$queryString = ($params.GetEnumerator() | ForEach-Object { "$($_.Key)=$([System.Uri]::EscapeDataString($_.Value))" }) -join "&"
$url = "https://projects.zoho.com/api/v3/portal/[PORTAL_ID]/projects/23806000097545166/tasks/[TASK_ID]/clone" + "?" + $queryString
$response = Invoke-RestMethod -Uri $url -Method POST -Headers $headers
$response | ConvertTo-Json
library(httr)
url <- "https://projects.zoho.com/api/v3/portal/[PORTAL_ID]/projects/23806000097545166/tasks/[TASK_ID]/clone"
params <- list(
no_of_instances = "1"
)
response <- POST(
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/tasks/[TASK_ID]/clone")!
components.queryItems = [
URLQueryItem(name: "no_of_instances", value: "1")
]
let url = components.url!
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 Input
Sample Response
Possible Errors
Update the order of tasks within a task list.
OAuth Scope:
ZohoProjects.tasks.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
requiredUnique, immutable identifier of the task within the specified project. You can obtain it from the Get Tasks API (the "id" field in the response).
String
Enter the ID of the task before which this task should be placed. Provide only one of before, after, or position.
You can obtain it from the Get Tasks API (the "id" field in the response).
String
Enter the ID of the task after which this task should be placed. Provide only one of before, after, or position.
You can obtain it from the Get Tasks API (the "id" field in the response).
String
Relative placement of the task within the task list. Accepted values: first or last. Ignored if before or after is specified (those take precedence). Applies only to top-level tasks; has no effect on subtasks. If none of before, after, or position are specified, the task retains its current position.
Request Example
curl -X POST \
'https://projects.zoho.com/api/v3/portal/[PORTAL_ID]/projects/23806000097545166/tasks/[TASK_ID]/reorder' \
-H 'Authorization: Bearer 1000.03xxxxxxxxxxxxxxxxxa5317.dxxxxxxxxxxxxxxxxxfa' \
-H 'Content-Type: application/json' \
-d '{"before":"4000000062001","after":"4000000062005","position":"last"}'
url = "https://projects.zoho.com/api/v3/portal/[PORTAL_ID]/projects/23806000097545166/tasks/[TASK_ID]/reorder";
params = Map();
params.put("before", "4000000062001");
params.put("after", "4000000062005");
params.put("position", "last");
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/tasks/[TASK_ID]/reorder');
const payload = JSON.stringify({"before":"4000000062001","after":"4000000062005","position":"last"});
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/tasks/[TASK_ID]/reorder")
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 = '{"before":"4000000062001","after":"4000000062005","position":"last"}'
response = http.request(request)
puts response.read_body
<?php
$url = "https://projects.zoho.com/api/v3/portal/[PORTAL_ID]/projects/23806000097545166/tasks/[TASK_ID]/reorder";
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => $url,
CURLOPT_RETURNTRANSFER => true,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => '{"before":"4000000062001","after":"4000000062005","position":"last"}',
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/tasks/[TASK_ID]/reorder"
headers = {
"Authorization": "Bearer 1000.03xxxxxxxxxxxxxxxxxa5317.dxxxxxxxxxxxxxxxxxfa",
"Content-Type": "application/json",
}
payload = '{"before":"4000000062001","after":"4000000062005","position":"last"}'
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/tasks/[TASK_ID]/reorder");
curl_easy_setopt(curl, CURLOPT_HTTPHEADER, headers);
curl_easy_setopt(curl, CURLOPT_CUSTOMREQUEST, "POST");
curl_easy_setopt(curl, CURLOPT_POSTFIELDS, "{\"before\":\"4000000062001\",\"after\":\"4000000062005\",\"position\":\"last\"}");
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/tasks/[TASK_ID]/reorder");
request.Content = new StringContent(
@"{""before"":""4000000062001"",""after"":""4000000062005"",""position"":""last""}",
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/tasks/[TASK_ID]/reorder");
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, "{\"before\":\"4000000062001\",\"after\":\"4000000062005\",\"position\":\"last\"}");
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/tasks/[TASK_ID]/reorder"
{:headers {"Authorization" "Bearer 1000.03xxxxxxxxxxxxxxxxxa5317.dxxxxxxxxxxxxxxxxxfa"
"Content-Type" "application/json"}
:body "{\"before\":\"4000000062001\",\"after\":\"4000000062005\",\"position\":\"last\"}"
:as :json}))
(println (:body response))
package main
import (
"fmt"
"io"
"net/http"
"strings"
)
func main() {
payload := strings.NewReader("{\"before\":\"4000000062001\",\"after\":\"4000000062005\",\"position\":\"last\"}")
req, _ := http.NewRequest("POST", "https://projects.zoho.com/api/v3/portal/[PORTAL_ID]/projects/23806000097545166/tasks/[TASK_ID]/reorder", 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/tasks/[TASK_ID]/reorder HTTP/1.1
Host: https://projects.zoho.com/api/v3/portal/[PORTAL_ID]/projects/23806000097545166/tasks/[TASK_ID]/reorder
Authorization: Bearer 1000.03xxxxxxxxxxxxxxxxxa5317.dxxxxxxxxxxxxxxxxxfa
Content-Type: application/json
{"before":"4000000062001","after":"4000000062005","position":"last"}
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/tasks/[TASK_ID]/reorder");
HttpUriRequest requestObj = new HttpPost(uriBuilder.build());
requestObj.addHeader("Authorization", "Bearer 1000.03xxxxxxxxxxxxxxxxxa5317.dxxxxxxxxxxxxxxxxxfa");
HttpEntityEnclosingRequestBase requestBase = (HttpEntityEnclosingRequestBase) requestObj;
String requestBody = "{\"before\":\"4000000062001\",\"after\":\"4000000062005\",\"position\":\"last\"}";
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/tasks/[TASK_ID]/reorder';
const options = {
method: 'POST',
headers: {
'Authorization': 'Bearer 1000.03xxxxxxxxxxxxxxxxxa5317.dxxxxxxxxxxxxxxxxxfa',
'Content-Type': 'application/json'
},
body: JSON.stringify({"before":"4000000062001","after":"4000000062005","position":"last"})
};
fetch(url, options)
.then(response => response.json())
.then(data => console.log(data))
.catch(error => console.error(error));
{"before":"4000000062001","after":"4000000062005","position":"last"}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/tasks/[TASK_ID]/reorder")
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("""{"before":"4000000062001","after":"4000000062005","position":"last"}""") }
val response = conn.inputStream.bufferedReader().readText()
println(response)
}
NSURL *url = [NSURL URLWithString:@"https://projects.zoho.com/api/v3/portal/[PORTAL_ID]/projects/23806000097545166/tasks/[TASK_ID]/reorder"];
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 = [@"{\"before\":\"4000000062001\",\"after\":\"4000000062005\",\"position\":\"last\"}" 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/tasks/[TASK_ID]/reorder" 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|{"before":"4000000062001","after":"4000000062005","position":"last"}|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 = @'
{"before":"4000000062001","after":"4000000062005","position":"last"}
'@
$response = Invoke-RestMethod -Uri "https://projects.zoho.com/api/v3/portal/[PORTAL_ID]/projects/23806000097545166/tasks/[TASK_ID]/reorder" -Method POST -Headers $headers -Body $body
$response | ConvertTo-Json
library(httr)
url <- "https://projects.zoho.com/api/v3/portal/[PORTAL_ID]/projects/23806000097545166/tasks/[TASK_ID]/reorder"
response <- POST(
url,
add_headers(Authorization = "Bearer 1000.03xxxxxxxxxxxxxxxxxa5317.dxxxxxxxxxxxxxxxxxfa"),
content_type_json(),
body = "{\"before\":\"4000000062001\",\"after\":\"4000000062005\",\"position\":\"last\"}"
)
content(response, "text")
import Foundation
let url = URL(string: "https://projects.zoho.com/api/v3/portal/[PORTAL_ID]/projects/23806000097545166/tasks/[TASK_ID]/reorder")!
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 = """
{"before":"4000000062001","after":"4000000062005","position":"last"}
""".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
Associate bugs to a task
OAuth Scope:
ZohoProjects.tasks.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
requiredUnique, immutable identifier of the task within the specified project. You can obtain it from the Get Tasks API (the "id" field in the response).
JSONArray
ID of the bugs to be associated You can obtain it from the Get Bugs API (the "id" field in the response).
Request Example
curl -X POST \
'https://projects.zoho.com/api/v3/portal/[PORTAL_ID]/projects/23806000097545166/tasks/[TASK_ID]/bugs' \
-H 'Authorization: Bearer 1000.03xxxxxxxxxxxxxxxxxa5317.dxxxxxxxxxxxxxxxxxfa' \
--form-string 'bug_ids=[1752587000000094001]'
url = "https://projects.zoho.com/api/v3/portal/[PORTAL_ID]/projects/23806000097545166/tasks/[TASK_ID]/bugs";
params = Map();
params.put("bug_ids", [1752587000000094001]);
response = invokeUrl
[
url: url
type: POST
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/tasks/[TASK_ID]/bugs');
url.searchParams.append('bug_ids', '[1752587000000094001]');
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/tasks/[TASK_ID]/bugs")
params = {
"bug_ids" => "[1752587000000094001]"
}
url.query = URI.encode_www_form(params)
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
$params = [
'bug_ids' => '[1752587000000094001]',
];
$url = "https://projects.zoho.com/api/v3/portal/[PORTAL_ID]/projects/23806000097545166/tasks/[TASK_ID]/bugs" . "?" . http_build_query($params);
$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/tasks/[TASK_ID]/bugs"
params = {
"bug_ids": "[1752587000000094001]"
}
headers = {
"Authorization": "Bearer 1000.03xxxxxxxxxxxxxxxxxa5317.dxxxxxxxxxxxxxxxxxfa",
}
response = requests.post(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_bug_ids = curl_easy_escape(curl, "[1752587000000094001]", 0);
char url[2048];
snprintf(url, sizeof(url), "https://projects.zoho.com/api/v3/portal/[PORTAL_ID]/projects/23806000097545166/tasks/[TASK_ID]/bugs?bug_ids=%s", enc_bug_ids);
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, "POST");
CURLcode res = curl_easy_perform(curl);
if (res != CURLE_OK)
fprintf(stderr, "curl failed: %s\n", curl_easy_strerror(res));
curl_free(enc_bug_ids);
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["bug_ids"] = "[1752587000000094001]";
var uriBuilder = new UriBuilder("https://projects.zoho.com/api/v3/portal/[PORTAL_ID]/projects/23806000097545166/tasks/[TASK_ID]/bugs") { Query = query.ToString() };
var request = new HttpRequestMessage(HttpMethod.Post, 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_bug_ids = curl_easy_escape(curl, "[1752587000000094001]", 0);
std::string url = "https://projects.zoho.com/api/v3/portal/[PORTAL_ID]/projects/23806000097545166/tasks/[TASK_ID]/bugs";
url += "?bug_ids=" + std::string(enc_bug_ids);
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, "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_free(enc_bug_ids);
curl_slist_free_all(headers);
curl_easy_cleanup(curl);
}
return 0;
}
(require '[clj-http.client :as client])
(let [enc-bug_ids (java.net.URLEncoder/encode "[1752587000000094001]" "UTF-8")
url (str "https://projects.zoho.com/api/v3/portal/[PORTAL_ID]/projects/23806000097545166/tasks/[TASK_ID]/bugs" "?bug_ids=" enc-bug_ids)]
(def response
(client/post 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("POST", "https://projects.zoho.com/api/v3/portal/[PORTAL_ID]/projects/23806000097545166/tasks/[TASK_ID]/bugs", nil)
q := req.URL.Query()
q.Add("bug_ids", "[1752587000000094001]")
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))
}
POST https://projects.zoho.com/api/v3/portal/[PORTAL_ID]/projects/23806000097545166/tasks/[TASK_ID]/bugs?bug_ids=%5B1752587000000094001%5D HTTP/1.1
Host: https://projects.zoho.com/api/v3/portal/[PORTAL_ID]/projects/23806000097545166/tasks/[TASK_ID]/bugs?bug_ids=%5B1752587000000094001%5D
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/tasks/[TASK_ID]/bugs");
uriBuilder.addParameter("bug_ids", "[1752587000000094001]");
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/tasks/[TASK_ID]/bugs';
const params = new URLSearchParams({
'bug_ids': '[1752587000000094001]'
});
const options = {
method: 'POST',
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));
bug_ids = [1752587000000094001]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/tasks/[TASK_ID]/bugs".toHttpUrl().newBuilder()
urlBuilder.addQueryParameter("bug_ids", "[1752587000000094001]")
val url = URL(urlBuilder.build().toString())
val conn = url.openConnection() as HttpURLConnection
conn.requestMethod = "POST"
conn.setRequestProperty("Authorization", "Bearer 1000.03xxxxxxxxxxxxxxxxxa5317.dxxxxxxxxxxxxxxxxxfa")
val response = conn.inputStream.bufferedReader().readText()
println(response)
}
NSString *encodedBug_ids = [@"[1752587000000094001]" stringByAddingPercentEncodingWithAllowedCharacters:[NSCharacterSet URLQueryAllowedCharacterSet]];
NSString *urlString = [NSString stringWithFormat:@"https://projects.zoho.com/api/v3/portal/[PORTAL_ID]/projects/23806000097545166/tasks/[TASK_ID]/bugs?bug_ids=%@", encodedBug_ids];
NSURL *url = [NSURL URLWithString:urlString];
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 enc_bug_ids = Uri.pct_encode "[1752587000000094001]" in
let uri = Uri.of_string ("https://projects.zoho.com/api/v3/portal/[PORTAL_ID]/projects/23806000097545166/tasks/[TASK_ID]/bugs" ^ "?bug_ids=" ^ enc_bug_ids) 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"
}
$params = @{
bug_ids = "[1752587000000094001]"
}
$queryString = ($params.GetEnumerator() | ForEach-Object { "$($_.Key)=$([System.Uri]::EscapeDataString($_.Value))" }) -join "&"
$url = "https://projects.zoho.com/api/v3/portal/[PORTAL_ID]/projects/23806000097545166/tasks/[TASK_ID]/bugs" + "?" + $queryString
$response = Invoke-RestMethod -Uri $url -Method POST -Headers $headers
$response | ConvertTo-Json
library(httr)
url <- "https://projects.zoho.com/api/v3/portal/[PORTAL_ID]/projects/23806000097545166/tasks/[TASK_ID]/bugs"
params <- list(
bug_ids = "[1752587000000094001]"
)
response <- POST(
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/tasks/[TASK_ID]/bugs")!
components.queryItems = [
URLQueryItem(name: "bug_ids", value: "[1752587000000094001]")
]
let url = components.url!
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 Input
Sample Response
Get Tasks Attachments
OAuth Scope:
ZohoProjects.tasks.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
Id's of the project
Request Example
curl -X GET \
'https://projects.zoho.com/api/v3/portal/[PORTAL_ID]/tasks/attachments?project_task_map=-' \
-H 'Authorization: Bearer 1000.03xxxxxxxxxxxxxxxxxa5317.dxxxxxxxxxxxxxxxxxfa'
url = "https://projects.zoho.com/api/v3/portal/[PORTAL_ID]/tasks/attachments";
params = Map();
params.put("project_task_map", "-");
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]/tasks/attachments');
url.searchParams.append('project_task_map', '-');
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]/tasks/attachments")
params = {
"project_task_map" => "-"
}
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 = [
'project_task_map' => '-',
];
$url = "https://projects.zoho.com/api/v3/portal/[PORTAL_ID]/tasks/attachments" . "?" . 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]/tasks/attachments"
params = {
"project_task_map": "-"
}
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_project_task_map = curl_easy_escape(curl, "-", 0);
char url[2048];
snprintf(url, sizeof(url), "https://projects.zoho.com/api/v3/portal/[PORTAL_ID]/tasks/attachments?project_task_map=%s", enc_project_task_map);
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_project_task_map);
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["project_task_map"] = "-";
var uriBuilder = new UriBuilder("https://projects.zoho.com/api/v3/portal/[PORTAL_ID]/tasks/attachments") { 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_project_task_map = curl_easy_escape(curl, "-", 0);
std::string url = "https://projects.zoho.com/api/v3/portal/[PORTAL_ID]/tasks/attachments";
url += "?project_task_map=" + std::string(enc_project_task_map);
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_project_task_map);
curl_slist_free_all(headers);
curl_easy_cleanup(curl);
}
return 0;
}
(require '[clj-http.client :as client])
(let [enc-project_task_map (java.net.URLEncoder/encode "-" "UTF-8")
url (str "https://projects.zoho.com/api/v3/portal/[PORTAL_ID]/tasks/attachments" "?project_task_map=" enc-project_task_map)]
(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]/tasks/attachments", nil)
q := req.URL.Query()
q.Add("project_task_map", "-")
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]/tasks/attachments?project_task_map=- HTTP/1.1
Host: https://projects.zoho.com/api/v3/portal/[PORTAL_ID]/tasks/attachments?project_task_map=-
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]/tasks/attachments");
uriBuilder.addParameter("project_task_map", "-");
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]/tasks/attachments';
const params = new URLSearchParams({
'project_task_map': '-'
});
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));
project_task_map = - 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]/tasks/attachments".toHttpUrl().newBuilder()
urlBuilder.addQueryParameter("project_task_map", "-")
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 *encodedProject_task_map = [@"-" stringByAddingPercentEncodingWithAllowedCharacters:[NSCharacterSet URLQueryAllowedCharacterSet]];
NSString *urlString = [NSString stringWithFormat:@"https://projects.zoho.com/api/v3/portal/[PORTAL_ID]/tasks/attachments?project_task_map=%@", encodedProject_task_map];
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_project_task_map = Uri.pct_encode "-" in
let uri = Uri.of_string ("https://projects.zoho.com/api/v3/portal/[PORTAL_ID]/tasks/attachments" ^ "?project_task_map=" ^ enc_project_task_map) 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 = @{
project_task_map = "-"
}
$queryString = ($params.GetEnumerator() | ForEach-Object { "$($_.Key)=$([System.Uri]::EscapeDataString($_.Value))" }) -join "&"
$url = "https://projects.zoho.com/api/v3/portal/[PORTAL_ID]/tasks/attachments" + "?" + $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]/tasks/attachments"
params <- list(
project_task_map = "-"
)
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]/tasks/attachments")!
components.queryItems = [
URLQueryItem(name: "project_task_map", value: "-")
]
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
Upload PDF Logo
OAuth Scope:
ZohoProjects.tasks.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).
file
Request Example
curl -X POST \
'https://projects.zoho.com/api/v3/portal/[PORTAL_ID]/tasks/gantt/logo' \
-H 'Authorization: Bearer 1000.03xxxxxxxxxxxxxxxxxa5317.dxxxxxxxxxxxxxxxxxfa' \
--form 'uploadlogo=@/path/to/file'
url = "https://projects.zoho.com/api/v3/portal/[PORTAL_ID]/tasks/gantt/logo";
fileObj = invokeUrl
[
url: "/path/to/file"
type: GET
];
response = invokeUrl
[
url: url
type: POST
files: {"uploadlogo": fileObj}
connection: "projects"
];
info response;
const fs = require('fs');
const FormData = require('form-data');
const https = require('https');
const form = new FormData();
form.append('uploadlogo', fs.createReadStream('/path/to/file'));
const url = new URL('https://projects.zoho.com/api/v3/portal/[PORTAL_ID]/tasks/gantt/logo');
const options = {
hostname: url.hostname,
path: url.pathname,
method: 'POST',
headers: {
'Authorization': 'Bearer 1000.03xxxxxxxxxxxxxxxxxa5317.dxxxxxxxxxxxxxxxxxfa',
...form.getHeaders()
}
};
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); });
form.pipe(req);
require 'net/http'
require 'uri'
url = URI("https://projects.zoho.com/api/v3/portal/[PORTAL_ID]/tasks/gantt/logo")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post::Multipart.new(url, {
"uploadlogo" => UploadIO.new(File.new("/path/to/file"), "application/octet-stream")
})
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]/tasks/gantt/logo";
$postFields = [
'uploadlogo' => new CURLFile('/path/to/file'),
];
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => $url,
CURLOPT_RETURNTRANSFER => true,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => $postFields,
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]/tasks/gantt/logo"
headers = {
"Authorization": "Bearer 1000.03xxxxxxxxxxxxxxxxxa5317.dxxxxxxxxxxxxxxxxxfa",
}
files = {
"uploadlogo": open("/path/to/file", "rb")
}
response = requests.post(url, headers=headers, files=files)
print(response.json())
#include <stdio.h>
#include <curl/curl.h>
int main(void) {
CURL *curl = curl_easy_init();
if (curl) {
curl_mime *mime = curl_mime_init(curl);
curl_mimepart *part = curl_mime_addpart(mime);
curl_mime_name(part, "uploadlogo");
curl_mime_filedata(part, "/path/to/file");
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]/tasks/gantt/logo");
curl_easy_setopt(curl, CURLOPT_HTTPHEADER, headers);
curl_easy_setopt(curl, CURLOPT_MIMEPOST, mime);
CURLcode res = curl_easy_perform(curl);
if (res != CURLE_OK)
fprintf(stderr, "curl failed: %s\n", curl_easy_strerror(res));
curl_mime_free(mime);
curl_slist_free_all(headers);
curl_easy_cleanup(curl);
}
return 0;
}
using System.Net.Http;
var client = new HttpClient();
client.DefaultRequestHeaders.Add("Authorization", "Bearer 1000.03xxxxxxxxxxxxxxxxxa5317.dxxxxxxxxxxxxxxxxxfa");
var content = new MultipartFormDataContent();
var fileStream = File.OpenRead("/path/to/file");
content.Add(new StreamContent(fileStream), "uploadlogo", "file");
var request = new HttpRequestMessage(HttpMethod.Post, "https://projects.zoho.com/api/v3/portal/[PORTAL_ID]/tasks/gantt/logo") { Content = content };
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;
curl_mime* mime = curl_mime_init(curl);
curl_mimepart* part = curl_mime_addpart(mime);
curl_mime_name(part, "uploadlogo");
curl_mime_filedata(part, "/path/to/file");
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]/tasks/gantt/logo");
curl_easy_setopt(curl, CURLOPT_HTTPHEADER, headers);
curl_easy_setopt(curl, CURLOPT_MIMEPOST, mime);
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_mime_free(mime);
curl_slist_free_all(headers);
curl_easy_cleanup(curl);
}
return 0;
}
(require '[clj-http.client :as client])
(require '[clojure.java.io :as io])
(def response
(client/post "https://projects.zoho.com/api/v3/portal/[PORTAL_ID]/tasks/gantt/logo"
{:headers {"Authorization" "Bearer 1000.03xxxxxxxxxxxxxxxxxa5317.dxxxxxxxxxxxxxxxxxfa"}
:multipart [{:name "uploadlogo"
:content (io/file "/path/to/file")}]}))
(println (:body response))
package main
import (
"bytes"
"fmt"
"io"
"mime/multipart"
"net/http"
"os"
)
func main() {
body := &bytes.Buffer{}
writer := multipart.NewWriter(body)
file, _ := os.Open("/path/to/file")
defer file.Close()
part, _ := writer.CreateFormFile("uploadlogo", "file")
io.Copy(part, file)
writer.Close()
req, _ := http.NewRequest("POST", "https://projects.zoho.com/api/v3/portal/[PORTAL_ID]/tasks/gantt/logo", body)
req.Header.Add("Authorization", "Bearer 1000.03xxxxxxxxxxxxxxxxxa5317.dxxxxxxxxxxxxxxxxxfa")
req.Header.Add("Content-Type", writer.FormDataContentType())
resp, _ := http.DefaultClient.Do(req)
defer resp.Body.Close()
respBody, _ := io.ReadAll(resp.Body)
fmt.Println(string(respBody))
}
POST https://projects.zoho.com/api/v3/portal/[PORTAL_ID]/tasks/gantt/logo HTTP/1.1
Host: https://projects.zoho.com/api/v3/portal/[PORTAL_ID]/tasks/gantt/logo
Authorization: Bearer 1000.03xxxxxxxxxxxxxxxxxa5317.dxxxxxxxxxxxxxxxxxfa
Content-Type: multipart/form-data; boundary=----FormBoundary
------FormBoundary
Content-Disposition: form-data; name="uploadlogo"; filename="file"
Content-Type: application/octet-stream
[file content]
------FormBoundary--
HttpClientBuilder httpClientBuilder = HttpClientBuilder.create();
SSLContext sslContext = SSLContext.getDefault();
SSLConnectionSocketFactory sslConnectionSocketFactory = new SSLConnectionSocketFactory(sslContext, NoopHostnameVerifier.INSTANCE);
CloseableHttpClient httpclient = httpClientBuilder.setSSLSocketFactory(sslConnectionSocketFactory).build();
HttpEntityEnclosingRequestBase httpRequest = new HttpPost("https://projects.zoho.com/api/v3/portal/[PORTAL_ID]/tasks/gantt/logo");
httpRequest.addHeader("Authorization", "Bearer 1000.03xxxxxxxxxxxxxxxxxa5317.dxxxxxxxxxxxxxxxxxfa");
MultipartEntityBuilder builder = MultipartEntityBuilder.create();
builder.addBinaryBody("uploadlogo", new File("/path/to/file"), ContentType.DEFAULT_BINARY, "file");
httpRequest.setEntity(builder.build());
HttpResponse response = httpclient.execute(httpRequest);
HttpEntity responseEntity = response.getEntity();
Object responseObject = EntityUtils.toString(responseEntity);
String responseString = responseObject.toString();
const formData = new FormData();
formData.append('uploadlogo', fileInput.files[0]);
fetch('https://projects.zoho.com/api/v3/portal/[PORTAL_ID]/tasks/gantt/logo', {
method: 'POST',
headers: {
'Authorization': 'Bearer 1000.03xxxxxxxxxxxxxxxxxa5317.dxxxxxxxxxxxxxxxxxfa'
},
body: formData
})
.then(response => response.json())
.then(data => console.log(data))
.catch(error => console.error(error));
{
"uploadlogo": "(binary file data)"
}import okhttp3.*
import okhttp3.MediaType.Companion.toMediaType
import java.io.File
fun main() {
val client = OkHttpClient()
val file = File("/path/to/file")
val body = MultipartBody.Builder()
.setType(MultipartBody.FORM)
.addFormDataPart("uploadlogo", file.name, RequestBody.create(file, "application/octet-stream".toMediaType()))
.build()
val request = Request.Builder()
.url("https://projects.zoho.com/api/v3/portal/[PORTAL_ID]/tasks/gantt/logo")
.method("POST", body)
.addHeader("Authorization", "Bearer 1000.03xxxxxxxxxxxxxxxxxa5317.dxxxxxxxxxxxxxxxxxfa")
.build()
val response = client.newCall(request).execute()
println(response.body?.string())
}
NSURL *url = [NSURL URLWithString:@"https://projects.zoho.com/api/v3/portal/[PORTAL_ID]/tasks/gantt/logo"];
NSMutableURLRequest *request = [NSMutableURLRequest requestWithURL:url];
[request setHTTPMethod:@"POST"];
[request setValue:@"Bearer 1000.03xxxxxxxxxxxxxxxxxa5317.dxxxxxxxxxxxxxxxxxfa" forHTTPHeaderField:@"Authorization"];
NSString *boundary = [[NSUUID UUID] UUIDString];
[request setValue:[NSString stringWithFormat:@"multipart/form-data; boundary=%@", boundary] forHTTPHeaderField:@"Content-Type"];
NSMutableData *body = [NSMutableData data];
NSData *fileData = [NSData dataWithContentsOfFile:@"/path/to/file"];
[body appendData:[[NSString stringWithFormat:@"--%@\r\n", boundary] dataUsingEncoding:NSUTF8StringEncoding]];
[body appendData:[[NSString stringWithFormat:@"Content-Disposition: form-data; name=\"uploadlogo\"; filename=\"file\"\r\n"] dataUsingEncoding:NSUTF8StringEncoding]];
[body appendData:[@"Content-Type: application/octet-stream\r\n\r\n" dataUsingEncoding:NSUTF8StringEncoding]];
[body appendData:fileData];
[body appendData:[@"\r\n" dataUsingEncoding:NSUTF8StringEncoding]];
[body appendData:[[NSString stringWithFormat:@"--%@--\r\n", boundary] 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]/tasks/gantt/logo" in
let file_content = Lwt_io.(with_file ~mode:Input "/path/to/file" read) in
let boundary = "----FormBoundary" in
let body_str =
"--" ^ boundary ^ "\r\n" ^
"Content-Disposition: form-data; name=\"uploadlogo\"; filename=\"file\"\r\n" ^
"Content-Type: application/octet-stream\r\n\r\n" ^
file_content ^ "\r\n" ^
"--" ^ boundary ^ "--\r\n" 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" ("multipart/form-data; boundary=" ^ boundary)
in
let body = Cohttp_lwt.Body.of_string body_str 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"
}
$form = @{
uploadlogo = Get-Item -Path "/path/to/file"
}
$response = Invoke-RestMethod -Uri "https://projects.zoho.com/api/v3/portal/[PORTAL_ID]/tasks/gantt/logo" -Method POST -Headers $headers -Form $form
$response | ConvertTo-Json
library(httr)
url <- "https://projects.zoho.com/api/v3/portal/[PORTAL_ID]/tasks/gantt/logo"
response <- POST(
url,
add_headers(Authorization = "Bearer 1000.03xxxxxxxxxxxxxxxxxa5317.dxxxxxxxxxxxxxxxxxfa"),
body = list(
uploadlogo = upload_file("/path/to/file")
),
encode = "multipart"
)
content(response, "text")
import Foundation
let url = URL(string: "https://projects.zoho.com/api/v3/portal/[PORTAL_ID]/tasks/gantt/logo")!
var request = URLRequest(url: url)
request.httpMethod = "POST"
request.setValue("Bearer 1000.03xxxxxxxxxxxxxxxxxa5317.dxxxxxxxxxxxxxxxxxfa", forHTTPHeaderField: "Authorization")
let boundary = UUID().uuidString
request.setValue("multipart/form-data; boundary=\(boundary)", forHTTPHeaderField: "Content-Type")
var body = Data()
let fileData = try! Data(contentsOf: URL(fileURLWithPath: "/path/to/file"))
body.append("--\(boundary)\r\n".data(using: .utf8)!)
body.append("Content-Disposition: form-data; name=\"uploadlogo\"; filename=\"file\"\r\n".data(using: .utf8)!)
body.append("Content-Type: application/octet-stream\r\n\r\n".data(using: .utf8)!)
body.append(fileData)
body.append("\r\n".data(using: .utf8)!)
body.append("--\(boundary)--\r\n".data(using: .utf8)!)
request.httpBody = body
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
to make the parent task as Tasklist
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
requiredUnique, immutable identifier of the task within the specified project. You can obtain it from the Get Tasks 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 : 100Enter the status of the task list.
JSONArray
max length : 10000Enter the tag details.
Request Example
curl -X POST \
'https://projects.zoho.com/api/v3/portal/[PORTAL_ID]/projects/23806000097545166/tasks/[TASK_ID]/make-as-tasklist' \
-H 'Authorization: Bearer 1000.03xxxxxxxxxxxxxxxxxa5317.dxxxxxxxxxxxxxxxxxfa' \
-H 'Content-Type: application/json' \
-d '{"name":"Set Up CI/CD Pipeline for Staging Environment","milestone":{"id":"4000000062001"},"flag":"external","status":"active","tags":[{"add":[{"id":"4000000062001"}],"remove":[{"id":"4000000062001"}],"id":"4000000062001"}]}'
url = "https://projects.zoho.com/api/v3/portal/[PORTAL_ID]/projects/23806000097545166/tasks/[TASK_ID]/make-as-tasklist";
params = Map();
params.put("name", "Set Up CI/CD Pipeline for Staging Environment");
params.put("milestone", {"id":"4000000062001"});
params.put("flag", "external");
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/tasks/[TASK_ID]/make-as-tasklist');
const payload = JSON.stringify({"name":"Set Up CI/CD Pipeline for Staging Environment","milestone":{"id":"4000000062001"},"flag":"external","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/tasks/[TASK_ID]/make-as-tasklist")
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":"Set Up CI/CD Pipeline for Staging Environment","milestone":{"id":"4000000062001"},"flag":"external","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/tasks/[TASK_ID]/make-as-tasklist";
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => $url,
CURLOPT_RETURNTRANSFER => true,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => '{"name":"Set Up CI/CD Pipeline for Staging Environment","milestone":{"id":"4000000062001"},"flag":"external","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/tasks/[TASK_ID]/make-as-tasklist"
headers = {
"Authorization": "Bearer 1000.03xxxxxxxxxxxxxxxxxa5317.dxxxxxxxxxxxxxxxxxfa",
"Content-Type": "application/json",
}
payload = '{"name":"Set Up CI/CD Pipeline for Staging Environment","milestone":{"id":"4000000062001"},"flag":"external","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/tasks/[TASK_ID]/make-as-tasklist");
curl_easy_setopt(curl, CURLOPT_HTTPHEADER, headers);
curl_easy_setopt(curl, CURLOPT_CUSTOMREQUEST, "POST");
curl_easy_setopt(curl, CURLOPT_POSTFIELDS, "{\"name\":\"Set Up CI/CD Pipeline for Staging Environment\",\"milestone\":{\"id\":\"4000000062001\"},\"flag\":\"external\",\"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/tasks/[TASK_ID]/make-as-tasklist");
request.Content = new StringContent(
@"{""name"":""Set Up CI/CD Pipeline for Staging Environment"",""milestone"":{""id"":""4000000062001""},""flag"":""external"",""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/tasks/[TASK_ID]/make-as-tasklist");
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\":\"Set Up CI/CD Pipeline for Staging Environment\",\"milestone\":{\"id\":\"4000000062001\"},\"flag\":\"external\",\"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/tasks/[TASK_ID]/make-as-tasklist"
{:headers {"Authorization" "Bearer 1000.03xxxxxxxxxxxxxxxxxa5317.dxxxxxxxxxxxxxxxxxfa"
"Content-Type" "application/json"}
:body "{\"name\":\"Set Up CI/CD Pipeline for Staging Environment\",\"milestone\":{\"id\":\"4000000062001\"},\"flag\":\"external\",\"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\":\"Set Up CI/CD Pipeline for Staging Environment\",\"milestone\":{\"id\":\"4000000062001\"},\"flag\":\"external\",\"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/tasks/[TASK_ID]/make-as-tasklist", 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/tasks/[TASK_ID]/make-as-tasklist HTTP/1.1
Host: https://projects.zoho.com/api/v3/portal/[PORTAL_ID]/projects/23806000097545166/tasks/[TASK_ID]/make-as-tasklist
Authorization: Bearer 1000.03xxxxxxxxxxxxxxxxxa5317.dxxxxxxxxxxxxxxxxxfa
Content-Type: application/json
{"name":"Set Up CI/CD Pipeline for Staging Environment","milestone":{"id":"4000000062001"},"flag":"external","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/tasks/[TASK_ID]/make-as-tasklist");
HttpUriRequest requestObj = new HttpPost(uriBuilder.build());
requestObj.addHeader("Authorization", "Bearer 1000.03xxxxxxxxxxxxxxxxxa5317.dxxxxxxxxxxxxxxxxxfa");
HttpEntityEnclosingRequestBase requestBase = (HttpEntityEnclosingRequestBase) requestObj;
String requestBody = "{\"name\":\"Set Up CI\/CD Pipeline for Staging Environment\",\"milestone\":{\"id\":\"4000000062001\"},\"flag\":\"external\",\"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/tasks/[TASK_ID]/make-as-tasklist';
const options = {
method: 'POST',
headers: {
'Authorization': 'Bearer 1000.03xxxxxxxxxxxxxxxxxa5317.dxxxxxxxxxxxxxxxxxfa',
'Content-Type': 'application/json'
},
body: JSON.stringify({"name":"Set Up CI/CD Pipeline for Staging Environment","milestone":{"id":"4000000062001"},"flag":"external","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":"Set Up CI/CD Pipeline for Staging Environment","milestone":{"id":"4000000062001"},"flag":"external","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/tasks/[TASK_ID]/make-as-tasklist")
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":"Set Up CI/CD Pipeline for Staging Environment","milestone":{"id":"4000000062001"},"flag":"external","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/tasks/[TASK_ID]/make-as-tasklist"];
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\":\"Set Up CI/CD Pipeline for Staging Environment\",\"milestone\":{\"id\":\"4000000062001\"},\"flag\":\"external\",\"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/tasks/[TASK_ID]/make-as-tasklist" 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":"Set Up CI/CD Pipeline for Staging Environment","milestone":{"id":"4000000062001"},"flag":"external","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":"Set Up CI/CD Pipeline for Staging Environment","milestone":{"id":"4000000062001"},"flag":"external","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/tasks/[TASK_ID]/make-as-tasklist" -Method POST -Headers $headers -Body $body
$response | ConvertTo-Json
library(httr)
url <- "https://projects.zoho.com/api/v3/portal/[PORTAL_ID]/projects/23806000097545166/tasks/[TASK_ID]/make-as-tasklist"
response <- POST(
url,
add_headers(Authorization = "Bearer 1000.03xxxxxxxxxxxxxxxxxa5317.dxxxxxxxxxxxxxxxxxfa"),
content_type_json(),
body = "{\"name\":\"Set Up CI/CD Pipeline for Staging Environment\",\"milestone\":{\"id\":\"4000000062001\"},\"flag\":\"external\",\"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/tasks/[TASK_ID]/make-as-tasklist")!
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":"Set Up CI/CD Pipeline for Staging Environment","milestone":{"id":"4000000062001"},"flag":"external","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
Convert a task into a subtask under a specified parent task in the project.
Note:
Parent task : The task directly above a subtask in the hierarchy. The converted task will be nested one level below this task. A parent task may or may not be a root task.
Root task : A task at the topmost level of a task hierarchy. It has no parent above it. A root task can become a parent task if subtasks are added to it, but a parent task is not always a root task.
OAuth Scope:
ZohoProjects.tasks.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
requiredUnique, immutable identifier of the task within the specified project. You can obtain it from the Get Tasks API (the "id" field in the response).
String
requiredEnter the ID of the parent task under which the task will be nested as a subtask.
JSONObject
Specify the placement of the converted subtask among the parent task's existing subtasks. If omitted, the task is placed at the end of the parent task's subtask list.
Request Example
curl -X POST \
'https://projects.zoho.com/api/v3/portal/[PORTAL_ID]/projects/23806000097545166/tasks/[TASK_ID]/make-as-subtask' \
-H 'Authorization: Bearer 1000.03xxxxxxxxxxxxxxxxxa5317.dxxxxxxxxxxxxxxxxxfa' \
-H 'Content-Type: application/json' \
-d '{"parent_id":"4000000009988","positional_info":{"previous_task_id":"40000000097101","next_task_id":"40000000097101"}}'
url = "https://projects.zoho.com/api/v3/portal/[PORTAL_ID]/projects/23806000097545166/tasks/[TASK_ID]/make-as-subtask";
params = Map();
params.put("parent_id", "4000000009988");
params.put("positional_info", {"previous_task_id":"40000000097101","next_task_id":"40000000097101"});
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/tasks/[TASK_ID]/make-as-subtask');
const payload = JSON.stringify({"parent_id":"4000000009988","positional_info":{"previous_task_id":"40000000097101","next_task_id":"40000000097101"}});
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/tasks/[TASK_ID]/make-as-subtask")
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 = '{"parent_id":"4000000009988","positional_info":{"previous_task_id":"40000000097101","next_task_id":"40000000097101"}}'
response = http.request(request)
puts response.read_body
<?php
$url = "https://projects.zoho.com/api/v3/portal/[PORTAL_ID]/projects/23806000097545166/tasks/[TASK_ID]/make-as-subtask";
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => $url,
CURLOPT_RETURNTRANSFER => true,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => '{"parent_id":"4000000009988","positional_info":{"previous_task_id":"40000000097101","next_task_id":"40000000097101"}}',
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/tasks/[TASK_ID]/make-as-subtask"
headers = {
"Authorization": "Bearer 1000.03xxxxxxxxxxxxxxxxxa5317.dxxxxxxxxxxxxxxxxxfa",
"Content-Type": "application/json",
}
payload = '{"parent_id":"4000000009988","positional_info":{"previous_task_id":"40000000097101","next_task_id":"40000000097101"}}'
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/tasks/[TASK_ID]/make-as-subtask");
curl_easy_setopt(curl, CURLOPT_HTTPHEADER, headers);
curl_easy_setopt(curl, CURLOPT_CUSTOMREQUEST, "POST");
curl_easy_setopt(curl, CURLOPT_POSTFIELDS, "{\"parent_id\":\"4000000009988\",\"positional_info\":{\"previous_task_id\":\"40000000097101\",\"next_task_id\":\"40000000097101\"}}");
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/tasks/[TASK_ID]/make-as-subtask");
request.Content = new StringContent(
@"{""parent_id"":""4000000009988"",""positional_info"":{""previous_task_id"":""40000000097101"",""next_task_id"":""40000000097101""}}",
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/tasks/[TASK_ID]/make-as-subtask");
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, "{\"parent_id\":\"4000000009988\",\"positional_info\":{\"previous_task_id\":\"40000000097101\",\"next_task_id\":\"40000000097101\"}}");
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/tasks/[TASK_ID]/make-as-subtask"
{:headers {"Authorization" "Bearer 1000.03xxxxxxxxxxxxxxxxxa5317.dxxxxxxxxxxxxxxxxxfa"
"Content-Type" "application/json"}
:body "{\"parent_id\":\"4000000009988\",\"positional_info\":{\"previous_task_id\":\"40000000097101\",\"next_task_id\":\"40000000097101\"}}"
:as :json}))
(println (:body response))
package main
import (
"fmt"
"io"
"net/http"
"strings"
)
func main() {
payload := strings.NewReader("{\"parent_id\":\"4000000009988\",\"positional_info\":{\"previous_task_id\":\"40000000097101\",\"next_task_id\":\"40000000097101\"}}")
req, _ := http.NewRequest("POST", "https://projects.zoho.com/api/v3/portal/[PORTAL_ID]/projects/23806000097545166/tasks/[TASK_ID]/make-as-subtask", 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/tasks/[TASK_ID]/make-as-subtask HTTP/1.1
Host: https://projects.zoho.com/api/v3/portal/[PORTAL_ID]/projects/23806000097545166/tasks/[TASK_ID]/make-as-subtask
Authorization: Bearer 1000.03xxxxxxxxxxxxxxxxxa5317.dxxxxxxxxxxxxxxxxxfa
Content-Type: application/json
{"parent_id":"4000000009988","positional_info":{"previous_task_id":"40000000097101","next_task_id":"40000000097101"}}
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/tasks/[TASK_ID]/make-as-subtask");
HttpUriRequest requestObj = new HttpPost(uriBuilder.build());
requestObj.addHeader("Authorization", "Bearer 1000.03xxxxxxxxxxxxxxxxxa5317.dxxxxxxxxxxxxxxxxxfa");
HttpEntityEnclosingRequestBase requestBase = (HttpEntityEnclosingRequestBase) requestObj;
String requestBody = "{\"parent_id\":\"4000000009988\",\"positional_info\":{\"previous_task_id\":\"40000000097101\",\"next_task_id\":\"40000000097101\"}}";
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/tasks/[TASK_ID]/make-as-subtask';
const options = {
method: 'POST',
headers: {
'Authorization': 'Bearer 1000.03xxxxxxxxxxxxxxxxxa5317.dxxxxxxxxxxxxxxxxxfa',
'Content-Type': 'application/json'
},
body: JSON.stringify({"parent_id":"4000000009988","positional_info":{"previous_task_id":"40000000097101","next_task_id":"40000000097101"}})
};
fetch(url, options)
.then(response => response.json())
.then(data => console.log(data))
.catch(error => console.error(error));
{"parent_id":"4000000009988","positional_info":{"previous_task_id":"40000000097101","next_task_id":"40000000097101"}}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/tasks/[TASK_ID]/make-as-subtask")
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("""{"parent_id":"4000000009988","positional_info":{"previous_task_id":"40000000097101","next_task_id":"40000000097101"}}""") }
val response = conn.inputStream.bufferedReader().readText()
println(response)
}
NSURL *url = [NSURL URLWithString:@"https://projects.zoho.com/api/v3/portal/[PORTAL_ID]/projects/23806000097545166/tasks/[TASK_ID]/make-as-subtask"];
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 = [@"{\"parent_id\":\"4000000009988\",\"positional_info\":{\"previous_task_id\":\"40000000097101\",\"next_task_id\":\"40000000097101\"}}" 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/tasks/[TASK_ID]/make-as-subtask" 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|{"parent_id":"4000000009988","positional_info":{"previous_task_id":"40000000097101","next_task_id":"40000000097101"}}|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 = @'
{"parent_id":"4000000009988","positional_info":{"previous_task_id":"40000000097101","next_task_id":"40000000097101"}}
'@
$response = Invoke-RestMethod -Uri "https://projects.zoho.com/api/v3/portal/[PORTAL_ID]/projects/23806000097545166/tasks/[TASK_ID]/make-as-subtask" -Method POST -Headers $headers -Body $body
$response | ConvertTo-Json
library(httr)
url <- "https://projects.zoho.com/api/v3/portal/[PORTAL_ID]/projects/23806000097545166/tasks/[TASK_ID]/make-as-subtask"
response <- POST(
url,
add_headers(Authorization = "Bearer 1000.03xxxxxxxxxxxxxxxxxa5317.dxxxxxxxxxxxxxxxxxfa"),
content_type_json(),
body = "{\"parent_id\":\"4000000009988\",\"positional_info\":{\"previous_task_id\":\"40000000097101\",\"next_task_id\":\"40000000097101\"}}"
)
content(response, "text")
import Foundation
let url = URL(string: "https://projects.zoho.com/api/v3/portal/[PORTAL_ID]/projects/23806000097545166/tasks/[TASK_ID]/make-as-subtask")!
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 = """
{"parent_id":"4000000009988","positional_info":{"previous_task_id":"40000000097101","next_task_id":"40000000097101"}}
""".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
Convert a subtask into a root task in the project.
Note:
Parent task : The task directly above a subtask in the hierarchy. The converted task will be nested one level below this task. A parent task may or may not be a root task.
Root task : A task at the topmost level of a task hierarchy. It has no parent above it. A root task can become a parent task if subtasks are added to it, but a parent task is not always a root task.
OAuth Scope:
ZohoProjects.tasks.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
requiredUnique, immutable identifier of the task within the specified project. You can obtain it from the Get Tasks API (the "id" field in the response).
JSONObject
Specify the placement of the converted root task within the task list. If omitted, the task is placed at the end of the task list.
Request Example
curl -X POST \
'https://projects.zoho.com/api/v3/portal/[PORTAL_ID]/projects/23806000097545166/tasks/[TASK_ID]/make-as-task' \
-H 'Authorization: Bearer 1000.03xxxxxxxxxxxxxxxxxa5317.dxxxxxxxxxxxxxxxxxfa' \
-H 'Content-Type: application/json' \
-d '{"positional_info":{"previous_task_id":"40000000097101","next_task_id":"40000000097101"}}'
url = "https://projects.zoho.com/api/v3/portal/[PORTAL_ID]/projects/23806000097545166/tasks/[TASK_ID]/make-as-task";
params = Map();
params.put("positional_info", {"previous_task_id":"40000000097101","next_task_id":"40000000097101"});
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/tasks/[TASK_ID]/make-as-task');
const payload = JSON.stringify({"positional_info":{"previous_task_id":"40000000097101","next_task_id":"40000000097101"}});
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/tasks/[TASK_ID]/make-as-task")
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 = '{"positional_info":{"previous_task_id":"40000000097101","next_task_id":"40000000097101"}}'
response = http.request(request)
puts response.read_body
<?php
$url = "https://projects.zoho.com/api/v3/portal/[PORTAL_ID]/projects/23806000097545166/tasks/[TASK_ID]/make-as-task";
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => $url,
CURLOPT_RETURNTRANSFER => true,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => '{"positional_info":{"previous_task_id":"40000000097101","next_task_id":"40000000097101"}}',
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/tasks/[TASK_ID]/make-as-task"
headers = {
"Authorization": "Bearer 1000.03xxxxxxxxxxxxxxxxxa5317.dxxxxxxxxxxxxxxxxxfa",
"Content-Type": "application/json",
}
payload = '{"positional_info":{"previous_task_id":"40000000097101","next_task_id":"40000000097101"}}'
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/tasks/[TASK_ID]/make-as-task");
curl_easy_setopt(curl, CURLOPT_HTTPHEADER, headers);
curl_easy_setopt(curl, CURLOPT_CUSTOMREQUEST, "POST");
curl_easy_setopt(curl, CURLOPT_POSTFIELDS, "{\"positional_info\":{\"previous_task_id\":\"40000000097101\",\"next_task_id\":\"40000000097101\"}}");
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/tasks/[TASK_ID]/make-as-task");
request.Content = new StringContent(
@"{""positional_info"":{""previous_task_id"":""40000000097101"",""next_task_id"":""40000000097101""}}",
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/tasks/[TASK_ID]/make-as-task");
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, "{\"positional_info\":{\"previous_task_id\":\"40000000097101\",\"next_task_id\":\"40000000097101\"}}");
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/tasks/[TASK_ID]/make-as-task"
{:headers {"Authorization" "Bearer 1000.03xxxxxxxxxxxxxxxxxa5317.dxxxxxxxxxxxxxxxxxfa"
"Content-Type" "application/json"}
:body "{\"positional_info\":{\"previous_task_id\":\"40000000097101\",\"next_task_id\":\"40000000097101\"}}"
:as :json}))
(println (:body response))
package main
import (
"fmt"
"io"
"net/http"
"strings"
)
func main() {
payload := strings.NewReader("{\"positional_info\":{\"previous_task_id\":\"40000000097101\",\"next_task_id\":\"40000000097101\"}}")
req, _ := http.NewRequest("POST", "https://projects.zoho.com/api/v3/portal/[PORTAL_ID]/projects/23806000097545166/tasks/[TASK_ID]/make-as-task", 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/tasks/[TASK_ID]/make-as-task HTTP/1.1
Host: https://projects.zoho.com/api/v3/portal/[PORTAL_ID]/projects/23806000097545166/tasks/[TASK_ID]/make-as-task
Authorization: Bearer 1000.03xxxxxxxxxxxxxxxxxa5317.dxxxxxxxxxxxxxxxxxfa
Content-Type: application/json
{"positional_info":{"previous_task_id":"40000000097101","next_task_id":"40000000097101"}}
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/tasks/[TASK_ID]/make-as-task");
HttpUriRequest requestObj = new HttpPost(uriBuilder.build());
requestObj.addHeader("Authorization", "Bearer 1000.03xxxxxxxxxxxxxxxxxa5317.dxxxxxxxxxxxxxxxxxfa");
HttpEntityEnclosingRequestBase requestBase = (HttpEntityEnclosingRequestBase) requestObj;
String requestBody = "{\"positional_info\":{\"previous_task_id\":\"40000000097101\",\"next_task_id\":\"40000000097101\"}}";
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/tasks/[TASK_ID]/make-as-task';
const options = {
method: 'POST',
headers: {
'Authorization': 'Bearer 1000.03xxxxxxxxxxxxxxxxxa5317.dxxxxxxxxxxxxxxxxxfa',
'Content-Type': 'application/json'
},
body: JSON.stringify({"positional_info":{"previous_task_id":"40000000097101","next_task_id":"40000000097101"}})
};
fetch(url, options)
.then(response => response.json())
.then(data => console.log(data))
.catch(error => console.error(error));
{"positional_info":{"previous_task_id":"40000000097101","next_task_id":"40000000097101"}}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/tasks/[TASK_ID]/make-as-task")
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("""{"positional_info":{"previous_task_id":"40000000097101","next_task_id":"40000000097101"}}""") }
val response = conn.inputStream.bufferedReader().readText()
println(response)
}
NSURL *url = [NSURL URLWithString:@"https://projects.zoho.com/api/v3/portal/[PORTAL_ID]/projects/23806000097545166/tasks/[TASK_ID]/make-as-task"];
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 = [@"{\"positional_info\":{\"previous_task_id\":\"40000000097101\",\"next_task_id\":\"40000000097101\"}}" 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/tasks/[TASK_ID]/make-as-task" 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|{"positional_info":{"previous_task_id":"40000000097101","next_task_id":"40000000097101"}}|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 = @'
{"positional_info":{"previous_task_id":"40000000097101","next_task_id":"40000000097101"}}
'@
$response = Invoke-RestMethod -Uri "https://projects.zoho.com/api/v3/portal/[PORTAL_ID]/projects/23806000097545166/tasks/[TASK_ID]/make-as-task" -Method POST -Headers $headers -Body $body
$response | ConvertTo-Json
library(httr)
url <- "https://projects.zoho.com/api/v3/portal/[PORTAL_ID]/projects/23806000097545166/tasks/[TASK_ID]/make-as-task"
response <- POST(
url,
add_headers(Authorization = "Bearer 1000.03xxxxxxxxxxxxxxxxxa5317.dxxxxxxxxxxxxxxxxxfa"),
content_type_json(),
body = "{\"positional_info\":{\"previous_task_id\":\"40000000097101\",\"next_task_id\":\"40000000097101\"}}"
)
content(response, "text")
import Foundation
let url = URL(string: "https://projects.zoho.com/api/v3/portal/[PORTAL_ID]/projects/23806000097545166/tasks/[TASK_ID]/make-as-task")!
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 = """
{"positional_info":{"previous_task_id":"40000000097101","next_task_id":"40000000097101"}}
""".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 multiple tasks at once in the Zoho Projects portal.Note: A maximum of 100 tasks across 5 unique projects can be updated per request.
OAuth Scope:
ZohoProjects.tasks.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).
JSONArray
array size : 0-800Enter the task details to update.
Request Example
curl -X PATCH \
'https://projects.zoho.com/api/v3/portal/[PORTAL_ID]/bulk-tasks' \
-H 'Authorization: Bearer 1000.03xxxxxxxxxxxxxxxxxa5317.dxxxxxxxxxxxxxxxxxfa' \
-H 'Content-Type: application/json' \
-d '{"tasks":[{"name":"Set Up CI/CD Pipeline for Staging Environment","description":"Configure and validate the CI/CD pipeline for the staging environment prior to production deployment.","status":{"id":"4000000062001"},"priority":"high","start_date":"2024-12-16T09:00:00.000Z","end_date":"2024-12-19T18:00:00.000Z","duration":{"unit":"days","value":"90"},"completion_percentage":20,"billing_type":"billable","attachments":["4000000094003"],"owners_and_work":{"owners":[{"zpuid":"4000000002055","zuid":"57261352","email":"richard.santos@zylker.com","work_values":"8.00"}],"work_type":"standard","unit":"hours","copy_task_duration":"true"},"tags":[{"id":"4000000062001"}],"teams":[{"id":"4000000062001"}],"budget_info":{"rate_per_hour":945.25,"budget":"98420000","threshold":"250000","revenue_budget":1023000,"cost_rate_per_hour":510.75},"color":"#67a0ff"}]}'
url = "https://projects.zoho.com/api/v3/portal/[PORTAL_ID]/bulk-tasks";
params = Map();
params.put("tasks", [{"name":"Set Up CI/CD Pipeline for Staging Environment","description":"Configure and validate the CI/CD pipeline for the staging environment prior to production deployment.","status":{"id":"4000000062001"},"priority":"high","start_date":"2024-12-16T09:00:00.000Z","end_date":"2024-12-19T18:00:00.000Z","duration":{"unit":"days","value":"90"},"completion_percentage":20,"billing_type":"billable","attachments":["4000000094003"],"owners_and_work":{"owners":[{"zpuid":"4000000002055","zuid":"57261352","email":"richard.santos@zylker.com","work_values":"8.00"}],"work_type":"standard","unit":"hours","copy_task_duration":"true"},"tags":[{"id":"4000000062001"}],"teams":[{"id":"4000000062001"}],"budget_info":{"rate_per_hour":945.25,"budget":"98420000","threshold":"250000","revenue_budget":1023000,"cost_rate_per_hour":510.75},"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]/bulk-tasks');
const payload = JSON.stringify({"tasks":[{"name":"Set Up CI/CD Pipeline for Staging Environment","description":"Configure and validate the CI/CD pipeline for the staging environment prior to production deployment.","status":{"id":"4000000062001"},"priority":"high","start_date":"2024-12-16T09:00:00.000Z","end_date":"2024-12-19T18:00:00.000Z","duration":{"unit":"days","value":"90"},"completion_percentage":20,"billing_type":"billable","attachments":["4000000094003"],"owners_and_work":{"owners":[{"zpuid":"4000000002055","zuid":"57261352","email":"richard.santos@zylker.com","work_values":"8.00"}],"work_type":"standard","unit":"hours","copy_task_duration":"true"},"tags":[{"id":"4000000062001"}],"teams":[{"id":"4000000062001"}],"budget_info":{"rate_per_hour":945.25,"budget":"98420000","threshold":"250000","revenue_budget":1023000,"cost_rate_per_hour":510.75},"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]/bulk-tasks")
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 = '{"tasks":[{"name":"Set Up CI/CD Pipeline for Staging Environment","description":"Configure and validate the CI/CD pipeline for the staging environment prior to production deployment.","status":{"id":"4000000062001"},"priority":"high","start_date":"2024-12-16T09:00:00.000Z","end_date":"2024-12-19T18:00:00.000Z","duration":{"unit":"days","value":"90"},"completion_percentage":20,"billing_type":"billable","attachments":["4000000094003"],"owners_and_work":{"owners":[{"zpuid":"4000000002055","zuid":"57261352","email":"richard.santos@zylker.com","work_values":"8.00"}],"work_type":"standard","unit":"hours","copy_task_duration":"true"},"tags":[{"id":"4000000062001"}],"teams":[{"id":"4000000062001"}],"budget_info":{"rate_per_hour":945.25,"budget":"98420000","threshold":"250000","revenue_budget":1023000,"cost_rate_per_hour":510.75},"color":"#67a0ff"}]}'
response = http.request(request)
puts response.read_body
<?php
$url = "https://projects.zoho.com/api/v3/portal/[PORTAL_ID]/bulk-tasks";
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => $url,
CURLOPT_RETURNTRANSFER => true,
CURLOPT_CUSTOMREQUEST => "PATCH",
CURLOPT_POSTFIELDS => '{"tasks":[{"name":"Set Up CI/CD Pipeline for Staging Environment","description":"Configure and validate the CI/CD pipeline for the staging environment prior to production deployment.","status":{"id":"4000000062001"},"priority":"high","start_date":"2024-12-16T09:00:00.000Z","end_date":"2024-12-19T18:00:00.000Z","duration":{"unit":"days","value":"90"},"completion_percentage":20,"billing_type":"billable","attachments":["4000000094003"],"owners_and_work":{"owners":[{"zpuid":"4000000002055","zuid":"57261352","email":"richard.santos@zylker.com","work_values":"8.00"}],"work_type":"standard","unit":"hours","copy_task_duration":"true"},"tags":[{"id":"4000000062001"}],"teams":[{"id":"4000000062001"}],"budget_info":{"rate_per_hour":945.25,"budget":"98420000","threshold":"250000","revenue_budget":1023000,"cost_rate_per_hour":510.75},"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]/bulk-tasks"
headers = {
"Authorization": "Bearer 1000.03xxxxxxxxxxxxxxxxxa5317.dxxxxxxxxxxxxxxxxxfa",
"Content-Type": "application/json",
}
payload = '{"tasks":[{"name":"Set Up CI/CD Pipeline for Staging Environment","description":"Configure and validate the CI/CD pipeline for the staging environment prior to production deployment.","status":{"id":"4000000062001"},"priority":"high","start_date":"2024-12-16T09:00:00.000Z","end_date":"2024-12-19T18:00:00.000Z","duration":{"unit":"days","value":"90"},"completion_percentage":20,"billing_type":"billable","attachments":["4000000094003"],"owners_and_work":{"owners":[{"zpuid":"4000000002055","zuid":"57261352","email":"richard.santos@zylker.com","work_values":"8.00"}],"work_type":"standard","unit":"hours","copy_task_duration":"true"},"tags":[{"id":"4000000062001"}],"teams":[{"id":"4000000062001"}],"budget_info":{"rate_per_hour":945.25,"budget":"98420000","threshold":"250000","revenue_budget":1023000,"cost_rate_per_hour":510.75},"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]/bulk-tasks");
curl_easy_setopt(curl, CURLOPT_HTTPHEADER, headers);
curl_easy_setopt(curl, CURLOPT_CUSTOMREQUEST, "PATCH");
curl_easy_setopt(curl, CURLOPT_POSTFIELDS, "{\"tasks\":[{\"name\":\"Set Up CI/CD Pipeline for Staging Environment\",\"description\":\"Configure and validate the CI/CD pipeline for the staging environment prior to production deployment.\",\"status\":{\"id\":\"4000000062001\"},\"priority\":\"high\",\"start_date\":\"2024-12-16T09:00:00.000Z\",\"end_date\":\"2024-12-19T18:00:00.000Z\",\"duration\":{\"unit\":\"days\",\"value\":\"90\"},\"completion_percentage\":20,\"billing_type\":\"billable\",\"attachments\":[\"4000000094003\"],\"owners_and_work\":{\"owners\":[{\"zpuid\":\"4000000002055\",\"zuid\":\"57261352\",\"email\":\"richard.santos@zylker.com\",\"work_values\":\"8.00\"}],\"work_type\":\"standard\",\"unit\":\"hours\",\"copy_task_duration\":\"true\"},\"tags\":[{\"id\":\"4000000062001\"}],\"teams\":[{\"id\":\"4000000062001\"}],\"budget_info\":{\"rate_per_hour\":945.25,\"budget\":\"98420000\",\"threshold\":\"250000\",\"revenue_budget\":1023000,\"cost_rate_per_hour\":510.75},\"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]/bulk-tasks");
request.Content = new StringContent(
@"{""tasks"":[{""name"":""Set Up CI/CD Pipeline for Staging Environment"",""description"":""Configure and validate the CI/CD pipeline for the staging environment prior to production deployment."",""status"":{""id"":""4000000062001""},""priority"":""high"",""start_date"":""2024-12-16T09:00:00.000Z"",""end_date"":""2024-12-19T18:00:00.000Z"",""duration"":{""unit"":""days"",""value"":""90""},""completion_percentage"":20,""billing_type"":""billable"",""attachments"":[""4000000094003""],""owners_and_work"":{""owners"":[{""zpuid"":""4000000002055"",""zuid"":""57261352"",""email"":""richard.santos@zylker.com"",""work_values"":""8.00""}],""work_type"":""standard"",""unit"":""hours"",""copy_task_duration"":""true""},""tags"":[{""id"":""4000000062001""}],""teams"":[{""id"":""4000000062001""}],""budget_info"":{""rate_per_hour"":945.25,""budget"":""98420000"",""threshold"":""250000"",""revenue_budget"":1023000,""cost_rate_per_hour"":510.75},""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]/bulk-tasks");
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, "{\"tasks\":[{\"name\":\"Set Up CI/CD Pipeline for Staging Environment\",\"description\":\"Configure and validate the CI/CD pipeline for the staging environment prior to production deployment.\",\"status\":{\"id\":\"4000000062001\"},\"priority\":\"high\",\"start_date\":\"2024-12-16T09:00:00.000Z\",\"end_date\":\"2024-12-19T18:00:00.000Z\",\"duration\":{\"unit\":\"days\",\"value\":\"90\"},\"completion_percentage\":20,\"billing_type\":\"billable\",\"attachments\":[\"4000000094003\"],\"owners_and_work\":{\"owners\":[{\"zpuid\":\"4000000002055\",\"zuid\":\"57261352\",\"email\":\"richard.santos@zylker.com\",\"work_values\":\"8.00\"}],\"work_type\":\"standard\",\"unit\":\"hours\",\"copy_task_duration\":\"true\"},\"tags\":[{\"id\":\"4000000062001\"}],\"teams\":[{\"id\":\"4000000062001\"}],\"budget_info\":{\"rate_per_hour\":945.25,\"budget\":\"98420000\",\"threshold\":\"250000\",\"revenue_budget\":1023000,\"cost_rate_per_hour\":510.75},\"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]/bulk-tasks"
{:headers {"Authorization" "Bearer 1000.03xxxxxxxxxxxxxxxxxa5317.dxxxxxxxxxxxxxxxxxfa"
"Content-Type" "application/json"}
:body "{\"tasks\":[{\"name\":\"Set Up CI/CD Pipeline for Staging Environment\",\"description\":\"Configure and validate the CI/CD pipeline for the staging environment prior to production deployment.\",\"status\":{\"id\":\"4000000062001\"},\"priority\":\"high\",\"start_date\":\"2024-12-16T09:00:00.000Z\",\"end_date\":\"2024-12-19T18:00:00.000Z\",\"duration\":{\"unit\":\"days\",\"value\":\"90\"},\"completion_percentage\":20,\"billing_type\":\"billable\",\"attachments\":[\"4000000094003\"],\"owners_and_work\":{\"owners\":[{\"zpuid\":\"4000000002055\",\"zuid\":\"57261352\",\"email\":\"richard.santos@zylker.com\",\"work_values\":\"8.00\"}],\"work_type\":\"standard\",\"unit\":\"hours\",\"copy_task_duration\":\"true\"},\"tags\":[{\"id\":\"4000000062001\"}],\"teams\":[{\"id\":\"4000000062001\"}],\"budget_info\":{\"rate_per_hour\":945.25,\"budget\":\"98420000\",\"threshold\":\"250000\",\"revenue_budget\":1023000,\"cost_rate_per_hour\":510.75},\"color\":\"#67a0ff\"}]}"
:as :json}))
(println (:body response))
package main
import (
"fmt"
"io"
"net/http"
"strings"
)
func main() {
payload := strings.NewReader("{\"tasks\":[{\"name\":\"Set Up CI/CD Pipeline for Staging Environment\",\"description\":\"Configure and validate the CI/CD pipeline for the staging environment prior to production deployment.\",\"status\":{\"id\":\"4000000062001\"},\"priority\":\"high\",\"start_date\":\"2024-12-16T09:00:00.000Z\",\"end_date\":\"2024-12-19T18:00:00.000Z\",\"duration\":{\"unit\":\"days\",\"value\":\"90\"},\"completion_percentage\":20,\"billing_type\":\"billable\",\"attachments\":[\"4000000094003\"],\"owners_and_work\":{\"owners\":[{\"zpuid\":\"4000000002055\",\"zuid\":\"57261352\",\"email\":\"richard.santos@zylker.com\",\"work_values\":\"8.00\"}],\"work_type\":\"standard\",\"unit\":\"hours\",\"copy_task_duration\":\"true\"},\"tags\":[{\"id\":\"4000000062001\"}],\"teams\":[{\"id\":\"4000000062001\"}],\"budget_info\":{\"rate_per_hour\":945.25,\"budget\":\"98420000\",\"threshold\":\"250000\",\"revenue_budget\":1023000,\"cost_rate_per_hour\":510.75},\"color\":\"#67a0ff\"}]}")
req, _ := http.NewRequest("PATCH", "https://projects.zoho.com/api/v3/portal/[PORTAL_ID]/bulk-tasks", 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]/bulk-tasks HTTP/1.1
Host: https://projects.zoho.com/api/v3/portal/[PORTAL_ID]/bulk-tasks
Authorization: Bearer 1000.03xxxxxxxxxxxxxxxxxa5317.dxxxxxxxxxxxxxxxxxfa
Content-Type: application/json
{"tasks":[{"name":"Set Up CI/CD Pipeline for Staging Environment","description":"Configure and validate the CI/CD pipeline for the staging environment prior to production deployment.","status":{"id":"4000000062001"},"priority":"high","start_date":"2024-12-16T09:00:00.000Z","end_date":"2024-12-19T18:00:00.000Z","duration":{"unit":"days","value":"90"},"completion_percentage":20,"billing_type":"billable","attachments":["4000000094003"],"owners_and_work":{"owners":[{"zpuid":"4000000002055","zuid":"57261352","email":"richard.santos@zylker.com","work_values":"8.00"}],"work_type":"standard","unit":"hours","copy_task_duration":"true"},"tags":[{"id":"4000000062001"}],"teams":[{"id":"4000000062001"}],"budget_info":{"rate_per_hour":945.25,"budget":"98420000","threshold":"250000","revenue_budget":1023000,"cost_rate_per_hour":510.75},"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]/bulk-tasks");
HttpUriRequest requestObj = new HttpPatch(uriBuilder.build());
requestObj.addHeader("Authorization", "Bearer 1000.03xxxxxxxxxxxxxxxxxa5317.dxxxxxxxxxxxxxxxxxfa");
HttpEntityEnclosingRequestBase requestBase = (HttpEntityEnclosingRequestBase) requestObj;
String requestBody = "{\"tasks\":[{\"name\":\"Set Up CI\/CD Pipeline for Staging Environment\",\"description\":\"Configure and validate the CI\/CD pipeline for the staging environment prior to production deployment.\",\"status\":{\"id\":\"4000000062001\"},\"priority\":\"high\",\"start_date\":\"2024-12-16T09:00:00.000Z\",\"end_date\":\"2024-12-19T18:00:00.000Z\",\"duration\":{\"unit\":\"days\",\"value\":\"90\"},\"completion_percentage\":20,\"billing_type\":\"billable\",\"attachments\":[\"4000000094003\"],\"owners_and_work\":{\"owners\":[{\"zpuid\":\"4000000002055\",\"zuid\":\"57261352\",\"email\":\"richard.santos@zylker.com\",\"work_values\":\"8.00\"}],\"work_type\":\"standard\",\"unit\":\"hours\",\"copy_task_duration\":\"true\"},\"tags\":[{\"id\":\"4000000062001\"}],\"teams\":[{\"id\":\"4000000062001\"}],\"budget_info\":{\"rate_per_hour\":945.25,\"budget\":\"98420000\",\"threshold\":\"250000\",\"revenue_budget\":1023000,\"cost_rate_per_hour\":510.75},\"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]/bulk-tasks';
const options = {
method: 'PATCH',
headers: {
'Authorization': 'Bearer 1000.03xxxxxxxxxxxxxxxxxa5317.dxxxxxxxxxxxxxxxxxfa',
'Content-Type': 'application/json'
},
body: JSON.stringify({"tasks":[{"name":"Set Up CI/CD Pipeline for Staging Environment","description":"Configure and validate the CI/CD pipeline for the staging environment prior to production deployment.","status":{"id":"4000000062001"},"priority":"high","start_date":"2024-12-16T09:00:00.000Z","end_date":"2024-12-19T18:00:00.000Z","duration":{"unit":"days","value":"90"},"completion_percentage":20,"billing_type":"billable","attachments":["4000000094003"],"owners_and_work":{"owners":[{"zpuid":"4000000002055","zuid":"57261352","email":"richard.santos@zylker.com","work_values":"8.00"}],"work_type":"standard","unit":"hours","copy_task_duration":"true"},"tags":[{"id":"4000000062001"}],"teams":[{"id":"4000000062001"}],"budget_info":{"rate_per_hour":945.25,"budget":"98420000","threshold":"250000","revenue_budget":1023000,"cost_rate_per_hour":510.75},"color":"#67a0ff"}]})
};
fetch(url, options)
.then(response => response.json())
.then(data => console.log(data))
.catch(error => console.error(error));
{"tasks":[{"name":"Set Up CI/CD Pipeline for Staging Environment","description":"Configure and validate the CI/CD pipeline for the staging environment prior to production deployment.","status":{"id":"4000000062001"},"priority":"high","start_date":"2024-12-16T09:00:00.000Z","end_date":"2024-12-19T18:00:00.000Z","duration":{"unit":"days","value":"90"},"completion_percentage":20,"billing_type":"billable","attachments":["4000000094003"],"owners_and_work":{"owners":[{"zpuid":"4000000002055","zuid":"57261352","email":"richard.santos@zylker.com","work_values":"8.00"}],"work_type":"standard","unit":"hours","copy_task_duration":"true"},"tags":[{"id":"4000000062001"}],"teams":[{"id":"4000000062001"}],"budget_info":{"rate_per_hour":945.25,"budget":"98420000","threshold":"250000","revenue_budget":1023000,"cost_rate_per_hour":510.75},"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]/bulk-tasks")
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("""{"tasks":[{"name":"Set Up CI/CD Pipeline for Staging Environment","description":"Configure and validate the CI/CD pipeline for the staging environment prior to production deployment.","status":{"id":"4000000062001"},"priority":"high","start_date":"2024-12-16T09:00:00.000Z","end_date":"2024-12-19T18:00:00.000Z","duration":{"unit":"days","value":"90"},"completion_percentage":20,"billing_type":"billable","attachments":["4000000094003"],"owners_and_work":{"owners":[{"zpuid":"4000000002055","zuid":"57261352","email":"richard.santos@zylker.com","work_values":"8.00"}],"work_type":"standard","unit":"hours","copy_task_duration":"true"},"tags":[{"id":"4000000062001"}],"teams":[{"id":"4000000062001"}],"budget_info":{"rate_per_hour":945.25,"budget":"98420000","threshold":"250000","revenue_budget":1023000,"cost_rate_per_hour":510.75},"color":"#67a0ff"}]}""") }
val response = conn.inputStream.bufferedReader().readText()
println(response)
}
NSURL *url = [NSURL URLWithString:@"https://projects.zoho.com/api/v3/portal/[PORTAL_ID]/bulk-tasks"];
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 = [@"{\"tasks\":[{\"name\":\"Set Up CI/CD Pipeline for Staging Environment\",\"description\":\"Configure and validate the CI/CD pipeline for the staging environment prior to production deployment.\",\"status\":{\"id\":\"4000000062001\"},\"priority\":\"high\",\"start_date\":\"2024-12-16T09:00:00.000Z\",\"end_date\":\"2024-12-19T18:00:00.000Z\",\"duration\":{\"unit\":\"days\",\"value\":\"90\"},\"completion_percentage\":20,\"billing_type\":\"billable\",\"attachments\":[\"4000000094003\"],\"owners_and_work\":{\"owners\":[{\"zpuid\":\"4000000002055\",\"zuid\":\"57261352\",\"email\":\"richard.santos@zylker.com\",\"work_values\":\"8.00\"}],\"work_type\":\"standard\",\"unit\":\"hours\",\"copy_task_duration\":\"true\"},\"tags\":[{\"id\":\"4000000062001\"}],\"teams\":[{\"id\":\"4000000062001\"}],\"budget_info\":{\"rate_per_hour\":945.25,\"budget\":\"98420000\",\"threshold\":\"250000\",\"revenue_budget\":1023000,\"cost_rate_per_hour\":510.75},\"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]/bulk-tasks" 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|{"tasks":[{"name":"Set Up CI/CD Pipeline for Staging Environment","description":"Configure and validate the CI/CD pipeline for the staging environment prior to production deployment.","status":{"id":"4000000062001"},"priority":"high","start_date":"2024-12-16T09:00:00.000Z","end_date":"2024-12-19T18:00:00.000Z","duration":{"unit":"days","value":"90"},"completion_percentage":20,"billing_type":"billable","attachments":["4000000094003"],"owners_and_work":{"owners":[{"zpuid":"4000000002055","zuid":"57261352","email":"richard.santos@zylker.com","work_values":"8.00"}],"work_type":"standard","unit":"hours","copy_task_duration":"true"},"tags":[{"id":"4000000062001"}],"teams":[{"id":"4000000062001"}],"budget_info":{"rate_per_hour":945.25,"budget":"98420000","threshold":"250000","revenue_budget":1023000,"cost_rate_per_hour":510.75},"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 = @'
{"tasks":[{"name":"Set Up CI/CD Pipeline for Staging Environment","description":"Configure and validate the CI/CD pipeline for the staging environment prior to production deployment.","status":{"id":"4000000062001"},"priority":"high","start_date":"2024-12-16T09:00:00.000Z","end_date":"2024-12-19T18:00:00.000Z","duration":{"unit":"days","value":"90"},"completion_percentage":20,"billing_type":"billable","attachments":["4000000094003"],"owners_and_work":{"owners":[{"zpuid":"4000000002055","zuid":"57261352","email":"richard.santos@zylker.com","work_values":"8.00"}],"work_type":"standard","unit":"hours","copy_task_duration":"true"},"tags":[{"id":"4000000062001"}],"teams":[{"id":"4000000062001"}],"budget_info":{"rate_per_hour":945.25,"budget":"98420000","threshold":"250000","revenue_budget":1023000,"cost_rate_per_hour":510.75},"color":"#67a0ff"}]}
'@
$response = Invoke-RestMethod -Uri "https://projects.zoho.com/api/v3/portal/[PORTAL_ID]/bulk-tasks" -Method PATCH -Headers $headers -Body $body
$response | ConvertTo-Json
library(httr)
url <- "https://projects.zoho.com/api/v3/portal/[PORTAL_ID]/bulk-tasks"
response <- PATCH(
url,
add_headers(Authorization = "Bearer 1000.03xxxxxxxxxxxxxxxxxa5317.dxxxxxxxxxxxxxxxxxfa"),
content_type_json(),
body = "{\"tasks\":[{\"name\":\"Set Up CI/CD Pipeline for Staging Environment\",\"description\":\"Configure and validate the CI/CD pipeline for the staging environment prior to production deployment.\",\"status\":{\"id\":\"4000000062001\"},\"priority\":\"high\",\"start_date\":\"2024-12-16T09:00:00.000Z\",\"end_date\":\"2024-12-19T18:00:00.000Z\",\"duration\":{\"unit\":\"days\",\"value\":\"90\"},\"completion_percentage\":20,\"billing_type\":\"billable\",\"attachments\":[\"4000000094003\"],\"owners_and_work\":{\"owners\":[{\"zpuid\":\"4000000002055\",\"zuid\":\"57261352\",\"email\":\"richard.santos@zylker.com\",\"work_values\":\"8.00\"}],\"work_type\":\"standard\",\"unit\":\"hours\",\"copy_task_duration\":\"true\"},\"tags\":[{\"id\":\"4000000062001\"}],\"teams\":[{\"id\":\"4000000062001\"}],\"budget_info\":{\"rate_per_hour\":945.25,\"budget\":\"98420000\",\"threshold\":\"250000\",\"revenue_budget\":1023000,\"cost_rate_per_hour\":510.75},\"color\":\"#67a0ff\"}]}"
)
content(response, "text")
import Foundation
let url = URL(string: "https://projects.zoho.com/api/v3/portal/[PORTAL_ID]/bulk-tasks")!
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 = """
{"tasks":[{"name":"Set Up CI/CD Pipeline for Staging Environment","description":"Configure and validate the CI/CD pipeline for the staging environment prior to production deployment.","status":{"id":"4000000062001"},"priority":"high","start_date":"2024-12-16T09:00:00.000Z","end_date":"2024-12-19T18:00:00.000Z","duration":{"unit":"days","value":"90"},"completion_percentage":20,"billing_type":"billable","attachments":["4000000094003"],"owners_and_work":{"owners":[{"zpuid":"4000000002055","zuid":"57261352","email":"richard.santos@zylker.com","work_values":"8.00"}],"work_type":"standard","unit":"hours","copy_task_duration":"true"},"tags":[{"id":"4000000062001"}],"teams":[{"id":"4000000062001"}],"budget_info":{"rate_per_hour":945.25,"budget":"98420000","threshold":"250000","revenue_budget":1023000,"cost_rate_per_hour":510.75},"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