Teams
This module covers team management related operations within Zoho Projects. Use this API to manage teams, get team details, associate them with projects, and update team meta details.
This module covers team management related operations within Zoho Projects. Use this API to manage teams, get team details, associate them with projects, and update team meta details.
Retrieve all teams in a specific portal. Use this API to access the list of teams and their details within a portal.
OAuth Scope:
ZohoProjects.teams.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
Enter the team ID.
String
Enter a search term to filter teams by name.
int
default : 1Enter the page number to retrieve.
int
limit : 1-200Enter the number of entries to be displayed per page.
String
Enter the last modified time to retrieve teams created or modified at or after this time.
String
Enter the sort order. Accepted values: ASC(field_name) or DESC(field_name)
Request Example
curl -X GET \
'https://projects.zoho.com/api/v3/portal/[PORTAL_ID]/teams?id=4000000062001&search_term=Zoho+Projects&page=1&per_page=10&last_modified_time=&sort_by=ASC%28last_modified_time%29' \
-H 'Authorization: Bearer 1000.03xxxxxxxxxxxxxxxxxa5317.dxxxxxxxxxxxxxxxxxfa'
url = "https://projects.zoho.com/api/v3/portal/[PORTAL_ID]/teams";
params = Map();
params.put("id", "4000000062001");
params.put("search_term", "Zoho Projects");
params.put("page", "1");
params.put("per_page", "10");
params.put("last_modified_time", "");
params.put("sort_by", "ASC(last_modified_time)");
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]/teams');
url.searchParams.append('id', '4000000062001');
url.searchParams.append('search_term', 'Zoho Projects');
url.searchParams.append('page', '1');
url.searchParams.append('per_page', '10');
url.searchParams.append('last_modified_time', '');
url.searchParams.append('sort_by', 'ASC(last_modified_time)');
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]/teams")
params = {
"id" => "4000000062001",
"search_term" => "Zoho Projects",
"page" => "1",
"per_page" => "10",
"last_modified_time" => "",
"sort_by" => "ASC(last_modified_time)"
}
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 = [
'id' => '4000000062001',
'search_term' => 'Zoho Projects',
'page' => '1',
'per_page' => '10',
'last_modified_time' => '',
'sort_by' => 'ASC(last_modified_time)',
];
$url = "https://projects.zoho.com/api/v3/portal/[PORTAL_ID]/teams" . "?" . 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]/teams"
params = {
"id": "4000000062001",
"search_term": "Zoho Projects",
"page": "1",
"per_page": "10",
"last_modified_time": "",
"sort_by": "ASC(last_modified_time)"
}
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_id = curl_easy_escape(curl, "4000000062001", 0);
char *enc_search_term = curl_easy_escape(curl, "Zoho Projects", 0);
char *enc_page = curl_easy_escape(curl, "1", 0);
char *enc_per_page = curl_easy_escape(curl, "10", 0);
char *enc_last_modified_time = curl_easy_escape(curl, "", 0);
char *enc_sort_by = curl_easy_escape(curl, "ASC(last_modified_time)", 0);
char url[2048];
snprintf(url, sizeof(url), "https://projects.zoho.com/api/v3/portal/[PORTAL_ID]/teams?id=%s&search_term=%s&page=%s&per_page=%s&last_modified_time=%s&sort_by=%s", enc_id, enc_search_term, enc_page, enc_per_page, enc_last_modified_time, enc_sort_by);
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_id);
curl_free(enc_search_term);
curl_free(enc_page);
curl_free(enc_per_page);
curl_free(enc_last_modified_time);
curl_free(enc_sort_by);
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["id"] = "4000000062001";
query["search_term"] = "Zoho Projects";
query["page"] = "1";
query["per_page"] = "10";
query["last_modified_time"] = "";
query["sort_by"] = "ASC(last_modified_time)";
var uriBuilder = new UriBuilder("https://projects.zoho.com/api/v3/portal/[PORTAL_ID]/teams") { 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_id = curl_easy_escape(curl, "4000000062001", 0);
char* enc_search_term = curl_easy_escape(curl, "Zoho Projects", 0);
char* enc_page = curl_easy_escape(curl, "1", 0);
char* enc_per_page = curl_easy_escape(curl, "10", 0);
char* enc_last_modified_time = curl_easy_escape(curl, "", 0);
char* enc_sort_by = curl_easy_escape(curl, "ASC(last_modified_time)", 0);
std::string url = "https://projects.zoho.com/api/v3/portal/[PORTAL_ID]/teams";
url += "?id=" + std::string(enc_id);
url += "&search_term=" + std::string(enc_search_term);
url += "&page=" + std::string(enc_page);
url += "&per_page=" + std::string(enc_per_page);
url += "&last_modified_time=" + std::string(enc_last_modified_time);
url += "&sort_by=" + std::string(enc_sort_by);
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_id);
curl_free(enc_search_term);
curl_free(enc_page);
curl_free(enc_per_page);
curl_free(enc_last_modified_time);
curl_free(enc_sort_by);
curl_slist_free_all(headers);
curl_easy_cleanup(curl);
}
return 0;
}
(require '[clj-http.client :as client])
(let [enc-id (java.net.URLEncoder/encode "4000000062001" "UTF-8")
enc-search_term (java.net.URLEncoder/encode "Zoho Projects" "UTF-8")
enc-page (java.net.URLEncoder/encode "1" "UTF-8")
enc-per_page (java.net.URLEncoder/encode "10" "UTF-8")
enc-last_modified_time (java.net.URLEncoder/encode "" "UTF-8")
enc-sort_by (java.net.URLEncoder/encode "ASC(last_modified_time)" "UTF-8")
url (str "https://projects.zoho.com/api/v3/portal/[PORTAL_ID]/teams" "?id=" enc-id "&search_term=" enc-search_term "&page=" enc-page "&per_page=" enc-per_page "&last_modified_time=" enc-last_modified_time "&sort_by=" enc-sort_by)]
(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]/teams", nil)
q := req.URL.Query()
q.Add("id", "4000000062001")
q.Add("search_term", "Zoho Projects")
q.Add("page", "1")
q.Add("per_page", "10")
q.Add("last_modified_time", "")
q.Add("sort_by", "ASC(last_modified_time)")
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]/teams?id=4000000062001&search_term=Zoho+Projects&page=1&per_page=10&last_modified_time=&sort_by=ASC%28last_modified_time%29 HTTP/1.1
Host: https://projects.zoho.com/api/v3/portal/[PORTAL_ID]/teams?id=4000000062001&search_term=Zoho+Projects&page=1&per_page=10&last_modified_time=&sort_by=ASC%28last_modified_time%29
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]/teams");
uriBuilder.addParameter("id", "4000000062001");
uriBuilder.addParameter("search_term", "Zoho Projects");
uriBuilder.addParameter("page", "1");
uriBuilder.addParameter("per_page", "10");
uriBuilder.addParameter("last_modified_time", "");
uriBuilder.addParameter("sort_by", "ASC(last_modified_time)");
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]/teams';
const params = new URLSearchParams({
'id': '4000000062001',
'search_term': 'Zoho Projects',
'page': '1',
'per_page': '10',
'last_modified_time': '',
'sort_by': 'ASC(last_modified_time)'
});
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));
id = "4000000062001"
search_term = "Zoho Projects"
page = "1"
per_page = "10"
last_modified_time = ""
sort_by = "ASC(last_modified_time)"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]/teams".toHttpUrl().newBuilder()
urlBuilder.addQueryParameter("id", "4000000062001")
urlBuilder.addQueryParameter("search_term", "Zoho Projects")
urlBuilder.addQueryParameter("page", "1")
urlBuilder.addQueryParameter("per_page", "10")
urlBuilder.addQueryParameter("last_modified_time", "")
urlBuilder.addQueryParameter("sort_by", "ASC(last_modified_time)")
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 *encodedId = [@"4000000062001" stringByAddingPercentEncodingWithAllowedCharacters:[NSCharacterSet URLQueryAllowedCharacterSet]];
NSString *encodedSearch_term = [@"Zoho Projects" stringByAddingPercentEncodingWithAllowedCharacters:[NSCharacterSet URLQueryAllowedCharacterSet]];
NSString *encodedPage = [@"1" stringByAddingPercentEncodingWithAllowedCharacters:[NSCharacterSet URLQueryAllowedCharacterSet]];
NSString *encodedPer_page = [@"10" stringByAddingPercentEncodingWithAllowedCharacters:[NSCharacterSet URLQueryAllowedCharacterSet]];
NSString *encodedLast_modified_time = [@"" stringByAddingPercentEncodingWithAllowedCharacters:[NSCharacterSet URLQueryAllowedCharacterSet]];
NSString *encodedSort_by = [@"ASC(last_modified_time)" stringByAddingPercentEncodingWithAllowedCharacters:[NSCharacterSet URLQueryAllowedCharacterSet]];
NSString *urlString = [NSString stringWithFormat:@"https://projects.zoho.com/api/v3/portal/[PORTAL_ID]/teams?id=%@&search_term=%@&page=%@&per_page=%@&last_modified_time=%@&sort_by=%@", encodedId, encodedSearch_term, encodedPage, encodedPer_page, encodedLast_modified_time, encodedSort_by];
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_id = Uri.pct_encode "4000000062001" in
let enc_search_term = Uri.pct_encode "Zoho Projects" in
let enc_page = Uri.pct_encode "1" in
let enc_per_page = Uri.pct_encode "10" in
let enc_last_modified_time = Uri.pct_encode "" in
let enc_sort_by = Uri.pct_encode "ASC(last_modified_time)" in
let uri = Uri.of_string ("https://projects.zoho.com/api/v3/portal/[PORTAL_ID]/teams" ^ "?id=" ^ enc_id ^ "&search_term=" ^ enc_search_term ^ "&page=" ^ enc_page ^ "&per_page=" ^ enc_per_page ^ "&last_modified_time=" ^ enc_last_modified_time ^ "&sort_by=" ^ enc_sort_by) 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 = @{
id = "4000000062001"
search_term = "Zoho Projects"
page = "1"
per_page = "10"
last_modified_time = ""
sort_by = "ASC(last_modified_time)"
}
$queryString = ($params.GetEnumerator() | ForEach-Object { "$($_.Key)=$([System.Uri]::EscapeDataString($_.Value))" }) -join "&"
$url = "https://projects.zoho.com/api/v3/portal/[PORTAL_ID]/teams" + "?" + $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]/teams"
params <- list(
id = "4000000062001",
search_term = "Zoho Projects",
page = "1",
per_page = "10",
last_modified_time = "",
sort_by = "ASC(last_modified_time)"
)
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]/teams")!
components.queryItems = [
URLQueryItem(name: "id", value: "4000000062001"),
URLQueryItem(name: "search_term", value: "Zoho Projects"),
URLQueryItem(name: "page", value: "1"),
URLQueryItem(name: "per_page", value: "10"),
URLQueryItem(name: "last_modified_time", value: ""),
URLQueryItem(name: "sort_by", value: "ASC(last_modified_time)")
]
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 all users across teams in a specific portal. Use this API to access the list of users associated with teams within a portal.
OAuth Scope:
ZohoProjects.teams.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).
JSONArray
Enter the team IDs. You can obtain it from the Get Teams API (the "id" field in the response).
int
default : 1Enter the page number to retrieve.
int
limit : 1-200Enter the number of entries to be displayed per page.
String
Enter the time to retrieve users added to the teams at or after this time.
Request Example
curl -X GET \
'https://projects.zoho.com/api/v3/portal/[PORTAL_ID]/teams/users?team_ids=170658000000605263&page=1&per_page=10&last_modified_time=' \
-H 'Authorization: Bearer 1000.03xxxxxxxxxxxxxxxxxa5317.dxxxxxxxxxxxxxxxxxfa'
url = "https://projects.zoho.com/api/v3/portal/[PORTAL_ID]/teams/users";
params = Map();
params.put("team_ids", "170658000000605263");
params.put("page", "1");
params.put("per_page", "10");
params.put("last_modified_time", "");
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]/teams/users');
url.searchParams.append('team_ids', '170658000000605263');
url.searchParams.append('page', '1');
url.searchParams.append('per_page', '10');
url.searchParams.append('last_modified_time', '');
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]/teams/users")
params = {
"team_ids" => "170658000000605263",
"page" => "1",
"per_page" => "10",
"last_modified_time" => ""
}
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 = [
'team_ids' => '170658000000605263',
'page' => '1',
'per_page' => '10',
'last_modified_time' => '',
];
$url = "https://projects.zoho.com/api/v3/portal/[PORTAL_ID]/teams/users" . "?" . 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]/teams/users"
params = {
"team_ids": "170658000000605263",
"page": "1",
"per_page": "10",
"last_modified_time": ""
}
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_team_ids = curl_easy_escape(curl, "170658000000605263", 0);
char *enc_page = curl_easy_escape(curl, "1", 0);
char *enc_per_page = curl_easy_escape(curl, "10", 0);
char *enc_last_modified_time = curl_easy_escape(curl, "", 0);
char url[2048];
snprintf(url, sizeof(url), "https://projects.zoho.com/api/v3/portal/[PORTAL_ID]/teams/users?team_ids=%s&page=%s&per_page=%s&last_modified_time=%s", enc_team_ids, enc_page, enc_per_page, enc_last_modified_time);
struct curl_slist *headers = NULL;
headers = curl_slist_append(headers, "Authorization: Bearer 1000.03xxxxxxxxxxxxxxxxxa5317.dxxxxxxxxxxxxxxxxxfa");
curl_easy_setopt(curl, CURLOPT_URL, url);
curl_easy_setopt(curl, CURLOPT_HTTPHEADER, headers);
curl_easy_setopt(curl, CURLOPT_CUSTOMREQUEST, "GET");
CURLcode res = curl_easy_perform(curl);
if (res != CURLE_OK)
fprintf(stderr, "curl failed: %s\n", curl_easy_strerror(res));
curl_free(enc_team_ids);
curl_free(enc_page);
curl_free(enc_per_page);
curl_free(enc_last_modified_time);
curl_slist_free_all(headers);
curl_easy_cleanup(curl);
}
return 0;
}
using System.Net.Http;
using System.Text;
using System.Web;
var client = new HttpClient();
client.DefaultRequestHeaders.Add("Authorization", "Bearer 1000.03xxxxxxxxxxxxxxxxxa5317.dxxxxxxxxxxxxxxxxxfa");
var query = HttpUtility.ParseQueryString(string.Empty);
query["team_ids"] = "170658000000605263";
query["page"] = "1";
query["per_page"] = "10";
query["last_modified_time"] = "";
var uriBuilder = new UriBuilder("https://projects.zoho.com/api/v3/portal/[PORTAL_ID]/teams/users") { 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_team_ids = curl_easy_escape(curl, "170658000000605263", 0);
char* enc_page = curl_easy_escape(curl, "1", 0);
char* enc_per_page = curl_easy_escape(curl, "10", 0);
char* enc_last_modified_time = curl_easy_escape(curl, "", 0);
std::string url = "https://projects.zoho.com/api/v3/portal/[PORTAL_ID]/teams/users";
url += "?team_ids=" + std::string(enc_team_ids);
url += "&page=" + std::string(enc_page);
url += "&per_page=" + std::string(enc_per_page);
url += "&last_modified_time=" + std::string(enc_last_modified_time);
struct curl_slist* headers = NULL;
headers = curl_slist_append(headers, "Authorization: Bearer 1000.03xxxxxxxxxxxxxxxxxa5317.dxxxxxxxxxxxxxxxxxfa");
curl_easy_setopt(curl, CURLOPT_URL, url.c_str());
curl_easy_setopt(curl, CURLOPT_HTTPHEADER, headers);
curl_easy_setopt(curl, CURLOPT_CUSTOMREQUEST, "GET");
curl_easy_setopt(curl, CURLOPT_WRITEFUNCTION, WriteCallback);
curl_easy_setopt(curl, CURLOPT_WRITEDATA, &response);
CURLcode res = curl_easy_perform(curl);
if (res == CURLE_OK)
std::cout << response << std::endl;
else
std::cerr << curl_easy_strerror(res) << std::endl;
curl_free(enc_team_ids);
curl_free(enc_page);
curl_free(enc_per_page);
curl_free(enc_last_modified_time);
curl_slist_free_all(headers);
curl_easy_cleanup(curl);
}
return 0;
}
(require '[clj-http.client :as client])
(let [enc-team_ids (java.net.URLEncoder/encode "170658000000605263" "UTF-8")
enc-page (java.net.URLEncoder/encode "1" "UTF-8")
enc-per_page (java.net.URLEncoder/encode "10" "UTF-8")
enc-last_modified_time (java.net.URLEncoder/encode "" "UTF-8")
url (str "https://projects.zoho.com/api/v3/portal/[PORTAL_ID]/teams/users" "?team_ids=" enc-team_ids "&page=" enc-page "&per_page=" enc-per_page "&last_modified_time=" enc-last_modified_time)]
(def response
(client/get url
{:headers {"Authorization" "Bearer 1000.03xxxxxxxxxxxxxxxxxa5317.dxxxxxxxxxxxxxxxxxfa"}
:as :json}))
(println (:body response))
package main
import (
"fmt"
"io"
"net/http"
"net/url"
)
func main() {
req, _ := http.NewRequest("GET", "https://projects.zoho.com/api/v3/portal/[PORTAL_ID]/teams/users", nil)
q := req.URL.Query()
q.Add("team_ids", "170658000000605263")
q.Add("page", "1")
q.Add("per_page", "10")
q.Add("last_modified_time", "")
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]/teams/users?team_ids=170658000000605263&page=1&per_page=10&last_modified_time= HTTP/1.1
Host: https://projects.zoho.com/api/v3/portal/[PORTAL_ID]/teams/users?team_ids=170658000000605263&page=1&per_page=10&last_modified_time=
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]/teams/users");
uriBuilder.addParameter("team_ids", "170658000000605263");
uriBuilder.addParameter("page", "1");
uriBuilder.addParameter("per_page", "10");
uriBuilder.addParameter("last_modified_time", "");
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]/teams/users';
const params = new URLSearchParams({
'team_ids': '170658000000605263',
'page': '1',
'per_page': '10',
'last_modified_time': ''
});
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));
team_ids = "170658000000605263"
page = "1"
per_page = "10"
last_modified_time = ""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]/teams/users".toHttpUrl().newBuilder()
urlBuilder.addQueryParameter("team_ids", "170658000000605263")
urlBuilder.addQueryParameter("page", "1")
urlBuilder.addQueryParameter("per_page", "10")
urlBuilder.addQueryParameter("last_modified_time", "")
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 *encodedTeam_ids = [@"170658000000605263" stringByAddingPercentEncodingWithAllowedCharacters:[NSCharacterSet URLQueryAllowedCharacterSet]];
NSString *encodedPage = [@"1" stringByAddingPercentEncodingWithAllowedCharacters:[NSCharacterSet URLQueryAllowedCharacterSet]];
NSString *encodedPer_page = [@"10" stringByAddingPercentEncodingWithAllowedCharacters:[NSCharacterSet URLQueryAllowedCharacterSet]];
NSString *encodedLast_modified_time = [@"" stringByAddingPercentEncodingWithAllowedCharacters:[NSCharacterSet URLQueryAllowedCharacterSet]];
NSString *urlString = [NSString stringWithFormat:@"https://projects.zoho.com/api/v3/portal/[PORTAL_ID]/teams/users?team_ids=%@&page=%@&per_page=%@&last_modified_time=%@", encodedTeam_ids, encodedPage, encodedPer_page, encodedLast_modified_time];
NSURL *url = [NSURL URLWithString:urlString];
NSMutableURLRequest *request = [NSMutableURLRequest requestWithURL:url];
[request setHTTPMethod:@"GET"];
[request setValue:@"Bearer 1000.03xxxxxxxxxxxxxxxxxa5317.dxxxxxxxxxxxxxxxxxfa" forHTTPHeaderField:@"Authorization"];
NSURLSession *session = [NSURLSession sharedSession];
NSURLSessionDataTask *task = [session dataTaskWithRequest:request
completionHandler:^(NSData *data, NSURLResponse *response, NSError *error) {
NSString *result = [[NSString alloc] initWithData:data encoding:NSUTF8StringEncoding];
NSLog(@"%@", result);
}];
[task resume];
open Lwt
open Cohttp_lwt_unix
let () =
let enc_team_ids = Uri.pct_encode "170658000000605263" in
let enc_page = Uri.pct_encode "1" in
let enc_per_page = Uri.pct_encode "10" in
let enc_last_modified_time = Uri.pct_encode "" in
let uri = Uri.of_string ("https://projects.zoho.com/api/v3/portal/[PORTAL_ID]/teams/users" ^ "?team_ids=" ^ enc_team_ids ^ "&page=" ^ enc_page ^ "&per_page=" ^ enc_per_page ^ "&last_modified_time=" ^ enc_last_modified_time) in
let headers = Cohttp.Header.init ()
|> fun h -> Cohttp.Header.add h "Authorization" "Bearer 1000.03xxxxxxxxxxxxxxxxxa5317.dxxxxxxxxxxxxxxxxxfa"
in
Lwt_main.run (
Client.get ~headers uri >>= fun (_, body) ->
Cohttp_lwt.Body.to_string body >|= fun s ->
print_endline s)
$headers = @{
"Authorization" = "Bearer 1000.03xxxxxxxxxxxxxxxxxa5317.dxxxxxxxxxxxxxxxxxfa"
}
$params = @{
team_ids = "170658000000605263"
page = "1"
per_page = "10"
last_modified_time = ""
}
$queryString = ($params.GetEnumerator() | ForEach-Object { "$($_.Key)=$([System.Uri]::EscapeDataString($_.Value))" }) -join "&"
$url = "https://projects.zoho.com/api/v3/portal/[PORTAL_ID]/teams/users" + "?" + $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]/teams/users"
params <- list(
team_ids = "170658000000605263",
page = "1",
per_page = "10",
last_modified_time = ""
)
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]/teams/users")!
components.queryItems = [
URLQueryItem(name: "team_ids", value: "170658000000605263"),
URLQueryItem(name: "page", value: "1"),
URLQueryItem(name: "per_page", value: "10"),
URLQueryItem(name: "last_modified_time", value: "")
]
let url = components.url!
var request = URLRequest(url: url)
request.httpMethod = "GET"
request.setValue("Bearer 1000.03xxxxxxxxxxxxxxxxxa5317.dxxxxxxxxxxxxxxxxxfa", forHTTPHeaderField: "Authorization")
let semaphore = DispatchSemaphore(value: 0)
let task = URLSession.shared.dataTask(with: request) { data, response, error in
if let data = data, let result = String(data: data, encoding: .utf8) {
print(result)
}
semaphore.signal()
}
task.resume()
semaphore.wait()
Sample Input
Sample Response
Retrieve all projects associated with teams in a specific portal. Use this API to access the list of projects linked to teams within a portal.
OAuth Scope:
ZohoProjects.teams.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).
JSONArray
Enter the team IDs. You can obtain it from the Get Teams API (the "id" field in the response).
int
default : 1Enter the page number to retrieve.
int
limit : 1-200Enter the number of entries to be displayed per page.
String
Enter the time to retrieve projects associated with the teams at or after this time.
Request Example
curl -X GET \
'https://projects.zoho.com/api/v3/portal/[PORTAL_ID]/teams/projects?team_ids=170658000000605263&page=1&per_page=10&last_modified_time=' \
-H 'Authorization: Bearer 1000.03xxxxxxxxxxxxxxxxxa5317.dxxxxxxxxxxxxxxxxxfa'
url = "https://projects.zoho.com/api/v3/portal/[PORTAL_ID]/teams/projects";
params = Map();
params.put("team_ids", "170658000000605263");
params.put("page", "1");
params.put("per_page", "10");
params.put("last_modified_time", "");
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]/teams/projects');
url.searchParams.append('team_ids', '170658000000605263');
url.searchParams.append('page', '1');
url.searchParams.append('per_page', '10');
url.searchParams.append('last_modified_time', '');
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]/teams/projects")
params = {
"team_ids" => "170658000000605263",
"page" => "1",
"per_page" => "10",
"last_modified_time" => ""
}
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 = [
'team_ids' => '170658000000605263',
'page' => '1',
'per_page' => '10',
'last_modified_time' => '',
];
$url = "https://projects.zoho.com/api/v3/portal/[PORTAL_ID]/teams/projects" . "?" . 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]/teams/projects"
params = {
"team_ids": "170658000000605263",
"page": "1",
"per_page": "10",
"last_modified_time": ""
}
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_team_ids = curl_easy_escape(curl, "170658000000605263", 0);
char *enc_page = curl_easy_escape(curl, "1", 0);
char *enc_per_page = curl_easy_escape(curl, "10", 0);
char *enc_last_modified_time = curl_easy_escape(curl, "", 0);
char url[2048];
snprintf(url, sizeof(url), "https://projects.zoho.com/api/v3/portal/[PORTAL_ID]/teams/projects?team_ids=%s&page=%s&per_page=%s&last_modified_time=%s", enc_team_ids, enc_page, enc_per_page, enc_last_modified_time);
struct curl_slist *headers = NULL;
headers = curl_slist_append(headers, "Authorization: Bearer 1000.03xxxxxxxxxxxxxxxxxa5317.dxxxxxxxxxxxxxxxxxfa");
curl_easy_setopt(curl, CURLOPT_URL, url);
curl_easy_setopt(curl, CURLOPT_HTTPHEADER, headers);
curl_easy_setopt(curl, CURLOPT_CUSTOMREQUEST, "GET");
CURLcode res = curl_easy_perform(curl);
if (res != CURLE_OK)
fprintf(stderr, "curl failed: %s\n", curl_easy_strerror(res));
curl_free(enc_team_ids);
curl_free(enc_page);
curl_free(enc_per_page);
curl_free(enc_last_modified_time);
curl_slist_free_all(headers);
curl_easy_cleanup(curl);
}
return 0;
}
using System.Net.Http;
using System.Text;
using System.Web;
var client = new HttpClient();
client.DefaultRequestHeaders.Add("Authorization", "Bearer 1000.03xxxxxxxxxxxxxxxxxa5317.dxxxxxxxxxxxxxxxxxfa");
var query = HttpUtility.ParseQueryString(string.Empty);
query["team_ids"] = "170658000000605263";
query["page"] = "1";
query["per_page"] = "10";
query["last_modified_time"] = "";
var uriBuilder = new UriBuilder("https://projects.zoho.com/api/v3/portal/[PORTAL_ID]/teams/projects") { 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_team_ids = curl_easy_escape(curl, "170658000000605263", 0);
char* enc_page = curl_easy_escape(curl, "1", 0);
char* enc_per_page = curl_easy_escape(curl, "10", 0);
char* enc_last_modified_time = curl_easy_escape(curl, "", 0);
std::string url = "https://projects.zoho.com/api/v3/portal/[PORTAL_ID]/teams/projects";
url += "?team_ids=" + std::string(enc_team_ids);
url += "&page=" + std::string(enc_page);
url += "&per_page=" + std::string(enc_per_page);
url += "&last_modified_time=" + std::string(enc_last_modified_time);
struct curl_slist* headers = NULL;
headers = curl_slist_append(headers, "Authorization: Bearer 1000.03xxxxxxxxxxxxxxxxxa5317.dxxxxxxxxxxxxxxxxxfa");
curl_easy_setopt(curl, CURLOPT_URL, url.c_str());
curl_easy_setopt(curl, CURLOPT_HTTPHEADER, headers);
curl_easy_setopt(curl, CURLOPT_CUSTOMREQUEST, "GET");
curl_easy_setopt(curl, CURLOPT_WRITEFUNCTION, WriteCallback);
curl_easy_setopt(curl, CURLOPT_WRITEDATA, &response);
CURLcode res = curl_easy_perform(curl);
if (res == CURLE_OK)
std::cout << response << std::endl;
else
std::cerr << curl_easy_strerror(res) << std::endl;
curl_free(enc_team_ids);
curl_free(enc_page);
curl_free(enc_per_page);
curl_free(enc_last_modified_time);
curl_slist_free_all(headers);
curl_easy_cleanup(curl);
}
return 0;
}
(require '[clj-http.client :as client])
(let [enc-team_ids (java.net.URLEncoder/encode "170658000000605263" "UTF-8")
enc-page (java.net.URLEncoder/encode "1" "UTF-8")
enc-per_page (java.net.URLEncoder/encode "10" "UTF-8")
enc-last_modified_time (java.net.URLEncoder/encode "" "UTF-8")
url (str "https://projects.zoho.com/api/v3/portal/[PORTAL_ID]/teams/projects" "?team_ids=" enc-team_ids "&page=" enc-page "&per_page=" enc-per_page "&last_modified_time=" enc-last_modified_time)]
(def response
(client/get url
{:headers {"Authorization" "Bearer 1000.03xxxxxxxxxxxxxxxxxa5317.dxxxxxxxxxxxxxxxxxfa"}
:as :json}))
(println (:body response))
package main
import (
"fmt"
"io"
"net/http"
"net/url"
)
func main() {
req, _ := http.NewRequest("GET", "https://projects.zoho.com/api/v3/portal/[PORTAL_ID]/teams/projects", nil)
q := req.URL.Query()
q.Add("team_ids", "170658000000605263")
q.Add("page", "1")
q.Add("per_page", "10")
q.Add("last_modified_time", "")
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]/teams/projects?team_ids=170658000000605263&page=1&per_page=10&last_modified_time= HTTP/1.1
Host: https://projects.zoho.com/api/v3/portal/[PORTAL_ID]/teams/projects?team_ids=170658000000605263&page=1&per_page=10&last_modified_time=
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]/teams/projects");
uriBuilder.addParameter("team_ids", "170658000000605263");
uriBuilder.addParameter("page", "1");
uriBuilder.addParameter("per_page", "10");
uriBuilder.addParameter("last_modified_time", "");
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]/teams/projects';
const params = new URLSearchParams({
'team_ids': '170658000000605263',
'page': '1',
'per_page': '10',
'last_modified_time': ''
});
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));
team_ids = "170658000000605263"
page = "1"
per_page = "10"
last_modified_time = ""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]/teams/projects".toHttpUrl().newBuilder()
urlBuilder.addQueryParameter("team_ids", "170658000000605263")
urlBuilder.addQueryParameter("page", "1")
urlBuilder.addQueryParameter("per_page", "10")
urlBuilder.addQueryParameter("last_modified_time", "")
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 *encodedTeam_ids = [@"170658000000605263" stringByAddingPercentEncodingWithAllowedCharacters:[NSCharacterSet URLQueryAllowedCharacterSet]];
NSString *encodedPage = [@"1" stringByAddingPercentEncodingWithAllowedCharacters:[NSCharacterSet URLQueryAllowedCharacterSet]];
NSString *encodedPer_page = [@"10" stringByAddingPercentEncodingWithAllowedCharacters:[NSCharacterSet URLQueryAllowedCharacterSet]];
NSString *encodedLast_modified_time = [@"" stringByAddingPercentEncodingWithAllowedCharacters:[NSCharacterSet URLQueryAllowedCharacterSet]];
NSString *urlString = [NSString stringWithFormat:@"https://projects.zoho.com/api/v3/portal/[PORTAL_ID]/teams/projects?team_ids=%@&page=%@&per_page=%@&last_modified_time=%@", encodedTeam_ids, encodedPage, encodedPer_page, encodedLast_modified_time];
NSURL *url = [NSURL URLWithString:urlString];
NSMutableURLRequest *request = [NSMutableURLRequest requestWithURL:url];
[request setHTTPMethod:@"GET"];
[request setValue:@"Bearer 1000.03xxxxxxxxxxxxxxxxxa5317.dxxxxxxxxxxxxxxxxxfa" forHTTPHeaderField:@"Authorization"];
NSURLSession *session = [NSURLSession sharedSession];
NSURLSessionDataTask *task = [session dataTaskWithRequest:request
completionHandler:^(NSData *data, NSURLResponse *response, NSError *error) {
NSString *result = [[NSString alloc] initWithData:data encoding:NSUTF8StringEncoding];
NSLog(@"%@", result);
}];
[task resume];
open Lwt
open Cohttp_lwt_unix
let () =
let enc_team_ids = Uri.pct_encode "170658000000605263" in
let enc_page = Uri.pct_encode "1" in
let enc_per_page = Uri.pct_encode "10" in
let enc_last_modified_time = Uri.pct_encode "" in
let uri = Uri.of_string ("https://projects.zoho.com/api/v3/portal/[PORTAL_ID]/teams/projects" ^ "?team_ids=" ^ enc_team_ids ^ "&page=" ^ enc_page ^ "&per_page=" ^ enc_per_page ^ "&last_modified_time=" ^ enc_last_modified_time) in
let headers = Cohttp.Header.init ()
|> fun h -> Cohttp.Header.add h "Authorization" "Bearer 1000.03xxxxxxxxxxxxxxxxxa5317.dxxxxxxxxxxxxxxxxxfa"
in
Lwt_main.run (
Client.get ~headers uri >>= fun (_, body) ->
Cohttp_lwt.Body.to_string body >|= fun s ->
print_endline s)
$headers = @{
"Authorization" = "Bearer 1000.03xxxxxxxxxxxxxxxxxa5317.dxxxxxxxxxxxxxxxxxfa"
}
$params = @{
team_ids = "170658000000605263"
page = "1"
per_page = "10"
last_modified_time = ""
}
$queryString = ($params.GetEnumerator() | ForEach-Object { "$($_.Key)=$([System.Uri]::EscapeDataString($_.Value))" }) -join "&"
$url = "https://projects.zoho.com/api/v3/portal/[PORTAL_ID]/teams/projects" + "?" + $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]/teams/projects"
params <- list(
team_ids = "170658000000605263",
page = "1",
per_page = "10",
last_modified_time = ""
)
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]/teams/projects")!
components.queryItems = [
URLQueryItem(name: "team_ids", value: "170658000000605263"),
URLQueryItem(name: "page", value: "1"),
URLQueryItem(name: "per_page", value: "10"),
URLQueryItem(name: "last_modified_time", value: "")
]
let url = components.url!
var request = URLRequest(url: url)
request.httpMethod = "GET"
request.setValue("Bearer 1000.03xxxxxxxxxxxxxxxxxa5317.dxxxxxxxxxxxxxxxxxfa", forHTTPHeaderField: "Authorization")
let semaphore = DispatchSemaphore(value: 0)
let task = URLSession.shared.dataTask(with: request) { data, response, error in
if let data = data, let result = String(data: data, encoding: .utf8) {
print(result)
}
semaphore.signal()
}
task.resume()
semaphore.wait()
Sample Input
Sample Response
Create a new team in a specific portal. Use this API to set up a team and group users for collaborative work within a portal.
OAuth Scope:
ZohoProjects.teams.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
requiredEnter the name of the team.
JSONObject
requiredEnter the IDs of the projects.
JSONObject
requiredEnter the IDs of the users.
String
requiredEnter the ID of the team lead. You can obtain it from the Get Portal Users API (the "id" field in the response).
String
max length : 100Enter the team's email address.
boolean
Specify whether to notify the users. Accepted values: true,false
JSONObject
max length : 5000Enter thirdparty record details.
Request Example
curl -X POST \
'https://projects.zoho.com/api/v3/portal/[PORTAL_ID]/teams' \
-H 'Authorization: Bearer 1000.03xxxxxxxxxxxxxxxxxa5317.dxxxxxxxxxxxxxxxxxfa' \
-H 'Content-Type: application/json' \
-d '{"name":"Development Team","project_ids":{"add":["4000000005103","4000000005133"]},"user_ids":{"add":["4000000005103","4000000005133"]},"lead":"4000000005103","email":"devs-team@zylker.com","notify":false}'
url = "https://projects.zoho.com/api/v3/portal/[PORTAL_ID]/teams";
params = Map();
params.put("name", "Development Team");
params.put("project_ids", {"add":["4000000005103","4000000005133"]});
params.put("user_ids", {"add":["4000000005103","4000000005133"]});
params.put("lead", "4000000005103");
params.put("email", "devs-team@zylker.com");
params.put("notify", false);
response = invokeUrl
[
url: url
type: POST
parameters: params.toString()
connection: "projects"
];
info response;
const https = require('https');
const url = new URL('https://projects.zoho.com/api/v3/portal/[PORTAL_ID]/teams');
const payload = JSON.stringify({"name":"Development Team","project_ids":{"add":["4000000005103","4000000005133"]},"user_ids":{"add":["4000000005103","4000000005133"]},"lead":"4000000005103","email":"devs-team@zylker.com","notify":false});
const options = {
hostname: url.hostname,
path: url.pathname + url.search,
method: 'POST',
headers: {
'Authorization': 'Bearer 1000.03xxxxxxxxxxxxxxxxxa5317.dxxxxxxxxxxxxxxxxxfa',
'Content-Type': 'application/json',
'Content-Length': Buffer.byteLength(payload)
}
};
const req = https.request(options, (res) => {
let data = '';
res.on('data', (chunk) => { data += chunk; });
res.on('end', () => { console.log(JSON.parse(data)); });
});
req.on('error', (err) => { console.error(err); });
req.write(payload);
req.end();
require 'net/http'
require 'uri'
require 'json'
url = URI("https://projects.zoho.com/api/v3/portal/[PORTAL_ID]/teams")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = "Bearer 1000.03xxxxxxxxxxxxxxxxxa5317.dxxxxxxxxxxxxxxxxxfa"
request["Content-Type"] = "application/json"
request.body = '{"name":"Development Team","project_ids":{"add":["4000000005103","4000000005133"]},"user_ids":{"add":["4000000005103","4000000005133"]},"lead":"4000000005103","email":"devs-team@zylker.com","notify":false}'
response = http.request(request)
puts response.read_body
<?php
$url = "https://projects.zoho.com/api/v3/portal/[PORTAL_ID]/teams";
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => $url,
CURLOPT_RETURNTRANSFER => true,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => '{"name":"Development Team","project_ids":{"add":["4000000005103","4000000005133"]},"user_ids":{"add":["4000000005103","4000000005133"]},"lead":"4000000005103","email":"devs-team@zylker.com","notify":false}',
CURLOPT_HTTPHEADER => [
"Authorization: Bearer 1000.03xxxxxxxxxxxxxxxxxa5317.dxxxxxxxxxxxxxxxxxfa",
"Content-Type: application/json"
],
]);
$response = curl_exec($curl);
curl_close($curl);
echo $response;
import requests
url = "https://projects.zoho.com/api/v3/portal/[PORTAL_ID]/teams"
headers = {
"Authorization": "Bearer 1000.03xxxxxxxxxxxxxxxxxa5317.dxxxxxxxxxxxxxxxxxfa",
"Content-Type": "application/json",
}
payload = '{"name":"Development Team","project_ids":{"add":["4000000005103","4000000005133"]},"user_ids":{"add":["4000000005103","4000000005133"]},"lead":"4000000005103","email":"devs-team@zylker.com","notify":false}'
response = requests.post(url, headers=headers, data=payload)
print(response.json())
#include <stdio.h>
#include <string.h>
#include <curl/curl.h>
int main(void) {
CURL *curl = curl_easy_init();
if (curl) {
struct curl_slist *headers = NULL;
headers = curl_slist_append(headers, "Authorization: Bearer 1000.03xxxxxxxxxxxxxxxxxa5317.dxxxxxxxxxxxxxxxxxfa");
headers = curl_slist_append(headers, "Content-Type: application/json");
curl_easy_setopt(curl, CURLOPT_URL, "https://projects.zoho.com/api/v3/portal/[PORTAL_ID]/teams");
curl_easy_setopt(curl, CURLOPT_HTTPHEADER, headers);
curl_easy_setopt(curl, CURLOPT_CUSTOMREQUEST, "POST");
curl_easy_setopt(curl, CURLOPT_POSTFIELDS, "{\"name\":\"Development Team\",\"project_ids\":{\"add\":[\"4000000005103\",\"4000000005133\"]},\"user_ids\":{\"add\":[\"4000000005103\",\"4000000005133\"]},\"lead\":\"4000000005103\",\"email\":\"devs-team@zylker.com\",\"notify\":false}");
CURLcode res = curl_easy_perform(curl);
if (res != CURLE_OK)
fprintf(stderr, "curl failed: %s\n", curl_easy_strerror(res));
curl_slist_free_all(headers);
curl_easy_cleanup(curl);
}
return 0;
}
using System.Net.Http;
using System.Text;
using System.Web;
var client = new HttpClient();
client.DefaultRequestHeaders.Add("Authorization", "Bearer 1000.03xxxxxxxxxxxxxxxxxa5317.dxxxxxxxxxxxxxxxxxfa");
var request = new HttpRequestMessage(HttpMethod.Post, "https://projects.zoho.com/api/v3/portal/[PORTAL_ID]/teams");
request.Content = new StringContent(
@"{""name"":""Development Team"",""project_ids"":{""add"":[""4000000005103"",""4000000005133""]},""user_ids"":{""add"":[""4000000005103"",""4000000005133""]},""lead"":""4000000005103"",""email"":""devs-team@zylker.com"",""notify"":false}",
Encoding.UTF8,
"application/json"
);
var response = await client.SendAsync(request);
var body = await response.Content.ReadAsStringAsync();
Console.WriteLine(body);
#include <iostream>
#include <string>
#include <curl/curl.h>
static size_t WriteCallback(void* contents, size_t size, size_t nmemb, std::string* output) {
output->append((char*)contents, size * nmemb);
return size * nmemb;
}
int main() {
CURL* curl = curl_easy_init();
if (curl) {
std::string response;
struct curl_slist* headers = NULL;
headers = curl_slist_append(headers, "Authorization: Bearer 1000.03xxxxxxxxxxxxxxxxxa5317.dxxxxxxxxxxxxxxxxxfa");
headers = curl_slist_append(headers, "Content-Type: application/json");
curl_easy_setopt(curl, CURLOPT_URL, "https://projects.zoho.com/api/v3/portal/[PORTAL_ID]/teams");
curl_easy_setopt(curl, CURLOPT_HTTPHEADER, headers);
curl_easy_setopt(curl, CURLOPT_CUSTOMREQUEST, "POST");
curl_easy_setopt(curl, CURLOPT_WRITEFUNCTION, WriteCallback);
curl_easy_setopt(curl, CURLOPT_WRITEDATA, &response);
curl_easy_setopt(curl, CURLOPT_POSTFIELDS, "{\"name\":\"Development Team\",\"project_ids\":{\"add\":[\"4000000005103\",\"4000000005133\"]},\"user_ids\":{\"add\":[\"4000000005103\",\"4000000005133\"]},\"lead\":\"4000000005103\",\"email\":\"devs-team@zylker.com\",\"notify\":false}");
CURLcode res = curl_easy_perform(curl);
if (res == CURLE_OK)
std::cout << response << std::endl;
else
std::cerr << curl_easy_strerror(res) << std::endl;
curl_slist_free_all(headers);
curl_easy_cleanup(curl);
}
return 0;
}
(require '[clj-http.client :as client])
(def response
(client/post "https://projects.zoho.com/api/v3/portal/[PORTAL_ID]/teams"
{:headers {"Authorization" "Bearer 1000.03xxxxxxxxxxxxxxxxxa5317.dxxxxxxxxxxxxxxxxxfa"
"Content-Type" "application/json"}
:body "{\"name\":\"Development Team\",\"project_ids\":{\"add\":[\"4000000005103\",\"4000000005133\"]},\"user_ids\":{\"add\":[\"4000000005103\",\"4000000005133\"]},\"lead\":\"4000000005103\",\"email\":\"devs-team@zylker.com\",\"notify\":false}"
:as :json}))
(println (:body response))
package main
import (
"fmt"
"io"
"net/http"
"strings"
)
func main() {
payload := strings.NewReader("{\"name\":\"Development Team\",\"project_ids\":{\"add\":[\"4000000005103\",\"4000000005133\"]},\"user_ids\":{\"add\":[\"4000000005103\",\"4000000005133\"]},\"lead\":\"4000000005103\",\"email\":\"devs-team@zylker.com\",\"notify\":false}")
req, _ := http.NewRequest("POST", "https://projects.zoho.com/api/v3/portal/[PORTAL_ID]/teams", 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]/teams HTTP/1.1
Host: https://projects.zoho.com/api/v3/portal/[PORTAL_ID]/teams
Authorization: Bearer 1000.03xxxxxxxxxxxxxxxxxa5317.dxxxxxxxxxxxxxxxxxfa
Content-Type: application/json
{"name":"Development Team","project_ids":{"add":["4000000005103","4000000005133"]},"user_ids":{"add":["4000000005103","4000000005133"]},"lead":"4000000005103","email":"devs-team@zylker.com","notify":false}
HttpClientBuilder httpClientBuilder = HttpClientBuilder.create();
SSLContext sslContext = SSLContext.getDefault();
SSLConnectionSocketFactory sslConnectionSocketFactory = new SSLConnectionSocketFactory(sslContext, NoopHostnameVerifier.INSTANCE);
CloseableHttpClient httpclient = httpClientBuilder.setSSLSocketFactory(sslConnectionSocketFactory).build();
URIBuilder uriBuilder = new URIBuilder("https://projects.zoho.com/api/v3/portal/[PORTAL_ID]/teams");
HttpUriRequest requestObj = new HttpPost(uriBuilder.build());
requestObj.addHeader("Authorization", "Bearer 1000.03xxxxxxxxxxxxxxxxxa5317.dxxxxxxxxxxxxxxxxxfa");
HttpEntityEnclosingRequestBase requestBase = (HttpEntityEnclosingRequestBase) requestObj;
String requestBody = "{\"name\":\"Development Team\",\"project_ids\":{\"add\":[\"4000000005103\",\"4000000005133\"]},\"user_ids\":{\"add\":[\"4000000005103\",\"4000000005133\"]},\"lead\":\"4000000005103\",\"email\":\"devs-team@zylker.com\",\"notify\":false}";
requestBase.setEntity(new StringEntity(requestBody, HTTP.UTF_8));
HttpResponse response = httpclient.execute(requestObj);
HttpEntity responseEntity = response.getEntity();
Object responseObject = EntityUtils.toString(responseEntity);
String responseString = responseObject.toString();
const url = 'https://projects.zoho.com/api/v3/portal/[PORTAL_ID]/teams';
const options = {
method: 'POST',
headers: {
'Authorization': 'Bearer 1000.03xxxxxxxxxxxxxxxxxa5317.dxxxxxxxxxxxxxxxxxfa',
'Content-Type': 'application/json'
},
body: JSON.stringify({"name":"Development Team","project_ids":{"add":["4000000005103","4000000005133"]},"user_ids":{"add":["4000000005103","4000000005133"]},"lead":"4000000005103","email":"devs-team@zylker.com","notify":false})
};
fetch(url, options)
.then(response => response.json())
.then(data => console.log(data))
.catch(error => console.error(error));
{"name":"Development Team","project_ids":{"add":["4000000005103","4000000005133"]},"user_ids":{"add":["4000000005103","4000000005133"]},"lead":"4000000005103","email":"devs-team@zylker.com","notify":false}import java.net.HttpURLConnection
import java.net.URL
import okhttp3.HttpUrl.Companion.toHttpUrl
fun main() {
val url = URL("https://projects.zoho.com/api/v3/portal/[PORTAL_ID]/teams")
val conn = url.openConnection() as HttpURLConnection
conn.requestMethod = "POST"
conn.setRequestProperty("Authorization", "Bearer 1000.03xxxxxxxxxxxxxxxxxa5317.dxxxxxxxxxxxxxxxxxfa")
conn.setRequestProperty("Content-Type", "application/json")
conn.doOutput = true
conn.outputStream.bufferedWriter().use { it.write("""{"name":"Development Team","project_ids":{"add":["4000000005103","4000000005133"]},"user_ids":{"add":["4000000005103","4000000005133"]},"lead":"4000000005103","email":"devs-team@zylker.com","notify":false}""") }
val response = conn.inputStream.bufferedReader().readText()
println(response)
}
NSURL *url = [NSURL URLWithString:@"https://projects.zoho.com/api/v3/portal/[PORTAL_ID]/teams"];
NSMutableURLRequest *request = [NSMutableURLRequest requestWithURL:url];
[request setHTTPMethod:@"POST"];
[request setValue:@"Bearer 1000.03xxxxxxxxxxxxxxxxxa5317.dxxxxxxxxxxxxxxxxxfa" forHTTPHeaderField:@"Authorization"];
[request setValue:@"application/json" forHTTPHeaderField:@"Content-Type"];
NSData *body = [@"{\"name\":\"Development Team\",\"project_ids\":{\"add\":[\"4000000005103\",\"4000000005133\"]},\"user_ids\":{\"add\":[\"4000000005103\",\"4000000005133\"]},\"lead\":\"4000000005103\",\"email\":\"devs-team@zylker.com\",\"notify\":false}" dataUsingEncoding:NSUTF8StringEncoding];
[request setHTTPBody:body];
NSURLSession *session = [NSURLSession sharedSession];
NSURLSessionDataTask *task = [session dataTaskWithRequest:request
completionHandler:^(NSData *data, NSURLResponse *response, NSError *error) {
NSString *result = [[NSString alloc] initWithData:data encoding:NSUTF8StringEncoding];
NSLog(@"%@", result);
}];
[task resume];
open Lwt
open Cohttp_lwt_unix
let () =
let uri = Uri.of_string "https://projects.zoho.com/api/v3/portal/[PORTAL_ID]/teams" in
let headers = Cohttp.Header.init ()
|> fun h -> Cohttp.Header.add h "Authorization" "Bearer 1000.03xxxxxxxxxxxxxxxxxa5317.dxxxxxxxxxxxxxxxxxfa"
|> fun h -> Cohttp.Header.add h "Content-Type" "application/json"
in
let body = Cohttp_lwt.Body.of_string {json|{"name":"Development Team","project_ids":{"add":["4000000005103","4000000005133"]},"user_ids":{"add":["4000000005103","4000000005133"]},"lead":"4000000005103","email":"devs-team@zylker.com","notify":false}|json} in
Lwt_main.run (
Client.post ~headers ~body uri >>= fun (_, body) ->
Cohttp_lwt.Body.to_string body >|= fun s ->
print_endline s)
$headers = @{
"Authorization" = "Bearer 1000.03xxxxxxxxxxxxxxxxxa5317.dxxxxxxxxxxxxxxxxxfa"
"Content-Type" = "application/json"
}
$body = @'
{"name":"Development Team","project_ids":{"add":["4000000005103","4000000005133"]},"user_ids":{"add":["4000000005103","4000000005133"]},"lead":"4000000005103","email":"devs-team@zylker.com","notify":false}
'@
$response = Invoke-RestMethod -Uri "https://projects.zoho.com/api/v3/portal/[PORTAL_ID]/teams" -Method POST -Headers $headers -Body $body
$response | ConvertTo-Json
library(httr)
url <- "https://projects.zoho.com/api/v3/portal/[PORTAL_ID]/teams"
response <- POST(
url,
add_headers(Authorization = "Bearer 1000.03xxxxxxxxxxxxxxxxxa5317.dxxxxxxxxxxxxxxxxxfa"),
content_type_json(),
body = "{\"name\":\"Development Team\",\"project_ids\":{\"add\":[\"4000000005103\",\"4000000005133\"]},\"user_ids\":{\"add\":[\"4000000005103\",\"4000000005133\"]},\"lead\":\"4000000005103\",\"email\":\"devs-team@zylker.com\",\"notify\":false}"
)
content(response, "text")
import Foundation
let url = URL(string: "https://projects.zoho.com/api/v3/portal/[PORTAL_ID]/teams")!
var request = URLRequest(url: url)
request.httpMethod = "POST"
request.setValue("Bearer 1000.03xxxxxxxxxxxxxxxxxa5317.dxxxxxxxxxxxxxxxxxfa", forHTTPHeaderField: "Authorization")
request.setValue("application/json", forHTTPHeaderField: "Content-Type")
request.httpBody = """
{"name":"Development Team","project_ids":{"add":["4000000005103","4000000005133"]},"user_ids":{"add":["4000000005103","4000000005133"]},"lead":"4000000005103","email":"devs-team@zylker.com","notify":false}
""".data(using: .utf8)
let semaphore = DispatchSemaphore(value: 0)
let task = URLSession.shared.dataTask(with: request) { data, response, error in
if let data = data, let result = String(data: data, encoding: .utf8) {
print(result)
}
semaphore.signal()
}
task.resume()
semaphore.wait()
Sample Input
Sample Response
Possible Errors
Modify the details of a specific team in a portal. Use this API to modify the name, members, or other details of an existing team.
OAuth Scope:
ZohoProjects.teams.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
requiredIdentifier of a team. Obtained from the Get Project Teams API - the "id" field in the response corresponds to team_id.
String
max length : 50Enter the name of the team.
JSONObject
max length : 5000Enter the project IDs to update the team's project associations.
JSONObject
max length : 5000Enter the user IDs to update the team's member associations.
int
Enter the ID of the team lead. You can obtain it from the Get Portal Users API (the "id" field in the response).
String
max length : 100Enter the team's email address.
boolean
Specify whether to notify the users. Accepted values: true,false
Request Example
curl -X PATCH \
'https://projects.zoho.com/api/v3/portal/[PORTAL_ID]/teams/[TEAM_ID]' \
-H 'Authorization: Bearer 1000.03xxxxxxxxxxxxxxxxxa5317.dxxxxxxxxxxxxxxxxxfa' \
-H 'Content-Type: application/json' \
-d '{"name":"Development Team","project_ids":{"add":"[4000000005103, 4000000005133]","remove":"[4000000014077, 4000000008020]"},"user_ids":{"add":"[4000000005103, 4000000005133]","remove":"[4000000014077, 4000000008020]"},"lead":4000000005103,"email":"richard.santos@zylker.com","notify":false}'
url = "https://projects.zoho.com/api/v3/portal/[PORTAL_ID]/teams/[TEAM_ID]";
params = Map();
params.put("name", "Development Team");
params.put("project_ids", {"add":"[4000000005103, 4000000005133]","remove":"[4000000014077, 4000000008020]"});
params.put("user_ids", {"add":"[4000000005103, 4000000005133]","remove":"[4000000014077, 4000000008020]"});
params.put("lead", 4000000005103);
params.put("email", "richard.santos@zylker.com");
params.put("notify", false);
response = invokeUrl
[
url: url
type: PATCH
parameters: params.toString()
connection: "projects"
];
info response;
const https = require('https');
const url = new URL('https://projects.zoho.com/api/v3/portal/[PORTAL_ID]/teams/[TEAM_ID]');
const payload = JSON.stringify({"name":"Development Team","project_ids":{"add":"[4000000005103, 4000000005133]","remove":"[4000000014077, 4000000008020]"},"user_ids":{"add":"[4000000005103, 4000000005133]","remove":"[4000000014077, 4000000008020]"},"lead":4000000005103,"email":"richard.santos@zylker.com","notify":false});
const options = {
hostname: url.hostname,
path: url.pathname + url.search,
method: 'PATCH',
headers: {
'Authorization': 'Bearer 1000.03xxxxxxxxxxxxxxxxxa5317.dxxxxxxxxxxxxxxxxxfa',
'Content-Type': 'application/json',
'Content-Length': Buffer.byteLength(payload)
}
};
const req = https.request(options, (res) => {
let data = '';
res.on('data', (chunk) => { data += chunk; });
res.on('end', () => { console.log(JSON.parse(data)); });
});
req.on('error', (err) => { console.error(err); });
req.write(payload);
req.end();
require 'net/http'
require 'uri'
require 'json'
url = URI("https://projects.zoho.com/api/v3/portal/[PORTAL_ID]/teams/[TEAM_ID]")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Patch.new(url)
request["Authorization"] = "Bearer 1000.03xxxxxxxxxxxxxxxxxa5317.dxxxxxxxxxxxxxxxxxfa"
request["Content-Type"] = "application/json"
request.body = '{"name":"Development Team","project_ids":{"add":"[4000000005103, 4000000005133]","remove":"[4000000014077, 4000000008020]"},"user_ids":{"add":"[4000000005103, 4000000005133]","remove":"[4000000014077, 4000000008020]"},"lead":4000000005103,"email":"richard.santos@zylker.com","notify":false}'
response = http.request(request)
puts response.read_body
<?php
$url = "https://projects.zoho.com/api/v3/portal/[PORTAL_ID]/teams/[TEAM_ID]";
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => $url,
CURLOPT_RETURNTRANSFER => true,
CURLOPT_CUSTOMREQUEST => "PATCH",
CURLOPT_POSTFIELDS => '{"name":"Development Team","project_ids":{"add":"[4000000005103, 4000000005133]","remove":"[4000000014077, 4000000008020]"},"user_ids":{"add":"[4000000005103, 4000000005133]","remove":"[4000000014077, 4000000008020]"},"lead":4000000005103,"email":"richard.santos@zylker.com","notify":false}',
CURLOPT_HTTPHEADER => [
"Authorization: Bearer 1000.03xxxxxxxxxxxxxxxxxa5317.dxxxxxxxxxxxxxxxxxfa",
"Content-Type: application/json"
],
]);
$response = curl_exec($curl);
curl_close($curl);
echo $response;
import requests
url = "https://projects.zoho.com/api/v3/portal/[PORTAL_ID]/teams/[TEAM_ID]"
headers = {
"Authorization": "Bearer 1000.03xxxxxxxxxxxxxxxxxa5317.dxxxxxxxxxxxxxxxxxfa",
"Content-Type": "application/json",
}
payload = '{"name":"Development Team","project_ids":{"add":"[4000000005103, 4000000005133]","remove":"[4000000014077, 4000000008020]"},"user_ids":{"add":"[4000000005103, 4000000005133]","remove":"[4000000014077, 4000000008020]"},"lead":4000000005103,"email":"richard.santos@zylker.com","notify":false}'
response = requests.patch(url, headers=headers, data=payload)
print(response.json())
#include <stdio.h>
#include <string.h>
#include <curl/curl.h>
int main(void) {
CURL *curl = curl_easy_init();
if (curl) {
struct curl_slist *headers = NULL;
headers = curl_slist_append(headers, "Authorization: Bearer 1000.03xxxxxxxxxxxxxxxxxa5317.dxxxxxxxxxxxxxxxxxfa");
headers = curl_slist_append(headers, "Content-Type: application/json");
curl_easy_setopt(curl, CURLOPT_URL, "https://projects.zoho.com/api/v3/portal/[PORTAL_ID]/teams/[TEAM_ID]");
curl_easy_setopt(curl, CURLOPT_HTTPHEADER, headers);
curl_easy_setopt(curl, CURLOPT_CUSTOMREQUEST, "PATCH");
curl_easy_setopt(curl, CURLOPT_POSTFIELDS, "{\"name\":\"Development Team\",\"project_ids\":{\"add\":\"[4000000005103, 4000000005133]\",\"remove\":\"[4000000014077, 4000000008020]\"},\"user_ids\":{\"add\":\"[4000000005103, 4000000005133]\",\"remove\":\"[4000000014077, 4000000008020]\"},\"lead\":4000000005103,\"email\":\"richard.santos@zylker.com\",\"notify\":false}");
CURLcode res = curl_easy_perform(curl);
if (res != CURLE_OK)
fprintf(stderr, "curl failed: %s\n", curl_easy_strerror(res));
curl_slist_free_all(headers);
curl_easy_cleanup(curl);
}
return 0;
}
using System.Net.Http;
using System.Text;
using System.Web;
var client = new HttpClient();
client.DefaultRequestHeaders.Add("Authorization", "Bearer 1000.03xxxxxxxxxxxxxxxxxa5317.dxxxxxxxxxxxxxxxxxfa");
var request = new HttpRequestMessage(HttpMethod.Patch, "https://projects.zoho.com/api/v3/portal/[PORTAL_ID]/teams/[TEAM_ID]");
request.Content = new StringContent(
@"{""name"":""Development Team"",""project_ids"":{""add"":""[4000000005103, 4000000005133]"",""remove"":""[4000000014077, 4000000008020]""},""user_ids"":{""add"":""[4000000005103, 4000000005133]"",""remove"":""[4000000014077, 4000000008020]""},""lead"":4000000005103,""email"":""richard.santos@zylker.com"",""notify"":false}",
Encoding.UTF8,
"application/json"
);
var response = await client.SendAsync(request);
var body = await response.Content.ReadAsStringAsync();
Console.WriteLine(body);
#include <iostream>
#include <string>
#include <curl/curl.h>
static size_t WriteCallback(void* contents, size_t size, size_t nmemb, std::string* output) {
output->append((char*)contents, size * nmemb);
return size * nmemb;
}
int main() {
CURL* curl = curl_easy_init();
if (curl) {
std::string response;
struct curl_slist* headers = NULL;
headers = curl_slist_append(headers, "Authorization: Bearer 1000.03xxxxxxxxxxxxxxxxxa5317.dxxxxxxxxxxxxxxxxxfa");
headers = curl_slist_append(headers, "Content-Type: application/json");
curl_easy_setopt(curl, CURLOPT_URL, "https://projects.zoho.com/api/v3/portal/[PORTAL_ID]/teams/[TEAM_ID]");
curl_easy_setopt(curl, CURLOPT_HTTPHEADER, headers);
curl_easy_setopt(curl, CURLOPT_CUSTOMREQUEST, "PATCH");
curl_easy_setopt(curl, CURLOPT_WRITEFUNCTION, WriteCallback);
curl_easy_setopt(curl, CURLOPT_WRITEDATA, &response);
curl_easy_setopt(curl, CURLOPT_POSTFIELDS, "{\"name\":\"Development Team\",\"project_ids\":{\"add\":\"[4000000005103, 4000000005133]\",\"remove\":\"[4000000014077, 4000000008020]\"},\"user_ids\":{\"add\":\"[4000000005103, 4000000005133]\",\"remove\":\"[4000000014077, 4000000008020]\"},\"lead\":4000000005103,\"email\":\"richard.santos@zylker.com\",\"notify\":false}");
CURLcode res = curl_easy_perform(curl);
if (res == CURLE_OK)
std::cout << response << std::endl;
else
std::cerr << curl_easy_strerror(res) << std::endl;
curl_slist_free_all(headers);
curl_easy_cleanup(curl);
}
return 0;
}
(require '[clj-http.client :as client])
(def response
(client/patch "https://projects.zoho.com/api/v3/portal/[PORTAL_ID]/teams/[TEAM_ID]"
{:headers {"Authorization" "Bearer 1000.03xxxxxxxxxxxxxxxxxa5317.dxxxxxxxxxxxxxxxxxfa"
"Content-Type" "application/json"}
:body "{\"name\":\"Development Team\",\"project_ids\":{\"add\":\"[4000000005103, 4000000005133]\",\"remove\":\"[4000000014077, 4000000008020]\"},\"user_ids\":{\"add\":\"[4000000005103, 4000000005133]\",\"remove\":\"[4000000014077, 4000000008020]\"},\"lead\":4000000005103,\"email\":\"richard.santos@zylker.com\",\"notify\":false}"
:as :json}))
(println (:body response))
package main
import (
"fmt"
"io"
"net/http"
"strings"
)
func main() {
payload := strings.NewReader("{\"name\":\"Development Team\",\"project_ids\":{\"add\":\"[4000000005103, 4000000005133]\",\"remove\":\"[4000000014077, 4000000008020]\"},\"user_ids\":{\"add\":\"[4000000005103, 4000000005133]\",\"remove\":\"[4000000014077, 4000000008020]\"},\"lead\":4000000005103,\"email\":\"richard.santos@zylker.com\",\"notify\":false}")
req, _ := http.NewRequest("PATCH", "https://projects.zoho.com/api/v3/portal/[PORTAL_ID]/teams/[TEAM_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]/teams/[TEAM_ID] HTTP/1.1
Host: https://projects.zoho.com/api/v3/portal/[PORTAL_ID]/teams/[TEAM_ID]
Authorization: Bearer 1000.03xxxxxxxxxxxxxxxxxa5317.dxxxxxxxxxxxxxxxxxfa
Content-Type: application/json
{"name":"Development Team","project_ids":{"add":"[4000000005103, 4000000005133]","remove":"[4000000014077, 4000000008020]"},"user_ids":{"add":"[4000000005103, 4000000005133]","remove":"[4000000014077, 4000000008020]"},"lead":4000000005103,"email":"richard.santos@zylker.com","notify":false}
HttpClientBuilder httpClientBuilder = HttpClientBuilder.create();
SSLContext sslContext = SSLContext.getDefault();
SSLConnectionSocketFactory sslConnectionSocketFactory = new SSLConnectionSocketFactory(sslContext, NoopHostnameVerifier.INSTANCE);
CloseableHttpClient httpclient = httpClientBuilder.setSSLSocketFactory(sslConnectionSocketFactory).build();
URIBuilder uriBuilder = new URIBuilder("https://projects.zoho.com/api/v3/portal/[PORTAL_ID]/teams/[TEAM_ID]");
HttpUriRequest requestObj = new HttpPatch(uriBuilder.build());
requestObj.addHeader("Authorization", "Bearer 1000.03xxxxxxxxxxxxxxxxxa5317.dxxxxxxxxxxxxxxxxxfa");
HttpEntityEnclosingRequestBase requestBase = (HttpEntityEnclosingRequestBase) requestObj;
String requestBody = "{\"name\":\"Development Team\",\"project_ids\":{\"add\":\"[4000000005103, 4000000005133]\",\"remove\":\"[4000000014077, 4000000008020]\"},\"user_ids\":{\"add\":\"[4000000005103, 4000000005133]\",\"remove\":\"[4000000014077, 4000000008020]\"},\"lead\":4000000005103,\"email\":\"richard.santos@zylker.com\",\"notify\":false}";
requestBase.setEntity(new StringEntity(requestBody, HTTP.UTF_8));
HttpResponse response = httpclient.execute(requestObj);
HttpEntity responseEntity = response.getEntity();
Object responseObject = EntityUtils.toString(responseEntity);
String responseString = responseObject.toString();
const url = 'https://projects.zoho.com/api/v3/portal/[PORTAL_ID]/teams/[TEAM_ID]';
const options = {
method: 'PATCH',
headers: {
'Authorization': 'Bearer 1000.03xxxxxxxxxxxxxxxxxa5317.dxxxxxxxxxxxxxxxxxfa',
'Content-Type': 'application/json'
},
body: JSON.stringify({"name":"Development Team","project_ids":{"add":"[4000000005103, 4000000005133]","remove":"[4000000014077, 4000000008020]"},"user_ids":{"add":"[4000000005103, 4000000005133]","remove":"[4000000014077, 4000000008020]"},"lead":4000000005103,"email":"richard.santos@zylker.com","notify":false})
};
fetch(url, options)
.then(response => response.json())
.then(data => console.log(data))
.catch(error => console.error(error));
{"name":"Development Team","project_ids":{"add":"[4000000005103, 4000000005133]","remove":"[4000000014077, 4000000008020]"},"user_ids":{"add":"[4000000005103, 4000000005133]","remove":"[4000000014077, 4000000008020]"},"lead":4000000005103,"email":"richard.santos@zylker.com","notify":false}import java.net.HttpURLConnection
import java.net.URL
import okhttp3.HttpUrl.Companion.toHttpUrl
fun main() {
val url = URL("https://projects.zoho.com/api/v3/portal/[PORTAL_ID]/teams/[TEAM_ID]")
val conn = url.openConnection() as HttpURLConnection
conn.requestMethod = "PATCH"
conn.setRequestProperty("Authorization", "Bearer 1000.03xxxxxxxxxxxxxxxxxa5317.dxxxxxxxxxxxxxxxxxfa")
conn.setRequestProperty("Content-Type", "application/json")
conn.doOutput = true
conn.outputStream.bufferedWriter().use { it.write("""{"name":"Development Team","project_ids":{"add":"[4000000005103, 4000000005133]","remove":"[4000000014077, 4000000008020]"},"user_ids":{"add":"[4000000005103, 4000000005133]","remove":"[4000000014077, 4000000008020]"},"lead":4000000005103,"email":"richard.santos@zylker.com","notify":false}""") }
val response = conn.inputStream.bufferedReader().readText()
println(response)
}
NSURL *url = [NSURL URLWithString:@"https://projects.zoho.com/api/v3/portal/[PORTAL_ID]/teams/[TEAM_ID]"];
NSMutableURLRequest *request = [NSMutableURLRequest requestWithURL:url];
[request setHTTPMethod:@"PATCH"];
[request setValue:@"Bearer 1000.03xxxxxxxxxxxxxxxxxa5317.dxxxxxxxxxxxxxxxxxfa" forHTTPHeaderField:@"Authorization"];
[request setValue:@"application/json" forHTTPHeaderField:@"Content-Type"];
NSData *body = [@"{\"name\":\"Development Team\",\"project_ids\":{\"add\":\"[4000000005103, 4000000005133]\",\"remove\":\"[4000000014077, 4000000008020]\"},\"user_ids\":{\"add\":\"[4000000005103, 4000000005133]\",\"remove\":\"[4000000014077, 4000000008020]\"},\"lead\":4000000005103,\"email\":\"richard.santos@zylker.com\",\"notify\":false}" dataUsingEncoding:NSUTF8StringEncoding];
[request setHTTPBody:body];
NSURLSession *session = [NSURLSession sharedSession];
NSURLSessionDataTask *task = [session dataTaskWithRequest:request
completionHandler:^(NSData *data, NSURLResponse *response, NSError *error) {
NSString *result = [[NSString alloc] initWithData:data encoding:NSUTF8StringEncoding];
NSLog(@"%@", result);
}];
[task resume];
open Lwt
open Cohttp_lwt_unix
let () =
let uri = Uri.of_string "https://projects.zoho.com/api/v3/portal/[PORTAL_ID]/teams/[TEAM_ID]" in
let headers = Cohttp.Header.init ()
|> fun h -> Cohttp.Header.add h "Authorization" "Bearer 1000.03xxxxxxxxxxxxxxxxxa5317.dxxxxxxxxxxxxxxxxxfa"
|> fun h -> Cohttp.Header.add h "Content-Type" "application/json"
in
let body = Cohttp_lwt.Body.of_string {json|{"name":"Development Team","project_ids":{"add":"[4000000005103, 4000000005133]","remove":"[4000000014077, 4000000008020]"},"user_ids":{"add":"[4000000005103, 4000000005133]","remove":"[4000000014077, 4000000008020]"},"lead":4000000005103,"email":"richard.santos@zylker.com","notify":false}|json} in
Lwt_main.run (
Client.patch ~headers ~body uri >>= fun (_, body) ->
Cohttp_lwt.Body.to_string body >|= fun s ->
print_endline s)
$headers = @{
"Authorization" = "Bearer 1000.03xxxxxxxxxxxxxxxxxa5317.dxxxxxxxxxxxxxxxxxfa"
"Content-Type" = "application/json"
}
$body = @'
{"name":"Development Team","project_ids":{"add":"[4000000005103, 4000000005133]","remove":"[4000000014077, 4000000008020]"},"user_ids":{"add":"[4000000005103, 4000000005133]","remove":"[4000000014077, 4000000008020]"},"lead":4000000005103,"email":"richard.santos@zylker.com","notify":false}
'@
$response = Invoke-RestMethod -Uri "https://projects.zoho.com/api/v3/portal/[PORTAL_ID]/teams/[TEAM_ID]" -Method PATCH -Headers $headers -Body $body
$response | ConvertTo-Json
library(httr)
url <- "https://projects.zoho.com/api/v3/portal/[PORTAL_ID]/teams/[TEAM_ID]"
response <- PATCH(
url,
add_headers(Authorization = "Bearer 1000.03xxxxxxxxxxxxxxxxxa5317.dxxxxxxxxxxxxxxxxxfa"),
content_type_json(),
body = "{\"name\":\"Development Team\",\"project_ids\":{\"add\":\"[4000000005103, 4000000005133]\",\"remove\":\"[4000000014077, 4000000008020]\"},\"user_ids\":{\"add\":\"[4000000005103, 4000000005133]\",\"remove\":\"[4000000014077, 4000000008020]\"},\"lead\":4000000005103,\"email\":\"richard.santos@zylker.com\",\"notify\":false}"
)
content(response, "text")
import Foundation
let url = URL(string: "https://projects.zoho.com/api/v3/portal/[PORTAL_ID]/teams/[TEAM_ID]")!
var request = URLRequest(url: url)
request.httpMethod = "PATCH"
request.setValue("Bearer 1000.03xxxxxxxxxxxxxxxxxa5317.dxxxxxxxxxxxxxxxxxfa", forHTTPHeaderField: "Authorization")
request.setValue("application/json", forHTTPHeaderField: "Content-Type")
request.httpBody = """
{"name":"Development Team","project_ids":{"add":"[4000000005103, 4000000005133]","remove":"[4000000014077, 4000000008020]"},"user_ids":{"add":"[4000000005103, 4000000005133]","remove":"[4000000014077, 4000000008020]"},"lead":4000000005103,"email":"richard.santos@zylker.com","notify":false}
""".data(using: .utf8)
let semaphore = DispatchSemaphore(value: 0)
let task = URLSession.shared.dataTask(with: request) { data, response, error in
if let data = data, let result = String(data: data, encoding: .utf8) {
print(result)
}
semaphore.signal()
}
task.resume()
semaphore.wait()
Sample Input
Sample Response
Possible Errors
Remove a specific team from a portal. Use this API to permanently remove a team and its associations within a portal.
OAuth Scope:
ZohoProjects.teams.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
requiredIdentifier of a team. Obtained from the Get Project Teams API - the "id" field in the response corresponds to team_id.
Request Example
curl -X DELETE \
'https://projects.zoho.com/api/v3/portal/[PORTAL_ID]/teams/[TEAM_ID]' \
-H 'Authorization: Bearer 1000.03xxxxxxxxxxxxxxxxxa5317.dxxxxxxxxxxxxxxxxxfa'
url = "https://projects.zoho.com/api/v3/portal/[PORTAL_ID]/teams/[TEAM_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]/teams/[TEAM_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]/teams/[TEAM_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]/teams/[TEAM_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]/teams/[TEAM_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]/teams/[TEAM_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]/teams/[TEAM_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]/teams/[TEAM_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]/teams/[TEAM_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]/teams/[TEAM_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]/teams/[TEAM_ID] HTTP/1.1
Host: https://projects.zoho.com/api/v3/portal/[PORTAL_ID]/teams/[TEAM_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]/teams/[TEAM_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]/teams/[TEAM_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]/teams/[TEAM_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]/teams/[TEAM_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]/teams/[TEAM_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]/teams/[TEAM_ID]" -Method DELETE -Headers $headers
$response | ConvertTo-Json
library(httr)
url <- "https://projects.zoho.com/api/v3/portal/[PORTAL_ID]/teams/[TEAM_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]/teams/[TEAM_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