Forums
This module covers forum related operations within Zoho Projects. Use this API to create, update, delete, or move forums, retrieve forum details, and manage tasks or comments associated with forums.
This module covers forum related operations within Zoho Projects. Use this API to create, update, delete, or move forums, retrieve forum details, and manage tasks or comments associated with forums.
Retrieve all forums in a specific project. Use this API to access the list of forums available within a project.
OAuth Scope:
ZohoProjects.forums.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
Enter the sort criteria. Accepted values: created_time,updated_time,last_activity
String
Enter the sort order. Accepted values: asc,desc
int
default : 1Enter the page number.
int
limit : 1-100Enter the number of entries to be displayed per page.
JSONObject
Enter the filter criteria to narrow down the forum results. Available fields: title, category, flag (internal, external), tags, type (regular, question and answer), sticky (true, false), announcement (true, false), posted_by (ZUID), commented_by (ZUID) and posted_time.
Request Example
curl -X GET \
'https://projects.zoho.com/api/v3/portal/[PORTAL_ID]/projects/23806000097545166/forums?sort_by=created_time&sort_order=desc&page=1&per_page=10&filter=%7B%22criteria%22%3A%5B%7B%22field_name%22%3A%22project%22%2C%22criteria_condition%22%3A%22contains%22%2C%22value%22%3A%5B%221752587000000097269%22%5D%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/forums";
filter_value = {"criteria":[{"field_name":"project","criteria_condition":"contains","value":["1752587000000097269"]}],"pattern":"1"};
params = Map();
params.put("sort_by", "created_time");
params.put("sort_order", "desc");
params.put("page", "1");
params.put("per_page", 10);
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/forums');
url.searchParams.append('sort_by', 'created_time');
url.searchParams.append('sort_order', 'desc');
url.searchParams.append('page', '1');
url.searchParams.append('per_page', '10');
url.searchParams.append('filter', '{"criteria":[{"field_name":"project","criteria_condition":"contains","value":["1752587000000097269"]}],"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/forums")
params = {
"sort_by" => "created_time",
"sort_order" => "desc",
"page" => "1",
"per_page" => "10",
"filter" => "{\"criteria\":[{\"field_name\":\"project\",\"criteria_condition\":\"contains\",\"value\":[\"1752587000000097269\"]}],\"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 = [
'sort_by' => 'created_time',
'sort_order' => 'desc',
'page' => '1',
'per_page' => '10',
'filter' => '{"criteria":[{"field_name":"project","criteria_condition":"contains","value":["1752587000000097269"]}],"pattern":"1"}',
];
$url = "https://projects.zoho.com/api/v3/portal/[PORTAL_ID]/projects/23806000097545166/forums" . "?" . 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/forums"
params = {
"sort_by": "created_time",
"sort_order": "desc",
"page": "1",
"per_page": "10",
"filter": "{\"criteria\":[{\"field_name\":\"project\",\"criteria_condition\":\"contains\",\"value\":[\"1752587000000097269\"]}],\"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_sort_by = curl_easy_escape(curl, "created_time", 0);
char *enc_sort_order = curl_easy_escape(curl, "desc", 0);
char *enc_page = curl_easy_escape(curl, "1", 0);
char *enc_per_page = curl_easy_escape(curl, "10", 0);
char *enc_filter = curl_easy_escape(curl, "{\"criteria\":[{\"field_name\":\"project\",\"criteria_condition\":\"contains\",\"value\":[\"1752587000000097269\"]}],\"pattern\":\"1\"}", 0);
char url[2048];
snprintf(url, sizeof(url), "https://projects.zoho.com/api/v3/portal/[PORTAL_ID]/projects/23806000097545166/forums?sort_by=%s&sort_order=%s&page=%s&per_page=%s&filter=%s", enc_sort_by, enc_sort_order, enc_page, enc_per_page, 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_sort_by);
curl_free(enc_sort_order);
curl_free(enc_page);
curl_free(enc_per_page);
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["sort_by"] = "created_time";
query["sort_order"] = "desc";
query["page"] = "1";
query["per_page"] = "10";
query["filter"] = "{\"criteria\":[{\"field_name\":\"project\",\"criteria_condition\":\"contains\",\"value\":[\"1752587000000097269\"]}],\"pattern\":\"1\"}";
var uriBuilder = new UriBuilder("https://projects.zoho.com/api/v3/portal/[PORTAL_ID]/projects/23806000097545166/forums") { 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_sort_by = curl_easy_escape(curl, "created_time", 0);
char* enc_sort_order = curl_easy_escape(curl, "desc", 0);
char* enc_page = curl_easy_escape(curl, "1", 0);
char* enc_per_page = curl_easy_escape(curl, "10", 0);
char* enc_filter = curl_easy_escape(curl, "{\"criteria\":[{\"field_name\":\"project\",\"criteria_condition\":\"contains\",\"value\":[\"1752587000000097269\"]}],\"pattern\":\"1\"}", 0);
std::string url = "https://projects.zoho.com/api/v3/portal/[PORTAL_ID]/projects/23806000097545166/forums";
url += "?sort_by=" + std::string(enc_sort_by);
url += "&sort_order=" + std::string(enc_sort_order);
url += "&page=" + std::string(enc_page);
url += "&per_page=" + std::string(enc_per_page);
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_sort_by);
curl_free(enc_sort_order);
curl_free(enc_page);
curl_free(enc_per_page);
curl_free(enc_filter);
curl_slist_free_all(headers);
curl_easy_cleanup(curl);
}
return 0;
}
(require '[clj-http.client :as client])
(let [enc-sort_by (java.net.URLEncoder/encode "created_time" "UTF-8")
enc-sort_order (java.net.URLEncoder/encode "desc" "UTF-8")
enc-page (java.net.URLEncoder/encode "1" "UTF-8")
enc-per_page (java.net.URLEncoder/encode "10" "UTF-8")
enc-filter (java.net.URLEncoder/encode "{\"criteria\":[{\"field_name\":\"project\",\"criteria_condition\":\"contains\",\"value\":[\"1752587000000097269\"]}],\"pattern\":\"1\"}" "UTF-8")
url (str "https://projects.zoho.com/api/v3/portal/[PORTAL_ID]/projects/23806000097545166/forums" "?sort_by=" enc-sort_by "&sort_order=" enc-sort_order "&page=" enc-page "&per_page=" enc-per_page "&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/forums", nil)
q := req.URL.Query()
q.Add("sort_by", "created_time")
q.Add("sort_order", "desc")
q.Add("page", "1")
q.Add("per_page", "10")
q.Add("filter", "{\"criteria\":[{\"field_name\":\"project\",\"criteria_condition\":\"contains\",\"value\":[\"1752587000000097269\"]}],\"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/forums?sort_by=created_time&sort_order=desc&page=1&per_page=10&filter=%7B%22criteria%22%3A%5B%7B%22field_name%22%3A%22project%22%2C%22criteria_condition%22%3A%22contains%22%2C%22value%22%3A%5B%221752587000000097269%22%5D%7D%5D%2C%22pattern%22%3A%221%22%7D HTTP/1.1
Host: https://projects.zoho.com/api/v3/portal/[PORTAL_ID]/projects/23806000097545166/forums?sort_by=created_time&sort_order=desc&page=1&per_page=10&filter=%7B%22criteria%22%3A%5B%7B%22field_name%22%3A%22project%22%2C%22criteria_condition%22%3A%22contains%22%2C%22value%22%3A%5B%221752587000000097269%22%5D%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/forums");
uriBuilder.addParameter("sort_by", "created_time");
uriBuilder.addParameter("sort_order", "desc");
uriBuilder.addParameter("page", "1");
uriBuilder.addParameter("per_page", "10");
uriBuilder.addParameter("filter", "{\"criteria\":[{\"field_name\":\"project\",\"criteria_condition\":\"contains\",\"value\":[\"1752587000000097269\"]}],\"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/forums';
const params = new URLSearchParams({
'sort_by': 'created_time',
'sort_order': 'desc',
'page': '1',
'per_page': '10',
'filter': '{"criteria":[{"field_name":"project","criteria_condition":"contains","value":["1752587000000097269"]}],"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));
sort_by = "created_time"
sort_order = "desc"
page = "1"
per_page = 10
filter = {"criteria":[{"field_name":"project","criteria_condition":"contains","value":["1752587000000097269"]}],"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/forums".toHttpUrl().newBuilder()
urlBuilder.addQueryParameter("sort_by", "created_time")
urlBuilder.addQueryParameter("sort_order", "desc")
urlBuilder.addQueryParameter("page", "1")
urlBuilder.addQueryParameter("per_page", "10")
urlBuilder.addQueryParameter("filter", "{\"criteria\":[{\"field_name\":\"project\",\"criteria_condition\":\"contains\",\"value\":[\"1752587000000097269\"]}],\"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 *encodedSort_by = [@"created_time" stringByAddingPercentEncodingWithAllowedCharacters:[NSCharacterSet URLQueryAllowedCharacterSet]];
NSString *encodedSort_order = [@"desc" stringByAddingPercentEncodingWithAllowedCharacters:[NSCharacterSet URLQueryAllowedCharacterSet]];
NSString *encodedPage = [@"1" stringByAddingPercentEncodingWithAllowedCharacters:[NSCharacterSet URLQueryAllowedCharacterSet]];
NSString *encodedPer_page = [@"10" stringByAddingPercentEncodingWithAllowedCharacters:[NSCharacterSet URLQueryAllowedCharacterSet]];
NSString *encodedFilter = [@"{\"criteria\":[{\"field_name\":\"project\",\"criteria_condition\":\"contains\",\"value\":[\"1752587000000097269\"]}],\"pattern\":\"1\"}" stringByAddingPercentEncodingWithAllowedCharacters:[NSCharacterSet URLQueryAllowedCharacterSet]];
NSString *urlString = [NSString stringWithFormat:@"https://projects.zoho.com/api/v3/portal/[PORTAL_ID]/projects/23806000097545166/forums?sort_by=%@&sort_order=%@&page=%@&per_page=%@&filter=%@", encodedSort_by, encodedSort_order, encodedPage, encodedPer_page, 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_sort_by = Uri.pct_encode "created_time" in
let enc_sort_order = Uri.pct_encode "desc" in
let enc_page = Uri.pct_encode "1" in
let enc_per_page = Uri.pct_encode "10" in
let enc_filter = Uri.pct_encode "{\"criteria\":[{\"field_name\":\"project\",\"criteria_condition\":\"contains\",\"value\":[\"1752587000000097269\"]}],\"pattern\":\"1\"}" in
let uri = Uri.of_string ("https://projects.zoho.com/api/v3/portal/[PORTAL_ID]/projects/23806000097545166/forums" ^ "?sort_by=" ^ enc_sort_by ^ "&sort_order=" ^ enc_sort_order ^ "&page=" ^ enc_page ^ "&per_page=" ^ enc_per_page ^ "&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 = @{
sort_by = "created_time"
sort_order = "desc"
page = "1"
per_page = "10"
filter = "{`"criteria`":[{`"field_name`":`"project`",`"criteria_condition`":`"contains`",`"value`":[`"1752587000000097269`"]}],`"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/forums" + "?" + $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/forums"
params <- list(
sort_by = "created_time",
sort_order = "desc",
page = "1",
per_page = "10",
filter = "{\"criteria\":[{\"field_name\":\"project\",\"criteria_condition\":\"contains\",\"value\":[\"1752587000000097269\"]}],\"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/forums")!
components.queryItems = [
URLQueryItem(name: "sort_by", value: "created_time"),
URLQueryItem(name: "sort_order", value: "desc"),
URLQueryItem(name: "page", value: "1"),
URLQueryItem(name: "per_page", value: "10"),
URLQueryItem(name: "filter", value: "{\"criteria\":[{\"field_name\":\"project\",\"criteria_condition\":\"contains\",\"value\":[\"1752587000000097269\"]}],\"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
Retrieve the details of a specific forum in a project. Use this API to access the full information of a forum within a project.
OAuth Scope:
ZohoProjects.forums.READ
String
requiredUnique, immutable identifier of the portal in Zoho Projects. You can obtain it from the Get Portals API (the "id" field in the response).
String
requiredUnique, immutable identifier of the project within the specified portal. You can obtain it from the Get Projects API (the "id" field in the response).
String
requiredIdentifier of a forum. Obtained from the Get Forums API - the "id" field in the response corresponds to forum_id.
Request Example
curl -X GET \
'https://projects.zoho.com/api/v3/portal/[PORTAL_ID]/projects/23806000097545166/forums/[FORUM_ID]' \
-H 'Authorization: Bearer 1000.03xxxxxxxxxxxxxxxxxa5317.dxxxxxxxxxxxxxxxxxfa'
url = "https://projects.zoho.com/api/v3/portal/[PORTAL_ID]/projects/23806000097545166/forums/[FORUM_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/forums/[FORUM_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/forums/[FORUM_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/forums/[FORUM_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/forums/[FORUM_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/forums/[FORUM_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/forums/[FORUM_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/forums/[FORUM_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/forums/[FORUM_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/forums/[FORUM_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/forums/[FORUM_ID] HTTP/1.1
Host: https://projects.zoho.com/api/v3/portal/[PORTAL_ID]/projects/23806000097545166/forums/[FORUM_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/forums/[FORUM_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/forums/[FORUM_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/forums/[FORUM_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/forums/[FORUM_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/forums/[FORUM_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/forums/[FORUM_ID]" -Method GET -Headers $headers
$response | ConvertTo-Json
library(httr)
url <- "https://projects.zoho.com/api/v3/portal/[PORTAL_ID]/projects/23806000097545166/forums/[FORUM_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/forums/[FORUM_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
Retrieve all tasks associated with a specific forum in a project. Use this API to access the list of tasks linked to a forum.
OAuth Scope:
ZohoProjects.forums.READ
String
requiredUnique, immutable identifier of the portal in Zoho Projects. You can obtain it from the Get Portals API (the "id" field in the response).
String
requiredUnique, immutable identifier of the project within the specified portal. You can obtain it from the Get Projects API (the "id" field in the response).
String
requiredIdentifier of a forum. Obtained from the Get Forums API - the "id" field in the response corresponds to forum_id.
int
default : 1Enter the page number.
int
limit : 1-200Enter the number of entries to be displayed per page.
Request Example
curl -X GET \
'https://projects.zoho.com/api/v3/portal/[PORTAL_ID]/projects/23806000097545166/forums/[FORUM_ID]/tasks?page=1&per_page=10' \
-H 'Authorization: Bearer 1000.03xxxxxxxxxxxxxxxxxa5317.dxxxxxxxxxxxxxxxxxfa'
url = "https://projects.zoho.com/api/v3/portal/[PORTAL_ID]/projects/23806000097545166/forums/[FORUM_ID]/tasks";
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/forums/[FORUM_ID]/tasks');
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/forums/[FORUM_ID]/tasks")
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/forums/[FORUM_ID]/tasks" . "?" . http_build_query($params);
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => $url,
CURLOPT_RETURNTRANSFER => true,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"Authorization: Bearer 1000.03xxxxxxxxxxxxxxxxxa5317.dxxxxxxxxxxxxxxxxxfa"
],
]);
$response = curl_exec($curl);
curl_close($curl);
echo $response;
import requests
url = "https://projects.zoho.com/api/v3/portal/[PORTAL_ID]/projects/23806000097545166/forums/[FORUM_ID]/tasks"
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/forums/[FORUM_ID]/tasks?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/forums/[FORUM_ID]/tasks") { Query = query.ToString() };
var request = new HttpRequestMessage(HttpMethod.Get, uriBuilder.Uri);
var response = await client.SendAsync(request);
var body = await response.Content.ReadAsStringAsync();
Console.WriteLine(body);
#include <iostream>
#include <string>
#include <curl/curl.h>
static size_t WriteCallback(void* contents, size_t size, size_t nmemb, std::string* output) {
output->append((char*)contents, size * nmemb);
return size * nmemb;
}
int main() {
CURL* curl = curl_easy_init();
if (curl) {
std::string response;
char* enc_page = curl_easy_escape(curl, "1", 0);
char* enc_per_page = curl_easy_escape(curl, "10", 0);
std::string url = "https://projects.zoho.com/api/v3/portal/[PORTAL_ID]/projects/23806000097545166/forums/[FORUM_ID]/tasks";
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/forums/[FORUM_ID]/tasks" "?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/forums/[FORUM_ID]/tasks", 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/forums/[FORUM_ID]/tasks?page=1&per_page=10 HTTP/1.1
Host: https://projects.zoho.com/api/v3/portal/[PORTAL_ID]/projects/23806000097545166/forums/[FORUM_ID]/tasks?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/forums/[FORUM_ID]/tasks");
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/forums/[FORUM_ID]/tasks';
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/forums/[FORUM_ID]/tasks".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/forums/[FORUM_ID]/tasks?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/forums/[FORUM_ID]/tasks" ^ "?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/forums/[FORUM_ID]/tasks" + "?" + $queryString
$response = Invoke-RestMethod -Uri $url -Method GET -Headers $headers
$response | ConvertTo-Json
library(httr)
url <- "https://projects.zoho.com/api/v3/portal/[PORTAL_ID]/projects/23806000097545166/forums/[FORUM_ID]/tasks"
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/forums/[FORUM_ID]/tasks")!
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
Add a new forum to a specific project. Use this API to create a forum for discussions within a project.
OAuth Scope:
ZohoProjects.forums.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 forum title
String
requiredEnter the forum content
String
requiredEnter the project category ID You can obtain it from the Get Forum Categories API (the "id" field in the response).
JSONArray
max length : 7000Enter the tags to add to the forum post
String
Mark the forum as internal (visible only to project users) or external (visible to both project and client users) Accepted values: internal,external
String
Enter the forum type Accepted values: normal,question
boolean
Specify whether to mark the post as sticky Accepted values: true,false
boolean
Specify whether to mark the post as announcement Accepted values: true,false
JSONArray
max length : 7000Enter the ZPUID of the users to notify You can obtain it from the Get Project Users API (the "id" field in the response).
JSONArray
max length : 7000Enter the attachment IDs You can obtain it from the Get Project Attachments API (the "attachment_id" field in the response).
JSONArray
max length : 2500Enter the WorkDrive resource IDs of the files to associate. The WorkDrive resource ID is different from the attachment ID in Zoho Projects. Up to 50 IDs can be passed in a single request. To retrieve the resource ID, refer to the (WorkDrive Upload Large File API). Users without upload permission to the folder or team folder can upload files up to 20 MB only.
Request Example
curl -X POST \
'https://projects.zoho.com/api/v3/portal/[PORTAL_ID]/projects/23806000097545166/forums' \
-H 'Authorization: Bearer 1000.03xxxxxxxxxxxxxxxxxa5317.dxxxxxxxxxxxxxxxxxfa' \
-H 'Content-Type: application/json' \
-d '{"title":"Software Development Project Discussion","content":"Please review the updated project scope and share your feedback by end of day.","category_id":"8000000041081","tags":["8000000041135"],"flag":"internal","type":"normal","is_sticky":true,"is_announcement":false,"notify":["8000000002001"],"attachment_ids":["8000000094011"],"thirdparty_id":["a1b2c3d4e5f6a7b8c9d0e1f2a3b4c5d6e7f8a9b0"]}'
url = "https://projects.zoho.com/api/v3/portal/[PORTAL_ID]/projects/23806000097545166/forums";
params = Map();
params.put("title", "Software Development Project Discussion");
params.put("content", "Please review the updated project scope and share your feedback by end of day.");
params.put("category_id", "8000000041081");
params.put("tags", ["8000000041135"]);
params.put("flag", "internal");
params.put("type", "normal");
params.put("is_sticky", true);
params.put("is_announcement", false);
params.put("notify", ["8000000002001"]);
params.put("attachment_ids", ["8000000094011"]);
params.put("thirdparty_id", ["a1b2c3d4e5f6a7b8c9d0e1f2a3b4c5d6e7f8a9b0"]);
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/forums');
const payload = JSON.stringify({"title":"Software Development Project Discussion","content":"Please review the updated project scope and share your feedback by end of day.","category_id":"8000000041081","tags":["8000000041135"],"flag":"internal","type":"normal","is_sticky":true,"is_announcement":false,"notify":["8000000002001"],"attachment_ids":["8000000094011"],"thirdparty_id":["a1b2c3d4e5f6a7b8c9d0e1f2a3b4c5d6e7f8a9b0"]});
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/forums")
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 = '{"title":"Software Development Project Discussion","content":"Please review the updated project scope and share your feedback by end of day.","category_id":"8000000041081","tags":["8000000041135"],"flag":"internal","type":"normal","is_sticky":true,"is_announcement":false,"notify":["8000000002001"],"attachment_ids":["8000000094011"],"thirdparty_id":["a1b2c3d4e5f6a7b8c9d0e1f2a3b4c5d6e7f8a9b0"]}'
response = http.request(request)
puts response.read_body
<?php
$url = "https://projects.zoho.com/api/v3/portal/[PORTAL_ID]/projects/23806000097545166/forums";
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => $url,
CURLOPT_RETURNTRANSFER => true,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => '{"title":"Software Development Project Discussion","content":"Please review the updated project scope and share your feedback by end of day.","category_id":"8000000041081","tags":["8000000041135"],"flag":"internal","type":"normal","is_sticky":true,"is_announcement":false,"notify":["8000000002001"],"attachment_ids":["8000000094011"],"thirdparty_id":["a1b2c3d4e5f6a7b8c9d0e1f2a3b4c5d6e7f8a9b0"]}',
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/forums"
headers = {
"Authorization": "Bearer 1000.03xxxxxxxxxxxxxxxxxa5317.dxxxxxxxxxxxxxxxxxfa",
"Content-Type": "application/json",
}
payload = '{"title":"Software Development Project Discussion","content":"Please review the updated project scope and share your feedback by end of day.","category_id":"8000000041081","tags":["8000000041135"],"flag":"internal","type":"normal","is_sticky":true,"is_announcement":false,"notify":["8000000002001"],"attachment_ids":["8000000094011"],"thirdparty_id":["a1b2c3d4e5f6a7b8c9d0e1f2a3b4c5d6e7f8a9b0"]}'
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/forums");
curl_easy_setopt(curl, CURLOPT_HTTPHEADER, headers);
curl_easy_setopt(curl, CURLOPT_CUSTOMREQUEST, "POST");
curl_easy_setopt(curl, CURLOPT_POSTFIELDS, "{\"title\":\"Software Development Project Discussion\",\"content\":\"Please review the updated project scope and share your feedback by end of day.\",\"category_id\":\"8000000041081\",\"tags\":[\"8000000041135\"],\"flag\":\"internal\",\"type\":\"normal\",\"is_sticky\":true,\"is_announcement\":false,\"notify\":[\"8000000002001\"],\"attachment_ids\":[\"8000000094011\"],\"thirdparty_id\":[\"a1b2c3d4e5f6a7b8c9d0e1f2a3b4c5d6e7f8a9b0\"]}");
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/forums");
request.Content = new StringContent(
@"{""title"":""Software Development Project Discussion"",""content"":""Please review the updated project scope and share your feedback by end of day."",""category_id"":""8000000041081"",""tags"":[""8000000041135""],""flag"":""internal"",""type"":""normal"",""is_sticky"":true,""is_announcement"":false,""notify"":[""8000000002001""],""attachment_ids"":[""8000000094011""],""thirdparty_id"":[""a1b2c3d4e5f6a7b8c9d0e1f2a3b4c5d6e7f8a9b0""]}",
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/forums");
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, "{\"title\":\"Software Development Project Discussion\",\"content\":\"Please review the updated project scope and share your feedback by end of day.\",\"category_id\":\"8000000041081\",\"tags\":[\"8000000041135\"],\"flag\":\"internal\",\"type\":\"normal\",\"is_sticky\":true,\"is_announcement\":false,\"notify\":[\"8000000002001\"],\"attachment_ids\":[\"8000000094011\"],\"thirdparty_id\":[\"a1b2c3d4e5f6a7b8c9d0e1f2a3b4c5d6e7f8a9b0\"]}");
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/forums"
{:headers {"Authorization" "Bearer 1000.03xxxxxxxxxxxxxxxxxa5317.dxxxxxxxxxxxxxxxxxfa"
"Content-Type" "application/json"}
:body "{\"title\":\"Software Development Project Discussion\",\"content\":\"Please review the updated project scope and share your feedback by end of day.\",\"category_id\":\"8000000041081\",\"tags\":[\"8000000041135\"],\"flag\":\"internal\",\"type\":\"normal\",\"is_sticky\":true,\"is_announcement\":false,\"notify\":[\"8000000002001\"],\"attachment_ids\":[\"8000000094011\"],\"thirdparty_id\":[\"a1b2c3d4e5f6a7b8c9d0e1f2a3b4c5d6e7f8a9b0\"]}"
:as :json}))
(println (:body response))
package main
import (
"fmt"
"io"
"net/http"
"strings"
)
func main() {
payload := strings.NewReader("{\"title\":\"Software Development Project Discussion\",\"content\":\"Please review the updated project scope and share your feedback by end of day.\",\"category_id\":\"8000000041081\",\"tags\":[\"8000000041135\"],\"flag\":\"internal\",\"type\":\"normal\",\"is_sticky\":true,\"is_announcement\":false,\"notify\":[\"8000000002001\"],\"attachment_ids\":[\"8000000094011\"],\"thirdparty_id\":[\"a1b2c3d4e5f6a7b8c9d0e1f2a3b4c5d6e7f8a9b0\"]}")
req, _ := http.NewRequest("POST", "https://projects.zoho.com/api/v3/portal/[PORTAL_ID]/projects/23806000097545166/forums", 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/forums HTTP/1.1
Host: https://projects.zoho.com/api/v3/portal/[PORTAL_ID]/projects/23806000097545166/forums
Authorization: Bearer 1000.03xxxxxxxxxxxxxxxxxa5317.dxxxxxxxxxxxxxxxxxfa
Content-Type: application/json
{"title":"Software Development Project Discussion","content":"Please review the updated project scope and share your feedback by end of day.","category_id":"8000000041081","tags":["8000000041135"],"flag":"internal","type":"normal","is_sticky":true,"is_announcement":false,"notify":["8000000002001"],"attachment_ids":["8000000094011"],"thirdparty_id":["a1b2c3d4e5f6a7b8c9d0e1f2a3b4c5d6e7f8a9b0"]}
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/forums");
HttpUriRequest requestObj = new HttpPost(uriBuilder.build());
requestObj.addHeader("Authorization", "Bearer 1000.03xxxxxxxxxxxxxxxxxa5317.dxxxxxxxxxxxxxxxxxfa");
HttpEntityEnclosingRequestBase requestBase = (HttpEntityEnclosingRequestBase) requestObj;
String requestBody = "{\"title\":\"Software Development Project Discussion\",\"content\":\"Please review the updated project scope and share your feedback by end of day.\",\"category_id\":\"8000000041081\",\"tags\":[\"8000000041135\"],\"flag\":\"internal\",\"type\":\"normal\",\"is_sticky\":true,\"is_announcement\":false,\"notify\":[\"8000000002001\"],\"attachment_ids\":[\"8000000094011\"],\"thirdparty_id\":[\"a1b2c3d4e5f6a7b8c9d0e1f2a3b4c5d6e7f8a9b0\"]}";
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/forums';
const options = {
method: 'POST',
headers: {
'Authorization': 'Bearer 1000.03xxxxxxxxxxxxxxxxxa5317.dxxxxxxxxxxxxxxxxxfa',
'Content-Type': 'application/json'
},
body: JSON.stringify({"title":"Software Development Project Discussion","content":"Please review the updated project scope and share your feedback by end of day.","category_id":"8000000041081","tags":["8000000041135"],"flag":"internal","type":"normal","is_sticky":true,"is_announcement":false,"notify":["8000000002001"],"attachment_ids":["8000000094011"],"thirdparty_id":["a1b2c3d4e5f6a7b8c9d0e1f2a3b4c5d6e7f8a9b0"]})
};
fetch(url, options)
.then(response => response.json())
.then(data => console.log(data))
.catch(error => console.error(error));
{"title":"Software Development Project Discussion","content":"Please review the updated project scope and share your feedback by end of day.","category_id":"8000000041081","tags":["8000000041135"],"flag":"internal","type":"normal","is_sticky":true,"is_announcement":false,"notify":["8000000002001"],"attachment_ids":["8000000094011"],"thirdparty_id":["a1b2c3d4e5f6a7b8c9d0e1f2a3b4c5d6e7f8a9b0"]}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/forums")
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("""{"title":"Software Development Project Discussion","content":"Please review the updated project scope and share your feedback by end of day.","category_id":"8000000041081","tags":["8000000041135"],"flag":"internal","type":"normal","is_sticky":true,"is_announcement":false,"notify":["8000000002001"],"attachment_ids":["8000000094011"],"thirdparty_id":["a1b2c3d4e5f6a7b8c9d0e1f2a3b4c5d6e7f8a9b0"]}""") }
val response = conn.inputStream.bufferedReader().readText()
println(response)
}
NSURL *url = [NSURL URLWithString:@"https://projects.zoho.com/api/v3/portal/[PORTAL_ID]/projects/23806000097545166/forums"];
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 = [@"{\"title\":\"Software Development Project Discussion\",\"content\":\"Please review the updated project scope and share your feedback by end of day.\",\"category_id\":\"8000000041081\",\"tags\":[\"8000000041135\"],\"flag\":\"internal\",\"type\":\"normal\",\"is_sticky\":true,\"is_announcement\":false,\"notify\":[\"8000000002001\"],\"attachment_ids\":[\"8000000094011\"],\"thirdparty_id\":[\"a1b2c3d4e5f6a7b8c9d0e1f2a3b4c5d6e7f8a9b0\"]}" 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/forums" 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|{"title":"Software Development Project Discussion","content":"Please review the updated project scope and share your feedback by end of day.","category_id":"8000000041081","tags":["8000000041135"],"flag":"internal","type":"normal","is_sticky":true,"is_announcement":false,"notify":["8000000002001"],"attachment_ids":["8000000094011"],"thirdparty_id":["a1b2c3d4e5f6a7b8c9d0e1f2a3b4c5d6e7f8a9b0"]}|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 = @'
{"title":"Software Development Project Discussion","content":"Please review the updated project scope and share your feedback by end of day.","category_id":"8000000041081","tags":["8000000041135"],"flag":"internal","type":"normal","is_sticky":true,"is_announcement":false,"notify":["8000000002001"],"attachment_ids":["8000000094011"],"thirdparty_id":["a1b2c3d4e5f6a7b8c9d0e1f2a3b4c5d6e7f8a9b0"]}
'@
$response = Invoke-RestMethod -Uri "https://projects.zoho.com/api/v3/portal/[PORTAL_ID]/projects/23806000097545166/forums" -Method POST -Headers $headers -Body $body
$response | ConvertTo-Json
library(httr)
url <- "https://projects.zoho.com/api/v3/portal/[PORTAL_ID]/projects/23806000097545166/forums"
response <- POST(
url,
add_headers(Authorization = "Bearer 1000.03xxxxxxxxxxxxxxxxxa5317.dxxxxxxxxxxxxxxxxxfa"),
content_type_json(),
body = "{\"title\":\"Software Development Project Discussion\",\"content\":\"Please review the updated project scope and share your feedback by end of day.\",\"category_id\":\"8000000041081\",\"tags\":[\"8000000041135\"],\"flag\":\"internal\",\"type\":\"normal\",\"is_sticky\":true,\"is_announcement\":false,\"notify\":[\"8000000002001\"],\"attachment_ids\":[\"8000000094011\"],\"thirdparty_id\":[\"a1b2c3d4e5f6a7b8c9d0e1f2a3b4c5d6e7f8a9b0\"]}"
)
content(response, "text")
import Foundation
let url = URL(string: "https://projects.zoho.com/api/v3/portal/[PORTAL_ID]/projects/23806000097545166/forums")!
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 = """
{"title":"Software Development Project Discussion","content":"Please review the updated project scope and share your feedback by end of day.","category_id":"8000000041081","tags":["8000000041135"],"flag":"internal","type":"normal","is_sticky":true,"is_announcement":false,"notify":["8000000002001"],"attachment_ids":["8000000094011"],"thirdparty_id":["a1b2c3d4e5f6a7b8c9d0e1f2a3b4c5d6e7f8a9b0"]}
""".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 forum in a specific project. Use this API to modify the details of an existing forum within a project.
OAuth Scope:
ZohoProjects.forums.UPDATE
String
requiredUnique, immutable identifier of the portal in Zoho Projects. You can obtain it from the Get Portals API (the "id" field in the response).
String
requiredUnique, immutable identifier of the project within the specified portal. You can obtain it from the Get Projects API (the "id" field in the response).
String
requiredIdentifier of a forum. Obtained from the Get Forums API - the "id" field in the response corresponds to forum_id.
String
max length : 100Enter the forum title
String
Enter the forum content
String
Enter the project category ID You can obtain it from the Get Forum Categories API (the "id" field in the response).
JSONArray
max length : 7000Enter the tags to add to the forum post
String
Mark the forum as internal (visible only to project users) or external (visible to both project and client users) Accepted values: internal,external
String
Enter the forum type Accepted values: normal,question
boolean
Specify whether to mark the post as sticky Accepted values: true,false
boolean
Specify whether to mark the post as announcement Accepted values: true,false
JSONArray
max length : 7000Enter the attachment IDs You can obtain it from the Get Project Attachments API (the "attachment_id" field in the response).
JSONArray
max length : 7000Enter the attachment IDs to remove You can obtain it from the Get Project Attachments API (the "attachment_id" field in the response).
JSONArray
max length : 2500Enter the WorkDrive resource IDs of the files to associate. The WorkDrive resource ID is different from the attachment ID in Zoho Projects. Up to 50 IDs can be passed in a single request. To retrieve the resource ID, refer to the (WorkDrive Upload Large File API). Users without upload permission to the folder or team folder can upload files up to 20 MB only.
Request Example
curl -X PATCH \
'https://projects.zoho.com/api/v3/portal/[PORTAL_ID]/projects/23806000097545166/forums/[FORUM_ID]' \
-H 'Authorization: Bearer 1000.03xxxxxxxxxxxxxxxxxa5317.dxxxxxxxxxxxxxxxxxfa' \
-H 'Content-Type: application/json' \
-d '{"title":"Software Development Project Discussion","content":"Please review the updated project scope and share your feedback by end of day.","category_id":"8000000041081","tags":["8000000041135"],"flag":"internal","type":"normal","is_sticky":true,"is_announcement":false,"attachment_ids":["8000000094011"],"delete_attachment_ids":["8000000094011"],"thirdparty_id":["a1b2c3d4e5f6a7b8c9d0e1f2a3b4c5d6e7f8a9b0"]}'
url = "https://projects.zoho.com/api/v3/portal/[PORTAL_ID]/projects/23806000097545166/forums/[FORUM_ID]";
params = Map();
params.put("title", "Software Development Project Discussion");
params.put("content", "Please review the updated project scope and share your feedback by end of day.");
params.put("category_id", "8000000041081");
params.put("tags", ["8000000041135"]);
params.put("flag", "internal");
params.put("type", "normal");
params.put("is_sticky", true);
params.put("is_announcement", false);
params.put("attachment_ids", ["8000000094011"]);
params.put("delete_attachment_ids", ["8000000094011"]);
params.put("thirdparty_id", ["a1b2c3d4e5f6a7b8c9d0e1f2a3b4c5d6e7f8a9b0"]);
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/forums/[FORUM_ID]');
const payload = JSON.stringify({"title":"Software Development Project Discussion","content":"Please review the updated project scope and share your feedback by end of day.","category_id":"8000000041081","tags":["8000000041135"],"flag":"internal","type":"normal","is_sticky":true,"is_announcement":false,"attachment_ids":["8000000094011"],"delete_attachment_ids":["8000000094011"],"thirdparty_id":["a1b2c3d4e5f6a7b8c9d0e1f2a3b4c5d6e7f8a9b0"]});
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/forums/[FORUM_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 = '{"title":"Software Development Project Discussion","content":"Please review the updated project scope and share your feedback by end of day.","category_id":"8000000041081","tags":["8000000041135"],"flag":"internal","type":"normal","is_sticky":true,"is_announcement":false,"attachment_ids":["8000000094011"],"delete_attachment_ids":["8000000094011"],"thirdparty_id":["a1b2c3d4e5f6a7b8c9d0e1f2a3b4c5d6e7f8a9b0"]}'
response = http.request(request)
puts response.read_body
<?php
$url = "https://projects.zoho.com/api/v3/portal/[PORTAL_ID]/projects/23806000097545166/forums/[FORUM_ID]";
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => $url,
CURLOPT_RETURNTRANSFER => true,
CURLOPT_CUSTOMREQUEST => "PATCH",
CURLOPT_POSTFIELDS => '{"title":"Software Development Project Discussion","content":"Please review the updated project scope and share your feedback by end of day.","category_id":"8000000041081","tags":["8000000041135"],"flag":"internal","type":"normal","is_sticky":true,"is_announcement":false,"attachment_ids":["8000000094011"],"delete_attachment_ids":["8000000094011"],"thirdparty_id":["a1b2c3d4e5f6a7b8c9d0e1f2a3b4c5d6e7f8a9b0"]}',
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/forums/[FORUM_ID]"
headers = {
"Authorization": "Bearer 1000.03xxxxxxxxxxxxxxxxxa5317.dxxxxxxxxxxxxxxxxxfa",
"Content-Type": "application/json",
}
payload = '{"title":"Software Development Project Discussion","content":"Please review the updated project scope and share your feedback by end of day.","category_id":"8000000041081","tags":["8000000041135"],"flag":"internal","type":"normal","is_sticky":true,"is_announcement":false,"attachment_ids":["8000000094011"],"delete_attachment_ids":["8000000094011"],"thirdparty_id":["a1b2c3d4e5f6a7b8c9d0e1f2a3b4c5d6e7f8a9b0"]}'
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/forums/[FORUM_ID]");
curl_easy_setopt(curl, CURLOPT_HTTPHEADER, headers);
curl_easy_setopt(curl, CURLOPT_CUSTOMREQUEST, "PATCH");
curl_easy_setopt(curl, CURLOPT_POSTFIELDS, "{\"title\":\"Software Development Project Discussion\",\"content\":\"Please review the updated project scope and share your feedback by end of day.\",\"category_id\":\"8000000041081\",\"tags\":[\"8000000041135\"],\"flag\":\"internal\",\"type\":\"normal\",\"is_sticky\":true,\"is_announcement\":false,\"attachment_ids\":[\"8000000094011\"],\"delete_attachment_ids\":[\"8000000094011\"],\"thirdparty_id\":[\"a1b2c3d4e5f6a7b8c9d0e1f2a3b4c5d6e7f8a9b0\"]}");
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/forums/[FORUM_ID]");
request.Content = new StringContent(
@"{""title"":""Software Development Project Discussion"",""content"":""Please review the updated project scope and share your feedback by end of day."",""category_id"":""8000000041081"",""tags"":[""8000000041135""],""flag"":""internal"",""type"":""normal"",""is_sticky"":true,""is_announcement"":false,""attachment_ids"":[""8000000094011""],""delete_attachment_ids"":[""8000000094011""],""thirdparty_id"":[""a1b2c3d4e5f6a7b8c9d0e1f2a3b4c5d6e7f8a9b0""]}",
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/forums/[FORUM_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, "{\"title\":\"Software Development Project Discussion\",\"content\":\"Please review the updated project scope and share your feedback by end of day.\",\"category_id\":\"8000000041081\",\"tags\":[\"8000000041135\"],\"flag\":\"internal\",\"type\":\"normal\",\"is_sticky\":true,\"is_announcement\":false,\"attachment_ids\":[\"8000000094011\"],\"delete_attachment_ids\":[\"8000000094011\"],\"thirdparty_id\":[\"a1b2c3d4e5f6a7b8c9d0e1f2a3b4c5d6e7f8a9b0\"]}");
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/forums/[FORUM_ID]"
{:headers {"Authorization" "Bearer 1000.03xxxxxxxxxxxxxxxxxa5317.dxxxxxxxxxxxxxxxxxfa"
"Content-Type" "application/json"}
:body "{\"title\":\"Software Development Project Discussion\",\"content\":\"Please review the updated project scope and share your feedback by end of day.\",\"category_id\":\"8000000041081\",\"tags\":[\"8000000041135\"],\"flag\":\"internal\",\"type\":\"normal\",\"is_sticky\":true,\"is_announcement\":false,\"attachment_ids\":[\"8000000094011\"],\"delete_attachment_ids\":[\"8000000094011\"],\"thirdparty_id\":[\"a1b2c3d4e5f6a7b8c9d0e1f2a3b4c5d6e7f8a9b0\"]}"
:as :json}))
(println (:body response))
package main
import (
"fmt"
"io"
"net/http"
"strings"
)
func main() {
payload := strings.NewReader("{\"title\":\"Software Development Project Discussion\",\"content\":\"Please review the updated project scope and share your feedback by end of day.\",\"category_id\":\"8000000041081\",\"tags\":[\"8000000041135\"],\"flag\":\"internal\",\"type\":\"normal\",\"is_sticky\":true,\"is_announcement\":false,\"attachment_ids\":[\"8000000094011\"],\"delete_attachment_ids\":[\"8000000094011\"],\"thirdparty_id\":[\"a1b2c3d4e5f6a7b8c9d0e1f2a3b4c5d6e7f8a9b0\"]}")
req, _ := http.NewRequest("PATCH", "https://projects.zoho.com/api/v3/portal/[PORTAL_ID]/projects/23806000097545166/forums/[FORUM_ID]", payload)
req.Header.Add("Authorization", "Bearer 1000.03xxxxxxxxxxxxxxxxxa5317.dxxxxxxxxxxxxxxxxxfa")
req.Header.Add("Content-Type", "application/json")
resp, _ := http.DefaultClient.Do(req)
defer resp.Body.Close()
body, _ := io.ReadAll(resp.Body)
fmt.Println(string(body))
}
PATCH https://projects.zoho.com/api/v3/portal/[PORTAL_ID]/projects/23806000097545166/forums/[FORUM_ID] HTTP/1.1
Host: https://projects.zoho.com/api/v3/portal/[PORTAL_ID]/projects/23806000097545166/forums/[FORUM_ID]
Authorization: Bearer 1000.03xxxxxxxxxxxxxxxxxa5317.dxxxxxxxxxxxxxxxxxfa
Content-Type: application/json
{"title":"Software Development Project Discussion","content":"Please review the updated project scope and share your feedback by end of day.","category_id":"8000000041081","tags":["8000000041135"],"flag":"internal","type":"normal","is_sticky":true,"is_announcement":false,"attachment_ids":["8000000094011"],"delete_attachment_ids":["8000000094011"],"thirdparty_id":["a1b2c3d4e5f6a7b8c9d0e1f2a3b4c5d6e7f8a9b0"]}
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/forums/[FORUM_ID]");
HttpUriRequest requestObj = new HttpPatch(uriBuilder.build());
requestObj.addHeader("Authorization", "Bearer 1000.03xxxxxxxxxxxxxxxxxa5317.dxxxxxxxxxxxxxxxxxfa");
HttpEntityEnclosingRequestBase requestBase = (HttpEntityEnclosingRequestBase) requestObj;
String requestBody = "{\"title\":\"Software Development Project Discussion\",\"content\":\"Please review the updated project scope and share your feedback by end of day.\",\"category_id\":\"8000000041081\",\"tags\":[\"8000000041135\"],\"flag\":\"internal\",\"type\":\"normal\",\"is_sticky\":true,\"is_announcement\":false,\"attachment_ids\":[\"8000000094011\"],\"delete_attachment_ids\":[\"8000000094011\"],\"thirdparty_id\":[\"a1b2c3d4e5f6a7b8c9d0e1f2a3b4c5d6e7f8a9b0\"]}";
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/forums/[FORUM_ID]';
const options = {
method: 'PATCH',
headers: {
'Authorization': 'Bearer 1000.03xxxxxxxxxxxxxxxxxa5317.dxxxxxxxxxxxxxxxxxfa',
'Content-Type': 'application/json'
},
body: JSON.stringify({"title":"Software Development Project Discussion","content":"Please review the updated project scope and share your feedback by end of day.","category_id":"8000000041081","tags":["8000000041135"],"flag":"internal","type":"normal","is_sticky":true,"is_announcement":false,"attachment_ids":["8000000094011"],"delete_attachment_ids":["8000000094011"],"thirdparty_id":["a1b2c3d4e5f6a7b8c9d0e1f2a3b4c5d6e7f8a9b0"]})
};
fetch(url, options)
.then(response => response.json())
.then(data => console.log(data))
.catch(error => console.error(error));
{"title":"Software Development Project Discussion","content":"Please review the updated project scope and share your feedback by end of day.","category_id":"8000000041081","tags":["8000000041135"],"flag":"internal","type":"normal","is_sticky":true,"is_announcement":false,"attachment_ids":["8000000094011"],"delete_attachment_ids":["8000000094011"],"thirdparty_id":["a1b2c3d4e5f6a7b8c9d0e1f2a3b4c5d6e7f8a9b0"]}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/forums/[FORUM_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("""{"title":"Software Development Project Discussion","content":"Please review the updated project scope and share your feedback by end of day.","category_id":"8000000041081","tags":["8000000041135"],"flag":"internal","type":"normal","is_sticky":true,"is_announcement":false,"attachment_ids":["8000000094011"],"delete_attachment_ids":["8000000094011"],"thirdparty_id":["a1b2c3d4e5f6a7b8c9d0e1f2a3b4c5d6e7f8a9b0"]}""") }
val response = conn.inputStream.bufferedReader().readText()
println(response)
}
NSURL *url = [NSURL URLWithString:@"https://projects.zoho.com/api/v3/portal/[PORTAL_ID]/projects/23806000097545166/forums/[FORUM_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 = [@"{\"title\":\"Software Development Project Discussion\",\"content\":\"Please review the updated project scope and share your feedback by end of day.\",\"category_id\":\"8000000041081\",\"tags\":[\"8000000041135\"],\"flag\":\"internal\",\"type\":\"normal\",\"is_sticky\":true,\"is_announcement\":false,\"attachment_ids\":[\"8000000094011\"],\"delete_attachment_ids\":[\"8000000094011\"],\"thirdparty_id\":[\"a1b2c3d4e5f6a7b8c9d0e1f2a3b4c5d6e7f8a9b0\"]}" 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/forums/[FORUM_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|{"title":"Software Development Project Discussion","content":"Please review the updated project scope and share your feedback by end of day.","category_id":"8000000041081","tags":["8000000041135"],"flag":"internal","type":"normal","is_sticky":true,"is_announcement":false,"attachment_ids":["8000000094011"],"delete_attachment_ids":["8000000094011"],"thirdparty_id":["a1b2c3d4e5f6a7b8c9d0e1f2a3b4c5d6e7f8a9b0"]}|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 = @'
{"title":"Software Development Project Discussion","content":"Please review the updated project scope and share your feedback by end of day.","category_id":"8000000041081","tags":["8000000041135"],"flag":"internal","type":"normal","is_sticky":true,"is_announcement":false,"attachment_ids":["8000000094011"],"delete_attachment_ids":["8000000094011"],"thirdparty_id":["a1b2c3d4e5f6a7b8c9d0e1f2a3b4c5d6e7f8a9b0"]}
'@
$response = Invoke-RestMethod -Uri "https://projects.zoho.com/api/v3/portal/[PORTAL_ID]/projects/23806000097545166/forums/[FORUM_ID]" -Method PATCH -Headers $headers -Body $body
$response | ConvertTo-Json
library(httr)
url <- "https://projects.zoho.com/api/v3/portal/[PORTAL_ID]/projects/23806000097545166/forums/[FORUM_ID]"
response <- PATCH(
url,
add_headers(Authorization = "Bearer 1000.03xxxxxxxxxxxxxxxxxa5317.dxxxxxxxxxxxxxxxxxfa"),
content_type_json(),
body = "{\"title\":\"Software Development Project Discussion\",\"content\":\"Please review the updated project scope and share your feedback by end of day.\",\"category_id\":\"8000000041081\",\"tags\":[\"8000000041135\"],\"flag\":\"internal\",\"type\":\"normal\",\"is_sticky\":true,\"is_announcement\":false,\"attachment_ids\":[\"8000000094011\"],\"delete_attachment_ids\":[\"8000000094011\"],\"thirdparty_id\":[\"a1b2c3d4e5f6a7b8c9d0e1f2a3b4c5d6e7f8a9b0\"]}"
)
content(response, "text")
import Foundation
let url = URL(string: "https://projects.zoho.com/api/v3/portal/[PORTAL_ID]/projects/23806000097545166/forums/[FORUM_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 = """
{"title":"Software Development Project Discussion","content":"Please review the updated project scope and share your feedback by end of day.","category_id":"8000000041081","tags":["8000000041135"],"flag":"internal","type":"normal","is_sticky":true,"is_announcement":false,"attachment_ids":["8000000094011"],"delete_attachment_ids":["8000000094011"],"thirdparty_id":["a1b2c3d4e5f6a7b8c9d0e1f2a3b4c5d6e7f8a9b0"]}
""".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
Delete a forum from a specific project. Use this API to permanently remove a forum and its content from a project.
OAuth Scope:
ZohoProjects.forums.DELETE
String
requiredUnique, immutable identifier of the portal in Zoho Projects. You can obtain it from the Get Portals API (the "id" field in the response).
String
requiredUnique, immutable identifier of the project within the specified portal. You can obtain it from the Get Projects API (the "id" field in the response).
String
requiredIdentifier of a forum. Obtained from the Get Forums API - the "id" field in the response corresponds to forum_id.
Request Example
curl -X DELETE \
'https://projects.zoho.com/api/v3/portal/[PORTAL_ID]/projects/23806000097545166/forums/[FORUM_ID]' \
-H 'Authorization: Bearer 1000.03xxxxxxxxxxxxxxxxxa5317.dxxxxxxxxxxxxxxxxxfa'
url = "https://projects.zoho.com/api/v3/portal/[PORTAL_ID]/projects/23806000097545166/forums/[FORUM_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/forums/[FORUM_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/forums/[FORUM_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/forums/[FORUM_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/forums/[FORUM_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/forums/[FORUM_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/forums/[FORUM_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/forums/[FORUM_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/forums/[FORUM_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/forums/[FORUM_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/forums/[FORUM_ID] HTTP/1.1
Host: https://projects.zoho.com/api/v3/portal/[PORTAL_ID]/projects/23806000097545166/forums/[FORUM_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/forums/[FORUM_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/forums/[FORUM_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/forums/[FORUM_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/forums/[FORUM_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/forums/[FORUM_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/forums/[FORUM_ID]" -Method DELETE -Headers $headers
$response | ConvertTo-Json
library(httr)
url <- "https://projects.zoho.com/api/v3/portal/[PORTAL_ID]/projects/23806000097545166/forums/[FORUM_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/forums/[FORUM_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