### Zoho Projects API GET Request Example (Java) Source: https://projects.zoho.com/api-docs/index This Java code snippet demonstrates how to construct and execute a GET request to the Zoho Projects API using Apache HttpClient. It includes setting up the SSL context and building the URI with parameters. ```java 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://projectsapi.zoho.com/api/v3/portal/"739121528"/projects/"1752587000000097024"/(timesheet|timelogs)"); HttpUriRequest requestObj = new HttpGet(uriBuilder.build()); uriBuilder.addParameter("page", ""); uriBuilder.addParameter("per_page", ""); uriBuilder.addParameter("view_type", ""); uriBuilder.addParameter("start_date", ""); uriBuilder.addParameter("end_date", ""); ``` -------------------------------- ### Get User Permissions via Java Source: https://projects.zoho.com/api-docs/index Java code example for making a GET request to the Zoho Projects API to fetch user permissions. It demonstrates setting up the HTTP client, SSL context, and request headers. ```Java 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://projectsapi.zoho.com/api/v3/portal/"739121528"/users/me/[ records | others | portal | settings | integrations | custom ]/permissions"); HttpUriRequest requestObj = new HttpGet(uriBuilder.build()); uriBuilder.addParameter("modules", ""); requestObj.addHeader("Authorization", "Zoho-oauthtoken 1000.xxxxxxx.xxxxxxx"); HttpResponse response = httpclient.execute(requestObj); HttpEntity responseEntity = response.getEntity(); Object responseObject = EntityUtils.toString(responseEntity); String responseString = responseObject.toString(); ``` -------------------------------- ### Zoho Projects API Request Setup (Java) Source: https://projects.zoho.com/api-docs/index This Java code snippet shows how to set up an HTTP client and prepare a GET request for the Zoho Projects API. It includes configuring SSL and building the URI with parameters. ```java 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://projectsapi.zoho.com/api/v3/portal/"739121528"/(timesheet|timelogs)"); HttpUriRequest requestObj = new HttpGet(uriBuilder.build()); uriBuilder.addParameter("page", ""); uriBuilder.addParameter("per_page", ""); uriBuilder.addParameter("view_type", ""); uriBuilder.addParameter("start_date", ""); uriBuilder.addParameter("end_date", ""); ``` -------------------------------- ### Zoho Projects API GET Request (Java) Source: https://projects.zoho.com/api-docs/index Java code example demonstrating how to construct and execute a GET request to the Zoho Projects API using Apache HttpClient. It includes setting up SSL, building the URI with parameters, and adding the Authorization header. ```Java 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://projectsapi.zoho.com/api/v3/portal/"739121528"/settings/fields"); HttpUriRequest requestObj = new HttpGet(uriBuilder.build()); uriBuilder.addParameter("module", "Projects"); uriBuilder.addParameter("filter", "{\"is_mandatory\":\"-\",\"is_renamed\":\"-\",\"is_default\":\"-\",\"is_unassociated\":\"-\",\"is_association_info_needed\":\"-\",\"layout_id\":\"4000003211234\",\"project_id\":\"4009238123434\",\"field_ids\":\"-\",\"fields\":\"-\"}"); uriBuilder.addParameter("index", "1"); uriBuilder.addParameter("range", "100"); uriBuilder.addParameter("page", "1"); uriBuilder.addParameter("per_page", "10"); requestObj.addHeader("Authorization", "Zoho-oauthtoken 1000.xxxxxxx.xxxxxxx"); HttpResponse response = httpclient.execute(requestObj); HttpEntity responseEntity = response.getEntity(); Object responseObject = EntityUtils.toString(responseEntity); String responseString = responseObject.toString(); ``` -------------------------------- ### Example API Request with Authorization Header Source: https://projects.zoho.com/api-docs/index Demonstrates how to make a GET request to the Zoho Projects API, including the mandatory Authorization header with an OAuth access token. ```shell curl -X GET https://projectsapi.zoho.com/api/v3/portal/687892/mytasks -H "Authorization:Zoho-oauthtoken 1000.03xxxxxxxxxxxxxxxxxa5317.dxxxxxxxxxxxxxxxxxfa" ``` -------------------------------- ### Execute Blueprint Transition with cURL Source: https://projects.zoho.com/api-docs/index Example of executing a blueprint transition using cURL. This command demonstrates how to send a GET request with specific query parameters and authorization headers to the Zoho Projects API. ```cURL curl -X GET 'https://projectsapi.zoho.com/api/v3/portal/"739121528"/automation/blueprint/[BLUEPRINTID]/transition/[TRANSITIONID]/during-actions?entity_id="11000000000371"&skip_bug_validation="true"' -H 'Authorization : Zoho-oauthtoken 1000.03xxxxxxxxxxxxxxxxxa5317.dxxxxxxxxxxxxxxxxxfa' ``` -------------------------------- ### Query Zoho Projects API with Java Source: https://projects.zoho.com/api-docs/index Java code example demonstrating how to construct and execute a GET request to the Zoho Projects API using Apache HttpClient. It includes setting up SSL, URI parameters, and authorization headers. ```java 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://projectsapi.zoho.com/api/v3/portal/"739121528"/projects/"1752587000000097024"/forums/"1752587000000097035"/tasks"); HttpUriRequest requestObj = new HttpGet(uriBuilder.build()); uriBuilder.addParameter("page", ""); uriBuilder.addParameter("per_page", ""); requestObj.addHeader("Authorization", "Zoho-oauthtoken 1000.xxxxxxx.xxxxxxx"); HttpResponse response = httpclient.execute(requestObj); HttpEntity responseEntity = response.getEntity(); Object responseObject = EntityUtils.toString(responseEntity); String responseString = responseObject.toString(); ``` -------------------------------- ### Zoho Projects API GET Request Example (Java) Source: https://projects.zoho.com/api-docs/index This Java code snippet shows how to construct and execute a GET request to the Zoho Projects API using Apache HttpClient. It configures SSL, sets up the URI with parameters, adds the Authorization header, and processes the response. ```Java 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://projectsapi.zoho.com/api/v3/portal/"739121528"/settings/fields"); HttpUriRequest requestObj = new HttpGet(uriBuilder.build()); uriBuilder.addParameter("module", "Projects"); uriBuilder.addParameter("filter", "{\"is_mandatory\":\"-\",\"is_renamed\":\"-\",\"is_default\":\"-\",\"is_unassociated\":\"-\",\"is_association_info_needed\":\"-\",\"layout_id\":\"4000003211234\",\"project_id\":\"4009238123434\",\"field_ids\":\"-\",\"fields\":\"-\"}"); uriBuilder.addParameter("index", "1"); uriBuilder.addParameter("range", "100"); uriBuilder.addParameter("page", "1"); uriBuilder.addParameter("per_page", "10"); requestObj.addHeader("Authorization", "Zoho-oauthtoken 1000.xxxxxxx.xxxxxxx"); HttpResponse response = httpclient.execute(requestObj); HttpEntity responseEntity = response.getEntity(); Object responseObject = EntityUtils.toString(responseEntity); String responseString = responseObject.toString(); ``` -------------------------------- ### Query Extension Storage (Java) Source: https://projects.zoho.com/api-docs/index Java code example for querying extension storage. It utilizes Apache HttpClient to construct and execute a GET request, including setting SSL context and adding parameters. ```Java 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://projectsapi.zoho.com/api/v3/portal/"739121528"/extensions/[EXTENSIONID]/storage"); HttpUriRequest requestObj = new HttpGet(uriBuilder.build()); uriBuilder.addParameter("key", ""); uriBuilder.addParameter("type", ""); uriBuilder.addParameter("entity", "{\"id\":\"4000000062001\",\"type\":\"Task\",\"project_id\":\"23806000097545166\"}"); requestObj.addHeader("Authorization", "Zoho-oauthtoken 1000.xxxxxxx.xxxxxxx"); HttpResponse response = httpclient.execute(requestObj); HttpEntity responseEntity = response.getEntity(); Object responseObject = EntityUtils.toString(responseEntity); String responseString = responseObject.toString(); ``` -------------------------------- ### Zoho Projects API GET Request Example (cURL) Source: https://projects.zoho.com/api-docs/index This cURL command demonstrates how to make a GET request to the Zoho Projects API to retrieve field settings. It includes parameters for module, filtering, indexing, range, page, and per_page, along with the necessary Authorization header. ```cURL curl -X GET 'https://projectsapi.zoho.com/api/v3/portal/"739121528"/settings/fields?module="Projects"&"filter"={"is_mandatory":"-","is_renamed":"-","is_default":"-","is_unassociated":"-","is_association_info_needed":"-","layout_id":"4000003211234","project_id":"4009238123434","field_ids":"-","fields":"-"}&index="1"&range="100"&page="1"&per_page="10"' -H 'Authorization : Zoho-oauthtoken 1000.03xxxxxxxxxxxxxxxxxa5317.dxxxxxxxxxxxxxxxxxfa' ``` -------------------------------- ### Query Zoho Projects API with Java Source: https://projects.zoho.com/api-docs/index Java code example demonstrating how to construct and execute a GET request to the Zoho Projects API. It utilizes HttpClientBuilder for SSL configuration and URIBuilder for adding query parameters. ```Java 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://projectsapi.zoho.com/api/v3/portal/"739121528"/tasks/customviews/form"); HttpUriRequest requestObj = new HttpGet(uriBuilder.build()); uriBuilder.addParameter("project_id", ""); uriBuilder.addParameter("view_id", ""); requestObj.addHeader("Authorization", "Zoho-oauthtoken 1000.xxxxxxx.xxxxxxx"); HttpResponse response = httpclient.execute(requestObj); HttpEntity responseEntity = response.getEntity(); Object responseObject = EntityUtils.toString(responseEntity); String responseString = responseObject.toString(); ``` -------------------------------- ### Query Extension Storage (cURL) Source: https://projects.zoho.com/api-docs/index Example of how to query extension storage using cURL. It demonstrates making a GET request with parameters for key, type, and entity details. ```cURL curl -X GET 'https://projectsapi.zoho.com/api/v3/portal/"739121528"/extensions/[EXTENSIONID]/storage?key="all"&type="Task"&"entity"={"id":"4000000062001","type":"Task","project_id":"23806000097545166"}' -H 'Authorization : Zoho-oauthtoken 1000.03xxxxxxxxxxxxxxxxxa5317.dxxxxxxxxxxxxxxxxxfa' ``` -------------------------------- ### Get Workload Report Details (Java) Source: https://projects.zoho.com/api-docs/index Java code example for fetching workload report details from the Zoho Projects API. It demonstrates setting up an HTTP client, constructing the request URI with parameters, and adding the necessary authorization header. ```java 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://projectsapi.zoho.com/api/v3/portal/"739121528"/reports/workload/meta"); HttpUriRequest requestObj = new HttpGet(uriBuilder.build()); uriBuilder.addParameter("project_id", ""); uriBuilder.addParameter("from_date", ""); uriBuilder.addParameter("to_date", ""); uriBuilder.addParameter("time_period", ""); uriBuilder.addParameter("group_by", ""); requestObj.addHeader("Authorization", "Zoho-oauthtoken 1000.xxxxxxx.xxxxxxx"); HttpResponse response = httpclient.execute(requestObj); HttpEntity responseEntity = response.getEntity(); Object responseObject = EntityUtils.toString(responseEntity); String responseString = responseObject.toString(); ``` -------------------------------- ### Get Tasks with Java HttpClient Source: https://projects.zoho.com/api-docs/index Example of retrieving tasks from Zoho Projects using Java's HttpClient. It shows how to build the request, set parameters, add headers, and handle the response, including SSL configuration. ```java 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://projectsapi.zoho.com/api/v3/portal/"739121528"/tasks"); HttpUriRequest requestObj = new HttpGet(uriBuilder.build()); uriBuilder.addParameter("page", ""); uriBuilder.addParameter("per_page", ""); uriBuilder.addParameter("filter", "{\"criteria\":[{\"cfid\":\"4000000000242\",\"api_name\":\"task_name\",\"field_name\":\"task_name\",\"criteria_condition\":\"contains\",\"value\":\"23806000000019001\",\"relative_columns\":[{\"cfid\":\"4000000000242\",\"offset\":\"1\",\"unit\":\"days\",\"prior\":\"before\"}]}],\"pattern\":\"1 AND 2\"}"); uriBuilder.addParameter("sort_by", ""); uriBuilder.addParameter("view_id", ""); requestObj.addHeader("Authorization", "Zoho-oauthtoken 1000.xxxxxxx.xxxxxxx"); HttpResponse response = httpclient.execute(requestObj); HttpEntity responseEntity = response.getEntity(); Object responseObject = EntityUtils.toString(responseEntity); String responseString = responseObject.toString(); ``` -------------------------------- ### Retrieve Tags with Query Parameters (Java) Source: https://projects.zoho.com/api-docs/index Java code example for fetching tags from Zoho Projects API. It utilizes Apache HttpClient to construct and execute the GET request, including setting up SSL and adding necessary headers and parameters. ```Java 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://projectsapi.zoho.com/api/v3/portal/"739121528"/projects/"1752587000000097024"/tags"); HttpUriRequest requestObj = new HttpGet(uriBuilder.build()); uriBuilder.addParameter("page", ""); uriBuilder.addParameter("per_page", ""); uriBuilder.addParameter("filter", "{\"criteria\":[{\"cfid\":\"4000000000242\",\"criteria_condition\":\"contains\",\"value\":\"[1752587000000097269]\"}],\"pattern\":\"1\"}"); uriBuilder.addParameter("sort_by", ""); uriBuilder.addParameter("view", ""); requestObj.addHeader("Authorization", "Zoho-oauthtoken 1000.xxxxxxx.xxxxxxx"); HttpResponse response = httpclient.execute(requestObj); HttpEntity responseEntity = response.getEntity(); Object responseObject = EntityUtils.toString(responseEntity); String responseString = responseObject.toString(); ``` -------------------------------- ### Fetch Tasks with Query Parameters (Java) Source: https://projects.zoho.com/api-docs/index This Java example shows how to interact with the Zoho Projects API to retrieve tasks, incorporating query parameters for pagination and sorting. It utilizes Apache HttpClient to construct and execute the GET request, setting headers and parameters. ```Java 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://projectsapi.zoho.com/api/v3/portal/"739121528"/projects/"1752587000000097024"/tasks/"1752587000000097101"/"Test Comment""); HttpUriRequest requestObj = new HttpGet(uriBuilder.build()); uriBuilder.addParameter("index", ""); uriBuilder.addParameter("range", ""); uriBuilder.addParameter("page", ""); uriBuilder.addParameter("per_page", ""); uriBuilder.addParameter("sort_by", ""); requestObj.addHeader("Authorization", "Zoho-oauthtoken 1000.xxxxxxx.xxxxxxx"); HttpResponse response = httpclient.execute(requestObj); HttpEntity responseEntity = response.getEntity(); Object responseObject = EntityUtils.toString(responseEntity); String responseString = responseObject.toString(); ``` -------------------------------- ### Get Workload Report using Java Source: https://projects.zoho.com/api-docs/index Java code example for fetching workload report data from Zoho Projects API. It demonstrates setting up an HTTP client, constructing the request URI with parameters, adding the authorization header, and processing the response. ```Java 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://projectsapi.zoho.com/api/v3/portal/"739121528"/reports/workload/meta"); HttpUriRequest requestObj = new HttpGet(uriBuilder.build()); uriBuilder.addParameter("project_id", ""); uriBuilder.addParameter("from_date", ""); uriBuilder.addParameter("to_date", ""); uriBuilder.addParameter("time_period", ""); uriBuilder.addParameter("group_by", ""); requestObj.addHeader("Authorization", "Zoho-oauthtoken 1000.xxxxxxx.xxxxxxx"); HttpResponse response = httpclient.execute(requestObj); HttpEntity responseEntity = response.getEntity(); Object responseObject = EntityUtils.toString(responseEntity); String responseString = responseObject.toString(); ``` -------------------------------- ### Get Holiday List Details (Java) Source: https://projects.zoho.com/api-docs/index Provides a Java example for retrieving the details of a holiday list in Zoho Projects using HttpClient. Covers request setup, headers, and response handling. ```java 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://projectsapi.zoho.com/api/v3/portal/"739121528"/holiday-list/[HOLIDAY-LISTID]"); HttpUriRequest requestObj = new HttpGet(uriBuilder.build()); requestObj.addHeader("Authorization", "Zoho-oauthtoken 1000.xxxxxxx.xxxxxxx"); HttpResponse response = httpclient.execute(requestObj); HttpEntity responseEntity = response.getEntity(); Object responseObject = EntityUtils.toString(responseEntity); String responseString = responseObject.toString(); ``` -------------------------------- ### Execute Blueprint Transition (Java) Source: https://projects.zoho.com/api-docs/index Java code example for executing a blueprint transition using Apache HttpClient. It demonstrates setting up the request, including headers and the JSON body, and executing the request. ```java 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://projectsapi.zoho.com/api/v3/portal/"739121528"/automation/blueprint/[BLUEPRINTID]/transition/[TRANSITIONID]/execute"); HttpUriRequest requestObj = new HttpPost(uriBuilder.build()); HttpEntityEnclosingRequestBase requestBase = (HttpEntityEnclosingRequestBase) requestObj; String requestBody = "{\"entity_id\":\"11000000000371\",\"skip_bug_validation\":\"true\",\"field_values\":[{\"id\":\"11000000000371\",\"value\":[1752587000000097269],\"is_days\":\"true\",\"attachment_ids\":[\"12345678987654321\"]}]}"; requestBase.setEntity(new StringEntity(requestBody, HTTP.UTF_8)); requestObj.addHeader("Authorization", "Zoho-oauthtoken 1000.xxxxxxx.xxxxxxx"); HttpResponse response = httpclient.execute(requestObj); HttpEntity responseEntity = response.getEntity(); Object responseObject = EntityUtils.toString(responseEntity); String responseString = responseObject.toString(); ``` -------------------------------- ### Get Specific Issue Comment (cURL) Source: https://projects.zoho.com/api-docs/index Retrieves a specific comment on an issue by its ID. This example shows a basic GET request with an authorization header. ```cURL curl -X GET 'https://projectsapi.zoho.com/api/v3/portal/"739121528"/projects/"1752587000000097024"/issues/"1752587000000097233"/"Test Comment"/"1752587000000097046"' -H 'Authorization : Zoho-oauthtoken 1000.03xxxxxxxxxxxxxxxxxa5317.dxxxxxxxxxxxxxxxxxfa' ``` -------------------------------- ### Zoho Projects API: Time Field Example Source: https://projects.zoho.com/api-docs/index Captures the time in HH:MM format. This example shows how to input start and end times. ```json {"start_time": "23:30","end_time": "13:30"} ``` -------------------------------- ### Execute Blueprint Transition (Java) Source: https://projects.zoho.com/api-docs/index This Java code example shows how to execute a blueprint transition using Apache HttpClient. It covers setting up the HTTP client, building the request URI, constructing the request body, and sending the request. ```java 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://projectsapi.zoho.com/api/v3/portal/"739121528"/automation/blueprint/[BLUEPRINTID]/transition/[TRANSITIONID]/execute"); HttpUriRequest requestObj = new HttpPost(uriBuilder.build()); HttpEntityEnclosingRequestBase requestBase = (HttpEntityEnclosingRequestBase) requestObj; String requestBody = "{\"entity_id\":\"11000000000371\",\"skip_bug_validation\":\"true\",\"field_values\":[{\"id\":\"11000000000371\",\"value\":[1752587000000097269],\"is_days\":\"true\",\"attachment_ids\":[\"12345678987654321\"]}]}"; requestBase.setEntity(new StringEntity(requestBody, HTTP.UTF_8)); requestObj.addHeader("Authorization", "Zoho-oauthtoken 1000.xxxxxxx.xxxxxxx"); HttpResponse response = httpclient.execute(requestObj); HttpEntity responseEntity = response.getEntity(); Object responseObject = EntityUtils.toString(responseEntity); String responseString = responseObject.toString(); ``` -------------------------------- ### Execute Blueprint Transition with Java Source: https://projects.zoho.com/api-docs/index Java code example for executing a blueprint transition. It utilizes Apache HttpClient to build and execute the request, including setting up SSL, defining the URI with parameters, and adding the authorization header. ```Java 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://projectsapi.zoho.com/api/v3/portal/"739121528"/automation/blueprint/[BLUEPRINTID]/transition/[TRANSITIONID]/during-actions"); HttpUriRequest requestObj = new HttpGet(uriBuilder.build()); uriBuilder.addParameter("entity_id", ""); uriBuilder.addParameter("skip_bug_validation", ""); requestObj.addHeader("Authorization", "Zoho-oauthtoken 1000.xxxxxxx.xxxxxxx"); HttpResponse response = httpclient.execute(requestObj); HttpEntity responseEntity = response.getEntity(); Object responseObject = EntityUtils.toString(responseEntity); String responseString = responseObject.toString(); ``` -------------------------------- ### Zoho Projects API GET Request (cURL) Source: https://projects.zoho.com/api-docs/index Example of making a GET request to the Zoho Projects API to retrieve fields, including filtering and pagination parameters. Requires an Authorization header. ```cURL curl -X GET 'https://projectsapi.zoho.com/api/v3/portal/"739121528"/settings/fields?module="Projects"&"filter"={"is_mandatory":"-","is_renamed":"-","is_default":"-","is_unassociated":"-","is_association_info_needed":"-","layout_id":"4000003211234","project_id":"4009238123434","field_ids":"-","fields":"-"}&index="1"&range="100"&page="1"&per_page="10"' -H 'Authorization : Zoho-oauthtoken 1000.03xxxxxxxxxxxxxxxxxa5317.dxxxxxxxxxxxxxxxxxfa' ``` -------------------------------- ### Get Specific Comment Source: https://projects.zoho.com/api-docs/index This snippet shows how to retrieve a single comment from a task list using its unique ID. It provides examples in cURL and Java for making the GET request and handling the response. ```cURL curl -X GET 'https://projectsapi.zoho.com/api/v3/portal/"739121528"/projects/"1752587000000097024"/tasklists/[TASKLISTID]/"Test Comment"/"1752587000000097046"' -H 'Authorization : Zoho-oauthtoken 1000.03xxxxxxxxxxxxxxxxxa5317.dxxxxxxxxxxxxxxxxxfa' ``` ```Java 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://projectsapi.zoho.com/api/v3/portal/"739121528"/projects/"1752587000000097024"/tasklists/[TASKLISTID]/"Test Comment"/"1752587000000097046""); HttpUriRequest requestObj = new HttpGet(uriBuilder.build()); requestObj.addHeader("Authorization", "Zoho-oauthtoken 1000.xxxxxxx.xxxxxxx"); HttpResponse response = httpclient.execute(requestObj); HttpEntity responseEntity = response.getEntity(); Object responseObject = EntityUtils.toString(responseEntity); String responseString = responseObject.toString(); ``` -------------------------------- ### Fetch Project Phases with Java HttpClient Source: https://projects.zoho.com/api-docs/index Provides a Java code example using Apache HttpClient to fetch project phases. It shows how to set up the client, build the URI with parameters, add headers, and execute the request. ```Java 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://projectsapi.zoho.com/api/v3/portal/"739121528"/phases"); HttpUriRequest requestObj = new HttpGet(uriBuilder.build()); uriBuilder.addParameter("page", ""); uriBuilder.addParameter("per_page", ""); uriBuilder.addParameter("sort_by", ""); uriBuilder.addParameter("view_id", ""); uriBuilder.addParameter("milestone_ids", ""); uriBuilder.addParameter("filter", "{\"criteria\":[{\"cfid\":\"23806000091055001\",\"api_name\":\"phase_name\",\"field_name\":\"phase_name\",\"criteria_condition\":\"contains\",\"value\":\"[1752587000000097269]\",\"relative_columns\":[{\"cfid\":\"23806000091055001\",\"offset\":\"1\",\"unit\":\"days\",\"prior\":\"before\"}]}]},\"pattern\":\"1 AND 2\"}"); uriBuilder.addParameter("provider", "{"provider":"PUSHY","index":"1","range":"100"}"); requestObj.addHeader("Authorization", "Zoho-oauthtoken 1000.xxxxxxx.xxxxxxx"); HttpResponse response = httpclient.execute(requestObj); HttpEntity responseEntity = response.getEntity(); Object responseObject = EntityUtils.toString(responseEntity); String responseString = responseObject.toString(); ``` -------------------------------- ### Get Current User Permissions in Project (Java) Source: https://projects.zoho.com/api-docs/index Retrieves project permission details for the current user using Java. This example demonstrates making a GET request to the project permissions endpoint and handling the response. ```Java 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://projectsapi.zoho.com/api/v3/portal/"739121528"/projects/"1752587000000097024"/users/me/[ records | others | portal | settings | integrations | custom ]/permissions"); HttpUriRequest requestObj = new HttpGet(uriBuilder.build()); requestObj.addHeader("Authorization", "Zoho-oauthtoken 1000.xxxxxxx.xxxxxxx"); HttpResponse response = httpclient.execute(requestObj); HttpEntity responseEntity = response.getEntity(); Object responseObject = EntityUtils.toString(responseEntity); String responseString = responseObject.toString(); ``` -------------------------------- ### Get User Permissions (Java) Source: https://projects.zoho.com/api-docs/index Retrieves permission details for the current user in a Zoho Projects portal using Java. This example demonstrates setting up an HTTP client, making a GET request, and processing the response. ```Java 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://projectsapi.zoho.com/api/v3/portal/"739121528"/users/me/fields/permissions"); HttpUriRequest requestObj = new HttpGet(uriBuilder.build()); uriBuilder.addParameter("modules", ""); requestObj.addHeader("Authorization", "Zoho-oauthtoken 1000.xxxxxxx.xxxxxxx"); HttpResponse response = httpclient.execute(requestObj); HttpEntity responseEntity = response.getEntity(); Object responseObject = EntityUtils.toString(responseEntity); String responseString = responseObject.toString(); ``` -------------------------------- ### Initialize Zoho Projects API Request (Java) Source: https://projects.zoho.com/api-docs/index Java code snippet demonstrating the initialization of an HTTP client and URI builder for making requests to the Zoho Projects API. It includes setting up SSL context and creating a GET request object. ```Java 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://projectsapi.zoho.com/api/v3/portal/"739121528"/(timesheet|timelogs)/report"); HttpUriRequest requestObj = new HttpGet(uriBuilder.build()); uriBuilder.addParameter("page", ""); uriBuilder.addParameter("per_page", ""); uriBuilder.addParameter("report_type", ""); uriBuilder.addParameter("view_type", ""); uriBuilder.addParameter("start_date", ""); ``` -------------------------------- ### Get Followers for Custom Entity (cURL) Source: https://projects.zoho.com/api-docs/index Retrieves a list of followers for a custom entity using cURL. This example shows how to construct the GET request with query parameters for pagination and includes the necessary authorization header. ```cURL curl -X GET 'https://projectsapi.zoho.com/api/v3/portal/"739121528"/module/[a-zA-Z_0-9]+/entity/[ENTITYID]/followers?page="1"&per_page="10"' -H 'Authorization : Zoho-oauthtoken 1000.03xxxxxxxxxxxxxxxxxa5317.dxxxxxxxxxxxxxxxxxfa' ``` -------------------------------- ### Java Example for Bulk Export Source: https://projects.zoho.com/api-docs/index This Java code demonstrates how to initiate a bulk export from Zoho Projects using the HttpClient library. It configures SSL, sets up the request URI with parameters, and includes the authorization token. ```Java 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://projectsapi.zoho.com/api/v3/portal/"739121528"/bulk/export/fields"); HttpUriRequest requestObj = new HttpGet(uriBuilder.build()); uriBuilder.addParameter("module", ""); requestObj.addHeader("Authorization", "Zoho-oauthtoken 1000.xxxxxxx.xxxxxxx"); HttpResponse response = httpclient.execute(requestObj); HttpEntity responseEntity = response.getEntity(); Object responseObject = EntityUtils.toString(responseEntity); String responseString = responseObject.toString(); ``` -------------------------------- ### Execute Blueprint Transition with Java Source: https://projects.zoho.com/api-docs/index This Java code snippet shows how to execute a blueprint transition using the Zoho Projects API. It utilizes Apache HttpClient to construct and send the GET request, including setting up SSL context and adding necessary headers and parameters. ```Java 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://projectsapi.zoho.com/api/v3/portal/"739121528"/automation/blueprint/[BLUEPRINTID]/transition/[TRANSITIONID]/during-actions"); HttpUriRequest requestObj = new HttpGet(uriBuilder.build()); uriBuilder.addParameter("entity_id", ""); uriBuilder.addParameter("skip_bug_validation", ""); requestObj.addHeader("Authorization", "Zoho-oauthtoken 1000.xxxxxxx.xxxxxxx"); HttpResponse response = httpclient.execute(requestObj); HttpEntity responseEntity = response.getEntity(); Object responseObject = EntityUtils.toString(responseEntity); String responseString = responseObject.toString(); ``` -------------------------------- ### Get Specific Issue Comment (Java) Source: https://projects.zoho.com/api-docs/index Java code example for fetching a specific issue comment using its ID. It demonstrates setting up an HTTP client, creating a GET request with the correct URI, and adding the authorization header. ```Java 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://projectsapi.zoho.com/api/v3/portal/"739121528"/projects/"1752587000000097024"/issues/"1752587000000097233"/"Test Comment"/"1752587000000097046""); HttpUriRequest requestObj = new HttpGet(uriBuilder.build()); requestObj.addHeader("Authorization", "Zoho-oauthtoken 1000.xxxxxxx.xxxxxxx"); HttpResponse response = httpclient.execute(requestObj); HttpEntity responseEntity = response.getEntity(); Object responseObject = EntityUtils.toString(responseEntity); String responseString = responseObject.toString(); ``` -------------------------------- ### Get Business Hours Version Details (Java) Source: https://projects.zoho.com/api-docs/index This Java code example demonstrates how to fetch business hours version details using the Zoho Projects API. It constructs a GET request with pagination parameters and includes necessary headers for authorization. ```java 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://projectsapi.zoho.com/api/v3/portal/"739121528"/business-hours/[BUSINESS-HOURID]/versions"); HttpUriRequest requestObj = new HttpGet(uriBuilder.build()); uriBuilder.addParameter("page", ""); uriBuilder.addParameter("per_page", ""); requestObj.addHeader("Authorization", "Zoho-oauthtoken 1000.xxxxxxx.xxxxxxx"); HttpResponse response = httpclient.execute(requestObj); HttpEntity responseEntity = response.getEntity(); Object responseObject = EntityUtils.toString(responseEntity); String responseString = responseObject.toString(); ``` -------------------------------- ### Query Project Clients with Parameters (Java) Source: https://projects.zoho.com/api-docs/index This Java code example shows how to retrieve clients for a project using the Zoho Projects API. It utilizes Apache HttpClient to build and execute the GET request, including setting up SSL context and adding query parameters like view_type, sort, page, and per_page. It also demonstrates how to handle the API response. ```Java 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://projectsapi.zoho.com/api/v3/portal/"739121528"/projects/"1752587000000097024"/clients/users"); HttpUriRequest requestObj = new HttpGet(uriBuilder.build()); uriBuilder.addParameter("view_type", ""); uriBuilder.addParameter("sort", ""); uriBuilder.addParameter("page", ""); uriBuilder.addParameter("per_page", ""); requestObj.addHeader("Authorization", "Zoho-oauthtoken 1000.xxxxxxx.xxxxxxx"); HttpResponse response = httpclient.execute(requestObj); HttpEntity responseEntity = response.getEntity(); Object responseObject = EntityUtils.toString(responseEntity); String responseString = responseObject.toString(); ``` -------------------------------- ### Query Teams with Parameters (Java) Source: https://projects.zoho.com/api-docs/index Java code example demonstrating how to make an API request to retrieve team information, including setting up the HTTP client, URI, and headers. ```Java 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://projectsapi.zoho.com/api/v3/portal/"739121528"/teams/projects"); HttpUriRequest requestObj = new HttpGet(uriBuilder.build()); uriBuilder.addParameter("team_ids", ""); uriBuilder.addParameter("page", ""); uriBuilder.addParameter("per_page", ""); uriBuilder.addParameter("last_modified_time", ""); requestObj.addHeader("Authorization", "Zoho-oauthtoken 1000.xxxxxxx.xxxxxxx"); HttpResponse response = httpclient.execute(requestObj); HttpEntity responseEntity = response.getEntity(); Object responseObject = EntityUtils.toString(responseEntity); String responseString = responseObject.toString(); ``` -------------------------------- ### Zoho Projects API GET Request Example (cURL) Source: https://projects.zoho.com/api-docs/index This cURL command demonstrates how to make a GET request to the Zoho Projects API to retrieve timesheet or timelog data. It includes various query parameters for filtering and specifying the data to be fetched. ```shell curl -X GET 'https://projectsapi.zoho.com/api/v3/portal/"739121528"/projects/"1752587000000097024"/(timesheet|timelogs)?page="1"&per_page="10"&view_type="date"&start_date="2023-12-20"&end_date="2024-12-20"&"filter"={"project":"-","assignee":"-","billtype":"-","approvaltype":"-","tsheetperiod":"-","clientcompany":"-","content":"Samplecontent","invoicestatus":"-","usergroups":"-","criteria":[{"cfid":"4000000000242","field_name":"-","custom_feild":"-","field_type":"start_date","criteria_condition":"contains","value":"[1752587000000097269]","relative_columns":[{"cfid":"4000000000242","offset":"-","unit":"-","prior":"-"}]}],"pattern":"1AND2","cf_single_line":"-","cf_user_picklist":"-","cf_number":"-","cf_date":"-","cf_decimal":"-","cf_multi_line":"-","cf_email":"-"}&"module"={"id":"4000000062001","type":"Task"}&view_id="23806000074760021"&timelog_group_id=-&frompage=-' -H 'Authorization : Zoho-oauthtoken 1000.03xxxxxxxxxxxxxxxxxa5317.dxxxxxxxxxxxxxxxxxfa' ``` -------------------------------- ### Get Issue Comment with Filtering (Java) Source: https://projects.zoho.com/api-docs/index Java code example for retrieving an issue comment with pagination, sorting, and filtering. It utilizes Apache HttpClient to build and execute the GET request, including setting SSL context and adding parameters and headers. ```Java 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://projectsapi.zoho.com/api/v3/portal/"739121528"/projects/"1752587000000097024"/issues/"1752587000000097233"/"Test Comment""); HttpUriRequest requestObj = new HttpGet(uriBuilder.build()); uriBuilder.addParameter("page", ""); uriBuilder.addParameter("per_page", ""); uriBuilder.addParameter("sort_by", ""); uriBuilder.addParameter("filter", "{\"criteria\":[{\"cfid\":\"23806000091055001\",\"api_name\":\"phase_name\",\"field_name\":\"phase_name\",\"criteria_condition\":\"contains\",\"value\":\"[1752587000000097269]\",\"relative_columns\":[{\"cfid\":\"23806000091055001\",\"offset\":\"1\",\"unit\":\"days\",\"prior\":\"before\"}]}],\"pattern\":\"1 AND 2\"}"); requestObj.addHeader("Authorization", "Zoho-oauthtoken 1000.xxxxxxx.xxxxxxx"); HttpResponse response = httpclient.execute(requestObj); HttpEntity responseEntity = response.getEntity(); Object responseObject = EntityUtils.toString(responseEntity); String responseString = responseObject.toString(); ```