Phases
This module covers Phase-related operations within Zoho Projects. Use this API to create, retrieve, update, manage, delete, move, or clone Phases.
This module covers Phase-related operations within Zoho Projects. Use this API to create, retrieve, update, manage, delete, move, or clone Phases.
OAuth Scope:
ZohoProjects.milestones.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.
int
limit : 1-200Enter the number of entries to be displayed per page.
String
Enter the sort criteria. Accepted values: ASC(field_name) or DESC(field_name)
String
Enter the ID of the custom view
String
Enter the IDs of phases to be retrieved You can obtain it from the Get Milestones API (the "id" field in the response).
JSONObject
Enter the filter criteria for the phases
Request Example
curl -X GET \
'https://projects.zoho.com/api/v3/portal/[PORTAL_ID]/phases?page=1&per_page=10&sort_by=ASC%28last_modified_time%29&view_id=23806000074760021&milestone_ids=139655000000057003%2C139655000000057004%2C139655000000057005&filter=%7B%22criteria%22%3A%5B%7B%22cfid%22%3A%226000000035033%22%2C%22api_name%22%3A%22status%22%2C%22field_name%22%3A%22project%22%2C%22criteria_condition%22%3A%22is%22%2C%22value%22%3A%5B%221752587000000097269%22%5D%2C%22relative_columns%22%3A%5B%7B%22cfid%22%3A%226000000035033%22%2C%22offset%22%3A%221%22%2C%22unit%22%3A%22days%22%2C%22prior%22%3A%22before%22%7D%5D%7D%5D%2C%22pattern%22%3A%221%22%7D' \
-H 'Authorization: Bearer 1000.03xxxxxxxxxxxxxxxxxa5317.dxxxxxxxxxxxxxxxxxfa'
url = "https://projects.zoho.com/api/v3/portal/[PORTAL_ID]/phases";
filter_value = {"criteria":[{"cfid":"6000000035033","api_name":"status","field_name":"project","criteria_condition":"is","value":["1752587000000097269"],"relative_columns":[{"cfid":"6000000035033","offset":"1","unit":"days","prior":"before"}]}],"pattern":"1"};
params = Map();
params.put("page", "1");
params.put("per_page", "10");
params.put("sort_by", "ASC(last_modified_time)");
params.put("view_id", "23806000074760021");
params.put("milestone_ids", "139655000000057003,139655000000057004,139655000000057005");
params.put("filter", filter_value);
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]/phases');
url.searchParams.append('page', '1');
url.searchParams.append('per_page', '10');
url.searchParams.append('sort_by', 'ASC(last_modified_time)');
url.searchParams.append('view_id', '23806000074760021');
url.searchParams.append('milestone_ids', '139655000000057003,139655000000057004,139655000000057005');
url.searchParams.append('filter', '{"criteria":[{"cfid":"6000000035033","api_name":"status","field_name":"project","criteria_condition":"is","value":["1752587000000097269"],"relative_columns":[{"cfid":"6000000035033","offset":"1","unit":"days","prior":"before"}]}],"pattern":"1"}');
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]/phases")
params = {
"page" => "1",
"per_page" => "10",
"sort_by" => "ASC(last_modified_time)",
"view_id" => "23806000074760021",
"milestone_ids" => "139655000000057003,139655000000057004,139655000000057005",
"filter" => "{\"criteria\":[{\"cfid\":\"6000000035033\",\"api_name\":\"status\",\"field_name\":\"project\",\"criteria_condition\":\"is\",\"value\":[\"1752587000000097269\"],\"relative_columns\":[{\"cfid\":\"6000000035033\",\"offset\":\"1\",\"unit\":\"days\",\"prior\":\"before\"}]}],\"pattern\":\"1\"}"
}
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',
'sort_by' => 'ASC(last_modified_time)',
'view_id' => '23806000074760021',
'milestone_ids' => '139655000000057003,139655000000057004,139655000000057005',
'filter' => '{"criteria":[{"cfid":"6000000035033","api_name":"status","field_name":"project","criteria_condition":"is","value":["1752587000000097269"],"relative_columns":[{"cfid":"6000000035033","offset":"1","unit":"days","prior":"before"}]}],"pattern":"1"}',
];
$url = "https://projects.zoho.com/api/v3/portal/[PORTAL_ID]/phases" . "?" . 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]/phases"
params = {
"page": "1",
"per_page": "10",
"sort_by": "ASC(last_modified_time)",
"view_id": "23806000074760021",
"milestone_ids": "139655000000057003,139655000000057004,139655000000057005",
"filter": "{\"criteria\":[{\"cfid\":\"6000000035033\",\"api_name\":\"status\",\"field_name\":\"project\",\"criteria_condition\":\"is\",\"value\":[\"1752587000000097269\"],\"relative_columns\":[{\"cfid\":\"6000000035033\",\"offset\":\"1\",\"unit\":\"days\",\"prior\":\"before\"}]}],\"pattern\":\"1\"}"
}
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_sort_by = curl_easy_escape(curl, "ASC(last_modified_time)", 0);
char *enc_view_id = curl_easy_escape(curl, "23806000074760021", 0);
char *enc_milestone_ids = curl_easy_escape(curl, "139655000000057003,139655000000057004,139655000000057005", 0);
char *enc_filter = curl_easy_escape(curl, "{\"criteria\":[{\"cfid\":\"6000000035033\",\"api_name\":\"status\",\"field_name\":\"project\",\"criteria_condition\":\"is\",\"value\":[\"1752587000000097269\"],\"relative_columns\":[{\"cfid\":\"6000000035033\",\"offset\":\"1\",\"unit\":\"days\",\"prior\":\"before\"}]}],\"pattern\":\"1\"}", 0);
char url[2048];
snprintf(url, sizeof(url), "https://projects.zoho.com/api/v3/portal/[PORTAL_ID]/phases?page=%s&per_page=%s&sort_by=%s&view_id=%s&milestone_ids=%s&filter=%s", enc_page, enc_per_page, enc_sort_by, enc_view_id, enc_milestone_ids, enc_filter);
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_sort_by);
curl_free(enc_view_id);
curl_free(enc_milestone_ids);
curl_free(enc_filter);
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["sort_by"] = "ASC(last_modified_time)";
query["view_id"] = "23806000074760021";
query["milestone_ids"] = "139655000000057003,139655000000057004,139655000000057005";
query["filter"] = "{\"criteria\":[{\"cfid\":\"6000000035033\",\"api_name\":\"status\",\"field_name\":\"project\",\"criteria_condition\":\"is\",\"value\":[\"1752587000000097269\"],\"relative_columns\":[{\"cfid\":\"6000000035033\",\"offset\":\"1\",\"unit\":\"days\",\"prior\":\"before\"}]}],\"pattern\":\"1\"}";
var uriBuilder = new UriBuilder("https://projects.zoho.com/api/v3/portal/[PORTAL_ID]/phases") { 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_sort_by = curl_easy_escape(curl, "ASC(last_modified_time)", 0);
char* enc_view_id = curl_easy_escape(curl, "23806000074760021", 0);
char* enc_milestone_ids = curl_easy_escape(curl, "139655000000057003,139655000000057004,139655000000057005", 0);
char* enc_filter = curl_easy_escape(curl, "{\"criteria\":[{\"cfid\":\"6000000035033\",\"api_name\":\"status\",\"field_name\":\"project\",\"criteria_condition\":\"is\",\"value\":[\"1752587000000097269\"],\"relative_columns\":[{\"cfid\":\"6000000035033\",\"offset\":\"1\",\"unit\":\"days\",\"prior\":\"before\"}]}],\"pattern\":\"1\"}", 0);
std::string url = "https://projects.zoho.com/api/v3/portal/[PORTAL_ID]/phases";
url += "?page=" + std::string(enc_page);
url += "&per_page=" + std::string(enc_per_page);
url += "&sort_by=" + std::string(enc_sort_by);
url += "&view_id=" + std::string(enc_view_id);
url += "&milestone_ids=" + std::string(enc_milestone_ids);
url += "&filter=" + std::string(enc_filter);
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_sort_by);
curl_free(enc_view_id);
curl_free(enc_milestone_ids);
curl_free(enc_filter);
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-sort_by (java.net.URLEncoder/encode "ASC(last_modified_time)" "UTF-8")
enc-view_id (java.net.URLEncoder/encode "23806000074760021" "UTF-8")
enc-milestone_ids (java.net.URLEncoder/encode "139655000000057003,139655000000057004,139655000000057005" "UTF-8")
enc-filter (java.net.URLEncoder/encode "{\"criteria\":[{\"cfid\":\"6000000035033\",\"api_name\":\"status\",\"field_name\":\"project\",\"criteria_condition\":\"is\",\"value\":[\"1752587000000097269\"],\"relative_columns\":[{\"cfid\":\"6000000035033\",\"offset\":\"1\",\"unit\":\"days\",\"prior\":\"before\"}]}],\"pattern\":\"1\"}" "UTF-8")
url (str "https://projects.zoho.com/api/v3/portal/[PORTAL_ID]/phases" "?page=" enc-page "&per_page=" enc-per_page "&sort_by=" enc-sort_by "&view_id=" enc-view_id "&milestone_ids=" enc-milestone_ids "&filter=" enc-filter)]
(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]/phases", nil)
q := req.URL.Query()
q.Add("page", "1")
q.Add("per_page", "10")
q.Add("sort_by", "ASC(last_modified_time)")
q.Add("view_id", "23806000074760021")
q.Add("milestone_ids", "139655000000057003,139655000000057004,139655000000057005")
q.Add("filter", "{\"criteria\":[{\"cfid\":\"6000000035033\",\"api_name\":\"status\",\"field_name\":\"project\",\"criteria_condition\":\"is\",\"value\":[\"1752587000000097269\"],\"relative_columns\":[{\"cfid\":\"6000000035033\",\"offset\":\"1\",\"unit\":\"days\",\"prior\":\"before\"}]}],\"pattern\":\"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))
}
GET https://projects.zoho.com/api/v3/portal/[PORTAL_ID]/phases?page=1&per_page=10&sort_by=ASC%28last_modified_time%29&view_id=23806000074760021&milestone_ids=139655000000057003%2C139655000000057004%2C139655000000057005&filter=%7B%22criteria%22%3A%5B%7B%22cfid%22%3A%226000000035033%22%2C%22api_name%22%3A%22status%22%2C%22field_name%22%3A%22project%22%2C%22criteria_condition%22%3A%22is%22%2C%22value%22%3A%5B%221752587000000097269%22%5D%2C%22relative_columns%22%3A%5B%7B%22cfid%22%3A%226000000035033%22%2C%22offset%22%3A%221%22%2C%22unit%22%3A%22days%22%2C%22prior%22%3A%22before%22%7D%5D%7D%5D%2C%22pattern%22%3A%221%22%7D HTTP/1.1
Host: https://projects.zoho.com/api/v3/portal/[PORTAL_ID]/phases?page=1&per_page=10&sort_by=ASC%28last_modified_time%29&view_id=23806000074760021&milestone_ids=139655000000057003%2C139655000000057004%2C139655000000057005&filter=%7B%22criteria%22%3A%5B%7B%22cfid%22%3A%226000000035033%22%2C%22api_name%22%3A%22status%22%2C%22field_name%22%3A%22project%22%2C%22criteria_condition%22%3A%22is%22%2C%22value%22%3A%5B%221752587000000097269%22%5D%2C%22relative_columns%22%3A%5B%7B%22cfid%22%3A%226000000035033%22%2C%22offset%22%3A%221%22%2C%22unit%22%3A%22days%22%2C%22prior%22%3A%22before%22%7D%5D%7D%5D%2C%22pattern%22%3A%221%22%7D
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]/phases");
uriBuilder.addParameter("page", "1");
uriBuilder.addParameter("per_page", "10");
uriBuilder.addParameter("sort_by", "ASC(last_modified_time)");
uriBuilder.addParameter("view_id", "23806000074760021");
uriBuilder.addParameter("milestone_ids", "139655000000057003,139655000000057004,139655000000057005");
uriBuilder.addParameter("filter", "{\"criteria\":[{\"cfid\":\"6000000035033\",\"api_name\":\"status\",\"field_name\":\"project\",\"criteria_condition\":\"is\",\"value\":[\"1752587000000097269\"],\"relative_columns\":[{\"cfid\":\"6000000035033\",\"offset\":\"1\",\"unit\":\"days\",\"prior\":\"before\"}]}],\"pattern\":\"1\"}");
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]/phases';
const params = new URLSearchParams({
'page': '1',
'per_page': '10',
'sort_by': 'ASC(last_modified_time)',
'view_id': '23806000074760021',
'milestone_ids': '139655000000057003,139655000000057004,139655000000057005',
'filter': '{"criteria":[{"cfid":"6000000035033","api_name":"status","field_name":"project","criteria_condition":"is","value":["1752587000000097269"],"relative_columns":[{"cfid":"6000000035033","offset":"1","unit":"days","prior":"before"}]}],"pattern":"1"}'
});
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"
sort_by = "ASC(last_modified_time)"
view_id = "23806000074760021"
milestone_ids = "139655000000057003,139655000000057004,139655000000057005"
filter = {"criteria":[{"cfid":"6000000035033","api_name":"status","field_name":"project","criteria_condition":"is","value":["1752587000000097269"],"relative_columns":[{"cfid":"6000000035033","offset":"1","unit":"days","prior":"before"}]}],"pattern":"1"}
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]/phases".toHttpUrl().newBuilder()
urlBuilder.addQueryParameter("page", "1")
urlBuilder.addQueryParameter("per_page", "10")
urlBuilder.addQueryParameter("sort_by", "ASC(last_modified_time)")
urlBuilder.addQueryParameter("view_id", "23806000074760021")
urlBuilder.addQueryParameter("milestone_ids", "139655000000057003,139655000000057004,139655000000057005")
urlBuilder.addQueryParameter("filter", "{\"criteria\":[{\"cfid\":\"6000000035033\",\"api_name\":\"status\",\"field_name\":\"project\",\"criteria_condition\":\"is\",\"value\":[\"1752587000000097269\"],\"relative_columns\":[{\"cfid\":\"6000000035033\",\"offset\":\"1\",\"unit\":\"days\",\"prior\":\"before\"}]}],\"pattern\":\"1\"}")
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 *encodedSort_by = [@"ASC(last_modified_time)" stringByAddingPercentEncodingWithAllowedCharacters:[NSCharacterSet URLQueryAllowedCharacterSet]];
NSString *encodedView_id = [@"23806000074760021" stringByAddingPercentEncodingWithAllowedCharacters:[NSCharacterSet URLQueryAllowedCharacterSet]];
NSString *encodedMilestone_ids = [@"139655000000057003,139655000000057004,139655000000057005" stringByAddingPercentEncodingWithAllowedCharacters:[NSCharacterSet URLQueryAllowedCharacterSet]];
NSString *encodedFilter = [@"{\"criteria\":[{\"cfid\":\"6000000035033\",\"api_name\":\"status\",\"field_name\":\"project\",\"criteria_condition\":\"is\",\"value\":[\"1752587000000097269\"],\"relative_columns\":[{\"cfid\":\"6000000035033\",\"offset\":\"1\",\"unit\":\"days\",\"prior\":\"before\"}]}],\"pattern\":\"1\"}" stringByAddingPercentEncodingWithAllowedCharacters:[NSCharacterSet URLQueryAllowedCharacterSet]];
NSString *urlString = [NSString stringWithFormat:@"https://projects.zoho.com/api/v3/portal/[PORTAL_ID]/phases?page=%@&per_page=%@&sort_by=%@&view_id=%@&milestone_ids=%@&filter=%@", encodedPage, encodedPer_page, encodedSort_by, encodedView_id, encodedMilestone_ids, encodedFilter];
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_sort_by = Uri.pct_encode "ASC(last_modified_time)" in
let enc_view_id = Uri.pct_encode "23806000074760021" in
let enc_milestone_ids = Uri.pct_encode "139655000000057003,139655000000057004,139655000000057005" in
let enc_filter = Uri.pct_encode "{\"criteria\":[{\"cfid\":\"6000000035033\",\"api_name\":\"status\",\"field_name\":\"project\",\"criteria_condition\":\"is\",\"value\":[\"1752587000000097269\"],\"relative_columns\":[{\"cfid\":\"6000000035033\",\"offset\":\"1\",\"unit\":\"days\",\"prior\":\"before\"}]}],\"pattern\":\"1\"}" in
let uri = Uri.of_string ("https://projects.zoho.com/api/v3/portal/[PORTAL_ID]/phases" ^ "?page=" ^ enc_page ^ "&per_page=" ^ enc_per_page ^ "&sort_by=" ^ enc_sort_by ^ "&view_id=" ^ enc_view_id ^ "&milestone_ids=" ^ enc_milestone_ids ^ "&filter=" ^ enc_filter) 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"
sort_by = "ASC(last_modified_time)"
view_id = "23806000074760021"
milestone_ids = "139655000000057003,139655000000057004,139655000000057005"
filter = "{`"criteria`":[{`"cfid`":`"6000000035033`",`"api_name`":`"status`",`"field_name`":`"project`",`"criteria_condition`":`"is`",`"value`":[`"1752587000000097269`"],`"relative_columns`":[{`"cfid`":`"6000000035033`",`"offset`":`"1`",`"unit`":`"days`",`"prior`":`"before`"}]}],`"pattern`":`"1`"}"
}
$queryString = ($params.GetEnumerator() | ForEach-Object { "$($_.Key)=$([System.Uri]::EscapeDataString($_.Value))" }) -join "&"
$url = "https://projects.zoho.com/api/v3/portal/[PORTAL_ID]/phases" + "?" + $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]/phases"
params <- list(
page = "1",
per_page = "10",
sort_by = "ASC(last_modified_time)",
view_id = "23806000074760021",
milestone_ids = "139655000000057003,139655000000057004,139655000000057005",
filter = "{\"criteria\":[{\"cfid\":\"6000000035033\",\"api_name\":\"status\",\"field_name\":\"project\",\"criteria_condition\":\"is\",\"value\":[\"1752587000000097269\"],\"relative_columns\":[{\"cfid\":\"6000000035033\",\"offset\":\"1\",\"unit\":\"days\",\"prior\":\"before\"}]}],\"pattern\":\"1\"}"
)
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]/phases")!
components.queryItems = [
URLQueryItem(name: "page", value: "1"),
URLQueryItem(name: "per_page", value: "10"),
URLQueryItem(name: "sort_by", value: "ASC(last_modified_time)"),
URLQueryItem(name: "view_id", value: "23806000074760021"),
URLQueryItem(name: "milestone_ids", value: "139655000000057003,139655000000057004,139655000000057005"),
URLQueryItem(name: "filter", value: "{\"criteria\":[{\"cfid\":\"6000000035033\",\"api_name\":\"status\",\"field_name\":\"project\",\"criteria_condition\":\"is\",\"value\":[\"1752587000000097269\"],\"relative_columns\":[{\"cfid\":\"6000000035033\",\"offset\":\"1\",\"unit\":\"days\",\"prior\":\"before\"}]}],\"pattern\":\"1\"}")
]
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
This API is deprecated. Use Get Project Phases (v3.1) instead.
Retrieve phases from a project. Use this API to fetch phase list using filters, sorting, and pagination.
OAuth Scope:
ZohoProjects.milestones.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.
int
limit : 1-200Enter the number of entries to be displayed per page.
String
Enter the sort criteria. Accepted values: ASC(field_name) or DESC(field_name)
String
Enter the ID of the custom view You can obtain it from the Get Task Custom Views API (the "id" field in the response).
String
Enter the IDs of phases to be retrieved You can obtain it from the Get Project Milestones API (the "id" field in the response).
JSONObject
Enter the filter criteria for the phases
Request Example
curl -X GET \
'https://projects.zoho.com/api/v3/portal/[PORTAL_ID]/projects/23806000097545166/phases?page=1&per_page=10&sort_by=ASC%28last_modified_time%29&view_id=23806000074760021&milestone_ids=139655000000057003%2C139655000000057004%2C139655000000057005&filter=%7B%22criteria%22%3A%5B%7B%22cfid%22%3A%226000000035033%22%2C%22api_name%22%3A%22status%22%2C%22field_name%22%3A%22project%22%2C%22criteria_condition%22%3A%22is%22%2C%22value%22%3A%5B%221752587000000097269%22%5D%2C%22relative_columns%22%3A%5B%7B%22cfid%22%3A%226000000035033%22%2C%22offset%22%3A%221%22%2C%22unit%22%3A%22days%22%2C%22prior%22%3A%22before%22%7D%5D%7D%5D%2C%22pattern%22%3A%221%22%7D' \
-H 'Authorization: Bearer 1000.03xxxxxxxxxxxxxxxxxa5317.dxxxxxxxxxxxxxxxxxfa'
url = "https://projects.zoho.com/api/v3/portal/[PORTAL_ID]/projects/23806000097545166/phases";
filter_value = {"criteria":[{"cfid":"6000000035033","api_name":"status","field_name":"project","criteria_condition":"is","value":["1752587000000097269"],"relative_columns":[{"cfid":"6000000035033","offset":"1","unit":"days","prior":"before"}]}],"pattern":"1"};
params = Map();
params.put("page", "1");
params.put("per_page", "10");
params.put("sort_by", "ASC(last_modified_time)");
params.put("view_id", "23806000074760021");
params.put("milestone_ids", "139655000000057003,139655000000057004,139655000000057005");
params.put("filter", filter_value);
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/phases');
url.searchParams.append('page', '1');
url.searchParams.append('per_page', '10');
url.searchParams.append('sort_by', 'ASC(last_modified_time)');
url.searchParams.append('view_id', '23806000074760021');
url.searchParams.append('milestone_ids', '139655000000057003,139655000000057004,139655000000057005');
url.searchParams.append('filter', '{"criteria":[{"cfid":"6000000035033","api_name":"status","field_name":"project","criteria_condition":"is","value":["1752587000000097269"],"relative_columns":[{"cfid":"6000000035033","offset":"1","unit":"days","prior":"before"}]}],"pattern":"1"}');
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/phases")
params = {
"page" => "1",
"per_page" => "10",
"sort_by" => "ASC(last_modified_time)",
"view_id" => "23806000074760021",
"milestone_ids" => "139655000000057003,139655000000057004,139655000000057005",
"filter" => "{\"criteria\":[{\"cfid\":\"6000000035033\",\"api_name\":\"status\",\"field_name\":\"project\",\"criteria_condition\":\"is\",\"value\":[\"1752587000000097269\"],\"relative_columns\":[{\"cfid\":\"6000000035033\",\"offset\":\"1\",\"unit\":\"days\",\"prior\":\"before\"}]}],\"pattern\":\"1\"}"
}
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',
'sort_by' => 'ASC(last_modified_time)',
'view_id' => '23806000074760021',
'milestone_ids' => '139655000000057003,139655000000057004,139655000000057005',
'filter' => '{"criteria":[{"cfid":"6000000035033","api_name":"status","field_name":"project","criteria_condition":"is","value":["1752587000000097269"],"relative_columns":[{"cfid":"6000000035033","offset":"1","unit":"days","prior":"before"}]}],"pattern":"1"}',
];
$url = "https://projects.zoho.com/api/v3/portal/[PORTAL_ID]/projects/23806000097545166/phases" . "?" . 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/phases"
params = {
"page": "1",
"per_page": "10",
"sort_by": "ASC(last_modified_time)",
"view_id": "23806000074760021",
"milestone_ids": "139655000000057003,139655000000057004,139655000000057005",
"filter": "{\"criteria\":[{\"cfid\":\"6000000035033\",\"api_name\":\"status\",\"field_name\":\"project\",\"criteria_condition\":\"is\",\"value\":[\"1752587000000097269\"],\"relative_columns\":[{\"cfid\":\"6000000035033\",\"offset\":\"1\",\"unit\":\"days\",\"prior\":\"before\"}]}],\"pattern\":\"1\"}"
}
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_sort_by = curl_easy_escape(curl, "ASC(last_modified_time)", 0);
char *enc_view_id = curl_easy_escape(curl, "23806000074760021", 0);
char *enc_milestone_ids = curl_easy_escape(curl, "139655000000057003,139655000000057004,139655000000057005", 0);
char *enc_filter = curl_easy_escape(curl, "{\"criteria\":[{\"cfid\":\"6000000035033\",\"api_name\":\"status\",\"field_name\":\"project\",\"criteria_condition\":\"is\",\"value\":[\"1752587000000097269\"],\"relative_columns\":[{\"cfid\":\"6000000035033\",\"offset\":\"1\",\"unit\":\"days\",\"prior\":\"before\"}]}],\"pattern\":\"1\"}", 0);
char url[2048];
snprintf(url, sizeof(url), "https://projects.zoho.com/api/v3/portal/[PORTAL_ID]/projects/23806000097545166/phases?page=%s&per_page=%s&sort_by=%s&view_id=%s&milestone_ids=%s&filter=%s", enc_page, enc_per_page, enc_sort_by, enc_view_id, enc_milestone_ids, enc_filter);
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_sort_by);
curl_free(enc_view_id);
curl_free(enc_milestone_ids);
curl_free(enc_filter);
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["sort_by"] = "ASC(last_modified_time)";
query["view_id"] = "23806000074760021";
query["milestone_ids"] = "139655000000057003,139655000000057004,139655000000057005";
query["filter"] = "{\"criteria\":[{\"cfid\":\"6000000035033\",\"api_name\":\"status\",\"field_name\":\"project\",\"criteria_condition\":\"is\",\"value\":[\"1752587000000097269\"],\"relative_columns\":[{\"cfid\":\"6000000035033\",\"offset\":\"1\",\"unit\":\"days\",\"prior\":\"before\"}]}],\"pattern\":\"1\"}";
var uriBuilder = new UriBuilder("https://projects.zoho.com/api/v3/portal/[PORTAL_ID]/projects/23806000097545166/phases") { 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_sort_by = curl_easy_escape(curl, "ASC(last_modified_time)", 0);
char* enc_view_id = curl_easy_escape(curl, "23806000074760021", 0);
char* enc_milestone_ids = curl_easy_escape(curl, "139655000000057003,139655000000057004,139655000000057005", 0);
char* enc_filter = curl_easy_escape(curl, "{\"criteria\":[{\"cfid\":\"6000000035033\",\"api_name\":\"status\",\"field_name\":\"project\",\"criteria_condition\":\"is\",\"value\":[\"1752587000000097269\"],\"relative_columns\":[{\"cfid\":\"6000000035033\",\"offset\":\"1\",\"unit\":\"days\",\"prior\":\"before\"}]}],\"pattern\":\"1\"}", 0);
std::string url = "https://projects.zoho.com/api/v3/portal/[PORTAL_ID]/projects/23806000097545166/phases";
url += "?page=" + std::string(enc_page);
url += "&per_page=" + std::string(enc_per_page);
url += "&sort_by=" + std::string(enc_sort_by);
url += "&view_id=" + std::string(enc_view_id);
url += "&milestone_ids=" + std::string(enc_milestone_ids);
url += "&filter=" + std::string(enc_filter);
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_sort_by);
curl_free(enc_view_id);
curl_free(enc_milestone_ids);
curl_free(enc_filter);
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-sort_by (java.net.URLEncoder/encode "ASC(last_modified_time)" "UTF-8")
enc-view_id (java.net.URLEncoder/encode "23806000074760021" "UTF-8")
enc-milestone_ids (java.net.URLEncoder/encode "139655000000057003,139655000000057004,139655000000057005" "UTF-8")
enc-filter (java.net.URLEncoder/encode "{\"criteria\":[{\"cfid\":\"6000000035033\",\"api_name\":\"status\",\"field_name\":\"project\",\"criteria_condition\":\"is\",\"value\":[\"1752587000000097269\"],\"relative_columns\":[{\"cfid\":\"6000000035033\",\"offset\":\"1\",\"unit\":\"days\",\"prior\":\"before\"}]}],\"pattern\":\"1\"}" "UTF-8")
url (str "https://projects.zoho.com/api/v3/portal/[PORTAL_ID]/projects/23806000097545166/phases" "?page=" enc-page "&per_page=" enc-per_page "&sort_by=" enc-sort_by "&view_id=" enc-view_id "&milestone_ids=" enc-milestone_ids "&filter=" enc-filter)]
(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/phases", nil)
q := req.URL.Query()
q.Add("page", "1")
q.Add("per_page", "10")
q.Add("sort_by", "ASC(last_modified_time)")
q.Add("view_id", "23806000074760021")
q.Add("milestone_ids", "139655000000057003,139655000000057004,139655000000057005")
q.Add("filter", "{\"criteria\":[{\"cfid\":\"6000000035033\",\"api_name\":\"status\",\"field_name\":\"project\",\"criteria_condition\":\"is\",\"value\":[\"1752587000000097269\"],\"relative_columns\":[{\"cfid\":\"6000000035033\",\"offset\":\"1\",\"unit\":\"days\",\"prior\":\"before\"}]}],\"pattern\":\"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))
}
GET https://projects.zoho.com/api/v3/portal/[PORTAL_ID]/projects/23806000097545166/phases?page=1&per_page=10&sort_by=ASC%28last_modified_time%29&view_id=23806000074760021&milestone_ids=139655000000057003%2C139655000000057004%2C139655000000057005&filter=%7B%22criteria%22%3A%5B%7B%22cfid%22%3A%226000000035033%22%2C%22api_name%22%3A%22status%22%2C%22field_name%22%3A%22project%22%2C%22criteria_condition%22%3A%22is%22%2C%22value%22%3A%5B%221752587000000097269%22%5D%2C%22relative_columns%22%3A%5B%7B%22cfid%22%3A%226000000035033%22%2C%22offset%22%3A%221%22%2C%22unit%22%3A%22days%22%2C%22prior%22%3A%22before%22%7D%5D%7D%5D%2C%22pattern%22%3A%221%22%7D HTTP/1.1
Host: https://projects.zoho.com/api/v3/portal/[PORTAL_ID]/projects/23806000097545166/phases?page=1&per_page=10&sort_by=ASC%28last_modified_time%29&view_id=23806000074760021&milestone_ids=139655000000057003%2C139655000000057004%2C139655000000057005&filter=%7B%22criteria%22%3A%5B%7B%22cfid%22%3A%226000000035033%22%2C%22api_name%22%3A%22status%22%2C%22field_name%22%3A%22project%22%2C%22criteria_condition%22%3A%22is%22%2C%22value%22%3A%5B%221752587000000097269%22%5D%2C%22relative_columns%22%3A%5B%7B%22cfid%22%3A%226000000035033%22%2C%22offset%22%3A%221%22%2C%22unit%22%3A%22days%22%2C%22prior%22%3A%22before%22%7D%5D%7D%5D%2C%22pattern%22%3A%221%22%7D
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/phases");
uriBuilder.addParameter("page", "1");
uriBuilder.addParameter("per_page", "10");
uriBuilder.addParameter("sort_by", "ASC(last_modified_time)");
uriBuilder.addParameter("view_id", "23806000074760021");
uriBuilder.addParameter("milestone_ids", "139655000000057003,139655000000057004,139655000000057005");
uriBuilder.addParameter("filter", "{\"criteria\":[{\"cfid\":\"6000000035033\",\"api_name\":\"status\",\"field_name\":\"project\",\"criteria_condition\":\"is\",\"value\":[\"1752587000000097269\"],\"relative_columns\":[{\"cfid\":\"6000000035033\",\"offset\":\"1\",\"unit\":\"days\",\"prior\":\"before\"}]}],\"pattern\":\"1\"}");
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/phases';
const params = new URLSearchParams({
'page': '1',
'per_page': '10',
'sort_by': 'ASC(last_modified_time)',
'view_id': '23806000074760021',
'milestone_ids': '139655000000057003,139655000000057004,139655000000057005',
'filter': '{"criteria":[{"cfid":"6000000035033","api_name":"status","field_name":"project","criteria_condition":"is","value":["1752587000000097269"],"relative_columns":[{"cfid":"6000000035033","offset":"1","unit":"days","prior":"before"}]}],"pattern":"1"}'
});
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"
sort_by = "ASC(last_modified_time)"
view_id = "23806000074760021"
milestone_ids = "139655000000057003,139655000000057004,139655000000057005"
filter = {"criteria":[{"cfid":"6000000035033","api_name":"status","field_name":"project","criteria_condition":"is","value":["1752587000000097269"],"relative_columns":[{"cfid":"6000000035033","offset":"1","unit":"days","prior":"before"}]}],"pattern":"1"}
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/phases".toHttpUrl().newBuilder()
urlBuilder.addQueryParameter("page", "1")
urlBuilder.addQueryParameter("per_page", "10")
urlBuilder.addQueryParameter("sort_by", "ASC(last_modified_time)")
urlBuilder.addQueryParameter("view_id", "23806000074760021")
urlBuilder.addQueryParameter("milestone_ids", "139655000000057003,139655000000057004,139655000000057005")
urlBuilder.addQueryParameter("filter", "{\"criteria\":[{\"cfid\":\"6000000035033\",\"api_name\":\"status\",\"field_name\":\"project\",\"criteria_condition\":\"is\",\"value\":[\"1752587000000097269\"],\"relative_columns\":[{\"cfid\":\"6000000035033\",\"offset\":\"1\",\"unit\":\"days\",\"prior\":\"before\"}]}],\"pattern\":\"1\"}")
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 *encodedSort_by = [@"ASC(last_modified_time)" stringByAddingPercentEncodingWithAllowedCharacters:[NSCharacterSet URLQueryAllowedCharacterSet]];
NSString *encodedView_id = [@"23806000074760021" stringByAddingPercentEncodingWithAllowedCharacters:[NSCharacterSet URLQueryAllowedCharacterSet]];
NSString *encodedMilestone_ids = [@"139655000000057003,139655000000057004,139655000000057005" stringByAddingPercentEncodingWithAllowedCharacters:[NSCharacterSet URLQueryAllowedCharacterSet]];
NSString *encodedFilter = [@"{\"criteria\":[{\"cfid\":\"6000000035033\",\"api_name\":\"status\",\"field_name\":\"project\",\"criteria_condition\":\"is\",\"value\":[\"1752587000000097269\"],\"relative_columns\":[{\"cfid\":\"6000000035033\",\"offset\":\"1\",\"unit\":\"days\",\"prior\":\"before\"}]}],\"pattern\":\"1\"}" stringByAddingPercentEncodingWithAllowedCharacters:[NSCharacterSet URLQueryAllowedCharacterSet]];
NSString *urlString = [NSString stringWithFormat:@"https://projects.zoho.com/api/v3/portal/[PORTAL_ID]/projects/23806000097545166/phases?page=%@&per_page=%@&sort_by=%@&view_id=%@&milestone_ids=%@&filter=%@", encodedPage, encodedPer_page, encodedSort_by, encodedView_id, encodedMilestone_ids, encodedFilter];
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_sort_by = Uri.pct_encode "ASC(last_modified_time)" in
let enc_view_id = Uri.pct_encode "23806000074760021" in
let enc_milestone_ids = Uri.pct_encode "139655000000057003,139655000000057004,139655000000057005" in
let enc_filter = Uri.pct_encode "{\"criteria\":[{\"cfid\":\"6000000035033\",\"api_name\":\"status\",\"field_name\":\"project\",\"criteria_condition\":\"is\",\"value\":[\"1752587000000097269\"],\"relative_columns\":[{\"cfid\":\"6000000035033\",\"offset\":\"1\",\"unit\":\"days\",\"prior\":\"before\"}]}],\"pattern\":\"1\"}" in
let uri = Uri.of_string ("https://projects.zoho.com/api/v3/portal/[PORTAL_ID]/projects/23806000097545166/phases" ^ "?page=" ^ enc_page ^ "&per_page=" ^ enc_per_page ^ "&sort_by=" ^ enc_sort_by ^ "&view_id=" ^ enc_view_id ^ "&milestone_ids=" ^ enc_milestone_ids ^ "&filter=" ^ enc_filter) 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"
sort_by = "ASC(last_modified_time)"
view_id = "23806000074760021"
milestone_ids = "139655000000057003,139655000000057004,139655000000057005"
filter = "{`"criteria`":[{`"cfid`":`"6000000035033`",`"api_name`":`"status`",`"field_name`":`"project`",`"criteria_condition`":`"is`",`"value`":[`"1752587000000097269`"],`"relative_columns`":[{`"cfid`":`"6000000035033`",`"offset`":`"1`",`"unit`":`"days`",`"prior`":`"before`"}]}],`"pattern`":`"1`"}"
}
$queryString = ($params.GetEnumerator() | ForEach-Object { "$($_.Key)=$([System.Uri]::EscapeDataString($_.Value))" }) -join "&"
$url = "https://projects.zoho.com/api/v3/portal/[PORTAL_ID]/projects/23806000097545166/phases" + "?" + $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/phases"
params <- list(
page = "1",
per_page = "10",
sort_by = "ASC(last_modified_time)",
view_id = "23806000074760021",
milestone_ids = "139655000000057003,139655000000057004,139655000000057005",
filter = "{\"criteria\":[{\"cfid\":\"6000000035033\",\"api_name\":\"status\",\"field_name\":\"project\",\"criteria_condition\":\"is\",\"value\":[\"1752587000000097269\"],\"relative_columns\":[{\"cfid\":\"6000000035033\",\"offset\":\"1\",\"unit\":\"days\",\"prior\":\"before\"}]}],\"pattern\":\"1\"}"
)
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/phases")!
components.queryItems = [
URLQueryItem(name: "page", value: "1"),
URLQueryItem(name: "per_page", value: "10"),
URLQueryItem(name: "sort_by", value: "ASC(last_modified_time)"),
URLQueryItem(name: "view_id", value: "23806000074760021"),
URLQueryItem(name: "milestone_ids", value: "139655000000057003,139655000000057004,139655000000057005"),
URLQueryItem(name: "filter", value: "{\"criteria\":[{\"cfid\":\"6000000035033\",\"api_name\":\"status\",\"field_name\":\"project\",\"criteria_condition\":\"is\",\"value\":[\"1752587000000097269\"],\"relative_columns\":[{\"cfid\":\"6000000035033\",\"offset\":\"1\",\"unit\":\"days\",\"prior\":\"before\"}]}],\"pattern\":\"1\"}")
]
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
This API is deprecated. Use Get Phase Details (v3.1) instead.
Retrieve details of a specific phase. Use this API to fetch complete phase information using the phase ID.
OAuth Scope:
ZohoProjects.milestones.READ
String
requiredUnique, immutable identifier of the portal in Zoho Projects. You can obtain it from the Get Portals API (the "id" field in the response).
String
requiredUnique, immutable identifier of the project within the specified portal. You can obtain it from the Get Projects API (the "id" field in the response).
String
requiredIdentifier of the milestone. You can obtain it from the Get Milestones API (the "id" field in the response).
Request Example
curl -X GET \
'https://projects.zoho.com/api/v3/portal/[PORTAL_ID]/projects/23806000097545166/phases/[MILESTONE_ID]' \
-H 'Authorization: Bearer 1000.03xxxxxxxxxxxxxxxxxa5317.dxxxxxxxxxxxxxxxxxfa'
url = "https://projects.zoho.com/api/v3/portal/[PORTAL_ID]/projects/23806000097545166/phases/[MILESTONE_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/phases/[MILESTONE_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/phases/[MILESTONE_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/phases/[MILESTONE_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/phases/[MILESTONE_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/phases/[MILESTONE_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/phases/[MILESTONE_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/phases/[MILESTONE_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/phases/[MILESTONE_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/phases/[MILESTONE_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/phases/[MILESTONE_ID] HTTP/1.1
Host: https://projects.zoho.com/api/v3/portal/[PORTAL_ID]/projects/23806000097545166/phases/[MILESTONE_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/phases/[MILESTONE_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/phases/[MILESTONE_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/phases/[MILESTONE_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/phases/[MILESTONE_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/phases/[MILESTONE_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/phases/[MILESTONE_ID]" -Method GET -Headers $headers
$response | ConvertTo-Json
library(httr)
url <- "https://projects.zoho.com/api/v3/portal/[PORTAL_ID]/projects/23806000097545166/phases/[MILESTONE_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/phases/[MILESTONE_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
This API is deprecated. Use Create a Phase instead.
Create a new phase in a project. Use this API to define phase details such as name, dates, owner, status, and budget.
OAuth Scope:
ZohoProjects.milestones.CREATE
String
requiredUnique, immutable identifier of the portal in Zoho Projects. You can obtain it from the Get Portals API (the "id" field in the response).
String
requiredUnique, immutable identifier of the project within the specified portal. You can obtain it from the Get Projects API (the "id" field in the response).
String
requiredEnter the name of the phase
String
Enter the start date of the phase
String
Enter the end date of the phase
String
Enter the ZPUID of the owner You can obtain it from the Get Project Users API (the "id" field in the response).
String
Enter the flag type of the phase. Accepted values: Internal or External
String
Enter the ID of the project You can obtain it from the Get Projects API (the "id" field in the response).
String
max length : 1000Enter the Tag IDs You can obtain it from the Get Project Tags API (the "id" field in the response).
String
Enter the ID of the phase that will follow the new phase You can obtain it from the Get Project Milestones API (the "id" field in the response).
String
Enter the ID of the phase that will precede the new phase You can obtain it from the Get Project Milestones API (the "id" field in the response).
String
Enter the budget of the phase
String
Enter the threshold value for the budget
String
Enter the hourly budget of the phase
String
Enter the hourly budget threshold of the phase
String
Enter the revenue budget for the phase
String
max length : 255Enter the custom field value accepting character data type
String
max length : 1000Enter the custom field value accepting text data type
int
max length : 19Enter the custom field value accepting integer type
String
max length : 19Enter the custom field value accepting user ID You can obtain it from the Get Project Users API (the "id" field in the response).
double
Enter the custom field value accepting double percision data type
String
Enter the custom field value accepting date
String
max length : 1000Enter the custom field value accepting any data type
JSONArray
array size : 0-20Enter the custom field value accepting multiple values
JSONArray
array size : 0-20Enter the custom field value accepting multiple user ZPUIDs
int
Enter the custom field value accepting modulebridge values
Request Example
curl -X POST \
'https://projects.zoho.com/api/v3/portal/[PORTAL_ID]/projects/23806000097545166/phases' \
-H 'Authorization: Bearer 1000.03xxxxxxxxxxxxxxxxxa5317.dxxxxxxxxxxxxxxxxxfa' \
-H 'Content-Type: application/json' \
-d '{"name":"Authentication Module Security Audit","start_date":"05/28/2025","end_date":"10/28/2025","owner_zpuid":"1752587000000097024","flag":"internal","project_id":"23806000097545166","status_id":"238060000975451234","tagIds":"238060000975451234,238060000975451234","next":"23806000097545224","previous":"23806000097545222","budget":"98420000","threshold":"250000","hourly_budget":"9895000","hourly_budget_threshold":"250000","revenue_budget":"1023000","udf_char[0-9]{1,3}":"Critical security vulnerability identified in the user authentication module affecting session token integrity.","udf_text[0-9]{1,2}":"The security audit conducted on May 6th identified a critical vulnerability in the authentication module. Session tokens are not invalidated upon timeout, allowing unauthorized access to active user sessions. Immediate remediation is required to prevent potential data breaches.","udf_long[0-9]{1,2}":123987542233,"udf_user[0-9]{1,2}":"139655000000057003","udf_double[0-9]{1,2}":123.445,"udf_date[0-9]{1,2}":"23/09/2024","udf_encrypt([1-9]|10)":"sample-encrypted-text","udf_multi[0-9]{1,2}":["issue","bug","security","needfix"],"udf_multiuser[0-9]{1,2}":["139655000000057003","139655000000057004","139655000000057005"]}'
url = "https://projects.zoho.com/api/v3/portal/[PORTAL_ID]/projects/23806000097545166/phases";
params = Map();
params.put("name", "Authentication Module Security Audit");
params.put("start_date", "05/28/2025");
params.put("end_date", "10/28/2025");
params.put("owner_zpuid", "1752587000000097024");
params.put("flag", "internal");
params.put("project_id", "23806000097545166");
params.put("status_id", "238060000975451234");
params.put("tagIds", "238060000975451234,238060000975451234");
params.put("next", "23806000097545224");
params.put("previous", "23806000097545222");
params.put("budget", "98420000");
params.put("threshold", "250000");
params.put("hourly_budget", "9895000");
params.put("hourly_budget_threshold", "250000");
params.put("revenue_budget", "1023000");
params.put("udf_char[0-9]{1,3}", "Critical security vulnerability identified in the user authentication module affecting session token integrity.");
params.put("udf_text[0-9]{1,2}", "The security audit conducted on May 6th identified a critical vulnerability in the authentication module. Session tokens are not invalidated upon timeout, allowing unauthorized access to active user sessions. Immediate remediation is required to prevent potential data breaches.");
params.put("udf_long[0-9]{1,2}", 123987542233);
params.put("udf_user[0-9]{1,2}", "139655000000057003");
params.put("udf_double[0-9]{1,2}", 123.445);
params.put("udf_date[0-9]{1,2}", "23/09/2024");
params.put("udf_encrypt([1-9]|10)", "sample-encrypted-text");
params.put("udf_multi[0-9]{1,2}", ["issue","bug","security","needfix"]);
params.put("udf_multiuser[0-9]{1,2}", ["139655000000057003","139655000000057004","139655000000057005"]);
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/phases');
const payload = JSON.stringify({"name":"Authentication Module Security Audit","start_date":"05/28/2025","end_date":"10/28/2025","owner_zpuid":"1752587000000097024","flag":"internal","project_id":"23806000097545166","status_id":"238060000975451234","tagIds":"238060000975451234,238060000975451234","next":"23806000097545224","previous":"23806000097545222","budget":"98420000","threshold":"250000","hourly_budget":"9895000","hourly_budget_threshold":"250000","revenue_budget":"1023000","udf_char[0-9]{1,3}":"Critical security vulnerability identified in the user authentication module affecting session token integrity.","udf_text[0-9]{1,2}":"The security audit conducted on May 6th identified a critical vulnerability in the authentication module. Session tokens are not invalidated upon timeout, allowing unauthorized access to active user sessions. Immediate remediation is required to prevent potential data breaches.","udf_long[0-9]{1,2}":123987542233,"udf_user[0-9]{1,2}":"139655000000057003","udf_double[0-9]{1,2}":123.445,"udf_date[0-9]{1,2}":"23/09/2024","udf_encrypt([1-9]|10)":"sample-encrypted-text","udf_multi[0-9]{1,2}":["issue","bug","security","needfix"],"udf_multiuser[0-9]{1,2}":["139655000000057003","139655000000057004","139655000000057005"]});
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/phases")
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":"Authentication Module Security Audit","start_date":"05/28/2025","end_date":"10/28/2025","owner_zpuid":"1752587000000097024","flag":"internal","project_id":"23806000097545166","status_id":"238060000975451234","tagIds":"238060000975451234,238060000975451234","next":"23806000097545224","previous":"23806000097545222","budget":"98420000","threshold":"250000","hourly_budget":"9895000","hourly_budget_threshold":"250000","revenue_budget":"1023000","udf_char[0-9]{1,3}":"Critical security vulnerability identified in the user authentication module affecting session token integrity.","udf_text[0-9]{1,2}":"The security audit conducted on May 6th identified a critical vulnerability in the authentication module. Session tokens are not invalidated upon timeout, allowing unauthorized access to active user sessions. Immediate remediation is required to prevent potential data breaches.","udf_long[0-9]{1,2}":123987542233,"udf_user[0-9]{1,2}":"139655000000057003","udf_double[0-9]{1,2}":123.445,"udf_date[0-9]{1,2}":"23/09/2024","udf_encrypt([1-9]|10)":"sample-encrypted-text","udf_multi[0-9]{1,2}":["issue","bug","security","needfix"],"udf_multiuser[0-9]{1,2}":["139655000000057003","139655000000057004","139655000000057005"]}'
response = http.request(request)
puts response.read_body
<?php
$url = "https://projects.zoho.com/api/v3/portal/[PORTAL_ID]/projects/23806000097545166/phases";
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => $url,
CURLOPT_RETURNTRANSFER => true,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => '{"name":"Authentication Module Security Audit","start_date":"05/28/2025","end_date":"10/28/2025","owner_zpuid":"1752587000000097024","flag":"internal","project_id":"23806000097545166","status_id":"238060000975451234","tagIds":"238060000975451234,238060000975451234","next":"23806000097545224","previous":"23806000097545222","budget":"98420000","threshold":"250000","hourly_budget":"9895000","hourly_budget_threshold":"250000","revenue_budget":"1023000","udf_char[0-9]{1,3}":"Critical security vulnerability identified in the user authentication module affecting session token integrity.","udf_text[0-9]{1,2}":"The security audit conducted on May 6th identified a critical vulnerability in the authentication module. Session tokens are not invalidated upon timeout, allowing unauthorized access to active user sessions. Immediate remediation is required to prevent potential data breaches.","udf_long[0-9]{1,2}":123987542233,"udf_user[0-9]{1,2}":"139655000000057003","udf_double[0-9]{1,2}":123.445,"udf_date[0-9]{1,2}":"23/09/2024","udf_encrypt([1-9]|10)":"sample-encrypted-text","udf_multi[0-9]{1,2}":["issue","bug","security","needfix"],"udf_multiuser[0-9]{1,2}":["139655000000057003","139655000000057004","139655000000057005"]}',
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/phases"
headers = {
"Authorization": "Bearer 1000.03xxxxxxxxxxxxxxxxxa5317.dxxxxxxxxxxxxxxxxxfa",
"Content-Type": "application/json",
}
payload = '{"name":"Authentication Module Security Audit","start_date":"05/28/2025","end_date":"10/28/2025","owner_zpuid":"1752587000000097024","flag":"internal","project_id":"23806000097545166","status_id":"238060000975451234","tagIds":"238060000975451234,238060000975451234","next":"23806000097545224","previous":"23806000097545222","budget":"98420000","threshold":"250000","hourly_budget":"9895000","hourly_budget_threshold":"250000","revenue_budget":"1023000","udf_char[0-9]{1,3}":"Critical security vulnerability identified in the user authentication module affecting session token integrity.","udf_text[0-9]{1,2}":"The security audit conducted on May 6th identified a critical vulnerability in the authentication module. Session tokens are not invalidated upon timeout, allowing unauthorized access to active user sessions. Immediate remediation is required to prevent potential data breaches.","udf_long[0-9]{1,2}":123987542233,"udf_user[0-9]{1,2}":"139655000000057003","udf_double[0-9]{1,2}":123.445,"udf_date[0-9]{1,2}":"23/09/2024","udf_encrypt([1-9]|10)":"sample-encrypted-text","udf_multi[0-9]{1,2}":["issue","bug","security","needfix"],"udf_multiuser[0-9]{1,2}":["139655000000057003","139655000000057004","139655000000057005"]}'
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/phases");
curl_easy_setopt(curl, CURLOPT_HTTPHEADER, headers);
curl_easy_setopt(curl, CURLOPT_CUSTOMREQUEST, "POST");
curl_easy_setopt(curl, CURLOPT_POSTFIELDS, "{\"name\":\"Authentication Module Security Audit\",\"start_date\":\"05/28/2025\",\"end_date\":\"10/28/2025\",\"owner_zpuid\":\"1752587000000097024\",\"flag\":\"internal\",\"project_id\":\"23806000097545166\",\"status_id\":\"238060000975451234\",\"tagIds\":\"238060000975451234,238060000975451234\",\"next\":\"23806000097545224\",\"previous\":\"23806000097545222\",\"budget\":\"98420000\",\"threshold\":\"250000\",\"hourly_budget\":\"9895000\",\"hourly_budget_threshold\":\"250000\",\"revenue_budget\":\"1023000\",\"udf_char[0-9]{1,3}\":\"Critical security vulnerability identified in the user authentication module affecting session token integrity.\",\"udf_text[0-9]{1,2}\":\"The security audit conducted on May 6th identified a critical vulnerability in the authentication module. Session tokens are not invalidated upon timeout, allowing unauthorized access to active user sessions. Immediate remediation is required to prevent potential data breaches.\",\"udf_long[0-9]{1,2}\":123987542233,\"udf_user[0-9]{1,2}\":\"139655000000057003\",\"udf_double[0-9]{1,2}\":123.445,\"udf_date[0-9]{1,2}\":\"23/09/2024\",\"udf_encrypt([1-9]|10)\":\"sample-encrypted-text\",\"udf_multi[0-9]{1,2}\":[\"issue\",\"bug\",\"security\",\"needfix\"],\"udf_multiuser[0-9]{1,2}\":[\"139655000000057003\",\"139655000000057004\",\"139655000000057005\"]}");
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/phases");
request.Content = new StringContent(
@"{""name"":""Authentication Module Security Audit"",""start_date"":""05/28/2025"",""end_date"":""10/28/2025"",""owner_zpuid"":""1752587000000097024"",""flag"":""internal"",""project_id"":""23806000097545166"",""status_id"":""238060000975451234"",""tagIds"":""238060000975451234,238060000975451234"",""next"":""23806000097545224"",""previous"":""23806000097545222"",""budget"":""98420000"",""threshold"":""250000"",""hourly_budget"":""9895000"",""hourly_budget_threshold"":""250000"",""revenue_budget"":""1023000"",""udf_char[0-9]{1,3}"":""Critical security vulnerability identified in the user authentication module affecting session token integrity."",""udf_text[0-9]{1,2}"":""The security audit conducted on May 6th identified a critical vulnerability in the authentication module. Session tokens are not invalidated upon timeout, allowing unauthorized access to active user sessions. Immediate remediation is required to prevent potential data breaches."",""udf_long[0-9]{1,2}"":123987542233,""udf_user[0-9]{1,2}"":""139655000000057003"",""udf_double[0-9]{1,2}"":123.445,""udf_date[0-9]{1,2}"":""23/09/2024"",""udf_encrypt([1-9]|10)"":""sample-encrypted-text"",""udf_multi[0-9]{1,2}"":[""issue"",""bug"",""security"",""needfix""],""udf_multiuser[0-9]{1,2}"":[""139655000000057003"",""139655000000057004"",""139655000000057005""]}",
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/phases");
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\":\"Authentication Module Security Audit\",\"start_date\":\"05/28/2025\",\"end_date\":\"10/28/2025\",\"owner_zpuid\":\"1752587000000097024\",\"flag\":\"internal\",\"project_id\":\"23806000097545166\",\"status_id\":\"238060000975451234\",\"tagIds\":\"238060000975451234,238060000975451234\",\"next\":\"23806000097545224\",\"previous\":\"23806000097545222\",\"budget\":\"98420000\",\"threshold\":\"250000\",\"hourly_budget\":\"9895000\",\"hourly_budget_threshold\":\"250000\",\"revenue_budget\":\"1023000\",\"udf_char[0-9]{1,3}\":\"Critical security vulnerability identified in the user authentication module affecting session token integrity.\",\"udf_text[0-9]{1,2}\":\"The security audit conducted on May 6th identified a critical vulnerability in the authentication module. Session tokens are not invalidated upon timeout, allowing unauthorized access to active user sessions. Immediate remediation is required to prevent potential data breaches.\",\"udf_long[0-9]{1,2}\":123987542233,\"udf_user[0-9]{1,2}\":\"139655000000057003\",\"udf_double[0-9]{1,2}\":123.445,\"udf_date[0-9]{1,2}\":\"23/09/2024\",\"udf_encrypt([1-9]|10)\":\"sample-encrypted-text\",\"udf_multi[0-9]{1,2}\":[\"issue\",\"bug\",\"security\",\"needfix\"],\"udf_multiuser[0-9]{1,2}\":[\"139655000000057003\",\"139655000000057004\",\"139655000000057005\"]}");
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/phases"
{:headers {"Authorization" "Bearer 1000.03xxxxxxxxxxxxxxxxxa5317.dxxxxxxxxxxxxxxxxxfa"
"Content-Type" "application/json"}
:body "{\"name\":\"Authentication Module Security Audit\",\"start_date\":\"05/28/2025\",\"end_date\":\"10/28/2025\",\"owner_zpuid\":\"1752587000000097024\",\"flag\":\"internal\",\"project_id\":\"23806000097545166\",\"status_id\":\"238060000975451234\",\"tagIds\":\"238060000975451234,238060000975451234\",\"next\":\"23806000097545224\",\"previous\":\"23806000097545222\",\"budget\":\"98420000\",\"threshold\":\"250000\",\"hourly_budget\":\"9895000\",\"hourly_budget_threshold\":\"250000\",\"revenue_budget\":\"1023000\",\"udf_char[0-9]{1,3}\":\"Critical security vulnerability identified in the user authentication module affecting session token integrity.\",\"udf_text[0-9]{1,2}\":\"The security audit conducted on May 6th identified a critical vulnerability in the authentication module. Session tokens are not invalidated upon timeout, allowing unauthorized access to active user sessions. Immediate remediation is required to prevent potential data breaches.\",\"udf_long[0-9]{1,2}\":123987542233,\"udf_user[0-9]{1,2}\":\"139655000000057003\",\"udf_double[0-9]{1,2}\":123.445,\"udf_date[0-9]{1,2}\":\"23/09/2024\",\"udf_encrypt([1-9]|10)\":\"sample-encrypted-text\",\"udf_multi[0-9]{1,2}\":[\"issue\",\"bug\",\"security\",\"needfix\"],\"udf_multiuser[0-9]{1,2}\":[\"139655000000057003\",\"139655000000057004\",\"139655000000057005\"]}"
:as :json}))
(println (:body response))
package main
import (
"fmt"
"io"
"net/http"
"strings"
)
func main() {
payload := strings.NewReader("{\"name\":\"Authentication Module Security Audit\",\"start_date\":\"05/28/2025\",\"end_date\":\"10/28/2025\",\"owner_zpuid\":\"1752587000000097024\",\"flag\":\"internal\",\"project_id\":\"23806000097545166\",\"status_id\":\"238060000975451234\",\"tagIds\":\"238060000975451234,238060000975451234\",\"next\":\"23806000097545224\",\"previous\":\"23806000097545222\",\"budget\":\"98420000\",\"threshold\":\"250000\",\"hourly_budget\":\"9895000\",\"hourly_budget_threshold\":\"250000\",\"revenue_budget\":\"1023000\",\"udf_char[0-9]{1,3}\":\"Critical security vulnerability identified in the user authentication module affecting session token integrity.\",\"udf_text[0-9]{1,2}\":\"The security audit conducted on May 6th identified a critical vulnerability in the authentication module. Session tokens are not invalidated upon timeout, allowing unauthorized access to active user sessions. Immediate remediation is required to prevent potential data breaches.\",\"udf_long[0-9]{1,2}\":123987542233,\"udf_user[0-9]{1,2}\":\"139655000000057003\",\"udf_double[0-9]{1,2}\":123.445,\"udf_date[0-9]{1,2}\":\"23/09/2024\",\"udf_encrypt([1-9]|10)\":\"sample-encrypted-text\",\"udf_multi[0-9]{1,2}\":[\"issue\",\"bug\",\"security\",\"needfix\"],\"udf_multiuser[0-9]{1,2}\":[\"139655000000057003\",\"139655000000057004\",\"139655000000057005\"]}")
req, _ := http.NewRequest("POST", "https://projects.zoho.com/api/v3/portal/[PORTAL_ID]/projects/23806000097545166/phases", 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/phases HTTP/1.1
Host: https://projects.zoho.com/api/v3/portal/[PORTAL_ID]/projects/23806000097545166/phases
Authorization: Bearer 1000.03xxxxxxxxxxxxxxxxxa5317.dxxxxxxxxxxxxxxxxxfa
Content-Type: application/json
{"name":"Authentication Module Security Audit","start_date":"05/28/2025","end_date":"10/28/2025","owner_zpuid":"1752587000000097024","flag":"internal","project_id":"23806000097545166","status_id":"238060000975451234","tagIds":"238060000975451234,238060000975451234","next":"23806000097545224","previous":"23806000097545222","budget":"98420000","threshold":"250000","hourly_budget":"9895000","hourly_budget_threshold":"250000","revenue_budget":"1023000","udf_char[0-9]{1,3}":"Critical security vulnerability identified in the user authentication module affecting session token integrity.","udf_text[0-9]{1,2}":"The security audit conducted on May 6th identified a critical vulnerability in the authentication module. Session tokens are not invalidated upon timeout, allowing unauthorized access to active user sessions. Immediate remediation is required to prevent potential data breaches.","udf_long[0-9]{1,2}":123987542233,"udf_user[0-9]{1,2}":"139655000000057003","udf_double[0-9]{1,2}":123.445,"udf_date[0-9]{1,2}":"23/09/2024","udf_encrypt([1-9]|10)":"sample-encrypted-text","udf_multi[0-9]{1,2}":["issue","bug","security","needfix"],"udf_multiuser[0-9]{1,2}":["139655000000057003","139655000000057004","139655000000057005"]}
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/phases");
HttpUriRequest requestObj = new HttpPost(uriBuilder.build());
requestObj.addHeader("Authorization", "Bearer 1000.03xxxxxxxxxxxxxxxxxa5317.dxxxxxxxxxxxxxxxxxfa");
HttpEntityEnclosingRequestBase requestBase = (HttpEntityEnclosingRequestBase) requestObj;
String requestBody = "{\"name\":\"Authentication Module Security Audit\",\"start_date\":\"05\/28\/2025\",\"end_date\":\"10\/28\/2025\",\"owner_zpuid\":\"1752587000000097024\",\"flag\":\"internal\",\"project_id\":\"23806000097545166\",\"status_id\":\"238060000975451234\",\"tagIds\":\"238060000975451234,238060000975451234\",\"next\":\"23806000097545224\",\"previous\":\"23806000097545222\",\"budget\":\"98420000\",\"threshold\":\"250000\",\"hourly_budget\":\"9895000\",\"hourly_budget_threshold\":\"250000\",\"revenue_budget\":\"1023000\",\"udf_char[0-9]{1,3}\":\"Critical security vulnerability identified in the user authentication module affecting session token integrity.\",\"udf_text[0-9]{1,2}\":\"The security audit conducted on May 6th identified a critical vulnerability in the authentication module. Session tokens are not invalidated upon timeout, allowing unauthorized access to active user sessions. Immediate remediation is required to prevent potential data breaches.\",\"udf_long[0-9]{1,2}\":123987542233,\"udf_user[0-9]{1,2}\":\"139655000000057003\",\"udf_double[0-9]{1,2}\":123.445,\"udf_date[0-9]{1,2}\":\"23\/09\/2024\",\"udf_encrypt([1-9]|10)\":\"sample-encrypted-text\",\"udf_multi[0-9]{1,2}\":[\"issue\",\"bug\",\"security\",\"needfix\"],\"udf_multiuser[0-9]{1,2}\":[\"139655000000057003\",\"139655000000057004\",\"139655000000057005\"]}";
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/phases';
const options = {
method: 'POST',
headers: {
'Authorization': 'Bearer 1000.03xxxxxxxxxxxxxxxxxa5317.dxxxxxxxxxxxxxxxxxfa',
'Content-Type': 'application/json'
},
body: JSON.stringify({"name":"Authentication Module Security Audit","start_date":"05/28/2025","end_date":"10/28/2025","owner_zpuid":"1752587000000097024","flag":"internal","project_id":"23806000097545166","status_id":"238060000975451234","tagIds":"238060000975451234,238060000975451234","next":"23806000097545224","previous":"23806000097545222","budget":"98420000","threshold":"250000","hourly_budget":"9895000","hourly_budget_threshold":"250000","revenue_budget":"1023000","udf_char[0-9]{1,3}":"Critical security vulnerability identified in the user authentication module affecting session token integrity.","udf_text[0-9]{1,2}":"The security audit conducted on May 6th identified a critical vulnerability in the authentication module. Session tokens are not invalidated upon timeout, allowing unauthorized access to active user sessions. Immediate remediation is required to prevent potential data breaches.","udf_long[0-9]{1,2}":123987542233,"udf_user[0-9]{1,2}":"139655000000057003","udf_double[0-9]{1,2}":123.445,"udf_date[0-9]{1,2}":"23/09/2024","udf_encrypt([1-9]|10)":"sample-encrypted-text","udf_multi[0-9]{1,2}":["issue","bug","security","needfix"],"udf_multiuser[0-9]{1,2}":["139655000000057003","139655000000057004","139655000000057005"]})
};
fetch(url, options)
.then(response => response.json())
.then(data => console.log(data))
.catch(error => console.error(error));
{"name":"Authentication Module Security Audit","start_date":"05/28/2025","end_date":"10/28/2025","owner_zpuid":"1752587000000097024","flag":"internal","project_id":"23806000097545166","status_id":"238060000975451234","tagIds":"238060000975451234,238060000975451234","next":"23806000097545224","previous":"23806000097545222","budget":"98420000","threshold":"250000","hourly_budget":"9895000","hourly_budget_threshold":"250000","revenue_budget":"1023000","udf_char[0-9]{1,3}":"Critical security vulnerability identified in the user authentication module affecting session token integrity.","udf_text[0-9]{1,2}":"The security audit conducted on May 6th identified a critical vulnerability in the authentication module. Session tokens are not invalidated upon timeout, allowing unauthorized access to active user sessions. Immediate remediation is required to prevent potential data breaches.","udf_long[0-9]{1,2}":123987542233,"udf_user[0-9]{1,2}":"139655000000057003","udf_double[0-9]{1,2}":123.445,"udf_date[0-9]{1,2}":"23/09/2024","udf_encrypt([1-9]|10)":"sample-encrypted-text","udf_multi[0-9]{1,2}":["issue","bug","security","needfix"],"udf_multiuser[0-9]{1,2}":["139655000000057003","139655000000057004","139655000000057005"]}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/phases")
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":"Authentication Module Security Audit","start_date":"05/28/2025","end_date":"10/28/2025","owner_zpuid":"1752587000000097024","flag":"internal","project_id":"23806000097545166","status_id":"238060000975451234","tagIds":"238060000975451234,238060000975451234","next":"23806000097545224","previous":"23806000097545222","budget":"98420000","threshold":"250000","hourly_budget":"9895000","hourly_budget_threshold":"250000","revenue_budget":"1023000","udf_char[0-9]{1,3}":"Critical security vulnerability identified in the user authentication module affecting session token integrity.","udf_text[0-9]{1,2}":"The security audit conducted on May 6th identified a critical vulnerability in the authentication module. Session tokens are not invalidated upon timeout, allowing unauthorized access to active user sessions. Immediate remediation is required to prevent potential data breaches.","udf_long[0-9]{1,2}":123987542233,"udf_user[0-9]{1,2}":"139655000000057003","udf_double[0-9]{1,2}":123.445,"udf_date[0-9]{1,2}":"23/09/2024","udf_encrypt([1-9]|10)":"sample-encrypted-text","udf_multi[0-9]{1,2}":["issue","bug","security","needfix"],"udf_multiuser[0-9]{1,2}":["139655000000057003","139655000000057004","139655000000057005"]}""") }
val response = conn.inputStream.bufferedReader().readText()
println(response)
}
NSURL *url = [NSURL URLWithString:@"https://projects.zoho.com/api/v3/portal/[PORTAL_ID]/projects/23806000097545166/phases"];
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\":\"Authentication Module Security Audit\",\"start_date\":\"05/28/2025\",\"end_date\":\"10/28/2025\",\"owner_zpuid\":\"1752587000000097024\",\"flag\":\"internal\",\"project_id\":\"23806000097545166\",\"status_id\":\"238060000975451234\",\"tagIds\":\"238060000975451234,238060000975451234\",\"next\":\"23806000097545224\",\"previous\":\"23806000097545222\",\"budget\":\"98420000\",\"threshold\":\"250000\",\"hourly_budget\":\"9895000\",\"hourly_budget_threshold\":\"250000\",\"revenue_budget\":\"1023000\",\"udf_char[0-9]{1,3}\":\"Critical security vulnerability identified in the user authentication module affecting session token integrity.\",\"udf_text[0-9]{1,2}\":\"The security audit conducted on May 6th identified a critical vulnerability in the authentication module. Session tokens are not invalidated upon timeout, allowing unauthorized access to active user sessions. Immediate remediation is required to prevent potential data breaches.\",\"udf_long[0-9]{1,2}\":123987542233,\"udf_user[0-9]{1,2}\":\"139655000000057003\",\"udf_double[0-9]{1,2}\":123.445,\"udf_date[0-9]{1,2}\":\"23/09/2024\",\"udf_encrypt([1-9]|10)\":\"sample-encrypted-text\",\"udf_multi[0-9]{1,2}\":[\"issue\",\"bug\",\"security\",\"needfix\"],\"udf_multiuser[0-9]{1,2}\":[\"139655000000057003\",\"139655000000057004\",\"139655000000057005\"]}" 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/phases" 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":"Authentication Module Security Audit","start_date":"05/28/2025","end_date":"10/28/2025","owner_zpuid":"1752587000000097024","flag":"internal","project_id":"23806000097545166","status_id":"238060000975451234","tagIds":"238060000975451234,238060000975451234","next":"23806000097545224","previous":"23806000097545222","budget":"98420000","threshold":"250000","hourly_budget":"9895000","hourly_budget_threshold":"250000","revenue_budget":"1023000","udf_char[0-9]{1,3}":"Critical security vulnerability identified in the user authentication module affecting session token integrity.","udf_text[0-9]{1,2}":"The security audit conducted on May 6th identified a critical vulnerability in the authentication module. Session tokens are not invalidated upon timeout, allowing unauthorized access to active user sessions. Immediate remediation is required to prevent potential data breaches.","udf_long[0-9]{1,2}":123987542233,"udf_user[0-9]{1,2}":"139655000000057003","udf_double[0-9]{1,2}":123.445,"udf_date[0-9]{1,2}":"23/09/2024","udf_encrypt([1-9]|10)":"sample-encrypted-text","udf_multi[0-9]{1,2}":["issue","bug","security","needfix"],"udf_multiuser[0-9]{1,2}":["139655000000057003","139655000000057004","139655000000057005"]}|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":"Authentication Module Security Audit","start_date":"05/28/2025","end_date":"10/28/2025","owner_zpuid":"1752587000000097024","flag":"internal","project_id":"23806000097545166","status_id":"238060000975451234","tagIds":"238060000975451234,238060000975451234","next":"23806000097545224","previous":"23806000097545222","budget":"98420000","threshold":"250000","hourly_budget":"9895000","hourly_budget_threshold":"250000","revenue_budget":"1023000","udf_char[0-9]{1,3}":"Critical security vulnerability identified in the user authentication module affecting session token integrity.","udf_text[0-9]{1,2}":"The security audit conducted on May 6th identified a critical vulnerability in the authentication module. Session tokens are not invalidated upon timeout, allowing unauthorized access to active user sessions. Immediate remediation is required to prevent potential data breaches.","udf_long[0-9]{1,2}":123987542233,"udf_user[0-9]{1,2}":"139655000000057003","udf_double[0-9]{1,2}":123.445,"udf_date[0-9]{1,2}":"23/09/2024","udf_encrypt([1-9]|10)":"sample-encrypted-text","udf_multi[0-9]{1,2}":["issue","bug","security","needfix"],"udf_multiuser[0-9]{1,2}":["139655000000057003","139655000000057004","139655000000057005"]}
'@
$response = Invoke-RestMethod -Uri "https://projects.zoho.com/api/v3/portal/[PORTAL_ID]/projects/23806000097545166/phases" -Method POST -Headers $headers -Body $body
$response | ConvertTo-Json
library(httr)
url <- "https://projects.zoho.com/api/v3/portal/[PORTAL_ID]/projects/23806000097545166/phases"
response <- POST(
url,
add_headers(Authorization = "Bearer 1000.03xxxxxxxxxxxxxxxxxa5317.dxxxxxxxxxxxxxxxxxfa"),
content_type_json(),
body = "{\"name\":\"Authentication Module Security Audit\",\"start_date\":\"05/28/2025\",\"end_date\":\"10/28/2025\",\"owner_zpuid\":\"1752587000000097024\",\"flag\":\"internal\",\"project_id\":\"23806000097545166\",\"status_id\":\"238060000975451234\",\"tagIds\":\"238060000975451234,238060000975451234\",\"next\":\"23806000097545224\",\"previous\":\"23806000097545222\",\"budget\":\"98420000\",\"threshold\":\"250000\",\"hourly_budget\":\"9895000\",\"hourly_budget_threshold\":\"250000\",\"revenue_budget\":\"1023000\",\"udf_char[0-9]{1,3}\":\"Critical security vulnerability identified in the user authentication module affecting session token integrity.\",\"udf_text[0-9]{1,2}\":\"The security audit conducted on May 6th identified a critical vulnerability in the authentication module. Session tokens are not invalidated upon timeout, allowing unauthorized access to active user sessions. Immediate remediation is required to prevent potential data breaches.\",\"udf_long[0-9]{1,2}\":123987542233,\"udf_user[0-9]{1,2}\":\"139655000000057003\",\"udf_double[0-9]{1,2}\":123.445,\"udf_date[0-9]{1,2}\":\"23/09/2024\",\"udf_encrypt([1-9]|10)\":\"sample-encrypted-text\",\"udf_multi[0-9]{1,2}\":[\"issue\",\"bug\",\"security\",\"needfix\"],\"udf_multiuser[0-9]{1,2}\":[\"139655000000057003\",\"139655000000057004\",\"139655000000057005\"]}"
)
content(response, "text")
import Foundation
let url = URL(string: "https://projects.zoho.com/api/v3/portal/[PORTAL_ID]/projects/23806000097545166/phases")!
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":"Authentication Module Security Audit","start_date":"05/28/2025","end_date":"10/28/2025","owner_zpuid":"1752587000000097024","flag":"internal","project_id":"23806000097545166","status_id":"238060000975451234","tagIds":"238060000975451234,238060000975451234","next":"23806000097545224","previous":"23806000097545222","budget":"98420000","threshold":"250000","hourly_budget":"9895000","hourly_budget_threshold":"250000","revenue_budget":"1023000","udf_char[0-9]{1,3}":"Critical security vulnerability identified in the user authentication module affecting session token integrity.","udf_text[0-9]{1,2}":"The security audit conducted on May 6th identified a critical vulnerability in the authentication module. Session tokens are not invalidated upon timeout, allowing unauthorized access to active user sessions. Immediate remediation is required to prevent potential data breaches.","udf_long[0-9]{1,2}":123987542233,"udf_user[0-9]{1,2}":"139655000000057003","udf_double[0-9]{1,2}":123.445,"udf_date[0-9]{1,2}":"23/09/2024","udf_encrypt([1-9]|10)":"sample-encrypted-text","udf_multi[0-9]{1,2}":["issue","bug","security","needfix"],"udf_multiuser[0-9]{1,2}":["139655000000057003","139655000000057004","139655000000057005"]}
""".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
OAuth Scope:
ZohoProjects.milestones.CREATE
String
requiredUnique, immutable identifier of the portal in Zoho Projects. You can obtain it from the Get Portals API (the "id" field in the response).
String
requiredUnique, immutable identifier of the project within the specified portal. You can obtain it from the Get Projects API (the "id" field in the response).
String
requiredIdentifier of the milestone. You can obtain it from the Get Milestones API (the "id" field in the response).
String
max length : 100Enter the phase name
String
Enter the start date of the phase
String
Enter the due date of the phase
String
Enter the ZPUID of the phase owner You can obtain it from the Get Project Users API (the "id" field in the response).
String
Specify the flag type for the phase. Accepted values: internal or external.
String
Enter the ID of the milestone status You can obtain it from the Get Global Statuses API.
String
max length : 1000Enter the tag IDs You can obtain it from the Get Project Tags API (the "id" field in the response).
String
Enter the budget value for the phase
String
Enter the threshold value for the budget
String
Enter the hourly budget value for the phase
String
Enter the threshold value for the hourly budget
double
Enter the revenue budget for the phase
String
max length : 255Enter the custom field value accepting character data type
String
max length : 1000Enter the custom field value accepting text data type
int
max length : 19Enter the custom field value accepting integer type
String
max length : 19Enter the custom field value accepting user ID You can obtain it from the Get Project Users API (the "id" field in the response).
double
Enter the custom field value accepting double percision data type
String
Enter the custom field value accepting date
String
max length : 1000Enter the custom field value accepting any data type
JSONArray
array size : 0-20Enter the custom field value accepting multiple values
JSONArray
array size : 0-20Enter the custom field value accepting multiple user ZPUIDs
JSONArray
Enter the custom field value accepting modulebridge values
Request Example
curl -X POST \
'https://projects.zoho.com/api/v3/portal/[PORTAL_ID]/projects/23806000097545166/phases/[MILESTONE_ID]' \
-H 'Authorization: Bearer 1000.03xxxxxxxxxxxxxxxxxa5317.dxxxxxxxxxxxxxxxxxfa' \
-H 'Content-Type: application/json' \
-d '{"name":"Authentication Module Security Audit","start_date":"05/28/2025","end_date":"10/28/2025","owner_zpuid":"1752587000000097024","flag":"internal","status_id":"238060000975451234","tagIds":"238060000975451234,238060000975451234","budget":"98420000","threshold":"250000","hourly_budget":"9895000","hourly_budget_threshold":"250000","revenue_budget":1023000,"udf_char[0-9]{1,3}":"Critical security vulnerability identified in the user authentication module affecting session token integrity.","udf_text[0-9]{1,2}":"The security audit conducted on May 6th identified a critical vulnerability in the authentication module. Session tokens are not invalidated upon timeout, allowing unauthorized access to active user sessions. Immediate remediation is required to prevent potential data breaches.","udf_long[0-9]{1,2}":123987542233,"udf_user[0-9]{1,2}":"139655000000057003","udf_double[0-9]{1,2}":123.445,"udf_date[0-9]{1,2}":"23/09/2024","udf_encrypt([1-9]|10)":"sample-encrypted-text","udf_multi[0-9]{1,2}":["issue","bug","security","needfix"],"udf_multiuser[0-9]{1,2}":["139655000000057003","139655000000057004","139655000000057005"]}'
url = "https://projects.zoho.com/api/v3/portal/[PORTAL_ID]/projects/23806000097545166/phases/[MILESTONE_ID]";
params = Map();
params.put("name", "Authentication Module Security Audit");
params.put("start_date", "05/28/2025");
params.put("end_date", "10/28/2025");
params.put("owner_zpuid", "1752587000000097024");
params.put("flag", "internal");
params.put("status_id", "238060000975451234");
params.put("tagIds", "238060000975451234,238060000975451234");
params.put("budget", "98420000");
params.put("threshold", "250000");
params.put("hourly_budget", "9895000");
params.put("hourly_budget_threshold", "250000");
params.put("revenue_budget", 1023000);
params.put("udf_char[0-9]{1,3}", "Critical security vulnerability identified in the user authentication module affecting session token integrity.");
params.put("udf_text[0-9]{1,2}", "The security audit conducted on May 6th identified a critical vulnerability in the authentication module. Session tokens are not invalidated upon timeout, allowing unauthorized access to active user sessions. Immediate remediation is required to prevent potential data breaches.");
params.put("udf_long[0-9]{1,2}", 123987542233);
params.put("udf_user[0-9]{1,2}", "139655000000057003");
params.put("udf_double[0-9]{1,2}", 123.445);
params.put("udf_date[0-9]{1,2}", "23/09/2024");
params.put("udf_encrypt([1-9]|10)", "sample-encrypted-text");
params.put("udf_multi[0-9]{1,2}", ["issue","bug","security","needfix"]);
params.put("udf_multiuser[0-9]{1,2}", ["139655000000057003","139655000000057004","139655000000057005"]);
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/phases/[MILESTONE_ID]');
const payload = JSON.stringify({"name":"Authentication Module Security Audit","start_date":"05/28/2025","end_date":"10/28/2025","owner_zpuid":"1752587000000097024","flag":"internal","status_id":"238060000975451234","tagIds":"238060000975451234,238060000975451234","budget":"98420000","threshold":"250000","hourly_budget":"9895000","hourly_budget_threshold":"250000","revenue_budget":1023000,"udf_char[0-9]{1,3}":"Critical security vulnerability identified in the user authentication module affecting session token integrity.","udf_text[0-9]{1,2}":"The security audit conducted on May 6th identified a critical vulnerability in the authentication module. Session tokens are not invalidated upon timeout, allowing unauthorized access to active user sessions. Immediate remediation is required to prevent potential data breaches.","udf_long[0-9]{1,2}":123987542233,"udf_user[0-9]{1,2}":"139655000000057003","udf_double[0-9]{1,2}":123.445,"udf_date[0-9]{1,2}":"23/09/2024","udf_encrypt([1-9]|10)":"sample-encrypted-text","udf_multi[0-9]{1,2}":["issue","bug","security","needfix"],"udf_multiuser[0-9]{1,2}":["139655000000057003","139655000000057004","139655000000057005"]});
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/phases/[MILESTONE_ID]")
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":"Authentication Module Security Audit","start_date":"05/28/2025","end_date":"10/28/2025","owner_zpuid":"1752587000000097024","flag":"internal","status_id":"238060000975451234","tagIds":"238060000975451234,238060000975451234","budget":"98420000","threshold":"250000","hourly_budget":"9895000","hourly_budget_threshold":"250000","revenue_budget":1023000,"udf_char[0-9]{1,3}":"Critical security vulnerability identified in the user authentication module affecting session token integrity.","udf_text[0-9]{1,2}":"The security audit conducted on May 6th identified a critical vulnerability in the authentication module. Session tokens are not invalidated upon timeout, allowing unauthorized access to active user sessions. Immediate remediation is required to prevent potential data breaches.","udf_long[0-9]{1,2}":123987542233,"udf_user[0-9]{1,2}":"139655000000057003","udf_double[0-9]{1,2}":123.445,"udf_date[0-9]{1,2}":"23/09/2024","udf_encrypt([1-9]|10)":"sample-encrypted-text","udf_multi[0-9]{1,2}":["issue","bug","security","needfix"],"udf_multiuser[0-9]{1,2}":["139655000000057003","139655000000057004","139655000000057005"]}'
response = http.request(request)
puts response.read_body
<?php
$url = "https://projects.zoho.com/api/v3/portal/[PORTAL_ID]/projects/23806000097545166/phases/[MILESTONE_ID]";
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => $url,
CURLOPT_RETURNTRANSFER => true,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => '{"name":"Authentication Module Security Audit","start_date":"05/28/2025","end_date":"10/28/2025","owner_zpuid":"1752587000000097024","flag":"internal","status_id":"238060000975451234","tagIds":"238060000975451234,238060000975451234","budget":"98420000","threshold":"250000","hourly_budget":"9895000","hourly_budget_threshold":"250000","revenue_budget":1023000,"udf_char[0-9]{1,3}":"Critical security vulnerability identified in the user authentication module affecting session token integrity.","udf_text[0-9]{1,2}":"The security audit conducted on May 6th identified a critical vulnerability in the authentication module. Session tokens are not invalidated upon timeout, allowing unauthorized access to active user sessions. Immediate remediation is required to prevent potential data breaches.","udf_long[0-9]{1,2}":123987542233,"udf_user[0-9]{1,2}":"139655000000057003","udf_double[0-9]{1,2}":123.445,"udf_date[0-9]{1,2}":"23/09/2024","udf_encrypt([1-9]|10)":"sample-encrypted-text","udf_multi[0-9]{1,2}":["issue","bug","security","needfix"],"udf_multiuser[0-9]{1,2}":["139655000000057003","139655000000057004","139655000000057005"]}',
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/phases/[MILESTONE_ID]"
headers = {
"Authorization": "Bearer 1000.03xxxxxxxxxxxxxxxxxa5317.dxxxxxxxxxxxxxxxxxfa",
"Content-Type": "application/json",
}
payload = '{"name":"Authentication Module Security Audit","start_date":"05/28/2025","end_date":"10/28/2025","owner_zpuid":"1752587000000097024","flag":"internal","status_id":"238060000975451234","tagIds":"238060000975451234,238060000975451234","budget":"98420000","threshold":"250000","hourly_budget":"9895000","hourly_budget_threshold":"250000","revenue_budget":1023000,"udf_char[0-9]{1,3}":"Critical security vulnerability identified in the user authentication module affecting session token integrity.","udf_text[0-9]{1,2}":"The security audit conducted on May 6th identified a critical vulnerability in the authentication module. Session tokens are not invalidated upon timeout, allowing unauthorized access to active user sessions. Immediate remediation is required to prevent potential data breaches.","udf_long[0-9]{1,2}":123987542233,"udf_user[0-9]{1,2}":"139655000000057003","udf_double[0-9]{1,2}":123.445,"udf_date[0-9]{1,2}":"23/09/2024","udf_encrypt([1-9]|10)":"sample-encrypted-text","udf_multi[0-9]{1,2}":["issue","bug","security","needfix"],"udf_multiuser[0-9]{1,2}":["139655000000057003","139655000000057004","139655000000057005"]}'
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/phases/[MILESTONE_ID]");
curl_easy_setopt(curl, CURLOPT_HTTPHEADER, headers);
curl_easy_setopt(curl, CURLOPT_CUSTOMREQUEST, "POST");
curl_easy_setopt(curl, CURLOPT_POSTFIELDS, "{\"name\":\"Authentication Module Security Audit\",\"start_date\":\"05/28/2025\",\"end_date\":\"10/28/2025\",\"owner_zpuid\":\"1752587000000097024\",\"flag\":\"internal\",\"status_id\":\"238060000975451234\",\"tagIds\":\"238060000975451234,238060000975451234\",\"budget\":\"98420000\",\"threshold\":\"250000\",\"hourly_budget\":\"9895000\",\"hourly_budget_threshold\":\"250000\",\"revenue_budget\":1023000,\"udf_char[0-9]{1,3}\":\"Critical security vulnerability identified in the user authentication module affecting session token integrity.\",\"udf_text[0-9]{1,2}\":\"The security audit conducted on May 6th identified a critical vulnerability in the authentication module. Session tokens are not invalidated upon timeout, allowing unauthorized access to active user sessions. Immediate remediation is required to prevent potential data breaches.\",\"udf_long[0-9]{1,2}\":123987542233,\"udf_user[0-9]{1,2}\":\"139655000000057003\",\"udf_double[0-9]{1,2}\":123.445,\"udf_date[0-9]{1,2}\":\"23/09/2024\",\"udf_encrypt([1-9]|10)\":\"sample-encrypted-text\",\"udf_multi[0-9]{1,2}\":[\"issue\",\"bug\",\"security\",\"needfix\"],\"udf_multiuser[0-9]{1,2}\":[\"139655000000057003\",\"139655000000057004\",\"139655000000057005\"]}");
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/phases/[MILESTONE_ID]");
request.Content = new StringContent(
@"{""name"":""Authentication Module Security Audit"",""start_date"":""05/28/2025"",""end_date"":""10/28/2025"",""owner_zpuid"":""1752587000000097024"",""flag"":""internal"",""status_id"":""238060000975451234"",""tagIds"":""238060000975451234,238060000975451234"",""budget"":""98420000"",""threshold"":""250000"",""hourly_budget"":""9895000"",""hourly_budget_threshold"":""250000"",""revenue_budget"":1023000,""udf_char[0-9]{1,3}"":""Critical security vulnerability identified in the user authentication module affecting session token integrity."",""udf_text[0-9]{1,2}"":""The security audit conducted on May 6th identified a critical vulnerability in the authentication module. Session tokens are not invalidated upon timeout, allowing unauthorized access to active user sessions. Immediate remediation is required to prevent potential data breaches."",""udf_long[0-9]{1,2}"":123987542233,""udf_user[0-9]{1,2}"":""139655000000057003"",""udf_double[0-9]{1,2}"":123.445,""udf_date[0-9]{1,2}"":""23/09/2024"",""udf_encrypt([1-9]|10)"":""sample-encrypted-text"",""udf_multi[0-9]{1,2}"":[""issue"",""bug"",""security"",""needfix""],""udf_multiuser[0-9]{1,2}"":[""139655000000057003"",""139655000000057004"",""139655000000057005""]}",
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/phases/[MILESTONE_ID]");
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\":\"Authentication Module Security Audit\",\"start_date\":\"05/28/2025\",\"end_date\":\"10/28/2025\",\"owner_zpuid\":\"1752587000000097024\",\"flag\":\"internal\",\"status_id\":\"238060000975451234\",\"tagIds\":\"238060000975451234,238060000975451234\",\"budget\":\"98420000\",\"threshold\":\"250000\",\"hourly_budget\":\"9895000\",\"hourly_budget_threshold\":\"250000\",\"revenue_budget\":1023000,\"udf_char[0-9]{1,3}\":\"Critical security vulnerability identified in the user authentication module affecting session token integrity.\",\"udf_text[0-9]{1,2}\":\"The security audit conducted on May 6th identified a critical vulnerability in the authentication module. Session tokens are not invalidated upon timeout, allowing unauthorized access to active user sessions. Immediate remediation is required to prevent potential data breaches.\",\"udf_long[0-9]{1,2}\":123987542233,\"udf_user[0-9]{1,2}\":\"139655000000057003\",\"udf_double[0-9]{1,2}\":123.445,\"udf_date[0-9]{1,2}\":\"23/09/2024\",\"udf_encrypt([1-9]|10)\":\"sample-encrypted-text\",\"udf_multi[0-9]{1,2}\":[\"issue\",\"bug\",\"security\",\"needfix\"],\"udf_multiuser[0-9]{1,2}\":[\"139655000000057003\",\"139655000000057004\",\"139655000000057005\"]}");
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/phases/[MILESTONE_ID]"
{:headers {"Authorization" "Bearer 1000.03xxxxxxxxxxxxxxxxxa5317.dxxxxxxxxxxxxxxxxxfa"
"Content-Type" "application/json"}
:body "{\"name\":\"Authentication Module Security Audit\",\"start_date\":\"05/28/2025\",\"end_date\":\"10/28/2025\",\"owner_zpuid\":\"1752587000000097024\",\"flag\":\"internal\",\"status_id\":\"238060000975451234\",\"tagIds\":\"238060000975451234,238060000975451234\",\"budget\":\"98420000\",\"threshold\":\"250000\",\"hourly_budget\":\"9895000\",\"hourly_budget_threshold\":\"250000\",\"revenue_budget\":1023000,\"udf_char[0-9]{1,3}\":\"Critical security vulnerability identified in the user authentication module affecting session token integrity.\",\"udf_text[0-9]{1,2}\":\"The security audit conducted on May 6th identified a critical vulnerability in the authentication module. Session tokens are not invalidated upon timeout, allowing unauthorized access to active user sessions. Immediate remediation is required to prevent potential data breaches.\",\"udf_long[0-9]{1,2}\":123987542233,\"udf_user[0-9]{1,2}\":\"139655000000057003\",\"udf_double[0-9]{1,2}\":123.445,\"udf_date[0-9]{1,2}\":\"23/09/2024\",\"udf_encrypt([1-9]|10)\":\"sample-encrypted-text\",\"udf_multi[0-9]{1,2}\":[\"issue\",\"bug\",\"security\",\"needfix\"],\"udf_multiuser[0-9]{1,2}\":[\"139655000000057003\",\"139655000000057004\",\"139655000000057005\"]}"
:as :json}))
(println (:body response))
package main
import (
"fmt"
"io"
"net/http"
"strings"
)
func main() {
payload := strings.NewReader("{\"name\":\"Authentication Module Security Audit\",\"start_date\":\"05/28/2025\",\"end_date\":\"10/28/2025\",\"owner_zpuid\":\"1752587000000097024\",\"flag\":\"internal\",\"status_id\":\"238060000975451234\",\"tagIds\":\"238060000975451234,238060000975451234\",\"budget\":\"98420000\",\"threshold\":\"250000\",\"hourly_budget\":\"9895000\",\"hourly_budget_threshold\":\"250000\",\"revenue_budget\":1023000,\"udf_char[0-9]{1,3}\":\"Critical security vulnerability identified in the user authentication module affecting session token integrity.\",\"udf_text[0-9]{1,2}\":\"The security audit conducted on May 6th identified a critical vulnerability in the authentication module. Session tokens are not invalidated upon timeout, allowing unauthorized access to active user sessions. Immediate remediation is required to prevent potential data breaches.\",\"udf_long[0-9]{1,2}\":123987542233,\"udf_user[0-9]{1,2}\":\"139655000000057003\",\"udf_double[0-9]{1,2}\":123.445,\"udf_date[0-9]{1,2}\":\"23/09/2024\",\"udf_encrypt([1-9]|10)\":\"sample-encrypted-text\",\"udf_multi[0-9]{1,2}\":[\"issue\",\"bug\",\"security\",\"needfix\"],\"udf_multiuser[0-9]{1,2}\":[\"139655000000057003\",\"139655000000057004\",\"139655000000057005\"]}")
req, _ := http.NewRequest("POST", "https://projects.zoho.com/api/v3/portal/[PORTAL_ID]/projects/23806000097545166/phases/[MILESTONE_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))
}
POST https://projects.zoho.com/api/v3/portal/[PORTAL_ID]/projects/23806000097545166/phases/[MILESTONE_ID] HTTP/1.1
Host: https://projects.zoho.com/api/v3/portal/[PORTAL_ID]/projects/23806000097545166/phases/[MILESTONE_ID]
Authorization: Bearer 1000.03xxxxxxxxxxxxxxxxxa5317.dxxxxxxxxxxxxxxxxxfa
Content-Type: application/json
{"name":"Authentication Module Security Audit","start_date":"05/28/2025","end_date":"10/28/2025","owner_zpuid":"1752587000000097024","flag":"internal","status_id":"238060000975451234","tagIds":"238060000975451234,238060000975451234","budget":"98420000","threshold":"250000","hourly_budget":"9895000","hourly_budget_threshold":"250000","revenue_budget":1023000,"udf_char[0-9]{1,3}":"Critical security vulnerability identified in the user authentication module affecting session token integrity.","udf_text[0-9]{1,2}":"The security audit conducted on May 6th identified a critical vulnerability in the authentication module. Session tokens are not invalidated upon timeout, allowing unauthorized access to active user sessions. Immediate remediation is required to prevent potential data breaches.","udf_long[0-9]{1,2}":123987542233,"udf_user[0-9]{1,2}":"139655000000057003","udf_double[0-9]{1,2}":123.445,"udf_date[0-9]{1,2}":"23/09/2024","udf_encrypt([1-9]|10)":"sample-encrypted-text","udf_multi[0-9]{1,2}":["issue","bug","security","needfix"],"udf_multiuser[0-9]{1,2}":["139655000000057003","139655000000057004","139655000000057005"]}
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/phases/[MILESTONE_ID]");
HttpUriRequest requestObj = new HttpPost(uriBuilder.build());
requestObj.addHeader("Authorization", "Bearer 1000.03xxxxxxxxxxxxxxxxxa5317.dxxxxxxxxxxxxxxxxxfa");
HttpEntityEnclosingRequestBase requestBase = (HttpEntityEnclosingRequestBase) requestObj;
String requestBody = "{\"name\":\"Authentication Module Security Audit\",\"start_date\":\"05\/28\/2025\",\"end_date\":\"10\/28\/2025\",\"owner_zpuid\":\"1752587000000097024\",\"flag\":\"internal\",\"status_id\":\"238060000975451234\",\"tagIds\":\"238060000975451234,238060000975451234\",\"budget\":\"98420000\",\"threshold\":\"250000\",\"hourly_budget\":\"9895000\",\"hourly_budget_threshold\":\"250000\",\"revenue_budget\":1023000,\"udf_char[0-9]{1,3}\":\"Critical security vulnerability identified in the user authentication module affecting session token integrity.\",\"udf_text[0-9]{1,2}\":\"The security audit conducted on May 6th identified a critical vulnerability in the authentication module. Session tokens are not invalidated upon timeout, allowing unauthorized access to active user sessions. Immediate remediation is required to prevent potential data breaches.\",\"udf_long[0-9]{1,2}\":123987542233,\"udf_user[0-9]{1,2}\":\"139655000000057003\",\"udf_double[0-9]{1,2}\":123.445,\"udf_date[0-9]{1,2}\":\"23\/09\/2024\",\"udf_encrypt([1-9]|10)\":\"sample-encrypted-text\",\"udf_multi[0-9]{1,2}\":[\"issue\",\"bug\",\"security\",\"needfix\"],\"udf_multiuser[0-9]{1,2}\":[\"139655000000057003\",\"139655000000057004\",\"139655000000057005\"]}";
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/phases/[MILESTONE_ID]';
const options = {
method: 'POST',
headers: {
'Authorization': 'Bearer 1000.03xxxxxxxxxxxxxxxxxa5317.dxxxxxxxxxxxxxxxxxfa',
'Content-Type': 'application/json'
},
body: JSON.stringify({"name":"Authentication Module Security Audit","start_date":"05/28/2025","end_date":"10/28/2025","owner_zpuid":"1752587000000097024","flag":"internal","status_id":"238060000975451234","tagIds":"238060000975451234,238060000975451234","budget":"98420000","threshold":"250000","hourly_budget":"9895000","hourly_budget_threshold":"250000","revenue_budget":1023000,"udf_char[0-9]{1,3}":"Critical security vulnerability identified in the user authentication module affecting session token integrity.","udf_text[0-9]{1,2}":"The security audit conducted on May 6th identified a critical vulnerability in the authentication module. Session tokens are not invalidated upon timeout, allowing unauthorized access to active user sessions. Immediate remediation is required to prevent potential data breaches.","udf_long[0-9]{1,2}":123987542233,"udf_user[0-9]{1,2}":"139655000000057003","udf_double[0-9]{1,2}":123.445,"udf_date[0-9]{1,2}":"23/09/2024","udf_encrypt([1-9]|10)":"sample-encrypted-text","udf_multi[0-9]{1,2}":["issue","bug","security","needfix"],"udf_multiuser[0-9]{1,2}":["139655000000057003","139655000000057004","139655000000057005"]})
};
fetch(url, options)
.then(response => response.json())
.then(data => console.log(data))
.catch(error => console.error(error));
{"name":"Authentication Module Security Audit","start_date":"05/28/2025","end_date":"10/28/2025","owner_zpuid":"1752587000000097024","flag":"internal","status_id":"238060000975451234","tagIds":"238060000975451234,238060000975451234","budget":"98420000","threshold":"250000","hourly_budget":"9895000","hourly_budget_threshold":"250000","revenue_budget":1023000,"udf_char[0-9]{1,3}":"Critical security vulnerability identified in the user authentication module affecting session token integrity.","udf_text[0-9]{1,2}":"The security audit conducted on May 6th identified a critical vulnerability in the authentication module. Session tokens are not invalidated upon timeout, allowing unauthorized access to active user sessions. Immediate remediation is required to prevent potential data breaches.","udf_long[0-9]{1,2}":123987542233,"udf_user[0-9]{1,2}":"139655000000057003","udf_double[0-9]{1,2}":123.445,"udf_date[0-9]{1,2}":"23/09/2024","udf_encrypt([1-9]|10)":"sample-encrypted-text","udf_multi[0-9]{1,2}":["issue","bug","security","needfix"],"udf_multiuser[0-9]{1,2}":["139655000000057003","139655000000057004","139655000000057005"]}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/phases/[MILESTONE_ID]")
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":"Authentication Module Security Audit","start_date":"05/28/2025","end_date":"10/28/2025","owner_zpuid":"1752587000000097024","flag":"internal","status_id":"238060000975451234","tagIds":"238060000975451234,238060000975451234","budget":"98420000","threshold":"250000","hourly_budget":"9895000","hourly_budget_threshold":"250000","revenue_budget":1023000,"udf_char[0-9]{1,3}":"Critical security vulnerability identified in the user authentication module affecting session token integrity.","udf_text[0-9]{1,2}":"The security audit conducted on May 6th identified a critical vulnerability in the authentication module. Session tokens are not invalidated upon timeout, allowing unauthorized access to active user sessions. Immediate remediation is required to prevent potential data breaches.","udf_long[0-9]{1,2}":123987542233,"udf_user[0-9]{1,2}":"139655000000057003","udf_double[0-9]{1,2}":123.445,"udf_date[0-9]{1,2}":"23/09/2024","udf_encrypt([1-9]|10)":"sample-encrypted-text","udf_multi[0-9]{1,2}":["issue","bug","security","needfix"],"udf_multiuser[0-9]{1,2}":["139655000000057003","139655000000057004","139655000000057005"]}""") }
val response = conn.inputStream.bufferedReader().readText()
println(response)
}
NSURL *url = [NSURL URLWithString:@"https://projects.zoho.com/api/v3/portal/[PORTAL_ID]/projects/23806000097545166/phases/[MILESTONE_ID]"];
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\":\"Authentication Module Security Audit\",\"start_date\":\"05/28/2025\",\"end_date\":\"10/28/2025\",\"owner_zpuid\":\"1752587000000097024\",\"flag\":\"internal\",\"status_id\":\"238060000975451234\",\"tagIds\":\"238060000975451234,238060000975451234\",\"budget\":\"98420000\",\"threshold\":\"250000\",\"hourly_budget\":\"9895000\",\"hourly_budget_threshold\":\"250000\",\"revenue_budget\":1023000,\"udf_char[0-9]{1,3}\":\"Critical security vulnerability identified in the user authentication module affecting session token integrity.\",\"udf_text[0-9]{1,2}\":\"The security audit conducted on May 6th identified a critical vulnerability in the authentication module. Session tokens are not invalidated upon timeout, allowing unauthorized access to active user sessions. Immediate remediation is required to prevent potential data breaches.\",\"udf_long[0-9]{1,2}\":123987542233,\"udf_user[0-9]{1,2}\":\"139655000000057003\",\"udf_double[0-9]{1,2}\":123.445,\"udf_date[0-9]{1,2}\":\"23/09/2024\",\"udf_encrypt([1-9]|10)\":\"sample-encrypted-text\",\"udf_multi[0-9]{1,2}\":[\"issue\",\"bug\",\"security\",\"needfix\"],\"udf_multiuser[0-9]{1,2}\":[\"139655000000057003\",\"139655000000057004\",\"139655000000057005\"]}" 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/phases/[MILESTONE_ID]" in
let headers = Cohttp.Header.init ()
|> fun h -> Cohttp.Header.add h "Authorization" "Bearer 1000.03xxxxxxxxxxxxxxxxxa5317.dxxxxxxxxxxxxxxxxxfa"
|> fun h -> Cohttp.Header.add h "Content-Type" "application/json"
in
let body = Cohttp_lwt.Body.of_string {json|{"name":"Authentication Module Security Audit","start_date":"05/28/2025","end_date":"10/28/2025","owner_zpuid":"1752587000000097024","flag":"internal","status_id":"238060000975451234","tagIds":"238060000975451234,238060000975451234","budget":"98420000","threshold":"250000","hourly_budget":"9895000","hourly_budget_threshold":"250000","revenue_budget":1023000,"udf_char[0-9]{1,3}":"Critical security vulnerability identified in the user authentication module affecting session token integrity.","udf_text[0-9]{1,2}":"The security audit conducted on May 6th identified a critical vulnerability in the authentication module. Session tokens are not invalidated upon timeout, allowing unauthorized access to active user sessions. Immediate remediation is required to prevent potential data breaches.","udf_long[0-9]{1,2}":123987542233,"udf_user[0-9]{1,2}":"139655000000057003","udf_double[0-9]{1,2}":123.445,"udf_date[0-9]{1,2}":"23/09/2024","udf_encrypt([1-9]|10)":"sample-encrypted-text","udf_multi[0-9]{1,2}":["issue","bug","security","needfix"],"udf_multiuser[0-9]{1,2}":["139655000000057003","139655000000057004","139655000000057005"]}|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":"Authentication Module Security Audit","start_date":"05/28/2025","end_date":"10/28/2025","owner_zpuid":"1752587000000097024","flag":"internal","status_id":"238060000975451234","tagIds":"238060000975451234,238060000975451234","budget":"98420000","threshold":"250000","hourly_budget":"9895000","hourly_budget_threshold":"250000","revenue_budget":1023000,"udf_char[0-9]{1,3}":"Critical security vulnerability identified in the user authentication module affecting session token integrity.","udf_text[0-9]{1,2}":"The security audit conducted on May 6th identified a critical vulnerability in the authentication module. Session tokens are not invalidated upon timeout, allowing unauthorized access to active user sessions. Immediate remediation is required to prevent potential data breaches.","udf_long[0-9]{1,2}":123987542233,"udf_user[0-9]{1,2}":"139655000000057003","udf_double[0-9]{1,2}":123.445,"udf_date[0-9]{1,2}":"23/09/2024","udf_encrypt([1-9]|10)":"sample-encrypted-text","udf_multi[0-9]{1,2}":["issue","bug","security","needfix"],"udf_multiuser[0-9]{1,2}":["139655000000057003","139655000000057004","139655000000057005"]}
'@
$response = Invoke-RestMethod -Uri "https://projects.zoho.com/api/v3/portal/[PORTAL_ID]/projects/23806000097545166/phases/[MILESTONE_ID]" -Method POST -Headers $headers -Body $body
$response | ConvertTo-Json
library(httr)
url <- "https://projects.zoho.com/api/v3/portal/[PORTAL_ID]/projects/23806000097545166/phases/[MILESTONE_ID]"
response <- POST(
url,
add_headers(Authorization = "Bearer 1000.03xxxxxxxxxxxxxxxxxa5317.dxxxxxxxxxxxxxxxxxfa"),
content_type_json(),
body = "{\"name\":\"Authentication Module Security Audit\",\"start_date\":\"05/28/2025\",\"end_date\":\"10/28/2025\",\"owner_zpuid\":\"1752587000000097024\",\"flag\":\"internal\",\"status_id\":\"238060000975451234\",\"tagIds\":\"238060000975451234,238060000975451234\",\"budget\":\"98420000\",\"threshold\":\"250000\",\"hourly_budget\":\"9895000\",\"hourly_budget_threshold\":\"250000\",\"revenue_budget\":1023000,\"udf_char[0-9]{1,3}\":\"Critical security vulnerability identified in the user authentication module affecting session token integrity.\",\"udf_text[0-9]{1,2}\":\"The security audit conducted on May 6th identified a critical vulnerability in the authentication module. Session tokens are not invalidated upon timeout, allowing unauthorized access to active user sessions. Immediate remediation is required to prevent potential data breaches.\",\"udf_long[0-9]{1,2}\":123987542233,\"udf_user[0-9]{1,2}\":\"139655000000057003\",\"udf_double[0-9]{1,2}\":123.445,\"udf_date[0-9]{1,2}\":\"23/09/2024\",\"udf_encrypt([1-9]|10)\":\"sample-encrypted-text\",\"udf_multi[0-9]{1,2}\":[\"issue\",\"bug\",\"security\",\"needfix\"],\"udf_multiuser[0-9]{1,2}\":[\"139655000000057003\",\"139655000000057004\",\"139655000000057005\"]}"
)
content(response, "text")
import Foundation
let url = URL(string: "https://projects.zoho.com/api/v3/portal/[PORTAL_ID]/projects/23806000097545166/phases/[MILESTONE_ID]")!
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":"Authentication Module Security Audit","start_date":"05/28/2025","end_date":"10/28/2025","owner_zpuid":"1752587000000097024","flag":"internal","status_id":"238060000975451234","tagIds":"238060000975451234,238060000975451234","budget":"98420000","threshold":"250000","hourly_budget":"9895000","hourly_budget_threshold":"250000","revenue_budget":1023000,"udf_char[0-9]{1,3}":"Critical security vulnerability identified in the user authentication module affecting session token integrity.","udf_text[0-9]{1,2}":"The security audit conducted on May 6th identified a critical vulnerability in the authentication module. Session tokens are not invalidated upon timeout, allowing unauthorized access to active user sessions. Immediate remediation is required to prevent potential data breaches.","udf_long[0-9]{1,2}":123987542233,"udf_user[0-9]{1,2}":"139655000000057003","udf_double[0-9]{1,2}":123.445,"udf_date[0-9]{1,2}":"23/09/2024","udf_encrypt([1-9]|10)":"sample-encrypted-text","udf_multi[0-9]{1,2}":["issue","bug","security","needfix"],"udf_multiuser[0-9]{1,2}":["139655000000057003","139655000000057004","139655000000057005"]}
""".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
OAuth Scope:
ZohoProjects.milestones.DELETE
String
requiredUnique, immutable identifier of the portal in Zoho Projects. You can obtain it from the Get Portals API (the "id" field in the response).
String
requiredUnique, immutable identifier of the project within the specified portal. You can obtain it from the Get Projects API (the "id" field in the response).
String
requiredIdentifier of the milestone. You can obtain it from the Get Milestones API (the "id" field in the response).
Request Example
curl -X DELETE \
'https://projects.zoho.com/api/v3/portal/[PORTAL_ID]/projects/23806000097545166/phases/[MILESTONE_ID]' \
-H 'Authorization: Bearer 1000.03xxxxxxxxxxxxxxxxxa5317.dxxxxxxxxxxxxxxxxxfa'
url = "https://projects.zoho.com/api/v3/portal/[PORTAL_ID]/projects/23806000097545166/phases/[MILESTONE_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/phases/[MILESTONE_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/phases/[MILESTONE_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/phases/[MILESTONE_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/phases/[MILESTONE_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/phases/[MILESTONE_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/phases/[MILESTONE_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/phases/[MILESTONE_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/phases/[MILESTONE_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/phases/[MILESTONE_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/phases/[MILESTONE_ID] HTTP/1.1
Host: https://projects.zoho.com/api/v3/portal/[PORTAL_ID]/projects/23806000097545166/phases/[MILESTONE_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/phases/[MILESTONE_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/phases/[MILESTONE_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/phases/[MILESTONE_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/phases/[MILESTONE_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/phases/[MILESTONE_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/phases/[MILESTONE_ID]" -Method DELETE -Headers $headers
$response | ConvertTo-Json
library(httr)
url <- "https://projects.zoho.com/api/v3/portal/[PORTAL_ID]/projects/23806000097545166/phases/[MILESTONE_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/phases/[MILESTONE_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
Move a phase to another project
OAuth Scope:
ZohoProjects.milestones.UPDATE
String
requiredUnique, immutable identifier of the portal in Zoho Projects. You can obtain it from the Get Portals API (the "id" field in the response).
String
requiredUnique, immutable identifier of the project within the specified portal. You can obtain it from the Get Projects API (the "id" field in the response).
String
requiredIdentifier of the milestone. You can obtain it from the Get Milestones API (the "id" field in the response).
String
Enter the ID of the project to which the phase should move You can obtain it from the Get Projects API (the "id" field in the response).
Request Example
curl -X PATCH \
'https://projects.zoho.com/api/v3/portal/[PORTAL_ID]/projects/23806000097545166/phases/[MILESTONE_ID]/move' \
-H 'Authorization: Bearer 1000.03xxxxxxxxxxxxxxxxxa5317.dxxxxxxxxxxxxxxxxxfa' \
-H 'Content-Type: application/json' \
-d '{"to_project":"23806000097545166"}'
url = "https://projects.zoho.com/api/v3/portal/[PORTAL_ID]/projects/23806000097545166/phases/[MILESTONE_ID]/move";
params = Map();
params.put("to_project", "23806000097545166");
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/phases/[MILESTONE_ID]/move');
const payload = JSON.stringify({"to_project":"23806000097545166"});
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/phases/[MILESTONE_ID]/move")
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 = '{"to_project":"23806000097545166"}'
response = http.request(request)
puts response.read_body
<?php
$url = "https://projects.zoho.com/api/v3/portal/[PORTAL_ID]/projects/23806000097545166/phases/[MILESTONE_ID]/move";
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => $url,
CURLOPT_RETURNTRANSFER => true,
CURLOPT_CUSTOMREQUEST => "PATCH",
CURLOPT_POSTFIELDS => '{"to_project":"23806000097545166"}',
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/phases/[MILESTONE_ID]/move"
headers = {
"Authorization": "Bearer 1000.03xxxxxxxxxxxxxxxxxa5317.dxxxxxxxxxxxxxxxxxfa",
"Content-Type": "application/json",
}
payload = '{"to_project":"23806000097545166"}'
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/phases/[MILESTONE_ID]/move");
curl_easy_setopt(curl, CURLOPT_HTTPHEADER, headers);
curl_easy_setopt(curl, CURLOPT_CUSTOMREQUEST, "PATCH");
curl_easy_setopt(curl, CURLOPT_POSTFIELDS, "{\"to_project\":\"23806000097545166\"}");
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/phases/[MILESTONE_ID]/move");
request.Content = new StringContent(
@"{""to_project"":""23806000097545166""}",
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/phases/[MILESTONE_ID]/move");
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, "{\"to_project\":\"23806000097545166\"}");
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/phases/[MILESTONE_ID]/move"
{:headers {"Authorization" "Bearer 1000.03xxxxxxxxxxxxxxxxxa5317.dxxxxxxxxxxxxxxxxxfa"
"Content-Type" "application/json"}
:body "{\"to_project\":\"23806000097545166\"}"
:as :json}))
(println (:body response))
package main
import (
"fmt"
"io"
"net/http"
"strings"
)
func main() {
payload := strings.NewReader("{\"to_project\":\"23806000097545166\"}")
req, _ := http.NewRequest("PATCH", "https://projects.zoho.com/api/v3/portal/[PORTAL_ID]/projects/23806000097545166/phases/[MILESTONE_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))
}
PATCH https://projects.zoho.com/api/v3/portal/[PORTAL_ID]/projects/23806000097545166/phases/[MILESTONE_ID]/move HTTP/1.1
Host: https://projects.zoho.com/api/v3/portal/[PORTAL_ID]/projects/23806000097545166/phases/[MILESTONE_ID]/move
Authorization: Bearer 1000.03xxxxxxxxxxxxxxxxxa5317.dxxxxxxxxxxxxxxxxxfa
Content-Type: application/json
{"to_project":"23806000097545166"}
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/phases/[MILESTONE_ID]/move");
HttpUriRequest requestObj = new HttpPatch(uriBuilder.build());
requestObj.addHeader("Authorization", "Bearer 1000.03xxxxxxxxxxxxxxxxxa5317.dxxxxxxxxxxxxxxxxxfa");
HttpEntityEnclosingRequestBase requestBase = (HttpEntityEnclosingRequestBase) requestObj;
String requestBody = "{\"to_project\":\"23806000097545166\"}";
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/phases/[MILESTONE_ID]/move';
const options = {
method: 'PATCH',
headers: {
'Authorization': 'Bearer 1000.03xxxxxxxxxxxxxxxxxa5317.dxxxxxxxxxxxxxxxxxfa',
'Content-Type': 'application/json'
},
body: JSON.stringify({"to_project":"23806000097545166"})
};
fetch(url, options)
.then(response => response.json())
.then(data => console.log(data))
.catch(error => console.error(error));
{"to_project":"23806000097545166"}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/phases/[MILESTONE_ID]/move")
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("""{"to_project":"23806000097545166"}""") }
val response = conn.inputStream.bufferedReader().readText()
println(response)
}
NSURL *url = [NSURL URLWithString:@"https://projects.zoho.com/api/v3/portal/[PORTAL_ID]/projects/23806000097545166/phases/[MILESTONE_ID]/move"];
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 = [@"{\"to_project\":\"23806000097545166\"}" 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/phases/[MILESTONE_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|{"to_project":"23806000097545166"}|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 = @'
{"to_project":"23806000097545166"}
'@
$response = Invoke-RestMethod -Uri "https://projects.zoho.com/api/v3/portal/[PORTAL_ID]/projects/23806000097545166/phases/[MILESTONE_ID]/move" -Method PATCH -Headers $headers -Body $body
$response | ConvertTo-Json
library(httr)
url <- "https://projects.zoho.com/api/v3/portal/[PORTAL_ID]/projects/23806000097545166/phases/[MILESTONE_ID]/move"
response <- PATCH(
url,
add_headers(Authorization = "Bearer 1000.03xxxxxxxxxxxxxxxxxa5317.dxxxxxxxxxxxxxxxxxfa"),
content_type_json(),
body = "{\"to_project\":\"23806000097545166\"}"
)
content(response, "text")
import Foundation
let url = URL(string: "https://projects.zoho.com/api/v3/portal/[PORTAL_ID]/projects/23806000097545166/phases/[MILESTONE_ID]/move")!
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 = """
{"to_project":"23806000097545166"}
""".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
Clone a phase within a project. Use this API to duplicate phase details and configuration.
OAuth Scope:
ZohoProjects.milestones.CREATE
String
requiredUnique, immutable identifier of the portal in Zoho Projects. You can obtain it from the Get Portals API (the "id" field in the response).
String
requiredUnique, immutable identifier of the project within the specified portal. You can obtain it from the Get Projects API (the "id" field in the response).
String
requiredIdentifier of the milestone. You can obtain it from the Get Milestones API (the "id" field in the response).
Request Example
curl -X POST \
'https://projects.zoho.com/api/v3/portal/[PORTAL_ID]/projects/23806000097545166/phases/[MILESTONE_ID]/clone' \
-H 'Authorization: Bearer 1000.03xxxxxxxxxxxxxxxxxa5317.dxxxxxxxxxxxxxxxxxfa' \
-H 'Content-Type: application/json' \
-d '{}'
url = "https://projects.zoho.com/api/v3/portal/[PORTAL_ID]/projects/23806000097545166/phases/[MILESTONE_ID]/clone";
response = invokeUrl
[
url: url
type: POST
connection: "projects"
];
info response;
const https = require('https');
const url = new URL('https://projects.zoho.com/api/v3/portal/[PORTAL_ID]/projects/23806000097545166/phases/[MILESTONE_ID]/clone');
const payload = JSON.stringify({});
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/phases/[MILESTONE_ID]/clone")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = "Bearer 1000.03xxxxxxxxxxxxxxxxxa5317.dxxxxxxxxxxxxxxxxxfa"
request["Content-Type"] = "application/json"
request.body = '{}'
response = http.request(request)
puts response.read_body
<?php
$url = "https://projects.zoho.com/api/v3/portal/[PORTAL_ID]/projects/23806000097545166/phases/[MILESTONE_ID]/clone";
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => $url,
CURLOPT_RETURNTRANSFER => true,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => '{}',
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/phases/[MILESTONE_ID]/clone"
headers = {
"Authorization": "Bearer 1000.03xxxxxxxxxxxxxxxxxa5317.dxxxxxxxxxxxxxxxxxfa",
"Content-Type": "application/json",
}
payload = '{}'
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/phases/[MILESTONE_ID]/clone");
curl_easy_setopt(curl, CURLOPT_HTTPHEADER, headers);
curl_easy_setopt(curl, CURLOPT_CUSTOMREQUEST, "POST");
curl_easy_setopt(curl, CURLOPT_POSTFIELDS, "{}");
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/phases/[MILESTONE_ID]/clone");
request.Content = new StringContent(
@"{}",
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/phases/[MILESTONE_ID]/clone");
curl_easy_setopt(curl, CURLOPT_HTTPHEADER, headers);
curl_easy_setopt(curl, CURLOPT_CUSTOMREQUEST, "POST");
curl_easy_setopt(curl, CURLOPT_WRITEFUNCTION, WriteCallback);
curl_easy_setopt(curl, CURLOPT_WRITEDATA, &response);
curl_easy_setopt(curl, CURLOPT_POSTFIELDS, "{}");
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/phases/[MILESTONE_ID]/clone"
{:headers {"Authorization" "Bearer 1000.03xxxxxxxxxxxxxxxxxa5317.dxxxxxxxxxxxxxxxxxfa"
"Content-Type" "application/json"}
:body "{}"
:as :json}))
(println (:body response))
package main
import (
"fmt"
"io"
"net/http"
"strings"
)
func main() {
payload := strings.NewReader("{}")
req, _ := http.NewRequest("POST", "https://projects.zoho.com/api/v3/portal/[PORTAL_ID]/projects/23806000097545166/phases/[MILESTONE_ID]/clone", payload)
req.Header.Add("Authorization", "Bearer 1000.03xxxxxxxxxxxxxxxxxa5317.dxxxxxxxxxxxxxxxxxfa")
req.Header.Add("Content-Type", "application/json")
resp, _ := http.DefaultClient.Do(req)
defer resp.Body.Close()
body, _ := io.ReadAll(resp.Body)
fmt.Println(string(body))
}
POST https://projects.zoho.com/api/v3/portal/[PORTAL_ID]/projects/23806000097545166/phases/[MILESTONE_ID]/clone HTTP/1.1
Host: https://projects.zoho.com/api/v3/portal/[PORTAL_ID]/projects/23806000097545166/phases/[MILESTONE_ID]/clone
Authorization: Bearer 1000.03xxxxxxxxxxxxxxxxxa5317.dxxxxxxxxxxxxxxxxxfa
Content-Type: application/json
{}
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/phases/[MILESTONE_ID]/clone");
HttpUriRequest requestObj = new HttpPost(uriBuilder.build());
requestObj.addHeader("Authorization", "Bearer 1000.03xxxxxxxxxxxxxxxxxa5317.dxxxxxxxxxxxxxxxxxfa");
HttpEntityEnclosingRequestBase requestBase = (HttpEntityEnclosingRequestBase) requestObj;
String requestBody = "{}";
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/phases/[MILESTONE_ID]/clone';
const options = {
method: 'POST',
headers: {
'Authorization': 'Bearer 1000.03xxxxxxxxxxxxxxxxxa5317.dxxxxxxxxxxxxxxxxxfa',
'Content-Type': 'application/json'
},
body: JSON.stringify({})
};
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/phases/[MILESTONE_ID]/clone")
val conn = url.openConnection() as HttpURLConnection
conn.requestMethod = "POST"
conn.setRequestProperty("Authorization", "Bearer 1000.03xxxxxxxxxxxxxxxxxa5317.dxxxxxxxxxxxxxxxxxfa")
conn.setRequestProperty("Content-Type", "application/json")
conn.doOutput = true
conn.outputStream.bufferedWriter().use { it.write("""{}""") }
val response = conn.inputStream.bufferedReader().readText()
println(response)
}
NSURL *url = [NSURL URLWithString:@"https://projects.zoho.com/api/v3/portal/[PORTAL_ID]/projects/23806000097545166/phases/[MILESTONE_ID]/clone"];
NSMutableURLRequest *request = [NSMutableURLRequest requestWithURL:url];
[request setHTTPMethod:@"POST"];
[request setValue:@"Bearer 1000.03xxxxxxxxxxxxxxxxxa5317.dxxxxxxxxxxxxxxxxxfa" forHTTPHeaderField:@"Authorization"];
[request setValue:@"application/json" forHTTPHeaderField:@"Content-Type"];
NSData *body = [@"{}" 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/phases/[MILESTONE_ID]/clone" in
let headers = Cohttp.Header.init ()
|> fun h -> Cohttp.Header.add h "Authorization" "Bearer 1000.03xxxxxxxxxxxxxxxxxa5317.dxxxxxxxxxxxxxxxxxfa"
|> fun h -> Cohttp.Header.add h "Content-Type" "application/json"
in
let body = Cohttp_lwt.Body.of_string {json|{}|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 = @'
{}
'@
$response = Invoke-RestMethod -Uri "https://projects.zoho.com/api/v3/portal/[PORTAL_ID]/projects/23806000097545166/phases/[MILESTONE_ID]/clone" -Method POST -Headers $headers -Body $body
$response | ConvertTo-Json
library(httr)
url <- "https://projects.zoho.com/api/v3/portal/[PORTAL_ID]/projects/23806000097545166/phases/[MILESTONE_ID]/clone"
response <- POST(
url,
add_headers(Authorization = "Bearer 1000.03xxxxxxxxxxxxxxxxxa5317.dxxxxxxxxxxxxxxxxxfa"),
content_type_json(),
body = "{}"
)
content(response, "text")
import Foundation
let url = URL(string: "https://projects.zoho.com/api/v3/portal/[PORTAL_ID]/projects/23806000097545166/phases/[MILESTONE_ID]/clone")!
var request = URLRequest(url: url)
request.httpMethod = "POST"
request.setValue("Bearer 1000.03xxxxxxxxxxxxxxxxxa5317.dxxxxxxxxxxxxxxxxxfa", forHTTPHeaderField: "Authorization")
request.setValue("application/json", forHTTPHeaderField: "Content-Type")
request.httpBody = """
{}
""".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
Get activities performed on a phase
OAuth Scope:
ZohoProjects.portals.READ
String
requiredUnique, immutable identifier of the portal in Zoho Projects. You can obtain it from the Get Portals API (the "id" field in the response).
String
requiredUnique, immutable identifier of the project within the specified portal. You can obtain it from the Get Projects API (the "id" field in the response).
String
requiredIdentifier of the milestone. You can obtain it from the Get Milestones API (the "id" field in the response).
int
default : 1Enter the page number.
int
limit : 1-200Enter the number of entries to display per page
Request Example
curl -X GET \
'https://projects.zoho.com/api/v3/portal/[PORTAL_ID]/projects/23806000097545166/phases/[MILESTONE_ID]/activities?page=1&per_page=10' \
-H 'Authorization: Bearer 1000.03xxxxxxxxxxxxxxxxxa5317.dxxxxxxxxxxxxxxxxxfa'
url = "https://projects.zoho.com/api/v3/portal/[PORTAL_ID]/projects/23806000097545166/phases/[MILESTONE_ID]/activities";
params = Map();
params.put("page", "1");
params.put("per_page", "10");
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/phases/[MILESTONE_ID]/activities');
url.searchParams.append('page', '1');
url.searchParams.append('per_page', '10');
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/phases/[MILESTONE_ID]/activities")
params = {
"page" => "1",
"per_page" => "10"
}
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',
];
$url = "https://projects.zoho.com/api/v3/portal/[PORTAL_ID]/projects/23806000097545166/phases/[MILESTONE_ID]/activities" . "?" . 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/phases/[MILESTONE_ID]/activities"
params = {
"page": "1",
"per_page": "10"
}
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 url[2048];
snprintf(url, sizeof(url), "https://projects.zoho.com/api/v3/portal/[PORTAL_ID]/projects/23806000097545166/phases/[MILESTONE_ID]/activities?page=%s&per_page=%s", enc_page, enc_per_page);
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_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";
var uriBuilder = new UriBuilder("https://projects.zoho.com/api/v3/portal/[PORTAL_ID]/projects/23806000097545166/phases/[MILESTONE_ID]/activities") { 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);
std::string url = "https://projects.zoho.com/api/v3/portal/[PORTAL_ID]/projects/23806000097545166/phases/[MILESTONE_ID]/activities";
url += "?page=" + std::string(enc_page);
url += "&per_page=" + std::string(enc_per_page);
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_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")
url (str "https://projects.zoho.com/api/v3/portal/[PORTAL_ID]/projects/23806000097545166/phases/[MILESTONE_ID]/activities" "?page=" enc-page "&per_page=" enc-per_page)]
(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/phases/[MILESTONE_ID]/activities", nil)
q := req.URL.Query()
q.Add("page", "1")
q.Add("per_page", "10")
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/phases/[MILESTONE_ID]/activities?page=1&per_page=10 HTTP/1.1
Host: https://projects.zoho.com/api/v3/portal/[PORTAL_ID]/projects/23806000097545166/phases/[MILESTONE_ID]/activities?page=1&per_page=10
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/phases/[MILESTONE_ID]/activities");
uriBuilder.addParameter("page", "1");
uriBuilder.addParameter("per_page", "10");
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/phases/[MILESTONE_ID]/activities';
const params = new URLSearchParams({
'page': '1',
'per_page': '10'
});
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"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/phases/[MILESTONE_ID]/activities".toHttpUrl().newBuilder()
urlBuilder.addQueryParameter("page", "1")
urlBuilder.addQueryParameter("per_page", "10")
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 *urlString = [NSString stringWithFormat:@"https://projects.zoho.com/api/v3/portal/[PORTAL_ID]/projects/23806000097545166/phases/[MILESTONE_ID]/activities?page=%@&per_page=%@", encodedPage, encodedPer_page];
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 uri = Uri.of_string ("https://projects.zoho.com/api/v3/portal/[PORTAL_ID]/projects/23806000097545166/phases/[MILESTONE_ID]/activities" ^ "?page=" ^ enc_page ^ "&per_page=" ^ enc_per_page) 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"
}
$queryString = ($params.GetEnumerator() | ForEach-Object { "$($_.Key)=$([System.Uri]::EscapeDataString($_.Value))" }) -join "&"
$url = "https://projects.zoho.com/api/v3/portal/[PORTAL_ID]/projects/23806000097545166/phases/[MILESTONE_ID]/activities" + "?" + $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/phases/[MILESTONE_ID]/activities"
params <- list(
page = "1",
per_page = "10"
)
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/phases/[MILESTONE_ID]/activities")!
components.queryItems = [
URLQueryItem(name: "page", value: "1"),
URLQueryItem(name: "per_page", value: "10")
]
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
Retrieve the status transition history of a phase
OAuth Scope:
ZohoProjects.milestones.READ
String
requiredUnique, immutable identifier of the portal in Zoho Projects. You can obtain it from the Get Portals API (the "id" field in the response).
String
requiredUnique, immutable identifier of the project within the specified portal. You can obtain it from the Get Projects API (the "id" field in the response).
String
requiredIdentifier of the milestone. You can obtain it from the Get Milestones API (the "id" field in the response).
Request Example
curl -X GET \
'https://projects.zoho.com/api/v3/portal/[PORTAL_ID]/projects/23806000097545166/phases/[MILESTONE_ID]/status-timeline' \
-H 'Authorization: Bearer 1000.03xxxxxxxxxxxxxxxxxa5317.dxxxxxxxxxxxxxxxxxfa'
url = "https://projects.zoho.com/api/v3/portal/[PORTAL_ID]/projects/23806000097545166/phases/[MILESTONE_ID]/status-timeline";
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/phases/[MILESTONE_ID]/status-timeline');
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/phases/[MILESTONE_ID]/status-timeline")
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/phases/[MILESTONE_ID]/status-timeline";
$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/phases/[MILESTONE_ID]/status-timeline"
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/phases/[MILESTONE_ID]/status-timeline");
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/phases/[MILESTONE_ID]/status-timeline");
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/phases/[MILESTONE_ID]/status-timeline");
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/phases/[MILESTONE_ID]/status-timeline"
{: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/phases/[MILESTONE_ID]/status-timeline", 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/phases/[MILESTONE_ID]/status-timeline HTTP/1.1
Host: https://projects.zoho.com/api/v3/portal/[PORTAL_ID]/projects/23806000097545166/phases/[MILESTONE_ID]/status-timeline
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/phases/[MILESTONE_ID]/status-timeline");
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/phases/[MILESTONE_ID]/status-timeline';
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/phases/[MILESTONE_ID]/status-timeline")
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/phases/[MILESTONE_ID]/status-timeline"];
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/phases/[MILESTONE_ID]/status-timeline" 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/phases/[MILESTONE_ID]/status-timeline" -Method GET -Headers $headers
$response | ConvertTo-Json
library(httr)
url <- "https://projects.zoho.com/api/v3/portal/[PORTAL_ID]/projects/23806000097545166/phases/[MILESTONE_ID]/status-timeline"
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/phases/[MILESTONE_ID]/status-timeline")!
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
Retrieve all phases from the portal. Use this API to fetch phases across projects with pagination, sorting, custom view, and filter criteria.
OAuth Scope:
ZohoProjects.milestones.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.
int
default : 100Enter the number of entries to be displayed per page.
String
Enter the sort criteria. Accepted values: ASC(field_name) or DESC(field_name).
String
Enter the ID of the custom view.
JSONObject
max length : 10000Enter the filter criteria for the phases.
String
max length : 2000Enter the specific phase IDs to fetch.
Request Example
curl -X GET \
'https://projects.zoho.com/api/v3.1/portal/[PORTAL_ID]/phases?page=1&per_page=10&sort_by=DESC%28created_time%29&view_id=23806000074760021&filter=%7B%22criteria%22%3A%5B%7B%22cfid%22%3A%226000000035033%22%2C%22api_name%22%3A%22status%22%2C%22field_name%22%3A%22status%22%2C%22criteria_condition%22%3A%22is%22%2C%22value%22%3A%5B%226000000000629%22%5D%2C%22relative_columns%22%3A%5B%7B%22cfid%22%3A%226000000035033%22%2C%22offset%22%3A%221%22%2C%22unit%22%3A%22days%22%2C%22prior%22%3A%22before%22%7D%5D%7D%5D%2C%22pattern%22%3A%221%22%7D&phase_ids=6000000019045%2C6000000019046' \
-H 'Authorization: Bearer 1000.03xxxxxxxxxxxxxxxxxa5317.dxxxxxxxxxxxxxxxxxfa'
url = "https://projects.zoho.com/api/v3.1/portal/[PORTAL_ID]/phases";
filter_value = {"criteria":[{"cfid":"6000000035033","api_name":"status","field_name":"status","criteria_condition":"is","value":["6000000000629"],"relative_columns":[{"cfid":"6000000035033","offset":"1","unit":"days","prior":"before"}]}],"pattern":"1"};
params = Map();
params.put("page", "1");
params.put("per_page", "10");
params.put("sort_by", "DESC(created_time)");
params.put("view_id", "23806000074760021");
params.put("filter", filter_value);
params.put("phase_ids", "6000000019045,6000000019046");
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.1/portal/[PORTAL_ID]/phases');
url.searchParams.append('page', '1');
url.searchParams.append('per_page', '10');
url.searchParams.append('sort_by', 'DESC(created_time)');
url.searchParams.append('view_id', '23806000074760021');
url.searchParams.append('filter', '{"criteria":[{"cfid":"6000000035033","api_name":"status","field_name":"status","criteria_condition":"is","value":["6000000000629"],"relative_columns":[{"cfid":"6000000035033","offset":"1","unit":"days","prior":"before"}]}],"pattern":"1"}');
url.searchParams.append('phase_ids', '6000000019045,6000000019046');
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.1/portal/[PORTAL_ID]/phases")
params = {
"page" => "1",
"per_page" => "10",
"sort_by" => "DESC(created_time)",
"view_id" => "23806000074760021",
"filter" => "{\"criteria\":[{\"cfid\":\"6000000035033\",\"api_name\":\"status\",\"field_name\":\"status\",\"criteria_condition\":\"is\",\"value\":[\"6000000000629\"],\"relative_columns\":[{\"cfid\":\"6000000035033\",\"offset\":\"1\",\"unit\":\"days\",\"prior\":\"before\"}]}],\"pattern\":\"1\"}",
"phase_ids" => "6000000019045,6000000019046"
}
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',
'sort_by' => 'DESC(created_time)',
'view_id' => '23806000074760021',
'filter' => '{"criteria":[{"cfid":"6000000035033","api_name":"status","field_name":"status","criteria_condition":"is","value":["6000000000629"],"relative_columns":[{"cfid":"6000000035033","offset":"1","unit":"days","prior":"before"}]}],"pattern":"1"}',
'phase_ids' => '6000000019045,6000000019046',
];
$url = "https://projects.zoho.com/api/v3.1/portal/[PORTAL_ID]/phases" . "?" . 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.1/portal/[PORTAL_ID]/phases"
params = {
"page": "1",
"per_page": "10",
"sort_by": "DESC(created_time)",
"view_id": "23806000074760021",
"filter": "{\"criteria\":[{\"cfid\":\"6000000035033\",\"api_name\":\"status\",\"field_name\":\"status\",\"criteria_condition\":\"is\",\"value\":[\"6000000000629\"],\"relative_columns\":[{\"cfid\":\"6000000035033\",\"offset\":\"1\",\"unit\":\"days\",\"prior\":\"before\"}]}],\"pattern\":\"1\"}",
"phase_ids": "6000000019045,6000000019046"
}
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_sort_by = curl_easy_escape(curl, "DESC(created_time)", 0);
char *enc_view_id = curl_easy_escape(curl, "23806000074760021", 0);
char *enc_filter = curl_easy_escape(curl, "{\"criteria\":[{\"cfid\":\"6000000035033\",\"api_name\":\"status\",\"field_name\":\"status\",\"criteria_condition\":\"is\",\"value\":[\"6000000000629\"],\"relative_columns\":[{\"cfid\":\"6000000035033\",\"offset\":\"1\",\"unit\":\"days\",\"prior\":\"before\"}]}],\"pattern\":\"1\"}", 0);
char *enc_phase_ids = curl_easy_escape(curl, "6000000019045,6000000019046", 0);
char url[2048];
snprintf(url, sizeof(url), "https://projects.zoho.com/api/v3.1/portal/[PORTAL_ID]/phases?page=%s&per_page=%s&sort_by=%s&view_id=%s&filter=%s&phase_ids=%s", enc_page, enc_per_page, enc_sort_by, enc_view_id, enc_filter, enc_phase_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, "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_sort_by);
curl_free(enc_view_id);
curl_free(enc_filter);
curl_free(enc_phase_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["page"] = "1";
query["per_page"] = "10";
query["sort_by"] = "DESC(created_time)";
query["view_id"] = "23806000074760021";
query["filter"] = "{\"criteria\":[{\"cfid\":\"6000000035033\",\"api_name\":\"status\",\"field_name\":\"status\",\"criteria_condition\":\"is\",\"value\":[\"6000000000629\"],\"relative_columns\":[{\"cfid\":\"6000000035033\",\"offset\":\"1\",\"unit\":\"days\",\"prior\":\"before\"}]}],\"pattern\":\"1\"}";
query["phase_ids"] = "6000000019045,6000000019046";
var uriBuilder = new UriBuilder("https://projects.zoho.com/api/v3.1/portal/[PORTAL_ID]/phases") { 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_sort_by = curl_easy_escape(curl, "DESC(created_time)", 0);
char* enc_view_id = curl_easy_escape(curl, "23806000074760021", 0);
char* enc_filter = curl_easy_escape(curl, "{\"criteria\":[{\"cfid\":\"6000000035033\",\"api_name\":\"status\",\"field_name\":\"status\",\"criteria_condition\":\"is\",\"value\":[\"6000000000629\"],\"relative_columns\":[{\"cfid\":\"6000000035033\",\"offset\":\"1\",\"unit\":\"days\",\"prior\":\"before\"}]}],\"pattern\":\"1\"}", 0);
char* enc_phase_ids = curl_easy_escape(curl, "6000000019045,6000000019046", 0);
std::string url = "https://projects.zoho.com/api/v3.1/portal/[PORTAL_ID]/phases";
url += "?page=" + std::string(enc_page);
url += "&per_page=" + std::string(enc_per_page);
url += "&sort_by=" + std::string(enc_sort_by);
url += "&view_id=" + std::string(enc_view_id);
url += "&filter=" + std::string(enc_filter);
url += "&phase_ids=" + std::string(enc_phase_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, "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_sort_by);
curl_free(enc_view_id);
curl_free(enc_filter);
curl_free(enc_phase_ids);
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-sort_by (java.net.URLEncoder/encode "DESC(created_time)" "UTF-8")
enc-view_id (java.net.URLEncoder/encode "23806000074760021" "UTF-8")
enc-filter (java.net.URLEncoder/encode "{\"criteria\":[{\"cfid\":\"6000000035033\",\"api_name\":\"status\",\"field_name\":\"status\",\"criteria_condition\":\"is\",\"value\":[\"6000000000629\"],\"relative_columns\":[{\"cfid\":\"6000000035033\",\"offset\":\"1\",\"unit\":\"days\",\"prior\":\"before\"}]}],\"pattern\":\"1\"}" "UTF-8")
enc-phase_ids (java.net.URLEncoder/encode "6000000019045,6000000019046" "UTF-8")
url (str "https://projects.zoho.com/api/v3.1/portal/[PORTAL_ID]/phases" "?page=" enc-page "&per_page=" enc-per_page "&sort_by=" enc-sort_by "&view_id=" enc-view_id "&filter=" enc-filter "&phase_ids=" enc-phase_ids)]
(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.1/portal/[PORTAL_ID]/phases", nil)
q := req.URL.Query()
q.Add("page", "1")
q.Add("per_page", "10")
q.Add("sort_by", "DESC(created_time)")
q.Add("view_id", "23806000074760021")
q.Add("filter", "{\"criteria\":[{\"cfid\":\"6000000035033\",\"api_name\":\"status\",\"field_name\":\"status\",\"criteria_condition\":\"is\",\"value\":[\"6000000000629\"],\"relative_columns\":[{\"cfid\":\"6000000035033\",\"offset\":\"1\",\"unit\":\"days\",\"prior\":\"before\"}]}],\"pattern\":\"1\"}")
q.Add("phase_ids", "6000000019045,6000000019046")
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.1/portal/[PORTAL_ID]/phases?page=1&per_page=10&sort_by=DESC%28created_time%29&view_id=23806000074760021&filter=%7B%22criteria%22%3A%5B%7B%22cfid%22%3A%226000000035033%22%2C%22api_name%22%3A%22status%22%2C%22field_name%22%3A%22status%22%2C%22criteria_condition%22%3A%22is%22%2C%22value%22%3A%5B%226000000000629%22%5D%2C%22relative_columns%22%3A%5B%7B%22cfid%22%3A%226000000035033%22%2C%22offset%22%3A%221%22%2C%22unit%22%3A%22days%22%2C%22prior%22%3A%22before%22%7D%5D%7D%5D%2C%22pattern%22%3A%221%22%7D&phase_ids=6000000019045%2C6000000019046 HTTP/1.1
Host: https://projects.zoho.com/api/v3.1/portal/[PORTAL_ID]/phases?page=1&per_page=10&sort_by=DESC%28created_time%29&view_id=23806000074760021&filter=%7B%22criteria%22%3A%5B%7B%22cfid%22%3A%226000000035033%22%2C%22api_name%22%3A%22status%22%2C%22field_name%22%3A%22status%22%2C%22criteria_condition%22%3A%22is%22%2C%22value%22%3A%5B%226000000000629%22%5D%2C%22relative_columns%22%3A%5B%7B%22cfid%22%3A%226000000035033%22%2C%22offset%22%3A%221%22%2C%22unit%22%3A%22days%22%2C%22prior%22%3A%22before%22%7D%5D%7D%5D%2C%22pattern%22%3A%221%22%7D&phase_ids=6000000019045%2C6000000019046
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.1/portal/[PORTAL_ID]/phases");
uriBuilder.addParameter("page", "1");
uriBuilder.addParameter("per_page", "10");
uriBuilder.addParameter("sort_by", "DESC(created_time)");
uriBuilder.addParameter("view_id", "23806000074760021");
uriBuilder.addParameter("filter", "{\"criteria\":[{\"cfid\":\"6000000035033\",\"api_name\":\"status\",\"field_name\":\"status\",\"criteria_condition\":\"is\",\"value\":[\"6000000000629\"],\"relative_columns\":[{\"cfid\":\"6000000035033\",\"offset\":\"1\",\"unit\":\"days\",\"prior\":\"before\"}]}],\"pattern\":\"1\"}");
uriBuilder.addParameter("phase_ids", "6000000019045,6000000019046");
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.1/portal/[PORTAL_ID]/phases';
const params = new URLSearchParams({
'page': '1',
'per_page': '10',
'sort_by': 'DESC(created_time)',
'view_id': '23806000074760021',
'filter': '{"criteria":[{"cfid":"6000000035033","api_name":"status","field_name":"status","criteria_condition":"is","value":["6000000000629"],"relative_columns":[{"cfid":"6000000035033","offset":"1","unit":"days","prior":"before"}]}],"pattern":"1"}',
'phase_ids': '6000000019045,6000000019046'
});
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"
sort_by = "DESC(created_time)"
view_id = "23806000074760021"
filter = {"criteria":[{"cfid":"6000000035033","api_name":"status","field_name":"status","criteria_condition":"is","value":["6000000000629"],"relative_columns":[{"cfid":"6000000035033","offset":"1","unit":"days","prior":"before"}]}],"pattern":"1"}
phase_ids = "6000000019045,6000000019046"
import java.net.HttpURLConnection
import java.net.URL
import okhttp3.HttpUrl.Companion.toHttpUrl
fun main() {
val urlBuilder = "https://projects.zoho.com/api/v3.1/portal/[PORTAL_ID]/phases".toHttpUrl().newBuilder()
urlBuilder.addQueryParameter("page", "1")
urlBuilder.addQueryParameter("per_page", "10")
urlBuilder.addQueryParameter("sort_by", "DESC(created_time)")
urlBuilder.addQueryParameter("view_id", "23806000074760021")
urlBuilder.addQueryParameter("filter", "{\"criteria\":[{\"cfid\":\"6000000035033\",\"api_name\":\"status\",\"field_name\":\"status\",\"criteria_condition\":\"is\",\"value\":[\"6000000000629\"],\"relative_columns\":[{\"cfid\":\"6000000035033\",\"offset\":\"1\",\"unit\":\"days\",\"prior\":\"before\"}]}],\"pattern\":\"1\"}")
urlBuilder.addQueryParameter("phase_ids", "6000000019045,6000000019046")
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 *encodedSort_by = [@"DESC(created_time)" stringByAddingPercentEncodingWithAllowedCharacters:[NSCharacterSet URLQueryAllowedCharacterSet]];
NSString *encodedView_id = [@"23806000074760021" stringByAddingPercentEncodingWithAllowedCharacters:[NSCharacterSet URLQueryAllowedCharacterSet]];
NSString *encodedFilter = [@"{\"criteria\":[{\"cfid\":\"6000000035033\",\"api_name\":\"status\",\"field_name\":\"status\",\"criteria_condition\":\"is\",\"value\":[\"6000000000629\"],\"relative_columns\":[{\"cfid\":\"6000000035033\",\"offset\":\"1\",\"unit\":\"days\",\"prior\":\"before\"}]}],\"pattern\":\"1\"}" stringByAddingPercentEncodingWithAllowedCharacters:[NSCharacterSet URLQueryAllowedCharacterSet]];
NSString *encodedPhase_ids = [@"6000000019045,6000000019046" stringByAddingPercentEncodingWithAllowedCharacters:[NSCharacterSet URLQueryAllowedCharacterSet]];
NSString *urlString = [NSString stringWithFormat:@"https://projects.zoho.com/api/v3.1/portal/[PORTAL_ID]/phases?page=%@&per_page=%@&sort_by=%@&view_id=%@&filter=%@&phase_ids=%@", encodedPage, encodedPer_page, encodedSort_by, encodedView_id, encodedFilter, encodedPhase_ids];
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_sort_by = Uri.pct_encode "DESC(created_time)" in
let enc_view_id = Uri.pct_encode "23806000074760021" in
let enc_filter = Uri.pct_encode "{\"criteria\":[{\"cfid\":\"6000000035033\",\"api_name\":\"status\",\"field_name\":\"status\",\"criteria_condition\":\"is\",\"value\":[\"6000000000629\"],\"relative_columns\":[{\"cfid\":\"6000000035033\",\"offset\":\"1\",\"unit\":\"days\",\"prior\":\"before\"}]}],\"pattern\":\"1\"}" in
let enc_phase_ids = Uri.pct_encode "6000000019045,6000000019046" in
let uri = Uri.of_string ("https://projects.zoho.com/api/v3.1/portal/[PORTAL_ID]/phases" ^ "?page=" ^ enc_page ^ "&per_page=" ^ enc_per_page ^ "&sort_by=" ^ enc_sort_by ^ "&view_id=" ^ enc_view_id ^ "&filter=" ^ enc_filter ^ "&phase_ids=" ^ enc_phase_ids) 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"
sort_by = "DESC(created_time)"
view_id = "23806000074760021"
filter = "{`"criteria`":[{`"cfid`":`"6000000035033`",`"api_name`":`"status`",`"field_name`":`"status`",`"criteria_condition`":`"is`",`"value`":[`"6000000000629`"],`"relative_columns`":[{`"cfid`":`"6000000035033`",`"offset`":`"1`",`"unit`":`"days`",`"prior`":`"before`"}]}],`"pattern`":`"1`"}"
phase_ids = "6000000019045,6000000019046"
}
$queryString = ($params.GetEnumerator() | ForEach-Object { "$($_.Key)=$([System.Uri]::EscapeDataString($_.Value))" }) -join "&"
$url = "https://projects.zoho.com/api/v3.1/portal/[PORTAL_ID]/phases" + "?" + $queryString
$response = Invoke-RestMethod -Uri $url -Method GET -Headers $headers
$response | ConvertTo-Json
library(httr)
url <- "https://projects.zoho.com/api/v3.1/portal/[PORTAL_ID]/phases"
params <- list(
page = "1",
per_page = "10",
sort_by = "DESC(created_time)",
view_id = "23806000074760021",
filter = "{\"criteria\":[{\"cfid\":\"6000000035033\",\"api_name\":\"status\",\"field_name\":\"status\",\"criteria_condition\":\"is\",\"value\":[\"6000000000629\"],\"relative_columns\":[{\"cfid\":\"6000000035033\",\"offset\":\"1\",\"unit\":\"days\",\"prior\":\"before\"}]}],\"pattern\":\"1\"}",
phase_ids = "6000000019045,6000000019046"
)
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.1/portal/[PORTAL_ID]/phases")!
components.queryItems = [
URLQueryItem(name: "page", value: "1"),
URLQueryItem(name: "per_page", value: "10"),
URLQueryItem(name: "sort_by", value: "DESC(created_time)"),
URLQueryItem(name: "view_id", value: "23806000074760021"),
URLQueryItem(name: "filter", value: "{\"criteria\":[{\"cfid\":\"6000000035033\",\"api_name\":\"status\",\"field_name\":\"status\",\"criteria_condition\":\"is\",\"value\":[\"6000000000629\"],\"relative_columns\":[{\"cfid\":\"6000000035033\",\"offset\":\"1\",\"unit\":\"days\",\"prior\":\"before\"}]}],\"pattern\":\"1\"}"),
URLQueryItem(name: "phase_ids", value: "6000000019045,6000000019046")
]
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
Retrieve phases from a project. Use this API to fetch the phases from a specific project with pagination, sorting, custom view, and filter criteria.
OAuth Scope:
ZohoProjects.milestones.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.
int
default : 100Enter the number of entries to be displayed per page.
String
Enter the sort criteria. Accepted values: ASC(field_name) or DESC(field_name).
String
Enter the ID of the custom view.
JSONObject
max length : 10000Enter the filter criteria for the phases.
String
max length : 2000Enter the specific phase IDs to fetch.
Request Example
curl -X GET \
'https://projects.zoho.com/api/v3.1/portal/[PORTAL_ID]/projects/23806000097545166/phases?page=1&per_page=10&sort_by=DESC%28created_time%29&view_id=23806000074760021&filter=%7B%22criteria%22%3A%5B%7B%22cfid%22%3A%226000000035033%22%2C%22api_name%22%3A%22status%22%2C%22field_name%22%3A%22status%22%2C%22criteria_condition%22%3A%22is%22%2C%22value%22%3A%5B%226000000000629%22%5D%2C%22relative_columns%22%3A%5B%7B%22cfid%22%3A%226000000035033%22%2C%22offset%22%3A%221%22%2C%22unit%22%3A%22days%22%2C%22prior%22%3A%22before%22%7D%5D%7D%5D%2C%22pattern%22%3A%221%22%7D&phase_ids=6000000019045%2C6000000019046' \
-H 'Authorization: Bearer 1000.03xxxxxxxxxxxxxxxxxa5317.dxxxxxxxxxxxxxxxxxfa'
url = "https://projects.zoho.com/api/v3.1/portal/[PORTAL_ID]/projects/23806000097545166/phases";
filter_value = {"criteria":[{"cfid":"6000000035033","api_name":"status","field_name":"status","criteria_condition":"is","value":["6000000000629"],"relative_columns":[{"cfid":"6000000035033","offset":"1","unit":"days","prior":"before"}]}],"pattern":"1"};
params = Map();
params.put("page", "1");
params.put("per_page", "10");
params.put("sort_by", "DESC(created_time)");
params.put("view_id", "23806000074760021");
params.put("filter", filter_value);
params.put("phase_ids", "6000000019045,6000000019046");
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.1/portal/[PORTAL_ID]/projects/23806000097545166/phases');
url.searchParams.append('page', '1');
url.searchParams.append('per_page', '10');
url.searchParams.append('sort_by', 'DESC(created_time)');
url.searchParams.append('view_id', '23806000074760021');
url.searchParams.append('filter', '{"criteria":[{"cfid":"6000000035033","api_name":"status","field_name":"status","criteria_condition":"is","value":["6000000000629"],"relative_columns":[{"cfid":"6000000035033","offset":"1","unit":"days","prior":"before"}]}],"pattern":"1"}');
url.searchParams.append('phase_ids', '6000000019045,6000000019046');
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.1/portal/[PORTAL_ID]/projects/23806000097545166/phases")
params = {
"page" => "1",
"per_page" => "10",
"sort_by" => "DESC(created_time)",
"view_id" => "23806000074760021",
"filter" => "{\"criteria\":[{\"cfid\":\"6000000035033\",\"api_name\":\"status\",\"field_name\":\"status\",\"criteria_condition\":\"is\",\"value\":[\"6000000000629\"],\"relative_columns\":[{\"cfid\":\"6000000035033\",\"offset\":\"1\",\"unit\":\"days\",\"prior\":\"before\"}]}],\"pattern\":\"1\"}",
"phase_ids" => "6000000019045,6000000019046"
}
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',
'sort_by' => 'DESC(created_time)',
'view_id' => '23806000074760021',
'filter' => '{"criteria":[{"cfid":"6000000035033","api_name":"status","field_name":"status","criteria_condition":"is","value":["6000000000629"],"relative_columns":[{"cfid":"6000000035033","offset":"1","unit":"days","prior":"before"}]}],"pattern":"1"}',
'phase_ids' => '6000000019045,6000000019046',
];
$url = "https://projects.zoho.com/api/v3.1/portal/[PORTAL_ID]/projects/23806000097545166/phases" . "?" . 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.1/portal/[PORTAL_ID]/projects/23806000097545166/phases"
params = {
"page": "1",
"per_page": "10",
"sort_by": "DESC(created_time)",
"view_id": "23806000074760021",
"filter": "{\"criteria\":[{\"cfid\":\"6000000035033\",\"api_name\":\"status\",\"field_name\":\"status\",\"criteria_condition\":\"is\",\"value\":[\"6000000000629\"],\"relative_columns\":[{\"cfid\":\"6000000035033\",\"offset\":\"1\",\"unit\":\"days\",\"prior\":\"before\"}]}],\"pattern\":\"1\"}",
"phase_ids": "6000000019045,6000000019046"
}
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_sort_by = curl_easy_escape(curl, "DESC(created_time)", 0);
char *enc_view_id = curl_easy_escape(curl, "23806000074760021", 0);
char *enc_filter = curl_easy_escape(curl, "{\"criteria\":[{\"cfid\":\"6000000035033\",\"api_name\":\"status\",\"field_name\":\"status\",\"criteria_condition\":\"is\",\"value\":[\"6000000000629\"],\"relative_columns\":[{\"cfid\":\"6000000035033\",\"offset\":\"1\",\"unit\":\"days\",\"prior\":\"before\"}]}],\"pattern\":\"1\"}", 0);
char *enc_phase_ids = curl_easy_escape(curl, "6000000019045,6000000019046", 0);
char url[2048];
snprintf(url, sizeof(url), "https://projects.zoho.com/api/v3.1/portal/[PORTAL_ID]/projects/23806000097545166/phases?page=%s&per_page=%s&sort_by=%s&view_id=%s&filter=%s&phase_ids=%s", enc_page, enc_per_page, enc_sort_by, enc_view_id, enc_filter, enc_phase_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, "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_sort_by);
curl_free(enc_view_id);
curl_free(enc_filter);
curl_free(enc_phase_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["page"] = "1";
query["per_page"] = "10";
query["sort_by"] = "DESC(created_time)";
query["view_id"] = "23806000074760021";
query["filter"] = "{\"criteria\":[{\"cfid\":\"6000000035033\",\"api_name\":\"status\",\"field_name\":\"status\",\"criteria_condition\":\"is\",\"value\":[\"6000000000629\"],\"relative_columns\":[{\"cfid\":\"6000000035033\",\"offset\":\"1\",\"unit\":\"days\",\"prior\":\"before\"}]}],\"pattern\":\"1\"}";
query["phase_ids"] = "6000000019045,6000000019046";
var uriBuilder = new UriBuilder("https://projects.zoho.com/api/v3.1/portal/[PORTAL_ID]/projects/23806000097545166/phases") { 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_sort_by = curl_easy_escape(curl, "DESC(created_time)", 0);
char* enc_view_id = curl_easy_escape(curl, "23806000074760021", 0);
char* enc_filter = curl_easy_escape(curl, "{\"criteria\":[{\"cfid\":\"6000000035033\",\"api_name\":\"status\",\"field_name\":\"status\",\"criteria_condition\":\"is\",\"value\":[\"6000000000629\"],\"relative_columns\":[{\"cfid\":\"6000000035033\",\"offset\":\"1\",\"unit\":\"days\",\"prior\":\"before\"}]}],\"pattern\":\"1\"}", 0);
char* enc_phase_ids = curl_easy_escape(curl, "6000000019045,6000000019046", 0);
std::string url = "https://projects.zoho.com/api/v3.1/portal/[PORTAL_ID]/projects/23806000097545166/phases";
url += "?page=" + std::string(enc_page);
url += "&per_page=" + std::string(enc_per_page);
url += "&sort_by=" + std::string(enc_sort_by);
url += "&view_id=" + std::string(enc_view_id);
url += "&filter=" + std::string(enc_filter);
url += "&phase_ids=" + std::string(enc_phase_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, "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_sort_by);
curl_free(enc_view_id);
curl_free(enc_filter);
curl_free(enc_phase_ids);
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-sort_by (java.net.URLEncoder/encode "DESC(created_time)" "UTF-8")
enc-view_id (java.net.URLEncoder/encode "23806000074760021" "UTF-8")
enc-filter (java.net.URLEncoder/encode "{\"criteria\":[{\"cfid\":\"6000000035033\",\"api_name\":\"status\",\"field_name\":\"status\",\"criteria_condition\":\"is\",\"value\":[\"6000000000629\"],\"relative_columns\":[{\"cfid\":\"6000000035033\",\"offset\":\"1\",\"unit\":\"days\",\"prior\":\"before\"}]}],\"pattern\":\"1\"}" "UTF-8")
enc-phase_ids (java.net.URLEncoder/encode "6000000019045,6000000019046" "UTF-8")
url (str "https://projects.zoho.com/api/v3.1/portal/[PORTAL_ID]/projects/23806000097545166/phases" "?page=" enc-page "&per_page=" enc-per_page "&sort_by=" enc-sort_by "&view_id=" enc-view_id "&filter=" enc-filter "&phase_ids=" enc-phase_ids)]
(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.1/portal/[PORTAL_ID]/projects/23806000097545166/phases", nil)
q := req.URL.Query()
q.Add("page", "1")
q.Add("per_page", "10")
q.Add("sort_by", "DESC(created_time)")
q.Add("view_id", "23806000074760021")
q.Add("filter", "{\"criteria\":[{\"cfid\":\"6000000035033\",\"api_name\":\"status\",\"field_name\":\"status\",\"criteria_condition\":\"is\",\"value\":[\"6000000000629\"],\"relative_columns\":[{\"cfid\":\"6000000035033\",\"offset\":\"1\",\"unit\":\"days\",\"prior\":\"before\"}]}],\"pattern\":\"1\"}")
q.Add("phase_ids", "6000000019045,6000000019046")
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.1/portal/[PORTAL_ID]/projects/23806000097545166/phases?page=1&per_page=10&sort_by=DESC%28created_time%29&view_id=23806000074760021&filter=%7B%22criteria%22%3A%5B%7B%22cfid%22%3A%226000000035033%22%2C%22api_name%22%3A%22status%22%2C%22field_name%22%3A%22status%22%2C%22criteria_condition%22%3A%22is%22%2C%22value%22%3A%5B%226000000000629%22%5D%2C%22relative_columns%22%3A%5B%7B%22cfid%22%3A%226000000035033%22%2C%22offset%22%3A%221%22%2C%22unit%22%3A%22days%22%2C%22prior%22%3A%22before%22%7D%5D%7D%5D%2C%22pattern%22%3A%221%22%7D&phase_ids=6000000019045%2C6000000019046 HTTP/1.1
Host: https://projects.zoho.com/api/v3.1/portal/[PORTAL_ID]/projects/23806000097545166/phases?page=1&per_page=10&sort_by=DESC%28created_time%29&view_id=23806000074760021&filter=%7B%22criteria%22%3A%5B%7B%22cfid%22%3A%226000000035033%22%2C%22api_name%22%3A%22status%22%2C%22field_name%22%3A%22status%22%2C%22criteria_condition%22%3A%22is%22%2C%22value%22%3A%5B%226000000000629%22%5D%2C%22relative_columns%22%3A%5B%7B%22cfid%22%3A%226000000035033%22%2C%22offset%22%3A%221%22%2C%22unit%22%3A%22days%22%2C%22prior%22%3A%22before%22%7D%5D%7D%5D%2C%22pattern%22%3A%221%22%7D&phase_ids=6000000019045%2C6000000019046
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.1/portal/[PORTAL_ID]/projects/23806000097545166/phases");
uriBuilder.addParameter("page", "1");
uriBuilder.addParameter("per_page", "10");
uriBuilder.addParameter("sort_by", "DESC(created_time)");
uriBuilder.addParameter("view_id", "23806000074760021");
uriBuilder.addParameter("filter", "{\"criteria\":[{\"cfid\":\"6000000035033\",\"api_name\":\"status\",\"field_name\":\"status\",\"criteria_condition\":\"is\",\"value\":[\"6000000000629\"],\"relative_columns\":[{\"cfid\":\"6000000035033\",\"offset\":\"1\",\"unit\":\"days\",\"prior\":\"before\"}]}],\"pattern\":\"1\"}");
uriBuilder.addParameter("phase_ids", "6000000019045,6000000019046");
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.1/portal/[PORTAL_ID]/projects/23806000097545166/phases';
const params = new URLSearchParams({
'page': '1',
'per_page': '10',
'sort_by': 'DESC(created_time)',
'view_id': '23806000074760021',
'filter': '{"criteria":[{"cfid":"6000000035033","api_name":"status","field_name":"status","criteria_condition":"is","value":["6000000000629"],"relative_columns":[{"cfid":"6000000035033","offset":"1","unit":"days","prior":"before"}]}],"pattern":"1"}',
'phase_ids': '6000000019045,6000000019046'
});
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"
sort_by = "DESC(created_time)"
view_id = "23806000074760021"
filter = {"criteria":[{"cfid":"6000000035033","api_name":"status","field_name":"status","criteria_condition":"is","value":["6000000000629"],"relative_columns":[{"cfid":"6000000035033","offset":"1","unit":"days","prior":"before"}]}],"pattern":"1"}
phase_ids = "6000000019045,6000000019046"
import java.net.HttpURLConnection
import java.net.URL
import okhttp3.HttpUrl.Companion.toHttpUrl
fun main() {
val urlBuilder = "https://projects.zoho.com/api/v3.1/portal/[PORTAL_ID]/projects/23806000097545166/phases".toHttpUrl().newBuilder()
urlBuilder.addQueryParameter("page", "1")
urlBuilder.addQueryParameter("per_page", "10")
urlBuilder.addQueryParameter("sort_by", "DESC(created_time)")
urlBuilder.addQueryParameter("view_id", "23806000074760021")
urlBuilder.addQueryParameter("filter", "{\"criteria\":[{\"cfid\":\"6000000035033\",\"api_name\":\"status\",\"field_name\":\"status\",\"criteria_condition\":\"is\",\"value\":[\"6000000000629\"],\"relative_columns\":[{\"cfid\":\"6000000035033\",\"offset\":\"1\",\"unit\":\"days\",\"prior\":\"before\"}]}],\"pattern\":\"1\"}")
urlBuilder.addQueryParameter("phase_ids", "6000000019045,6000000019046")
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 *encodedSort_by = [@"DESC(created_time)" stringByAddingPercentEncodingWithAllowedCharacters:[NSCharacterSet URLQueryAllowedCharacterSet]];
NSString *encodedView_id = [@"23806000074760021" stringByAddingPercentEncodingWithAllowedCharacters:[NSCharacterSet URLQueryAllowedCharacterSet]];
NSString *encodedFilter = [@"{\"criteria\":[{\"cfid\":\"6000000035033\",\"api_name\":\"status\",\"field_name\":\"status\",\"criteria_condition\":\"is\",\"value\":[\"6000000000629\"],\"relative_columns\":[{\"cfid\":\"6000000035033\",\"offset\":\"1\",\"unit\":\"days\",\"prior\":\"before\"}]}],\"pattern\":\"1\"}" stringByAddingPercentEncodingWithAllowedCharacters:[NSCharacterSet URLQueryAllowedCharacterSet]];
NSString *encodedPhase_ids = [@"6000000019045,6000000019046" stringByAddingPercentEncodingWithAllowedCharacters:[NSCharacterSet URLQueryAllowedCharacterSet]];
NSString *urlString = [NSString stringWithFormat:@"https://projects.zoho.com/api/v3.1/portal/[PORTAL_ID]/projects/23806000097545166/phases?page=%@&per_page=%@&sort_by=%@&view_id=%@&filter=%@&phase_ids=%@", encodedPage, encodedPer_page, encodedSort_by, encodedView_id, encodedFilter, encodedPhase_ids];
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_sort_by = Uri.pct_encode "DESC(created_time)" in
let enc_view_id = Uri.pct_encode "23806000074760021" in
let enc_filter = Uri.pct_encode "{\"criteria\":[{\"cfid\":\"6000000035033\",\"api_name\":\"status\",\"field_name\":\"status\",\"criteria_condition\":\"is\",\"value\":[\"6000000000629\"],\"relative_columns\":[{\"cfid\":\"6000000035033\",\"offset\":\"1\",\"unit\":\"days\",\"prior\":\"before\"}]}],\"pattern\":\"1\"}" in
let enc_phase_ids = Uri.pct_encode "6000000019045,6000000019046" in
let uri = Uri.of_string ("https://projects.zoho.com/api/v3.1/portal/[PORTAL_ID]/projects/23806000097545166/phases" ^ "?page=" ^ enc_page ^ "&per_page=" ^ enc_per_page ^ "&sort_by=" ^ enc_sort_by ^ "&view_id=" ^ enc_view_id ^ "&filter=" ^ enc_filter ^ "&phase_ids=" ^ enc_phase_ids) 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"
sort_by = "DESC(created_time)"
view_id = "23806000074760021"
filter = "{`"criteria`":[{`"cfid`":`"6000000035033`",`"api_name`":`"status`",`"field_name`":`"status`",`"criteria_condition`":`"is`",`"value`":[`"6000000000629`"],`"relative_columns`":[{`"cfid`":`"6000000035033`",`"offset`":`"1`",`"unit`":`"days`",`"prior`":`"before`"}]}],`"pattern`":`"1`"}"
phase_ids = "6000000019045,6000000019046"
}
$queryString = ($params.GetEnumerator() | ForEach-Object { "$($_.Key)=$([System.Uri]::EscapeDataString($_.Value))" }) -join "&"
$url = "https://projects.zoho.com/api/v3.1/portal/[PORTAL_ID]/projects/23806000097545166/phases" + "?" + $queryString
$response = Invoke-RestMethod -Uri $url -Method GET -Headers $headers
$response | ConvertTo-Json
library(httr)
url <- "https://projects.zoho.com/api/v3.1/portal/[PORTAL_ID]/projects/23806000097545166/phases"
params <- list(
page = "1",
per_page = "10",
sort_by = "DESC(created_time)",
view_id = "23806000074760021",
filter = "{\"criteria\":[{\"cfid\":\"6000000035033\",\"api_name\":\"status\",\"field_name\":\"status\",\"criteria_condition\":\"is\",\"value\":[\"6000000000629\"],\"relative_columns\":[{\"cfid\":\"6000000035033\",\"offset\":\"1\",\"unit\":\"days\",\"prior\":\"before\"}]}],\"pattern\":\"1\"}",
phase_ids = "6000000019045,6000000019046"
)
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.1/portal/[PORTAL_ID]/projects/23806000097545166/phases")!
components.queryItems = [
URLQueryItem(name: "page", value: "1"),
URLQueryItem(name: "per_page", value: "10"),
URLQueryItem(name: "sort_by", value: "DESC(created_time)"),
URLQueryItem(name: "view_id", value: "23806000074760021"),
URLQueryItem(name: "filter", value: "{\"criteria\":[{\"cfid\":\"6000000035033\",\"api_name\":\"status\",\"field_name\":\"status\",\"criteria_condition\":\"is\",\"value\":[\"6000000000629\"],\"relative_columns\":[{\"cfid\":\"6000000035033\",\"offset\":\"1\",\"unit\":\"days\",\"prior\":\"before\"}]}],\"pattern\":\"1\"}"),
URLQueryItem(name: "phase_ids", value: "6000000019045,6000000019046")
]
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
Retrieve details of a phase. Use this API to fetch complete phase information using the phase ID.
OAuth Scope:
ZohoProjects.milestones.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 phase within the specified project. You can obtain it from the Get Project Phases API (the "id" field in the response).
Request Example
curl -X GET \
'https://projects.zoho.com/api/v3.1/portal/[PORTAL_ID]/projects/23806000097545166/phases/[PHASE_ID]' \
-H 'Authorization: Bearer 1000.03xxxxxxxxxxxxxxxxxa5317.dxxxxxxxxxxxxxxxxxfa'
url = "https://projects.zoho.com/api/v3.1/portal/[PORTAL_ID]/projects/23806000097545166/phases/[PHASE_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.1/portal/[PORTAL_ID]/projects/23806000097545166/phases/[PHASE_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.1/portal/[PORTAL_ID]/projects/23806000097545166/phases/[PHASE_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.1/portal/[PORTAL_ID]/projects/23806000097545166/phases/[PHASE_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.1/portal/[PORTAL_ID]/projects/23806000097545166/phases/[PHASE_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.1/portal/[PORTAL_ID]/projects/23806000097545166/phases/[PHASE_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.1/portal/[PORTAL_ID]/projects/23806000097545166/phases/[PHASE_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.1/portal/[PORTAL_ID]/projects/23806000097545166/phases/[PHASE_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.1/portal/[PORTAL_ID]/projects/23806000097545166/phases/[PHASE_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.1/portal/[PORTAL_ID]/projects/23806000097545166/phases/[PHASE_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.1/portal/[PORTAL_ID]/projects/23806000097545166/phases/[PHASE_ID] HTTP/1.1
Host: https://projects.zoho.com/api/v3.1/portal/[PORTAL_ID]/projects/23806000097545166/phases/[PHASE_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.1/portal/[PORTAL_ID]/projects/23806000097545166/phases/[PHASE_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.1/portal/[PORTAL_ID]/projects/23806000097545166/phases/[PHASE_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.1/portal/[PORTAL_ID]/projects/23806000097545166/phases/[PHASE_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.1/portal/[PORTAL_ID]/projects/23806000097545166/phases/[PHASE_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.1/portal/[PORTAL_ID]/projects/23806000097545166/phases/[PHASE_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.1/portal/[PORTAL_ID]/projects/23806000097545166/phases/[PHASE_ID]" -Method GET -Headers $headers
$response | ConvertTo-Json
library(httr)
url <- "https://projects.zoho.com/api/v3.1/portal/[PORTAL_ID]/projects/23806000097545166/phases/[PHASE_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.1/portal/[PORTAL_ID]/projects/23806000097545166/phases/[PHASE_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
Create a phase in a project. Use this API to add a phase with its owner, status, duration, tags, position, and budget details.
OAuth Scope:
ZohoProjects.milestones.CREATE
String
requiredUnique, immutable identifier of the portal in Zoho Projects. You can obtain it from the Get Portals API (the "id" field in the response).
String
requiredUnique, immutable identifier of the project within the specified portal. You can obtain it from the Get Projects API (the "id" field in the response).
String
requiredEnter the name of the phase.
String
max length : 100Specify the flag type of the phase. Accepted values: Internal or External.
JSONObject
max length : 1000Specify the owner of the phase.
JSONObject
max length : 1000Specify the status of the phase.
String
Enter the start date of the phase, in ISO 8601 format (YYYY-MM-DD).
String
Enter the end date of the phase, in ISO 8601 format (YYYY-MM-DD).
JSONArray
max length : 10000Specify the IDs of the tags to be associated with the phase.
String
max length : 10Enter the hex color code to be used for the phase's Gantt bar.
JSONObject
max length : 1000Specify the position at which the phase is to be placed.
JSONObject
max length : 5000Specify the template settings of the phase. Applicable only when the project is of type template.
JSONObject
max length : 5000Enter the budget details of the phase. Applicable only when budget is enabled at both the portal and project level.
Request Example
curl -X POST \
'https://projects.zoho.com/api/v3.1/portal/[PORTAL_ID]/projects/23806000097545166/phases' \
-H 'Authorization: Bearer 1000.03xxxxxxxxxxxxxxxxxa5317.dxxxxxxxxxxxxxxxxxfa' \
-H 'Content-Type: application/json' \
-d '{"name":"Finalize UI/UX Design Handover","flag":"internal","owner":{"zpuid":"6000000015029"},"status":{"id":"6000000035033"},"start_date":"2026-07-20","end_date":"2026-08-05","tags":[{"id":"6000000035033"}],"color":"#4C9AFF","position":{"before_id":"6000000019045","after_id":"6000000019046","exact_position":"3","known_position":"last"},"template_settings":{"start_after":"5","frequency_unit":"days","duration":"10"},"budget_info":{"cost_budget":{"amount":"12000.00"},"cost_budget_threshold":{"amount":"12000.00"},"revenue_budget":{"amount":"12000.00"},"hourly_budget":"40:00","hourly_budget_threshold":"36:00"}}'
url = "https://projects.zoho.com/api/v3.1/portal/[PORTAL_ID]/projects/23806000097545166/phases";
params = Map();
params.put("name", "Finalize UI/UX Design Handover");
params.put("flag", "internal");
params.put("owner", {"zpuid":"6000000015029"});
params.put("status", {"id":"6000000035033"});
params.put("start_date", "2026-07-20");
params.put("end_date", "2026-08-05");
params.put("tags", [{"id":"6000000035033"}]);
params.put("color", "#4C9AFF");
params.put("position", {"before_id":"6000000019045","after_id":"6000000019046","exact_position":"3","known_position":"last"});
params.put("template_settings", {"start_after":"5","frequency_unit":"days","duration":"10"});
params.put("budget_info", {"cost_budget":{"amount":"12000.00"},"cost_budget_threshold":{"amount":"12000.00"},"revenue_budget":{"amount":"12000.00"},"hourly_budget":"40:00","hourly_budget_threshold":"36:00"});
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.1/portal/[PORTAL_ID]/projects/23806000097545166/phases');
const payload = JSON.stringify({"name":"Finalize UI/UX Design Handover","flag":"internal","owner":{"zpuid":"6000000015029"},"status":{"id":"6000000035033"},"start_date":"2026-07-20","end_date":"2026-08-05","tags":[{"id":"6000000035033"}],"color":"#4C9AFF","position":{"before_id":"6000000019045","after_id":"6000000019046","exact_position":"3","known_position":"last"},"template_settings":{"start_after":"5","frequency_unit":"days","duration":"10"},"budget_info":{"cost_budget":{"amount":"12000.00"},"cost_budget_threshold":{"amount":"12000.00"},"revenue_budget":{"amount":"12000.00"},"hourly_budget":"40:00","hourly_budget_threshold":"36:00"}});
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.1/portal/[PORTAL_ID]/projects/23806000097545166/phases")
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":"Finalize UI/UX Design Handover","flag":"internal","owner":{"zpuid":"6000000015029"},"status":{"id":"6000000035033"},"start_date":"2026-07-20","end_date":"2026-08-05","tags":[{"id":"6000000035033"}],"color":"#4C9AFF","position":{"before_id":"6000000019045","after_id":"6000000019046","exact_position":"3","known_position":"last"},"template_settings":{"start_after":"5","frequency_unit":"days","duration":"10"},"budget_info":{"cost_budget":{"amount":"12000.00"},"cost_budget_threshold":{"amount":"12000.00"},"revenue_budget":{"amount":"12000.00"},"hourly_budget":"40:00","hourly_budget_threshold":"36:00"}}'
response = http.request(request)
puts response.read_body
<?php
$url = "https://projects.zoho.com/api/v3.1/portal/[PORTAL_ID]/projects/23806000097545166/phases";
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => $url,
CURLOPT_RETURNTRANSFER => true,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => '{"name":"Finalize UI/UX Design Handover","flag":"internal","owner":{"zpuid":"6000000015029"},"status":{"id":"6000000035033"},"start_date":"2026-07-20","end_date":"2026-08-05","tags":[{"id":"6000000035033"}],"color":"#4C9AFF","position":{"before_id":"6000000019045","after_id":"6000000019046","exact_position":"3","known_position":"last"},"template_settings":{"start_after":"5","frequency_unit":"days","duration":"10"},"budget_info":{"cost_budget":{"amount":"12000.00"},"cost_budget_threshold":{"amount":"12000.00"},"revenue_budget":{"amount":"12000.00"},"hourly_budget":"40:00","hourly_budget_threshold":"36:00"}}',
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.1/portal/[PORTAL_ID]/projects/23806000097545166/phases"
headers = {
"Authorization": "Bearer 1000.03xxxxxxxxxxxxxxxxxa5317.dxxxxxxxxxxxxxxxxxfa",
"Content-Type": "application/json",
}
payload = '{"name":"Finalize UI/UX Design Handover","flag":"internal","owner":{"zpuid":"6000000015029"},"status":{"id":"6000000035033"},"start_date":"2026-07-20","end_date":"2026-08-05","tags":[{"id":"6000000035033"}],"color":"#4C9AFF","position":{"before_id":"6000000019045","after_id":"6000000019046","exact_position":"3","known_position":"last"},"template_settings":{"start_after":"5","frequency_unit":"days","duration":"10"},"budget_info":{"cost_budget":{"amount":"12000.00"},"cost_budget_threshold":{"amount":"12000.00"},"revenue_budget":{"amount":"12000.00"},"hourly_budget":"40:00","hourly_budget_threshold":"36:00"}}'
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.1/portal/[PORTAL_ID]/projects/23806000097545166/phases");
curl_easy_setopt(curl, CURLOPT_HTTPHEADER, headers);
curl_easy_setopt(curl, CURLOPT_CUSTOMREQUEST, "POST");
curl_easy_setopt(curl, CURLOPT_POSTFIELDS, "{\"name\":\"Finalize UI/UX Design Handover\",\"flag\":\"internal\",\"owner\":{\"zpuid\":\"6000000015029\"},\"status\":{\"id\":\"6000000035033\"},\"start_date\":\"2026-07-20\",\"end_date\":\"2026-08-05\",\"tags\":[{\"id\":\"6000000035033\"}],\"color\":\"#4C9AFF\",\"position\":{\"before_id\":\"6000000019045\",\"after_id\":\"6000000019046\",\"exact_position\":\"3\",\"known_position\":\"last\"},\"template_settings\":{\"start_after\":\"5\",\"frequency_unit\":\"days\",\"duration\":\"10\"},\"budget_info\":{\"cost_budget\":{\"amount\":\"12000.00\"},\"cost_budget_threshold\":{\"amount\":\"12000.00\"},\"revenue_budget\":{\"amount\":\"12000.00\"},\"hourly_budget\":\"40:00\",\"hourly_budget_threshold\":\"36:00\"}}");
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.1/portal/[PORTAL_ID]/projects/23806000097545166/phases");
request.Content = new StringContent(
@"{""name"":""Finalize UI/UX Design Handover"",""flag"":""internal"",""owner"":{""zpuid"":""6000000015029""},""status"":{""id"":""6000000035033""},""start_date"":""2026-07-20"",""end_date"":""2026-08-05"",""tags"":[{""id"":""6000000035033""}],""color"":""#4C9AFF"",""position"":{""before_id"":""6000000019045"",""after_id"":""6000000019046"",""exact_position"":""3"",""known_position"":""last""},""template_settings"":{""start_after"":""5"",""frequency_unit"":""days"",""duration"":""10""},""budget_info"":{""cost_budget"":{""amount"":""12000.00""},""cost_budget_threshold"":{""amount"":""12000.00""},""revenue_budget"":{""amount"":""12000.00""},""hourly_budget"":""40:00"",""hourly_budget_threshold"":""36:00""}}",
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.1/portal/[PORTAL_ID]/projects/23806000097545166/phases");
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\":\"Finalize UI/UX Design Handover\",\"flag\":\"internal\",\"owner\":{\"zpuid\":\"6000000015029\"},\"status\":{\"id\":\"6000000035033\"},\"start_date\":\"2026-07-20\",\"end_date\":\"2026-08-05\",\"tags\":[{\"id\":\"6000000035033\"}],\"color\":\"#4C9AFF\",\"position\":{\"before_id\":\"6000000019045\",\"after_id\":\"6000000019046\",\"exact_position\":\"3\",\"known_position\":\"last\"},\"template_settings\":{\"start_after\":\"5\",\"frequency_unit\":\"days\",\"duration\":\"10\"},\"budget_info\":{\"cost_budget\":{\"amount\":\"12000.00\"},\"cost_budget_threshold\":{\"amount\":\"12000.00\"},\"revenue_budget\":{\"amount\":\"12000.00\"},\"hourly_budget\":\"40:00\",\"hourly_budget_threshold\":\"36:00\"}}");
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.1/portal/[PORTAL_ID]/projects/23806000097545166/phases"
{:headers {"Authorization" "Bearer 1000.03xxxxxxxxxxxxxxxxxa5317.dxxxxxxxxxxxxxxxxxfa"
"Content-Type" "application/json"}
:body "{\"name\":\"Finalize UI/UX Design Handover\",\"flag\":\"internal\",\"owner\":{\"zpuid\":\"6000000015029\"},\"status\":{\"id\":\"6000000035033\"},\"start_date\":\"2026-07-20\",\"end_date\":\"2026-08-05\",\"tags\":[{\"id\":\"6000000035033\"}],\"color\":\"#4C9AFF\",\"position\":{\"before_id\":\"6000000019045\",\"after_id\":\"6000000019046\",\"exact_position\":\"3\",\"known_position\":\"last\"},\"template_settings\":{\"start_after\":\"5\",\"frequency_unit\":\"days\",\"duration\":\"10\"},\"budget_info\":{\"cost_budget\":{\"amount\":\"12000.00\"},\"cost_budget_threshold\":{\"amount\":\"12000.00\"},\"revenue_budget\":{\"amount\":\"12000.00\"},\"hourly_budget\":\"40:00\",\"hourly_budget_threshold\":\"36:00\"}}"
:as :json}))
(println (:body response))
package main
import (
"fmt"
"io"
"net/http"
"strings"
)
func main() {
payload := strings.NewReader("{\"name\":\"Finalize UI/UX Design Handover\",\"flag\":\"internal\",\"owner\":{\"zpuid\":\"6000000015029\"},\"status\":{\"id\":\"6000000035033\"},\"start_date\":\"2026-07-20\",\"end_date\":\"2026-08-05\",\"tags\":[{\"id\":\"6000000035033\"}],\"color\":\"#4C9AFF\",\"position\":{\"before_id\":\"6000000019045\",\"after_id\":\"6000000019046\",\"exact_position\":\"3\",\"known_position\":\"last\"},\"template_settings\":{\"start_after\":\"5\",\"frequency_unit\":\"days\",\"duration\":\"10\"},\"budget_info\":{\"cost_budget\":{\"amount\":\"12000.00\"},\"cost_budget_threshold\":{\"amount\":\"12000.00\"},\"revenue_budget\":{\"amount\":\"12000.00\"},\"hourly_budget\":\"40:00\",\"hourly_budget_threshold\":\"36:00\"}}")
req, _ := http.NewRequest("POST", "https://projects.zoho.com/api/v3.1/portal/[PORTAL_ID]/projects/23806000097545166/phases", 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.1/portal/[PORTAL_ID]/projects/23806000097545166/phases HTTP/1.1
Host: https://projects.zoho.com/api/v3.1/portal/[PORTAL_ID]/projects/23806000097545166/phases
Authorization: Bearer 1000.03xxxxxxxxxxxxxxxxxa5317.dxxxxxxxxxxxxxxxxxfa
Content-Type: application/json
{"name":"Finalize UI/UX Design Handover","flag":"internal","owner":{"zpuid":"6000000015029"},"status":{"id":"6000000035033"},"start_date":"2026-07-20","end_date":"2026-08-05","tags":[{"id":"6000000035033"}],"color":"#4C9AFF","position":{"before_id":"6000000019045","after_id":"6000000019046","exact_position":"3","known_position":"last"},"template_settings":{"start_after":"5","frequency_unit":"days","duration":"10"},"budget_info":{"cost_budget":{"amount":"12000.00"},"cost_budget_threshold":{"amount":"12000.00"},"revenue_budget":{"amount":"12000.00"},"hourly_budget":"40:00","hourly_budget_threshold":"36:00"}}
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.1/portal/[PORTAL_ID]/projects/23806000097545166/phases");
HttpUriRequest requestObj = new HttpPost(uriBuilder.build());
requestObj.addHeader("Authorization", "Bearer 1000.03xxxxxxxxxxxxxxxxxa5317.dxxxxxxxxxxxxxxxxxfa");
HttpEntityEnclosingRequestBase requestBase = (HttpEntityEnclosingRequestBase) requestObj;
String requestBody = "{\"name\":\"Finalize UI\/UX Design Handover\",\"flag\":\"internal\",\"owner\":{\"zpuid\":\"6000000015029\"},\"status\":{\"id\":\"6000000035033\"},\"start_date\":\"2026-07-20\",\"end_date\":\"2026-08-05\",\"tags\":[{\"id\":\"6000000035033\"}],\"color\":\"#4C9AFF\",\"position\":{\"before_id\":\"6000000019045\",\"after_id\":\"6000000019046\",\"exact_position\":\"3\",\"known_position\":\"last\"},\"template_settings\":{\"start_after\":\"5\",\"frequency_unit\":\"days\",\"duration\":\"10\"},\"budget_info\":{\"cost_budget\":{\"amount\":\"12000.00\"},\"cost_budget_threshold\":{\"amount\":\"12000.00\"},\"revenue_budget\":{\"amount\":\"12000.00\"},\"hourly_budget\":\"40:00\",\"hourly_budget_threshold\":\"36:00\"}}";
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.1/portal/[PORTAL_ID]/projects/23806000097545166/phases';
const options = {
method: 'POST',
headers: {
'Authorization': 'Bearer 1000.03xxxxxxxxxxxxxxxxxa5317.dxxxxxxxxxxxxxxxxxfa',
'Content-Type': 'application/json'
},
body: JSON.stringify({"name":"Finalize UI/UX Design Handover","flag":"internal","owner":{"zpuid":"6000000015029"},"status":{"id":"6000000035033"},"start_date":"2026-07-20","end_date":"2026-08-05","tags":[{"id":"6000000035033"}],"color":"#4C9AFF","position":{"before_id":"6000000019045","after_id":"6000000019046","exact_position":"3","known_position":"last"},"template_settings":{"start_after":"5","frequency_unit":"days","duration":"10"},"budget_info":{"cost_budget":{"amount":"12000.00"},"cost_budget_threshold":{"amount":"12000.00"},"revenue_budget":{"amount":"12000.00"},"hourly_budget":"40:00","hourly_budget_threshold":"36:00"}})
};
fetch(url, options)
.then(response => response.json())
.then(data => console.log(data))
.catch(error => console.error(error));
{"name":"Finalize UI/UX Design Handover","flag":"internal","owner":{"zpuid":"6000000015029"},"status":{"id":"6000000035033"},"start_date":"2026-07-20","end_date":"2026-08-05","tags":[{"id":"6000000035033"}],"color":"#4C9AFF","position":{"before_id":"6000000019045","after_id":"6000000019046","exact_position":"3","known_position":"last"},"template_settings":{"start_after":"5","frequency_unit":"days","duration":"10"},"budget_info":{"cost_budget":{"amount":"12000.00"},"cost_budget_threshold":{"amount":"12000.00"},"revenue_budget":{"amount":"12000.00"},"hourly_budget":"40:00","hourly_budget_threshold":"36:00"}}import java.net.HttpURLConnection
import java.net.URL
import okhttp3.HttpUrl.Companion.toHttpUrl
fun main() {
val url = URL("https://projects.zoho.com/api/v3.1/portal/[PORTAL_ID]/projects/23806000097545166/phases")
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":"Finalize UI/UX Design Handover","flag":"internal","owner":{"zpuid":"6000000015029"},"status":{"id":"6000000035033"},"start_date":"2026-07-20","end_date":"2026-08-05","tags":[{"id":"6000000035033"}],"color":"#4C9AFF","position":{"before_id":"6000000019045","after_id":"6000000019046","exact_position":"3","known_position":"last"},"template_settings":{"start_after":"5","frequency_unit":"days","duration":"10"},"budget_info":{"cost_budget":{"amount":"12000.00"},"cost_budget_threshold":{"amount":"12000.00"},"revenue_budget":{"amount":"12000.00"},"hourly_budget":"40:00","hourly_budget_threshold":"36:00"}}""") }
val response = conn.inputStream.bufferedReader().readText()
println(response)
}
NSURL *url = [NSURL URLWithString:@"https://projects.zoho.com/api/v3.1/portal/[PORTAL_ID]/projects/23806000097545166/phases"];
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\":\"Finalize UI/UX Design Handover\",\"flag\":\"internal\",\"owner\":{\"zpuid\":\"6000000015029\"},\"status\":{\"id\":\"6000000035033\"},\"start_date\":\"2026-07-20\",\"end_date\":\"2026-08-05\",\"tags\":[{\"id\":\"6000000035033\"}],\"color\":\"#4C9AFF\",\"position\":{\"before_id\":\"6000000019045\",\"after_id\":\"6000000019046\",\"exact_position\":\"3\",\"known_position\":\"last\"},\"template_settings\":{\"start_after\":\"5\",\"frequency_unit\":\"days\",\"duration\":\"10\"},\"budget_info\":{\"cost_budget\":{\"amount\":\"12000.00\"},\"cost_budget_threshold\":{\"amount\":\"12000.00\"},\"revenue_budget\":{\"amount\":\"12000.00\"},\"hourly_budget\":\"40:00\",\"hourly_budget_threshold\":\"36:00\"}}" 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.1/portal/[PORTAL_ID]/projects/23806000097545166/phases" 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":"Finalize UI/UX Design Handover","flag":"internal","owner":{"zpuid":"6000000015029"},"status":{"id":"6000000035033"},"start_date":"2026-07-20","end_date":"2026-08-05","tags":[{"id":"6000000035033"}],"color":"#4C9AFF","position":{"before_id":"6000000019045","after_id":"6000000019046","exact_position":"3","known_position":"last"},"template_settings":{"start_after":"5","frequency_unit":"days","duration":"10"},"budget_info":{"cost_budget":{"amount":"12000.00"},"cost_budget_threshold":{"amount":"12000.00"},"revenue_budget":{"amount":"12000.00"},"hourly_budget":"40:00","hourly_budget_threshold":"36:00"}}|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":"Finalize UI/UX Design Handover","flag":"internal","owner":{"zpuid":"6000000015029"},"status":{"id":"6000000035033"},"start_date":"2026-07-20","end_date":"2026-08-05","tags":[{"id":"6000000035033"}],"color":"#4C9AFF","position":{"before_id":"6000000019045","after_id":"6000000019046","exact_position":"3","known_position":"last"},"template_settings":{"start_after":"5","frequency_unit":"days","duration":"10"},"budget_info":{"cost_budget":{"amount":"12000.00"},"cost_budget_threshold":{"amount":"12000.00"},"revenue_budget":{"amount":"12000.00"},"hourly_budget":"40:00","hourly_budget_threshold":"36:00"}}
'@
$response = Invoke-RestMethod -Uri "https://projects.zoho.com/api/v3.1/portal/[PORTAL_ID]/projects/23806000097545166/phases" -Method POST -Headers $headers -Body $body
$response | ConvertTo-Json
library(httr)
url <- "https://projects.zoho.com/api/v3.1/portal/[PORTAL_ID]/projects/23806000097545166/phases"
response <- POST(
url,
add_headers(Authorization = "Bearer 1000.03xxxxxxxxxxxxxxxxxa5317.dxxxxxxxxxxxxxxxxxfa"),
content_type_json(),
body = "{\"name\":\"Finalize UI/UX Design Handover\",\"flag\":\"internal\",\"owner\":{\"zpuid\":\"6000000015029\"},\"status\":{\"id\":\"6000000035033\"},\"start_date\":\"2026-07-20\",\"end_date\":\"2026-08-05\",\"tags\":[{\"id\":\"6000000035033\"}],\"color\":\"#4C9AFF\",\"position\":{\"before_id\":\"6000000019045\",\"after_id\":\"6000000019046\",\"exact_position\":\"3\",\"known_position\":\"last\"},\"template_settings\":{\"start_after\":\"5\",\"frequency_unit\":\"days\",\"duration\":\"10\"},\"budget_info\":{\"cost_budget\":{\"amount\":\"12000.00\"},\"cost_budget_threshold\":{\"amount\":\"12000.00\"},\"revenue_budget\":{\"amount\":\"12000.00\"},\"hourly_budget\":\"40:00\",\"hourly_budget_threshold\":\"36:00\"}}"
)
content(response, "text")
import Foundation
let url = URL(string: "https://projects.zoho.com/api/v3.1/portal/[PORTAL_ID]/projects/23806000097545166/phases")!
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":"Finalize UI/UX Design Handover","flag":"internal","owner":{"zpuid":"6000000015029"},"status":{"id":"6000000035033"},"start_date":"2026-07-20","end_date":"2026-08-05","tags":[{"id":"6000000035033"}],"color":"#4C9AFF","position":{"before_id":"6000000019045","after_id":"6000000019046","exact_position":"3","known_position":"last"},"template_settings":{"start_after":"5","frequency_unit":"days","duration":"10"},"budget_info":{"cost_budget":{"amount":"12000.00"},"cost_budget_threshold":{"amount":"12000.00"},"revenue_budget":{"amount":"12000.00"},"hourly_budget":"40:00","hourly_budget_threshold":"36:00"}}
""".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
Update a phase in a project. Use this API to modify the phase details such as name, owner, status, duration, tags, position, and budget details.
OAuth Scope:
ZohoProjects.milestones.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 phase within the specified project. You can obtain it from the Get Project Phases API (the "id" field in the response).
String
max length : 65000Enter the name of the phase.
String
max length : 100Specify the flag type of the phase. Accepted values: Internal or External.
JSONObject
max length : 1000Specify the owner of the phase.
JSONObject
max length : 1000Specify the status of the phase.
String
Enter the start date of the phase, in ISO 8601 format (YYYY-MM-DD).
String
Enter the end date of the phase, in ISO 8601 format (YYYY-MM-DD).
String
Enter the date on which the phase was completed, in ISO 8601 format (YYYY-MM-DD). Accepted only when the phase is in closed status type.
JSONArray
max length : 10000Specify the IDs of the tags to be associated with the phase.
String
max length : 10Enter the hex color code to be used for the phase's Gantt bar.
JSONObject
max length : 1000Specify the position at which the phase is to be placed.
JSONObject
max length : 5000Specify the template settings of the phase. Applicable only when the project is of type template.
JSONObject
max length : 5000Enter the budget details of the phase. Applicable only when budget is enabled at both the portal and project level.
Request Example
curl -X PATCH \
'https://projects.zoho.com/api/v3.1/portal/[PORTAL_ID]/projects/23806000097545166/phases/[PHASE_ID]' \
-H 'Authorization: Bearer 1000.03xxxxxxxxxxxxxxxxxa5317.dxxxxxxxxxxxxxxxxxfa' \
-H 'Content-Type: application/json' \
-d '{"name":"Finalize UI/UX Design Handover","flag":"internal","owner":{"zpuid":"6000000015029"},"status":{"id":"6000000035033"},"start_date":"2026-07-20","end_date":"2026-08-05","completed_date":"2026-08-05","tags":[{"id":"6000000035033"}],"color":"#4C9AFF","position":{"before_id":"6000000019045","after_id":"6000000019046","exact_position":"3","known_position":"last"},"template_settings":{"start_after":"5","frequency_unit":"days","duration":"10"},"budget_info":{"cost_budget":{"amount":"12000.00"},"cost_budget_threshold":{"amount":"12000.00"},"revenue_budget":{"amount":"12000.00"},"hourly_budget":"40:00","hourly_budget_threshold":"36:00"}}'
url = "https://projects.zoho.com/api/v3.1/portal/[PORTAL_ID]/projects/23806000097545166/phases/[PHASE_ID]";
params = Map();
params.put("name", "Finalize UI/UX Design Handover");
params.put("flag", "internal");
params.put("owner", {"zpuid":"6000000015029"});
params.put("status", {"id":"6000000035033"});
params.put("start_date", "2026-07-20");
params.put("end_date", "2026-08-05");
params.put("completed_date", "2026-08-05");
params.put("tags", [{"id":"6000000035033"}]);
params.put("color", "#4C9AFF");
params.put("position", {"before_id":"6000000019045","after_id":"6000000019046","exact_position":"3","known_position":"last"});
params.put("template_settings", {"start_after":"5","frequency_unit":"days","duration":"10"});
params.put("budget_info", {"cost_budget":{"amount":"12000.00"},"cost_budget_threshold":{"amount":"12000.00"},"revenue_budget":{"amount":"12000.00"},"hourly_budget":"40:00","hourly_budget_threshold":"36:00"});
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.1/portal/[PORTAL_ID]/projects/23806000097545166/phases/[PHASE_ID]');
const payload = JSON.stringify({"name":"Finalize UI/UX Design Handover","flag":"internal","owner":{"zpuid":"6000000015029"},"status":{"id":"6000000035033"},"start_date":"2026-07-20","end_date":"2026-08-05","completed_date":"2026-08-05","tags":[{"id":"6000000035033"}],"color":"#4C9AFF","position":{"before_id":"6000000019045","after_id":"6000000019046","exact_position":"3","known_position":"last"},"template_settings":{"start_after":"5","frequency_unit":"days","duration":"10"},"budget_info":{"cost_budget":{"amount":"12000.00"},"cost_budget_threshold":{"amount":"12000.00"},"revenue_budget":{"amount":"12000.00"},"hourly_budget":"40:00","hourly_budget_threshold":"36:00"}});
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.1/portal/[PORTAL_ID]/projects/23806000097545166/phases/[PHASE_ID]")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Patch.new(url)
request["Authorization"] = "Bearer 1000.03xxxxxxxxxxxxxxxxxa5317.dxxxxxxxxxxxxxxxxxfa"
request["Content-Type"] = "application/json"
request.body = '{"name":"Finalize UI/UX Design Handover","flag":"internal","owner":{"zpuid":"6000000015029"},"status":{"id":"6000000035033"},"start_date":"2026-07-20","end_date":"2026-08-05","completed_date":"2026-08-05","tags":[{"id":"6000000035033"}],"color":"#4C9AFF","position":{"before_id":"6000000019045","after_id":"6000000019046","exact_position":"3","known_position":"last"},"template_settings":{"start_after":"5","frequency_unit":"days","duration":"10"},"budget_info":{"cost_budget":{"amount":"12000.00"},"cost_budget_threshold":{"amount":"12000.00"},"revenue_budget":{"amount":"12000.00"},"hourly_budget":"40:00","hourly_budget_threshold":"36:00"}}'
response = http.request(request)
puts response.read_body
<?php
$url = "https://projects.zoho.com/api/v3.1/portal/[PORTAL_ID]/projects/23806000097545166/phases/[PHASE_ID]";
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => $url,
CURLOPT_RETURNTRANSFER => true,
CURLOPT_CUSTOMREQUEST => "PATCH",
CURLOPT_POSTFIELDS => '{"name":"Finalize UI/UX Design Handover","flag":"internal","owner":{"zpuid":"6000000015029"},"status":{"id":"6000000035033"},"start_date":"2026-07-20","end_date":"2026-08-05","completed_date":"2026-08-05","tags":[{"id":"6000000035033"}],"color":"#4C9AFF","position":{"before_id":"6000000019045","after_id":"6000000019046","exact_position":"3","known_position":"last"},"template_settings":{"start_after":"5","frequency_unit":"days","duration":"10"},"budget_info":{"cost_budget":{"amount":"12000.00"},"cost_budget_threshold":{"amount":"12000.00"},"revenue_budget":{"amount":"12000.00"},"hourly_budget":"40:00","hourly_budget_threshold":"36:00"}}',
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.1/portal/[PORTAL_ID]/projects/23806000097545166/phases/[PHASE_ID]"
headers = {
"Authorization": "Bearer 1000.03xxxxxxxxxxxxxxxxxa5317.dxxxxxxxxxxxxxxxxxfa",
"Content-Type": "application/json",
}
payload = '{"name":"Finalize UI/UX Design Handover","flag":"internal","owner":{"zpuid":"6000000015029"},"status":{"id":"6000000035033"},"start_date":"2026-07-20","end_date":"2026-08-05","completed_date":"2026-08-05","tags":[{"id":"6000000035033"}],"color":"#4C9AFF","position":{"before_id":"6000000019045","after_id":"6000000019046","exact_position":"3","known_position":"last"},"template_settings":{"start_after":"5","frequency_unit":"days","duration":"10"},"budget_info":{"cost_budget":{"amount":"12000.00"},"cost_budget_threshold":{"amount":"12000.00"},"revenue_budget":{"amount":"12000.00"},"hourly_budget":"40:00","hourly_budget_threshold":"36:00"}}'
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.1/portal/[PORTAL_ID]/projects/23806000097545166/phases/[PHASE_ID]");
curl_easy_setopt(curl, CURLOPT_HTTPHEADER, headers);
curl_easy_setopt(curl, CURLOPT_CUSTOMREQUEST, "PATCH");
curl_easy_setopt(curl, CURLOPT_POSTFIELDS, "{\"name\":\"Finalize UI/UX Design Handover\",\"flag\":\"internal\",\"owner\":{\"zpuid\":\"6000000015029\"},\"status\":{\"id\":\"6000000035033\"},\"start_date\":\"2026-07-20\",\"end_date\":\"2026-08-05\",\"completed_date\":\"2026-08-05\",\"tags\":[{\"id\":\"6000000035033\"}],\"color\":\"#4C9AFF\",\"position\":{\"before_id\":\"6000000019045\",\"after_id\":\"6000000019046\",\"exact_position\":\"3\",\"known_position\":\"last\"},\"template_settings\":{\"start_after\":\"5\",\"frequency_unit\":\"days\",\"duration\":\"10\"},\"budget_info\":{\"cost_budget\":{\"amount\":\"12000.00\"},\"cost_budget_threshold\":{\"amount\":\"12000.00\"},\"revenue_budget\":{\"amount\":\"12000.00\"},\"hourly_budget\":\"40:00\",\"hourly_budget_threshold\":\"36:00\"}}");
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.1/portal/[PORTAL_ID]/projects/23806000097545166/phases/[PHASE_ID]");
request.Content = new StringContent(
@"{""name"":""Finalize UI/UX Design Handover"",""flag"":""internal"",""owner"":{""zpuid"":""6000000015029""},""status"":{""id"":""6000000035033""},""start_date"":""2026-07-20"",""end_date"":""2026-08-05"",""completed_date"":""2026-08-05"",""tags"":[{""id"":""6000000035033""}],""color"":""#4C9AFF"",""position"":{""before_id"":""6000000019045"",""after_id"":""6000000019046"",""exact_position"":""3"",""known_position"":""last""},""template_settings"":{""start_after"":""5"",""frequency_unit"":""days"",""duration"":""10""},""budget_info"":{""cost_budget"":{""amount"":""12000.00""},""cost_budget_threshold"":{""amount"":""12000.00""},""revenue_budget"":{""amount"":""12000.00""},""hourly_budget"":""40:00"",""hourly_budget_threshold"":""36:00""}}",
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.1/portal/[PORTAL_ID]/projects/23806000097545166/phases/[PHASE_ID]");
curl_easy_setopt(curl, CURLOPT_HTTPHEADER, headers);
curl_easy_setopt(curl, CURLOPT_CUSTOMREQUEST, "PATCH");
curl_easy_setopt(curl, CURLOPT_WRITEFUNCTION, WriteCallback);
curl_easy_setopt(curl, CURLOPT_WRITEDATA, &response);
curl_easy_setopt(curl, CURLOPT_POSTFIELDS, "{\"name\":\"Finalize UI/UX Design Handover\",\"flag\":\"internal\",\"owner\":{\"zpuid\":\"6000000015029\"},\"status\":{\"id\":\"6000000035033\"},\"start_date\":\"2026-07-20\",\"end_date\":\"2026-08-05\",\"completed_date\":\"2026-08-05\",\"tags\":[{\"id\":\"6000000035033\"}],\"color\":\"#4C9AFF\",\"position\":{\"before_id\":\"6000000019045\",\"after_id\":\"6000000019046\",\"exact_position\":\"3\",\"known_position\":\"last\"},\"template_settings\":{\"start_after\":\"5\",\"frequency_unit\":\"days\",\"duration\":\"10\"},\"budget_info\":{\"cost_budget\":{\"amount\":\"12000.00\"},\"cost_budget_threshold\":{\"amount\":\"12000.00\"},\"revenue_budget\":{\"amount\":\"12000.00\"},\"hourly_budget\":\"40:00\",\"hourly_budget_threshold\":\"36:00\"}}");
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.1/portal/[PORTAL_ID]/projects/23806000097545166/phases/[PHASE_ID]"
{:headers {"Authorization" "Bearer 1000.03xxxxxxxxxxxxxxxxxa5317.dxxxxxxxxxxxxxxxxxfa"
"Content-Type" "application/json"}
:body "{\"name\":\"Finalize UI/UX Design Handover\",\"flag\":\"internal\",\"owner\":{\"zpuid\":\"6000000015029\"},\"status\":{\"id\":\"6000000035033\"},\"start_date\":\"2026-07-20\",\"end_date\":\"2026-08-05\",\"completed_date\":\"2026-08-05\",\"tags\":[{\"id\":\"6000000035033\"}],\"color\":\"#4C9AFF\",\"position\":{\"before_id\":\"6000000019045\",\"after_id\":\"6000000019046\",\"exact_position\":\"3\",\"known_position\":\"last\"},\"template_settings\":{\"start_after\":\"5\",\"frequency_unit\":\"days\",\"duration\":\"10\"},\"budget_info\":{\"cost_budget\":{\"amount\":\"12000.00\"},\"cost_budget_threshold\":{\"amount\":\"12000.00\"},\"revenue_budget\":{\"amount\":\"12000.00\"},\"hourly_budget\":\"40:00\",\"hourly_budget_threshold\":\"36:00\"}}"
:as :json}))
(println (:body response))
package main
import (
"fmt"
"io"
"net/http"
"strings"
)
func main() {
payload := strings.NewReader("{\"name\":\"Finalize UI/UX Design Handover\",\"flag\":\"internal\",\"owner\":{\"zpuid\":\"6000000015029\"},\"status\":{\"id\":\"6000000035033\"},\"start_date\":\"2026-07-20\",\"end_date\":\"2026-08-05\",\"completed_date\":\"2026-08-05\",\"tags\":[{\"id\":\"6000000035033\"}],\"color\":\"#4C9AFF\",\"position\":{\"before_id\":\"6000000019045\",\"after_id\":\"6000000019046\",\"exact_position\":\"3\",\"known_position\":\"last\"},\"template_settings\":{\"start_after\":\"5\",\"frequency_unit\":\"days\",\"duration\":\"10\"},\"budget_info\":{\"cost_budget\":{\"amount\":\"12000.00\"},\"cost_budget_threshold\":{\"amount\":\"12000.00\"},\"revenue_budget\":{\"amount\":\"12000.00\"},\"hourly_budget\":\"40:00\",\"hourly_budget_threshold\":\"36:00\"}}")
req, _ := http.NewRequest("PATCH", "https://projects.zoho.com/api/v3.1/portal/[PORTAL_ID]/projects/23806000097545166/phases/[PHASE_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.1/portal/[PORTAL_ID]/projects/23806000097545166/phases/[PHASE_ID] HTTP/1.1
Host: https://projects.zoho.com/api/v3.1/portal/[PORTAL_ID]/projects/23806000097545166/phases/[PHASE_ID]
Authorization: Bearer 1000.03xxxxxxxxxxxxxxxxxa5317.dxxxxxxxxxxxxxxxxxfa
Content-Type: application/json
{"name":"Finalize UI/UX Design Handover","flag":"internal","owner":{"zpuid":"6000000015029"},"status":{"id":"6000000035033"},"start_date":"2026-07-20","end_date":"2026-08-05","completed_date":"2026-08-05","tags":[{"id":"6000000035033"}],"color":"#4C9AFF","position":{"before_id":"6000000019045","after_id":"6000000019046","exact_position":"3","known_position":"last"},"template_settings":{"start_after":"5","frequency_unit":"days","duration":"10"},"budget_info":{"cost_budget":{"amount":"12000.00"},"cost_budget_threshold":{"amount":"12000.00"},"revenue_budget":{"amount":"12000.00"},"hourly_budget":"40:00","hourly_budget_threshold":"36:00"}}
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.1/portal/[PORTAL_ID]/projects/23806000097545166/phases/[PHASE_ID]");
HttpUriRequest requestObj = new HttpPatch(uriBuilder.build());
requestObj.addHeader("Authorization", "Bearer 1000.03xxxxxxxxxxxxxxxxxa5317.dxxxxxxxxxxxxxxxxxfa");
HttpEntityEnclosingRequestBase requestBase = (HttpEntityEnclosingRequestBase) requestObj;
String requestBody = "{\"name\":\"Finalize UI\/UX Design Handover\",\"flag\":\"internal\",\"owner\":{\"zpuid\":\"6000000015029\"},\"status\":{\"id\":\"6000000035033\"},\"start_date\":\"2026-07-20\",\"end_date\":\"2026-08-05\",\"completed_date\":\"2026-08-05\",\"tags\":[{\"id\":\"6000000035033\"}],\"color\":\"#4C9AFF\",\"position\":{\"before_id\":\"6000000019045\",\"after_id\":\"6000000019046\",\"exact_position\":\"3\",\"known_position\":\"last\"},\"template_settings\":{\"start_after\":\"5\",\"frequency_unit\":\"days\",\"duration\":\"10\"},\"budget_info\":{\"cost_budget\":{\"amount\":\"12000.00\"},\"cost_budget_threshold\":{\"amount\":\"12000.00\"},\"revenue_budget\":{\"amount\":\"12000.00\"},\"hourly_budget\":\"40:00\",\"hourly_budget_threshold\":\"36:00\"}}";
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.1/portal/[PORTAL_ID]/projects/23806000097545166/phases/[PHASE_ID]';
const options = {
method: 'PATCH',
headers: {
'Authorization': 'Bearer 1000.03xxxxxxxxxxxxxxxxxa5317.dxxxxxxxxxxxxxxxxxfa',
'Content-Type': 'application/json'
},
body: JSON.stringify({"name":"Finalize UI/UX Design Handover","flag":"internal","owner":{"zpuid":"6000000015029"},"status":{"id":"6000000035033"},"start_date":"2026-07-20","end_date":"2026-08-05","completed_date":"2026-08-05","tags":[{"id":"6000000035033"}],"color":"#4C9AFF","position":{"before_id":"6000000019045","after_id":"6000000019046","exact_position":"3","known_position":"last"},"template_settings":{"start_after":"5","frequency_unit":"days","duration":"10"},"budget_info":{"cost_budget":{"amount":"12000.00"},"cost_budget_threshold":{"amount":"12000.00"},"revenue_budget":{"amount":"12000.00"},"hourly_budget":"40:00","hourly_budget_threshold":"36:00"}})
};
fetch(url, options)
.then(response => response.json())
.then(data => console.log(data))
.catch(error => console.error(error));
{"name":"Finalize UI/UX Design Handover","flag":"internal","owner":{"zpuid":"6000000015029"},"status":{"id":"6000000035033"},"start_date":"2026-07-20","end_date":"2026-08-05","completed_date":"2026-08-05","tags":[{"id":"6000000035033"}],"color":"#4C9AFF","position":{"before_id":"6000000019045","after_id":"6000000019046","exact_position":"3","known_position":"last"},"template_settings":{"start_after":"5","frequency_unit":"days","duration":"10"},"budget_info":{"cost_budget":{"amount":"12000.00"},"cost_budget_threshold":{"amount":"12000.00"},"revenue_budget":{"amount":"12000.00"},"hourly_budget":"40:00","hourly_budget_threshold":"36:00"}}import java.net.HttpURLConnection
import java.net.URL
import okhttp3.HttpUrl.Companion.toHttpUrl
fun main() {
val url = URL("https://projects.zoho.com/api/v3.1/portal/[PORTAL_ID]/projects/23806000097545166/phases/[PHASE_ID]")
val conn = url.openConnection() as HttpURLConnection
conn.requestMethod = "PATCH"
conn.setRequestProperty("Authorization", "Bearer 1000.03xxxxxxxxxxxxxxxxxa5317.dxxxxxxxxxxxxxxxxxfa")
conn.setRequestProperty("Content-Type", "application/json")
conn.doOutput = true
conn.outputStream.bufferedWriter().use { it.write("""{"name":"Finalize UI/UX Design Handover","flag":"internal","owner":{"zpuid":"6000000015029"},"status":{"id":"6000000035033"},"start_date":"2026-07-20","end_date":"2026-08-05","completed_date":"2026-08-05","tags":[{"id":"6000000035033"}],"color":"#4C9AFF","position":{"before_id":"6000000019045","after_id":"6000000019046","exact_position":"3","known_position":"last"},"template_settings":{"start_after":"5","frequency_unit":"days","duration":"10"},"budget_info":{"cost_budget":{"amount":"12000.00"},"cost_budget_threshold":{"amount":"12000.00"},"revenue_budget":{"amount":"12000.00"},"hourly_budget":"40:00","hourly_budget_threshold":"36:00"}}""") }
val response = conn.inputStream.bufferedReader().readText()
println(response)
}
NSURL *url = [NSURL URLWithString:@"https://projects.zoho.com/api/v3.1/portal/[PORTAL_ID]/projects/23806000097545166/phases/[PHASE_ID]"];
NSMutableURLRequest *request = [NSMutableURLRequest requestWithURL:url];
[request setHTTPMethod:@"PATCH"];
[request setValue:@"Bearer 1000.03xxxxxxxxxxxxxxxxxa5317.dxxxxxxxxxxxxxxxxxfa" forHTTPHeaderField:@"Authorization"];
[request setValue:@"application/json" forHTTPHeaderField:@"Content-Type"];
NSData *body = [@"{\"name\":\"Finalize UI/UX Design Handover\",\"flag\":\"internal\",\"owner\":{\"zpuid\":\"6000000015029\"},\"status\":{\"id\":\"6000000035033\"},\"start_date\":\"2026-07-20\",\"end_date\":\"2026-08-05\",\"completed_date\":\"2026-08-05\",\"tags\":[{\"id\":\"6000000035033\"}],\"color\":\"#4C9AFF\",\"position\":{\"before_id\":\"6000000019045\",\"after_id\":\"6000000019046\",\"exact_position\":\"3\",\"known_position\":\"last\"},\"template_settings\":{\"start_after\":\"5\",\"frequency_unit\":\"days\",\"duration\":\"10\"},\"budget_info\":{\"cost_budget\":{\"amount\":\"12000.00\"},\"cost_budget_threshold\":{\"amount\":\"12000.00\"},\"revenue_budget\":{\"amount\":\"12000.00\"},\"hourly_budget\":\"40:00\",\"hourly_budget_threshold\":\"36:00\"}}" 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.1/portal/[PORTAL_ID]/projects/23806000097545166/phases/[PHASE_ID]" in
let headers = Cohttp.Header.init ()
|> fun h -> Cohttp.Header.add h "Authorization" "Bearer 1000.03xxxxxxxxxxxxxxxxxa5317.dxxxxxxxxxxxxxxxxxfa"
|> fun h -> Cohttp.Header.add h "Content-Type" "application/json"
in
let body = Cohttp_lwt.Body.of_string {json|{"name":"Finalize UI/UX Design Handover","flag":"internal","owner":{"zpuid":"6000000015029"},"status":{"id":"6000000035033"},"start_date":"2026-07-20","end_date":"2026-08-05","completed_date":"2026-08-05","tags":[{"id":"6000000035033"}],"color":"#4C9AFF","position":{"before_id":"6000000019045","after_id":"6000000019046","exact_position":"3","known_position":"last"},"template_settings":{"start_after":"5","frequency_unit":"days","duration":"10"},"budget_info":{"cost_budget":{"amount":"12000.00"},"cost_budget_threshold":{"amount":"12000.00"},"revenue_budget":{"amount":"12000.00"},"hourly_budget":"40:00","hourly_budget_threshold":"36:00"}}|json} in
Lwt_main.run (
Client.patch ~headers ~body uri >>= fun (_, body) ->
Cohttp_lwt.Body.to_string body >|= fun s ->
print_endline s)
$headers = @{
"Authorization" = "Bearer 1000.03xxxxxxxxxxxxxxxxxa5317.dxxxxxxxxxxxxxxxxxfa"
"Content-Type" = "application/json"
}
$body = @'
{"name":"Finalize UI/UX Design Handover","flag":"internal","owner":{"zpuid":"6000000015029"},"status":{"id":"6000000035033"},"start_date":"2026-07-20","end_date":"2026-08-05","completed_date":"2026-08-05","tags":[{"id":"6000000035033"}],"color":"#4C9AFF","position":{"before_id":"6000000019045","after_id":"6000000019046","exact_position":"3","known_position":"last"},"template_settings":{"start_after":"5","frequency_unit":"days","duration":"10"},"budget_info":{"cost_budget":{"amount":"12000.00"},"cost_budget_threshold":{"amount":"12000.00"},"revenue_budget":{"amount":"12000.00"},"hourly_budget":"40:00","hourly_budget_threshold":"36:00"}}
'@
$response = Invoke-RestMethod -Uri "https://projects.zoho.com/api/v3.1/portal/[PORTAL_ID]/projects/23806000097545166/phases/[PHASE_ID]" -Method PATCH -Headers $headers -Body $body
$response | ConvertTo-Json
library(httr)
url <- "https://projects.zoho.com/api/v3.1/portal/[PORTAL_ID]/projects/23806000097545166/phases/[PHASE_ID]"
response <- PATCH(
url,
add_headers(Authorization = "Bearer 1000.03xxxxxxxxxxxxxxxxxa5317.dxxxxxxxxxxxxxxxxxfa"),
content_type_json(),
body = "{\"name\":\"Finalize UI/UX Design Handover\",\"flag\":\"internal\",\"owner\":{\"zpuid\":\"6000000015029\"},\"status\":{\"id\":\"6000000035033\"},\"start_date\":\"2026-07-20\",\"end_date\":\"2026-08-05\",\"completed_date\":\"2026-08-05\",\"tags\":[{\"id\":\"6000000035033\"}],\"color\":\"#4C9AFF\",\"position\":{\"before_id\":\"6000000019045\",\"after_id\":\"6000000019046\",\"exact_position\":\"3\",\"known_position\":\"last\"},\"template_settings\":{\"start_after\":\"5\",\"frequency_unit\":\"days\",\"duration\":\"10\"},\"budget_info\":{\"cost_budget\":{\"amount\":\"12000.00\"},\"cost_budget_threshold\":{\"amount\":\"12000.00\"},\"revenue_budget\":{\"amount\":\"12000.00\"},\"hourly_budget\":\"40:00\",\"hourly_budget_threshold\":\"36:00\"}}"
)
content(response, "text")
import Foundation
let url = URL(string: "https://projects.zoho.com/api/v3.1/portal/[PORTAL_ID]/projects/23806000097545166/phases/[PHASE_ID]")!
var request = URLRequest(url: url)
request.httpMethod = "PATCH"
request.setValue("Bearer 1000.03xxxxxxxxxxxxxxxxxa5317.dxxxxxxxxxxxxxxxxxfa", forHTTPHeaderField: "Authorization")
request.setValue("application/json", forHTTPHeaderField: "Content-Type")
request.httpBody = """
{"name":"Finalize UI/UX Design Handover","flag":"internal","owner":{"zpuid":"6000000015029"},"status":{"id":"6000000035033"},"start_date":"2026-07-20","end_date":"2026-08-05","completed_date":"2026-08-05","tags":[{"id":"6000000035033"}],"color":"#4C9AFF","position":{"before_id":"6000000019045","after_id":"6000000019046","exact_position":"3","known_position":"last"},"template_settings":{"start_after":"5","frequency_unit":"days","duration":"10"},"budget_info":{"cost_budget":{"amount":"12000.00"},"cost_budget_threshold":{"amount":"12000.00"},"revenue_budget":{"amount":"12000.00"},"hourly_budget":"40:00","hourly_budget_threshold":"36:00"}}
""".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
Trash a phase from a project. Use this API to move a phase to recycle bin using the phase ID.
OAuth Scope:
ZohoProjects.milestones.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 phase within the specified project. You can obtain it from the Get Project Phases API (the "id" field in the response).
Request Example
curl -X DELETE \
'https://projects.zoho.com/api/v3.1/portal/[PORTAL_ID]/projects/23806000097545166/phases/[PHASE_ID]' \
-H 'Authorization: Bearer 1000.03xxxxxxxxxxxxxxxxxa5317.dxxxxxxxxxxxxxxxxxfa'
url = "https://projects.zoho.com/api/v3.1/portal/[PORTAL_ID]/projects/23806000097545166/phases/[PHASE_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.1/portal/[PORTAL_ID]/projects/23806000097545166/phases/[PHASE_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.1/portal/[PORTAL_ID]/projects/23806000097545166/phases/[PHASE_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.1/portal/[PORTAL_ID]/projects/23806000097545166/phases/[PHASE_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.1/portal/[PORTAL_ID]/projects/23806000097545166/phases/[PHASE_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.1/portal/[PORTAL_ID]/projects/23806000097545166/phases/[PHASE_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.1/portal/[PORTAL_ID]/projects/23806000097545166/phases/[PHASE_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.1/portal/[PORTAL_ID]/projects/23806000097545166/phases/[PHASE_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.1/portal/[PORTAL_ID]/projects/23806000097545166/phases/[PHASE_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.1/portal/[PORTAL_ID]/projects/23806000097545166/phases/[PHASE_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.1/portal/[PORTAL_ID]/projects/23806000097545166/phases/[PHASE_ID] HTTP/1.1
Host: https://projects.zoho.com/api/v3.1/portal/[PORTAL_ID]/projects/23806000097545166/phases/[PHASE_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.1/portal/[PORTAL_ID]/projects/23806000097545166/phases/[PHASE_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.1/portal/[PORTAL_ID]/projects/23806000097545166/phases/[PHASE_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.1/portal/[PORTAL_ID]/projects/23806000097545166/phases/[PHASE_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.1/portal/[PORTAL_ID]/projects/23806000097545166/phases/[PHASE_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.1/portal/[PORTAL_ID]/projects/23806000097545166/phases/[PHASE_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.1/portal/[PORTAL_ID]/projects/23806000097545166/phases/[PHASE_ID]" -Method DELETE -Headers $headers
$response | ConvertTo-Json
library(httr)
url <- "https://projects.zoho.com/api/v3.1/portal/[PORTAL_ID]/projects/23806000097545166/phases/[PHASE_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.1/portal/[PORTAL_ID]/projects/23806000097545166/phases/[PHASE_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