Zoho Projects API Documentation
Text copied
File not found

Settings

This module covers operations related to time log settings within Zoho Projects. Use this API to retrieve, update, or configure metadata and settings related to time logs.

Get Time Log Settings Metadata

Retrieve the metadata for time log settings in a specific portal. Use this API to access the available options and configurations for time log settings.

GET

/api/v3/portal/[PORTAL_ID]/settings/timelog/meta-data

OAuth Scope:

ZohoProjects.timesheets.READ

Path Parameters

Param Name
Data Type
Description

Request Example

Request Example
  • cURL
  • Deluge
  • Node.js
  • Ruby
  • PHP
  • Python
  • C
  • C#
  • C++
  • Clojure
  • Go
  • HTTP
  • Java
  • JS Fetch
  • Kotlin
  • Objective-C
  • OCaml
  • PowerShell
  • R
  • Swift

curl -X GET \
'https://projects.zoho.com/api/v3/portal/[PORTAL_ID]/settings/timelog/meta-data' \
-H 'Authorization: Bearer 1000.03xxxxxxxxxxxxxxxxxa5317.dxxxxxxxxxxxxxxxxxfa'

url = "https://projects.zoho.com/api/v3/portal/[PORTAL_ID]/settings/timelog/meta-data";
response = invokeUrl
[
    url: url
    type: GET
    connection: "projects"
];
info response;
const https = require('https');
const url = new URL('https://projects.zoho.com/api/v3/portal/[PORTAL_ID]/settings/timelog/meta-data');

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]/settings/timelog/meta-data")

http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true

request = Net::HTTP::Get.new(url)
request["Authorization"] = "Bearer 1000.03xxxxxxxxxxxxxxxxxa5317.dxxxxxxxxxxxxxxxxxfa"

response = http.request(request)
puts response.read_body
<?php
$url = "https://projects.zoho.com/api/v3/portal/[PORTAL_ID]/settings/timelog/meta-data";

$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]/settings/timelog/meta-data"

headers = {
    "Authorization": "Bearer 1000.03xxxxxxxxxxxxxxxxxa5317.dxxxxxxxxxxxxxxxxxfa",
}

response = requests.get(url, headers=headers)

print(response.json())
#include <stdio.h>
#include <string.h>
#include <curl/curl.h>

int main(void) {
    CURL *curl = curl_easy_init();
    if (curl) {
        struct curl_slist *headers = NULL;
        headers = curl_slist_append(headers, "Authorization: Bearer 1000.03xxxxxxxxxxxxxxxxxa5317.dxxxxxxxxxxxxxxxxxfa");

        curl_easy_setopt(curl, CURLOPT_URL, "https://projects.zoho.com/api/v3/portal/[PORTAL_ID]/settings/timelog/meta-data");
        curl_easy_setopt(curl, CURLOPT_HTTPHEADER, headers);
        curl_easy_setopt(curl, CURLOPT_CUSTOMREQUEST, "GET");

        CURLcode res = curl_easy_perform(curl);
        if (res != CURLE_OK)
            fprintf(stderr, "curl failed: %s\n", curl_easy_strerror(res));

        curl_slist_free_all(headers);
        curl_easy_cleanup(curl);
    }
    return 0;
}
using System.Net.Http;
using System.Text;
using System.Web;

var client = new HttpClient();
client.DefaultRequestHeaders.Add("Authorization", "Bearer 1000.03xxxxxxxxxxxxxxxxxa5317.dxxxxxxxxxxxxxxxxxfa");

var request = new HttpRequestMessage(HttpMethod.Get, "https://projects.zoho.com/api/v3/portal/[PORTAL_ID]/settings/timelog/meta-data");

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]/settings/timelog/meta-data");
        curl_easy_setopt(curl, CURLOPT_HTTPHEADER, headers);
        curl_easy_setopt(curl, CURLOPT_CUSTOMREQUEST, "GET");
        curl_easy_setopt(curl, CURLOPT_WRITEFUNCTION, WriteCallback);
        curl_easy_setopt(curl, CURLOPT_WRITEDATA, &response);

        CURLcode res = curl_easy_perform(curl);
        if (res == CURLE_OK)
            std::cout << response << std::endl;
        else
            std::cerr << curl_easy_strerror(res) << std::endl;

        curl_slist_free_all(headers);
        curl_easy_cleanup(curl);
    }
    return 0;
}
(require '[clj-http.client :as client])

(def response
  (client/get "https://projects.zoho.com/api/v3/portal/[PORTAL_ID]/settings/timelog/meta-data"
    {:headers {"Authorization" "Bearer 1000.03xxxxxxxxxxxxxxxxxa5317.dxxxxxxxxxxxxxxxxxfa"}
     :as :json}))

(println (:body response))
package main

import (
    "fmt"
    "io"
    "net/http"
)

func main() {
    req, _ := http.NewRequest("GET", "https://projects.zoho.com/api/v3/portal/[PORTAL_ID]/settings/timelog/meta-data", nil)
    req.Header.Add("Authorization", "Bearer 1000.03xxxxxxxxxxxxxxxxxa5317.dxxxxxxxxxxxxxxxxxfa")

    resp, _ := http.DefaultClient.Do(req)
    defer resp.Body.Close()
    body, _ := io.ReadAll(resp.Body)
    fmt.Println(string(body))
}
GET https://projects.zoho.com/api/v3/portal/[PORTAL_ID]/settings/timelog/meta-data HTTP/1.1
Host: https://projects.zoho.com/api/v3/portal/[PORTAL_ID]/settings/timelog/meta-data
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]/settings/timelog/meta-data");
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]/settings/timelog/meta-data';

const options = {
  method: 'GET',
  headers: {
    'Authorization': 'Bearer 1000.03xxxxxxxxxxxxxxxxxa5317.dxxxxxxxxxxxxxxxxxfa'
  }
};

fetch(url, options)
  .then(response => response.json())
  .then(data => console.log(data))
  .catch(error => console.error(error));
import java.net.HttpURLConnection
import java.net.URL
import okhttp3.HttpUrl.Companion.toHttpUrl

fun main() {
    val url = URL("https://projects.zoho.com/api/v3/portal/[PORTAL_ID]/settings/timelog/meta-data")
    val conn = url.openConnection() as HttpURLConnection
    conn.requestMethod = "GET"
    conn.setRequestProperty("Authorization", "Bearer 1000.03xxxxxxxxxxxxxxxxxa5317.dxxxxxxxxxxxxxxxxxfa")

    val response = conn.inputStream.bufferedReader().readText()
    println(response)
}
NSURL *url = [NSURL URLWithString:@"https://projects.zoho.com/api/v3/portal/[PORTAL_ID]/settings/timelog/meta-data"];
NSMutableURLRequest *request = [NSMutableURLRequest requestWithURL:url];
[request setHTTPMethod:@"GET"];
[request setValue:@"Bearer 1000.03xxxxxxxxxxxxxxxxxa5317.dxxxxxxxxxxxxxxxxxfa" forHTTPHeaderField:@"Authorization"];

NSURLSession *session = [NSURLSession sharedSession];
NSURLSessionDataTask *task = [session dataTaskWithRequest:request
    completionHandler:^(NSData *data, NSURLResponse *response, NSError *error) {
        NSString *result = [[NSString alloc] initWithData:data encoding:NSUTF8StringEncoding];
        NSLog(@"%@", result);
}];
[task resume];
open Lwt
open Cohttp_lwt_unix

let () =
  let uri = Uri.of_string "https://projects.zoho.com/api/v3/portal/[PORTAL_ID]/settings/timelog/meta-data" in
  let headers = Cohttp.Header.init ()
    |> fun h -> Cohttp.Header.add h "Authorization" "Bearer 1000.03xxxxxxxxxxxxxxxxxa5317.dxxxxxxxxxxxxxxxxxfa"
  in
  Lwt_main.run (
    Client.get ~headers uri >>= fun (_, body) ->
    Cohttp_lwt.Body.to_string body >|= fun s ->
    print_endline s)
$headers = @{
    "Authorization" = "Bearer 1000.03xxxxxxxxxxxxxxxxxa5317.dxxxxxxxxxxxxxxxxxfa"
}

$response = Invoke-RestMethod -Uri "https://projects.zoho.com/api/v3/portal/[PORTAL_ID]/settings/timelog/meta-data" -Method GET -Headers $headers

$response | ConvertTo-Json
library(httr)

url <- "https://projects.zoho.com/api/v3/portal/[PORTAL_ID]/settings/timelog/meta-data"

response <- GET(
  url,
  add_headers(Authorization = "Bearer 1000.03xxxxxxxxxxxxxxxxxa5317.dxxxxxxxxxxxxxxxxxfa")
)

content(response, "text")
import Foundation

let url = URL(string: "https://projects.zoho.com/api/v3/portal/[PORTAL_ID]/settings/timelog/meta-data")!
var request = URLRequest(url: url)
request.httpMethod = "GET"
request.setValue("Bearer 1000.03xxxxxxxxxxxxxxxxxa5317.dxxxxxxxxxxxxxxxxxfa", forHTTPHeaderField: "Authorization")

let semaphore = DispatchSemaphore(value: 0)
let task = URLSession.shared.dataTask(with: request) { data, response, error in
    if let data = data, let result = String(data: data, encoding: .utf8) {
        print(result)
    }
    semaphore.signal()
}
task.resume()
semaphore.wait()

Sample Response

200{ "timer_restriction_obj" : { "has_task_timer_running" : "false", "has_issue_timer_running" : "false", "has_generic_timer_running" : "false" }, "is_people_integrated" : "false", "exclude_reminder_for" : { "profiles" : [ { "name" : "Portal Owner", "id" : "8000000002837" } ] }, "is_tsapproval_available" : "true", "threshold" : "1439", "is_draft_supported" : "false", "user_restriction_obj" : { "has_user_timer_not_in_team" : "false", "has_other_user_timer" : "false" } }

Get Time Log Settings

Retrieve the time log settings for a specific portal. Use this API to access the current configuration of time log settings in a portal.

GET

/api/v3/portal/[PORTAL_ID]/settings/timelog

OAuth Scope:

ZohoProjects.timesheets.READ

Path Parameters

Param Name
Data Type
Description

Request Example

Request Example
  • cURL
  • Deluge
  • Node.js
  • Ruby
  • PHP
  • Python
  • C
  • C#
  • C++
  • Clojure
  • Go
  • HTTP
  • Java
  • JS Fetch
  • Kotlin
  • Objective-C
  • OCaml
  • PowerShell
  • R
  • Swift

curl -X GET \
'https://projects.zoho.com/api/v3/portal/[PORTAL_ID]/settings/timelog' \
-H 'Authorization: Bearer 1000.03xxxxxxxxxxxxxxxxxa5317.dxxxxxxxxxxxxxxxxxfa'

url = "https://projects.zoho.com/api/v3/portal/[PORTAL_ID]/settings/timelog";
response = invokeUrl
[
    url: url
    type: GET
    connection: "projects"
];
info response;
const https = require('https');
const url = new URL('https://projects.zoho.com/api/v3/portal/[PORTAL_ID]/settings/timelog');

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]/settings/timelog")

http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true

request = Net::HTTP::Get.new(url)
request["Authorization"] = "Bearer 1000.03xxxxxxxxxxxxxxxxxa5317.dxxxxxxxxxxxxxxxxxfa"

response = http.request(request)
puts response.read_body
<?php
$url = "https://projects.zoho.com/api/v3/portal/[PORTAL_ID]/settings/timelog";

$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]/settings/timelog"

headers = {
    "Authorization": "Bearer 1000.03xxxxxxxxxxxxxxxxxa5317.dxxxxxxxxxxxxxxxxxfa",
}

response = requests.get(url, headers=headers)

print(response.json())
#include <stdio.h>
#include <string.h>
#include <curl/curl.h>

int main(void) {
    CURL *curl = curl_easy_init();
    if (curl) {
        struct curl_slist *headers = NULL;
        headers = curl_slist_append(headers, "Authorization: Bearer 1000.03xxxxxxxxxxxxxxxxxa5317.dxxxxxxxxxxxxxxxxxfa");

        curl_easy_setopt(curl, CURLOPT_URL, "https://projects.zoho.com/api/v3/portal/[PORTAL_ID]/settings/timelog");
        curl_easy_setopt(curl, CURLOPT_HTTPHEADER, headers);
        curl_easy_setopt(curl, CURLOPT_CUSTOMREQUEST, "GET");

        CURLcode res = curl_easy_perform(curl);
        if (res != CURLE_OK)
            fprintf(stderr, "curl failed: %s\n", curl_easy_strerror(res));

        curl_slist_free_all(headers);
        curl_easy_cleanup(curl);
    }
    return 0;
}
using System.Net.Http;
using System.Text;
using System.Web;

var client = new HttpClient();
client.DefaultRequestHeaders.Add("Authorization", "Bearer 1000.03xxxxxxxxxxxxxxxxxa5317.dxxxxxxxxxxxxxxxxxfa");

var request = new HttpRequestMessage(HttpMethod.Get, "https://projects.zoho.com/api/v3/portal/[PORTAL_ID]/settings/timelog");

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]/settings/timelog");
        curl_easy_setopt(curl, CURLOPT_HTTPHEADER, headers);
        curl_easy_setopt(curl, CURLOPT_CUSTOMREQUEST, "GET");
        curl_easy_setopt(curl, CURLOPT_WRITEFUNCTION, WriteCallback);
        curl_easy_setopt(curl, CURLOPT_WRITEDATA, &response);

        CURLcode res = curl_easy_perform(curl);
        if (res == CURLE_OK)
            std::cout << response << std::endl;
        else
            std::cerr << curl_easy_strerror(res) << std::endl;

        curl_slist_free_all(headers);
        curl_easy_cleanup(curl);
    }
    return 0;
}
(require '[clj-http.client :as client])

(def response
  (client/get "https://projects.zoho.com/api/v3/portal/[PORTAL_ID]/settings/timelog"
    {:headers {"Authorization" "Bearer 1000.03xxxxxxxxxxxxxxxxxa5317.dxxxxxxxxxxxxxxxxxfa"}
     :as :json}))

(println (:body response))
package main

import (
    "fmt"
    "io"
    "net/http"
)

func main() {
    req, _ := http.NewRequest("GET", "https://projects.zoho.com/api/v3/portal/[PORTAL_ID]/settings/timelog", nil)
    req.Header.Add("Authorization", "Bearer 1000.03xxxxxxxxxxxxxxxxxa5317.dxxxxxxxxxxxxxxxxxfa")

    resp, _ := http.DefaultClient.Do(req)
    defer resp.Body.Close()
    body, _ := io.ReadAll(resp.Body)
    fmt.Println(string(body))
}
GET https://projects.zoho.com/api/v3/portal/[PORTAL_ID]/settings/timelog HTTP/1.1
Host: https://projects.zoho.com/api/v3/portal/[PORTAL_ID]/settings/timelog
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]/settings/timelog");
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]/settings/timelog';

const options = {
  method: 'GET',
  headers: {
    'Authorization': 'Bearer 1000.03xxxxxxxxxxxxxxxxxa5317.dxxxxxxxxxxxxxxxxxfa'
  }
};

fetch(url, options)
  .then(response => response.json())
  .then(data => console.log(data))
  .catch(error => console.error(error));
import java.net.HttpURLConnection
import java.net.URL
import okhttp3.HttpUrl.Companion.toHttpUrl

fun main() {
    val url = URL("https://projects.zoho.com/api/v3/portal/[PORTAL_ID]/settings/timelog")
    val conn = url.openConnection() as HttpURLConnection
    conn.requestMethod = "GET"
    conn.setRequestProperty("Authorization", "Bearer 1000.03xxxxxxxxxxxxxxxxxa5317.dxxxxxxxxxxxxxxxxxfa")

    val response = conn.inputStream.bufferedReader().readText()
    println(response)
}
NSURL *url = [NSURL URLWithString:@"https://projects.zoho.com/api/v3/portal/[PORTAL_ID]/settings/timelog"];
NSMutableURLRequest *request = [NSMutableURLRequest requestWithURL:url];
[request setHTTPMethod:@"GET"];
[request setValue:@"Bearer 1000.03xxxxxxxxxxxxxxxxxa5317.dxxxxxxxxxxxxxxxxxfa" forHTTPHeaderField:@"Authorization"];

NSURLSession *session = [NSURLSession sharedSession];
NSURLSessionDataTask *task = [session dataTaskWithRequest:request
    completionHandler:^(NSData *data, NSURLResponse *response, NSError *error) {
        NSString *result = [[NSString alloc] initWithData:data encoding:NSUTF8StringEncoding];
        NSLog(@"%@", result);
}];
[task resume];
open Lwt
open Cohttp_lwt_unix

let () =
  let uri = Uri.of_string "https://projects.zoho.com/api/v3/portal/[PORTAL_ID]/settings/timelog" in
  let headers = Cohttp.Header.init ()
    |> fun h -> Cohttp.Header.add h "Authorization" "Bearer 1000.03xxxxxxxxxxxxxxxxxa5317.dxxxxxxxxxxxxxxxxxfa"
  in
  Lwt_main.run (
    Client.get ~headers uri >>= fun (_, body) ->
    Cohttp_lwt.Body.to_string body >|= fun s ->
    print_endline s)
$headers = @{
    "Authorization" = "Bearer 1000.03xxxxxxxxxxxxxxxxxa5317.dxxxxxxxxxxxxxxxxxfa"
}

$response = Invoke-RestMethod -Uri "https://projects.zoho.com/api/v3/portal/[PORTAL_ID]/settings/timelog" -Method GET -Headers $headers

$response | ConvertTo-Json
library(httr)

url <- "https://projects.zoho.com/api/v3/portal/[PORTAL_ID]/settings/timelog"

response <- GET(
  url,
  add_headers(Authorization = "Bearer 1000.03xxxxxxxxxxxxxxxxxa5317.dxxxxxxxxxxxxxxxxxfa")
)

content(response, "text")
import Foundation

let url = URL(string: "https://projects.zoho.com/api/v3/portal/[PORTAL_ID]/settings/timelog")!
var request = URLRequest(url: url)
request.httpMethod = "GET"
request.setValue("Bearer 1000.03xxxxxxxxxxxxxxxxxa5317.dxxxxxxxxxxxxxxxxxfa", forHTTPHeaderField: "Authorization")

let semaphore = DispatchSemaphore(value: 0)
let task = URLSession.shared.dataTask(with: request) { data, response, error in
    if let data = data, let result = String(data: data, encoding: .utf8) {
        print(result)
    }
    semaphore.signal()
}
task.resume()
semaphore.wait()

Sample Response

200{ "overlap_restriction" : "allow", "restrict_timelogs" : { "weekend" : "false", "holiday" : "false", "zpeople_leave" : "false" }, "loghour_restriction" : { "is_enabled" : "false" }, "reminder" : { "is_enabled" : "false" }, "timelog_configuration" : { "log_type" : "both", "is_generallog_enabled" : "true", "is_tasklog_enabled" : "true", "is_issuelog_enabled" : "true" }, "project_status_restriction" : { "is_enabled" : true, "restricted_statuses" : [ { "id" : "12000000000515" }, { "id" : "12000000000507" } ] }, "closed_entity_restriction" : "false", "approval" : { "is_enabled" : "true", "is_auto_approval" : "false", "type" : "allowed_approvers", "email_notification" : { "is_enabled" : "false" } }, "is_draft_enabled" : "false", "period_settings" : { "future_log" : "not_allow", "past_log" : "allow" }, "allow_timelog_for" : "owners", "multi_timer_restriction" : "false", "workhour_restriction" : "false", "ip_based_restriction" : "false", "allowed_ips" : [ ], "completion_pct_restriction" : "false", "timer_restricted_profiles" : [ ], "is_timer_profile_restricted" : "false" }

Update Time Log Settings

Modify the time log settings of a project

PATCH

/api/v3/portal/[PORTAL_ID]/settings/timelog

OAuth Scope:

ZohoProjects.timesheets.UPDATE

Path Parameters

Param Name
Data Type
Description

Body Parameters

Param Name
Data Type
Description

Request Example

Request Example
  • cURL
  • Deluge
  • Node.js
  • Ruby
  • PHP
  • Python
  • C
  • C#
  • C++
  • Clojure
  • Go
  • HTTP
  • Java
  • JS Fetch
  • JSON
  • Kotlin
  • Objective-C
  • OCaml
  • PowerShell
  • R
  • Swift

curl -X PATCH \
'https://projects.zoho.com/api/v3/portal/[PORTAL_ID]/settings/timelog' \
-H 'Authorization: Bearer 1000.03xxxxxxxxxxxxxxxxxa5317.dxxxxxxxxxxxxxxxxxfa' \
-H 'Content-Type: application/json' \
-d '{"allow_timelog_for":"everyone","closed_entity_restriction":true,"multi_timer_restriction":false,"workhour_restriction":true,"entity_date_restriction":true,"allow_unassigned_entity_logs":true,"zpeople_attendance_restriction":true,"project_status_restriction":{"is_enabled":true,"restricted_statuses":[{"add":[{"id":"4000000062001"}],"remove":[{"id":"4000000062001"}]}]},"restrict_timelogs":{"weekend":true,"holiday":true,"zpeople_leave":true},"timelog_configuration":{"log_type":"both","is_tasklog_enabled":true,"is_issuelog_enabled":true,"is_generallog_enabled":true},"overlap_restriction":"allow","period_settings":{"past_log":"allow","future_log":"allow","is_editlog_restricted":true,"period_customized_data":{"past_value":1,"past_unit":"day","future_value":1,"future_unit":"day"},"past_log_excluded_users":[{"add":[{"zpuid":"4000000002055"}],"remove":[{"zpuid":"4000000002055"}]}]},"loghour_restriction":{"is_enabled":true,"max_per_day":"08:00","max_per_week":"40:00"},"reminder":{"is_enabled":true,"threshold":1,"daily_reminder":{"minutes":1,"condition":"before_start_of_business_hours","notify_running_timers":"true"},"weekly_reminder":{"minutes":1,"condition":"before_start_of_business_week"},"exclude_reminder_for":{"users":{"add":["4000000002055"],"remove":["4000000002055"]},"profiles":{"add":["4000000002055"],"remove":["4000000002055"]}}},"approval":{"is_enabled":true,"type":"all","is_auto_approval":true,"email_notification":{"is_enabled":true,"frequency":"daily","time":"22:00"}},"is_draft_enabled":true,"ip_based_restriction":true,"allowed_ips":{"type":"range","from":"203.0.113.1","to":"203.0.113.254"},"completion_pct_restriction":true,"timer_restricted_profiles":["4000000002055"]}'

url = "https://projects.zoho.com/api/v3/portal/[PORTAL_ID]/settings/timelog";
params = Map();
params.put("allow_timelog_for", "everyone");
params.put("closed_entity_restriction", true);
params.put("multi_timer_restriction", false);
params.put("workhour_restriction", true);
params.put("entity_date_restriction", true);
params.put("allow_unassigned_entity_logs", true);
params.put("zpeople_attendance_restriction", true);
params.put("project_status_restriction", {"is_enabled":true,"restricted_statuses":[{"add":[{"id":"4000000062001"}],"remove":[{"id":"4000000062001"}]}]});
params.put("restrict_timelogs", {"weekend":true,"holiday":true,"zpeople_leave":true});
params.put("timelog_configuration", {"log_type":"both","is_tasklog_enabled":true,"is_issuelog_enabled":true,"is_generallog_enabled":true});
params.put("overlap_restriction", "allow");
params.put("period_settings", {"past_log":"allow","future_log":"allow","is_editlog_restricted":true,"period_customized_data":{"past_value":1,"past_unit":"day","future_value":1,"future_unit":"day"},"past_log_excluded_users":[{"add":[{"zpuid":"4000000002055"}],"remove":[{"zpuid":"4000000002055"}]}]});
params.put("loghour_restriction", {"is_enabled":true,"max_per_day":"08:00","max_per_week":"40:00"});
params.put("reminder", {"is_enabled":true,"threshold":1,"daily_reminder":{"minutes":1,"condition":"before_start_of_business_hours","notify_running_timers":"true"},"weekly_reminder":{"minutes":1,"condition":"before_start_of_business_week"},"exclude_reminder_for":{"users":{"add":["4000000002055"],"remove":["4000000002055"]},"profiles":{"add":["4000000002055"],"remove":["4000000002055"]}}});
params.put("approval", {"is_enabled":true,"type":"all","is_auto_approval":true,"email_notification":{"is_enabled":true,"frequency":"daily","time":"22:00"}});
params.put("is_draft_enabled", true);
params.put("ip_based_restriction", true);
params.put("allowed_ips", {"type":"range","from":"203.0.113.1","to":"203.0.113.254"});
params.put("completion_pct_restriction", true);
params.put("timer_restricted_profiles", ["4000000002055"]);
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]/settings/timelog');

const payload = JSON.stringify({"allow_timelog_for":"everyone","closed_entity_restriction":true,"multi_timer_restriction":false,"workhour_restriction":true,"entity_date_restriction":true,"allow_unassigned_entity_logs":true,"zpeople_attendance_restriction":true,"project_status_restriction":{"is_enabled":true,"restricted_statuses":[{"add":[{"id":"4000000062001"}],"remove":[{"id":"4000000062001"}]}]},"restrict_timelogs":{"weekend":true,"holiday":true,"zpeople_leave":true},"timelog_configuration":{"log_type":"both","is_tasklog_enabled":true,"is_issuelog_enabled":true,"is_generallog_enabled":true},"overlap_restriction":"allow","period_settings":{"past_log":"allow","future_log":"allow","is_editlog_restricted":true,"period_customized_data":{"past_value":1,"past_unit":"day","future_value":1,"future_unit":"day"},"past_log_excluded_users":[{"add":[{"zpuid":"4000000002055"}],"remove":[{"zpuid":"4000000002055"}]}]},"loghour_restriction":{"is_enabled":true,"max_per_day":"08:00","max_per_week":"40:00"},"reminder":{"is_enabled":true,"threshold":1,"daily_reminder":{"minutes":1,"condition":"before_start_of_business_hours","notify_running_timers":"true"},"weekly_reminder":{"minutes":1,"condition":"before_start_of_business_week"},"exclude_reminder_for":{"users":{"add":["4000000002055"],"remove":["4000000002055"]},"profiles":{"add":["4000000002055"],"remove":["4000000002055"]}}},"approval":{"is_enabled":true,"type":"all","is_auto_approval":true,"email_notification":{"is_enabled":true,"frequency":"daily","time":"22:00"}},"is_draft_enabled":true,"ip_based_restriction":true,"allowed_ips":{"type":"range","from":"203.0.113.1","to":"203.0.113.254"},"completion_pct_restriction":true,"timer_restricted_profiles":["4000000002055"]});

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]/settings/timelog")

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 = '{"allow_timelog_for":"everyone","closed_entity_restriction":true,"multi_timer_restriction":false,"workhour_restriction":true,"entity_date_restriction":true,"allow_unassigned_entity_logs":true,"zpeople_attendance_restriction":true,"project_status_restriction":{"is_enabled":true,"restricted_statuses":[{"add":[{"id":"4000000062001"}],"remove":[{"id":"4000000062001"}]}]},"restrict_timelogs":{"weekend":true,"holiday":true,"zpeople_leave":true},"timelog_configuration":{"log_type":"both","is_tasklog_enabled":true,"is_issuelog_enabled":true,"is_generallog_enabled":true},"overlap_restriction":"allow","period_settings":{"past_log":"allow","future_log":"allow","is_editlog_restricted":true,"period_customized_data":{"past_value":1,"past_unit":"day","future_value":1,"future_unit":"day"},"past_log_excluded_users":[{"add":[{"zpuid":"4000000002055"}],"remove":[{"zpuid":"4000000002055"}]}]},"loghour_restriction":{"is_enabled":true,"max_per_day":"08:00","max_per_week":"40:00"},"reminder":{"is_enabled":true,"threshold":1,"daily_reminder":{"minutes":1,"condition":"before_start_of_business_hours","notify_running_timers":"true"},"weekly_reminder":{"minutes":1,"condition":"before_start_of_business_week"},"exclude_reminder_for":{"users":{"add":["4000000002055"],"remove":["4000000002055"]},"profiles":{"add":["4000000002055"],"remove":["4000000002055"]}}},"approval":{"is_enabled":true,"type":"all","is_auto_approval":true,"email_notification":{"is_enabled":true,"frequency":"daily","time":"22:00"}},"is_draft_enabled":true,"ip_based_restriction":true,"allowed_ips":{"type":"range","from":"203.0.113.1","to":"203.0.113.254"},"completion_pct_restriction":true,"timer_restricted_profiles":["4000000002055"]}'

response = http.request(request)
puts response.read_body
<?php
$url = "https://projects.zoho.com/api/v3/portal/[PORTAL_ID]/settings/timelog";

$curl = curl_init();

curl_setopt_array($curl, [
  CURLOPT_URL => $url,
  CURLOPT_RETURNTRANSFER => true,
  CURLOPT_CUSTOMREQUEST => "PATCH",
  CURLOPT_POSTFIELDS => '{"allow_timelog_for":"everyone","closed_entity_restriction":true,"multi_timer_restriction":false,"workhour_restriction":true,"entity_date_restriction":true,"allow_unassigned_entity_logs":true,"zpeople_attendance_restriction":true,"project_status_restriction":{"is_enabled":true,"restricted_statuses":[{"add":[{"id":"4000000062001"}],"remove":[{"id":"4000000062001"}]}]},"restrict_timelogs":{"weekend":true,"holiday":true,"zpeople_leave":true},"timelog_configuration":{"log_type":"both","is_tasklog_enabled":true,"is_issuelog_enabled":true,"is_generallog_enabled":true},"overlap_restriction":"allow","period_settings":{"past_log":"allow","future_log":"allow","is_editlog_restricted":true,"period_customized_data":{"past_value":1,"past_unit":"day","future_value":1,"future_unit":"day"},"past_log_excluded_users":[{"add":[{"zpuid":"4000000002055"}],"remove":[{"zpuid":"4000000002055"}]}]},"loghour_restriction":{"is_enabled":true,"max_per_day":"08:00","max_per_week":"40:00"},"reminder":{"is_enabled":true,"threshold":1,"daily_reminder":{"minutes":1,"condition":"before_start_of_business_hours","notify_running_timers":"true"},"weekly_reminder":{"minutes":1,"condition":"before_start_of_business_week"},"exclude_reminder_for":{"users":{"add":["4000000002055"],"remove":["4000000002055"]},"profiles":{"add":["4000000002055"],"remove":["4000000002055"]}}},"approval":{"is_enabled":true,"type":"all","is_auto_approval":true,"email_notification":{"is_enabled":true,"frequency":"daily","time":"22:00"}},"is_draft_enabled":true,"ip_based_restriction":true,"allowed_ips":{"type":"range","from":"203.0.113.1","to":"203.0.113.254"},"completion_pct_restriction":true,"timer_restricted_profiles":["4000000002055"]}',
  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]/settings/timelog"

headers = {
    "Authorization": "Bearer 1000.03xxxxxxxxxxxxxxxxxa5317.dxxxxxxxxxxxxxxxxxfa",
    "Content-Type": "application/json",
}

payload = '{"allow_timelog_for":"everyone","closed_entity_restriction":true,"multi_timer_restriction":false,"workhour_restriction":true,"entity_date_restriction":true,"allow_unassigned_entity_logs":true,"zpeople_attendance_restriction":true,"project_status_restriction":{"is_enabled":true,"restricted_statuses":[{"add":[{"id":"4000000062001"}],"remove":[{"id":"4000000062001"}]}]},"restrict_timelogs":{"weekend":true,"holiday":true,"zpeople_leave":true},"timelog_configuration":{"log_type":"both","is_tasklog_enabled":true,"is_issuelog_enabled":true,"is_generallog_enabled":true},"overlap_restriction":"allow","period_settings":{"past_log":"allow","future_log":"allow","is_editlog_restricted":true,"period_customized_data":{"past_value":1,"past_unit":"day","future_value":1,"future_unit":"day"},"past_log_excluded_users":[{"add":[{"zpuid":"4000000002055"}],"remove":[{"zpuid":"4000000002055"}]}]},"loghour_restriction":{"is_enabled":true,"max_per_day":"08:00","max_per_week":"40:00"},"reminder":{"is_enabled":true,"threshold":1,"daily_reminder":{"minutes":1,"condition":"before_start_of_business_hours","notify_running_timers":"true"},"weekly_reminder":{"minutes":1,"condition":"before_start_of_business_week"},"exclude_reminder_for":{"users":{"add":["4000000002055"],"remove":["4000000002055"]},"profiles":{"add":["4000000002055"],"remove":["4000000002055"]}}},"approval":{"is_enabled":true,"type":"all","is_auto_approval":true,"email_notification":{"is_enabled":true,"frequency":"daily","time":"22:00"}},"is_draft_enabled":true,"ip_based_restriction":true,"allowed_ips":{"type":"range","from":"203.0.113.1","to":"203.0.113.254"},"completion_pct_restriction":true,"timer_restricted_profiles":["4000000002055"]}'

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]/settings/timelog");
        curl_easy_setopt(curl, CURLOPT_HTTPHEADER, headers);
        curl_easy_setopt(curl, CURLOPT_CUSTOMREQUEST, "PATCH");
        curl_easy_setopt(curl, CURLOPT_POSTFIELDS, "{\"allow_timelog_for\":\"everyone\",\"closed_entity_restriction\":true,\"multi_timer_restriction\":false,\"workhour_restriction\":true,\"entity_date_restriction\":true,\"allow_unassigned_entity_logs\":true,\"zpeople_attendance_restriction\":true,\"project_status_restriction\":{\"is_enabled\":true,\"restricted_statuses\":[{\"add\":[{\"id\":\"4000000062001\"}],\"remove\":[{\"id\":\"4000000062001\"}]}]},\"restrict_timelogs\":{\"weekend\":true,\"holiday\":true,\"zpeople_leave\":true},\"timelog_configuration\":{\"log_type\":\"both\",\"is_tasklog_enabled\":true,\"is_issuelog_enabled\":true,\"is_generallog_enabled\":true},\"overlap_restriction\":\"allow\",\"period_settings\":{\"past_log\":\"allow\",\"future_log\":\"allow\",\"is_editlog_restricted\":true,\"period_customized_data\":{\"past_value\":1,\"past_unit\":\"day\",\"future_value\":1,\"future_unit\":\"day\"},\"past_log_excluded_users\":[{\"add\":[{\"zpuid\":\"4000000002055\"}],\"remove\":[{\"zpuid\":\"4000000002055\"}]}]},\"loghour_restriction\":{\"is_enabled\":true,\"max_per_day\":\"08:00\",\"max_per_week\":\"40:00\"},\"reminder\":{\"is_enabled\":true,\"threshold\":1,\"daily_reminder\":{\"minutes\":1,\"condition\":\"before_start_of_business_hours\",\"notify_running_timers\":\"true\"},\"weekly_reminder\":{\"minutes\":1,\"condition\":\"before_start_of_business_week\"},\"exclude_reminder_for\":{\"users\":{\"add\":[\"4000000002055\"],\"remove\":[\"4000000002055\"]},\"profiles\":{\"add\":[\"4000000002055\"],\"remove\":[\"4000000002055\"]}}},\"approval\":{\"is_enabled\":true,\"type\":\"all\",\"is_auto_approval\":true,\"email_notification\":{\"is_enabled\":true,\"frequency\":\"daily\",\"time\":\"22:00\"}},\"is_draft_enabled\":true,\"ip_based_restriction\":true,\"allowed_ips\":{\"type\":\"range\",\"from\":\"203.0.113.1\",\"to\":\"203.0.113.254\"},\"completion_pct_restriction\":true,\"timer_restricted_profiles\":[\"4000000002055\"]}");

        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]/settings/timelog");
request.Content = new StringContent(
    @"{""allow_timelog_for"":""everyone"",""closed_entity_restriction"":true,""multi_timer_restriction"":false,""workhour_restriction"":true,""entity_date_restriction"":true,""allow_unassigned_entity_logs"":true,""zpeople_attendance_restriction"":true,""project_status_restriction"":{""is_enabled"":true,""restricted_statuses"":[{""add"":[{""id"":""4000000062001""}],""remove"":[{""id"":""4000000062001""}]}]},""restrict_timelogs"":{""weekend"":true,""holiday"":true,""zpeople_leave"":true},""timelog_configuration"":{""log_type"":""both"",""is_tasklog_enabled"":true,""is_issuelog_enabled"":true,""is_generallog_enabled"":true},""overlap_restriction"":""allow"",""period_settings"":{""past_log"":""allow"",""future_log"":""allow"",""is_editlog_restricted"":true,""period_customized_data"":{""past_value"":1,""past_unit"":""day"",""future_value"":1,""future_unit"":""day""},""past_log_excluded_users"":[{""add"":[{""zpuid"":""4000000002055""}],""remove"":[{""zpuid"":""4000000002055""}]}]},""loghour_restriction"":{""is_enabled"":true,""max_per_day"":""08:00"",""max_per_week"":""40:00""},""reminder"":{""is_enabled"":true,""threshold"":1,""daily_reminder"":{""minutes"":1,""condition"":""before_start_of_business_hours"",""notify_running_timers"":""true""},""weekly_reminder"":{""minutes"":1,""condition"":""before_start_of_business_week""},""exclude_reminder_for"":{""users"":{""add"":[""4000000002055""],""remove"":[""4000000002055""]},""profiles"":{""add"":[""4000000002055""],""remove"":[""4000000002055""]}}},""approval"":{""is_enabled"":true,""type"":""all"",""is_auto_approval"":true,""email_notification"":{""is_enabled"":true,""frequency"":""daily"",""time"":""22:00""}},""is_draft_enabled"":true,""ip_based_restriction"":true,""allowed_ips"":{""type"":""range"",""from"":""203.0.113.1"",""to"":""203.0.113.254""},""completion_pct_restriction"":true,""timer_restricted_profiles"":[""4000000002055""]}",
    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]/settings/timelog");
        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, "{\"allow_timelog_for\":\"everyone\",\"closed_entity_restriction\":true,\"multi_timer_restriction\":false,\"workhour_restriction\":true,\"entity_date_restriction\":true,\"allow_unassigned_entity_logs\":true,\"zpeople_attendance_restriction\":true,\"project_status_restriction\":{\"is_enabled\":true,\"restricted_statuses\":[{\"add\":[{\"id\":\"4000000062001\"}],\"remove\":[{\"id\":\"4000000062001\"}]}]},\"restrict_timelogs\":{\"weekend\":true,\"holiday\":true,\"zpeople_leave\":true},\"timelog_configuration\":{\"log_type\":\"both\",\"is_tasklog_enabled\":true,\"is_issuelog_enabled\":true,\"is_generallog_enabled\":true},\"overlap_restriction\":\"allow\",\"period_settings\":{\"past_log\":\"allow\",\"future_log\":\"allow\",\"is_editlog_restricted\":true,\"period_customized_data\":{\"past_value\":1,\"past_unit\":\"day\",\"future_value\":1,\"future_unit\":\"day\"},\"past_log_excluded_users\":[{\"add\":[{\"zpuid\":\"4000000002055\"}],\"remove\":[{\"zpuid\":\"4000000002055\"}]}]},\"loghour_restriction\":{\"is_enabled\":true,\"max_per_day\":\"08:00\",\"max_per_week\":\"40:00\"},\"reminder\":{\"is_enabled\":true,\"threshold\":1,\"daily_reminder\":{\"minutes\":1,\"condition\":\"before_start_of_business_hours\",\"notify_running_timers\":\"true\"},\"weekly_reminder\":{\"minutes\":1,\"condition\":\"before_start_of_business_week\"},\"exclude_reminder_for\":{\"users\":{\"add\":[\"4000000002055\"],\"remove\":[\"4000000002055\"]},\"profiles\":{\"add\":[\"4000000002055\"],\"remove\":[\"4000000002055\"]}}},\"approval\":{\"is_enabled\":true,\"type\":\"all\",\"is_auto_approval\":true,\"email_notification\":{\"is_enabled\":true,\"frequency\":\"daily\",\"time\":\"22:00\"}},\"is_draft_enabled\":true,\"ip_based_restriction\":true,\"allowed_ips\":{\"type\":\"range\",\"from\":\"203.0.113.1\",\"to\":\"203.0.113.254\"},\"completion_pct_restriction\":true,\"timer_restricted_profiles\":[\"4000000002055\"]}");

        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]/settings/timelog"
    {:headers {"Authorization" "Bearer 1000.03xxxxxxxxxxxxxxxxxa5317.dxxxxxxxxxxxxxxxxxfa"
                "Content-Type" "application/json"}
     :body "{\"allow_timelog_for\":\"everyone\",\"closed_entity_restriction\":true,\"multi_timer_restriction\":false,\"workhour_restriction\":true,\"entity_date_restriction\":true,\"allow_unassigned_entity_logs\":true,\"zpeople_attendance_restriction\":true,\"project_status_restriction\":{\"is_enabled\":true,\"restricted_statuses\":[{\"add\":[{\"id\":\"4000000062001\"}],\"remove\":[{\"id\":\"4000000062001\"}]}]},\"restrict_timelogs\":{\"weekend\":true,\"holiday\":true,\"zpeople_leave\":true},\"timelog_configuration\":{\"log_type\":\"both\",\"is_tasklog_enabled\":true,\"is_issuelog_enabled\":true,\"is_generallog_enabled\":true},\"overlap_restriction\":\"allow\",\"period_settings\":{\"past_log\":\"allow\",\"future_log\":\"allow\",\"is_editlog_restricted\":true,\"period_customized_data\":{\"past_value\":1,\"past_unit\":\"day\",\"future_value\":1,\"future_unit\":\"day\"},\"past_log_excluded_users\":[{\"add\":[{\"zpuid\":\"4000000002055\"}],\"remove\":[{\"zpuid\":\"4000000002055\"}]}]},\"loghour_restriction\":{\"is_enabled\":true,\"max_per_day\":\"08:00\",\"max_per_week\":\"40:00\"},\"reminder\":{\"is_enabled\":true,\"threshold\":1,\"daily_reminder\":{\"minutes\":1,\"condition\":\"before_start_of_business_hours\",\"notify_running_timers\":\"true\"},\"weekly_reminder\":{\"minutes\":1,\"condition\":\"before_start_of_business_week\"},\"exclude_reminder_for\":{\"users\":{\"add\":[\"4000000002055\"],\"remove\":[\"4000000002055\"]},\"profiles\":{\"add\":[\"4000000002055\"],\"remove\":[\"4000000002055\"]}}},\"approval\":{\"is_enabled\":true,\"type\":\"all\",\"is_auto_approval\":true,\"email_notification\":{\"is_enabled\":true,\"frequency\":\"daily\",\"time\":\"22:00\"}},\"is_draft_enabled\":true,\"ip_based_restriction\":true,\"allowed_ips\":{\"type\":\"range\",\"from\":\"203.0.113.1\",\"to\":\"203.0.113.254\"},\"completion_pct_restriction\":true,\"timer_restricted_profiles\":[\"4000000002055\"]}"
     :as :json}))

(println (:body response))
package main

import (
    "fmt"
    "io"
    "net/http"
    "strings"
)

func main() {
    payload := strings.NewReader("{\"allow_timelog_for\":\"everyone\",\"closed_entity_restriction\":true,\"multi_timer_restriction\":false,\"workhour_restriction\":true,\"entity_date_restriction\":true,\"allow_unassigned_entity_logs\":true,\"zpeople_attendance_restriction\":true,\"project_status_restriction\":{\"is_enabled\":true,\"restricted_statuses\":[{\"add\":[{\"id\":\"4000000062001\"}],\"remove\":[{\"id\":\"4000000062001\"}]}]},\"restrict_timelogs\":{\"weekend\":true,\"holiday\":true,\"zpeople_leave\":true},\"timelog_configuration\":{\"log_type\":\"both\",\"is_tasklog_enabled\":true,\"is_issuelog_enabled\":true,\"is_generallog_enabled\":true},\"overlap_restriction\":\"allow\",\"period_settings\":{\"past_log\":\"allow\",\"future_log\":\"allow\",\"is_editlog_restricted\":true,\"period_customized_data\":{\"past_value\":1,\"past_unit\":\"day\",\"future_value\":1,\"future_unit\":\"day\"},\"past_log_excluded_users\":[{\"add\":[{\"zpuid\":\"4000000002055\"}],\"remove\":[{\"zpuid\":\"4000000002055\"}]}]},\"loghour_restriction\":{\"is_enabled\":true,\"max_per_day\":\"08:00\",\"max_per_week\":\"40:00\"},\"reminder\":{\"is_enabled\":true,\"threshold\":1,\"daily_reminder\":{\"minutes\":1,\"condition\":\"before_start_of_business_hours\",\"notify_running_timers\":\"true\"},\"weekly_reminder\":{\"minutes\":1,\"condition\":\"before_start_of_business_week\"},\"exclude_reminder_for\":{\"users\":{\"add\":[\"4000000002055\"],\"remove\":[\"4000000002055\"]},\"profiles\":{\"add\":[\"4000000002055\"],\"remove\":[\"4000000002055\"]}}},\"approval\":{\"is_enabled\":true,\"type\":\"all\",\"is_auto_approval\":true,\"email_notification\":{\"is_enabled\":true,\"frequency\":\"daily\",\"time\":\"22:00\"}},\"is_draft_enabled\":true,\"ip_based_restriction\":true,\"allowed_ips\":{\"type\":\"range\",\"from\":\"203.0.113.1\",\"to\":\"203.0.113.254\"},\"completion_pct_restriction\":true,\"timer_restricted_profiles\":[\"4000000002055\"]}")
    req, _ := http.NewRequest("PATCH", "https://projects.zoho.com/api/v3/portal/[PORTAL_ID]/settings/timelog", 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]/settings/timelog HTTP/1.1
Host: https://projects.zoho.com/api/v3/portal/[PORTAL_ID]/settings/timelog
Authorization: Bearer 1000.03xxxxxxxxxxxxxxxxxa5317.dxxxxxxxxxxxxxxxxxfa
Content-Type: application/json

{"allow_timelog_for":"everyone","closed_entity_restriction":true,"multi_timer_restriction":false,"workhour_restriction":true,"entity_date_restriction":true,"allow_unassigned_entity_logs":true,"zpeople_attendance_restriction":true,"project_status_restriction":{"is_enabled":true,"restricted_statuses":[{"add":[{"id":"4000000062001"}],"remove":[{"id":"4000000062001"}]}]},"restrict_timelogs":{"weekend":true,"holiday":true,"zpeople_leave":true},"timelog_configuration":{"log_type":"both","is_tasklog_enabled":true,"is_issuelog_enabled":true,"is_generallog_enabled":true},"overlap_restriction":"allow","period_settings":{"past_log":"allow","future_log":"allow","is_editlog_restricted":true,"period_customized_data":{"past_value":1,"past_unit":"day","future_value":1,"future_unit":"day"},"past_log_excluded_users":[{"add":[{"zpuid":"4000000002055"}],"remove":[{"zpuid":"4000000002055"}]}]},"loghour_restriction":{"is_enabled":true,"max_per_day":"08:00","max_per_week":"40:00"},"reminder":{"is_enabled":true,"threshold":1,"daily_reminder":{"minutes":1,"condition":"before_start_of_business_hours","notify_running_timers":"true"},"weekly_reminder":{"minutes":1,"condition":"before_start_of_business_week"},"exclude_reminder_for":{"users":{"add":["4000000002055"],"remove":["4000000002055"]},"profiles":{"add":["4000000002055"],"remove":["4000000002055"]}}},"approval":{"is_enabled":true,"type":"all","is_auto_approval":true,"email_notification":{"is_enabled":true,"frequency":"daily","time":"22:00"}},"is_draft_enabled":true,"ip_based_restriction":true,"allowed_ips":{"type":"range","from":"203.0.113.1","to":"203.0.113.254"},"completion_pct_restriction":true,"timer_restricted_profiles":["4000000002055"]}
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]/settings/timelog");
HttpUriRequest requestObj = new HttpPatch(uriBuilder.build());
requestObj.addHeader("Authorization", "Bearer 1000.03xxxxxxxxxxxxxxxxxa5317.dxxxxxxxxxxxxxxxxxfa");

HttpEntityEnclosingRequestBase requestBase = (HttpEntityEnclosingRequestBase) requestObj;
String requestBody = "{\"allow_timelog_for\":\"everyone\",\"closed_entity_restriction\":true,\"multi_timer_restriction\":false,\"workhour_restriction\":true,\"entity_date_restriction\":true,\"allow_unassigned_entity_logs\":true,\"zpeople_attendance_restriction\":true,\"project_status_restriction\":{\"is_enabled\":true,\"restricted_statuses\":[{\"add\":[{\"id\":\"4000000062001\"}],\"remove\":[{\"id\":\"4000000062001\"}]}]},\"restrict_timelogs\":{\"weekend\":true,\"holiday\":true,\"zpeople_leave\":true},\"timelog_configuration\":{\"log_type\":\"both\",\"is_tasklog_enabled\":true,\"is_issuelog_enabled\":true,\"is_generallog_enabled\":true},\"overlap_restriction\":\"allow\",\"period_settings\":{\"past_log\":\"allow\",\"future_log\":\"allow\",\"is_editlog_restricted\":true,\"period_customized_data\":{\"past_value\":1,\"past_unit\":\"day\",\"future_value\":1,\"future_unit\":\"day\"},\"past_log_excluded_users\":[{\"add\":[{\"zpuid\":\"4000000002055\"}],\"remove\":[{\"zpuid\":\"4000000002055\"}]}]},\"loghour_restriction\":{\"is_enabled\":true,\"max_per_day\":\"08:00\",\"max_per_week\":\"40:00\"},\"reminder\":{\"is_enabled\":true,\"threshold\":1,\"daily_reminder\":{\"minutes\":1,\"condition\":\"before_start_of_business_hours\",\"notify_running_timers\":\"true\"},\"weekly_reminder\":{\"minutes\":1,\"condition\":\"before_start_of_business_week\"},\"exclude_reminder_for\":{\"users\":{\"add\":[\"4000000002055\"],\"remove\":[\"4000000002055\"]},\"profiles\":{\"add\":[\"4000000002055\"],\"remove\":[\"4000000002055\"]}}},\"approval\":{\"is_enabled\":true,\"type\":\"all\",\"is_auto_approval\":true,\"email_notification\":{\"is_enabled\":true,\"frequency\":\"daily\",\"time\":\"22:00\"}},\"is_draft_enabled\":true,\"ip_based_restriction\":true,\"allowed_ips\":{\"type\":\"range\",\"from\":\"203.0.113.1\",\"to\":\"203.0.113.254\"},\"completion_pct_restriction\":true,\"timer_restricted_profiles\":[\"4000000002055\"]}";
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]/settings/timelog';

const options = {
  method: 'PATCH',
  headers: {
    'Authorization': 'Bearer 1000.03xxxxxxxxxxxxxxxxxa5317.dxxxxxxxxxxxxxxxxxfa',
    'Content-Type': 'application/json'
  },
  body: JSON.stringify({"allow_timelog_for":"everyone","closed_entity_restriction":true,"multi_timer_restriction":false,"workhour_restriction":true,"entity_date_restriction":true,"allow_unassigned_entity_logs":true,"zpeople_attendance_restriction":true,"project_status_restriction":{"is_enabled":true,"restricted_statuses":[{"add":[{"id":"4000000062001"}],"remove":[{"id":"4000000062001"}]}]},"restrict_timelogs":{"weekend":true,"holiday":true,"zpeople_leave":true},"timelog_configuration":{"log_type":"both","is_tasklog_enabled":true,"is_issuelog_enabled":true,"is_generallog_enabled":true},"overlap_restriction":"allow","period_settings":{"past_log":"allow","future_log":"allow","is_editlog_restricted":true,"period_customized_data":{"past_value":1,"past_unit":"day","future_value":1,"future_unit":"day"},"past_log_excluded_users":[{"add":[{"zpuid":"4000000002055"}],"remove":[{"zpuid":"4000000002055"}]}]},"loghour_restriction":{"is_enabled":true,"max_per_day":"08:00","max_per_week":"40:00"},"reminder":{"is_enabled":true,"threshold":1,"daily_reminder":{"minutes":1,"condition":"before_start_of_business_hours","notify_running_timers":"true"},"weekly_reminder":{"minutes":1,"condition":"before_start_of_business_week"},"exclude_reminder_for":{"users":{"add":["4000000002055"],"remove":["4000000002055"]},"profiles":{"add":["4000000002055"],"remove":["4000000002055"]}}},"approval":{"is_enabled":true,"type":"all","is_auto_approval":true,"email_notification":{"is_enabled":true,"frequency":"daily","time":"22:00"}},"is_draft_enabled":true,"ip_based_restriction":true,"allowed_ips":{"type":"range","from":"203.0.113.1","to":"203.0.113.254"},"completion_pct_restriction":true,"timer_restricted_profiles":["4000000002055"]})
};

fetch(url, options)
  .then(response => response.json())
  .then(data => console.log(data))
  .catch(error => console.error(error));
{"allow_timelog_for":"everyone","closed_entity_restriction":true,"multi_timer_restriction":false,"workhour_restriction":true,"entity_date_restriction":true,"allow_unassigned_entity_logs":true,"zpeople_attendance_restriction":true,"project_status_restriction":{"is_enabled":true,"restricted_statuses":[{"add":[{"id":"4000000062001"}],"remove":[{"id":"4000000062001"}]}]},"restrict_timelogs":{"weekend":true,"holiday":true,"zpeople_leave":true},"timelog_configuration":{"log_type":"both","is_tasklog_enabled":true,"is_issuelog_enabled":true,"is_generallog_enabled":true},"overlap_restriction":"allow","period_settings":{"past_log":"allow","future_log":"allow","is_editlog_restricted":true,"period_customized_data":{"past_value":1,"past_unit":"day","future_value":1,"future_unit":"day"},"past_log_excluded_users":[{"add":[{"zpuid":"4000000002055"}],"remove":[{"zpuid":"4000000002055"}]}]},"loghour_restriction":{"is_enabled":true,"max_per_day":"08:00","max_per_week":"40:00"},"reminder":{"is_enabled":true,"threshold":1,"daily_reminder":{"minutes":1,"condition":"before_start_of_business_hours","notify_running_timers":"true"},"weekly_reminder":{"minutes":1,"condition":"before_start_of_business_week"},"exclude_reminder_for":{"users":{"add":["4000000002055"],"remove":["4000000002055"]},"profiles":{"add":["4000000002055"],"remove":["4000000002055"]}}},"approval":{"is_enabled":true,"type":"all","is_auto_approval":true,"email_notification":{"is_enabled":true,"frequency":"daily","time":"22:00"}},"is_draft_enabled":true,"ip_based_restriction":true,"allowed_ips":{"type":"range","from":"203.0.113.1","to":"203.0.113.254"},"completion_pct_restriction":true,"timer_restricted_profiles":["4000000002055"]}
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]/settings/timelog")
    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("""{"allow_timelog_for":"everyone","closed_entity_restriction":true,"multi_timer_restriction":false,"workhour_restriction":true,"entity_date_restriction":true,"allow_unassigned_entity_logs":true,"zpeople_attendance_restriction":true,"project_status_restriction":{"is_enabled":true,"restricted_statuses":[{"add":[{"id":"4000000062001"}],"remove":[{"id":"4000000062001"}]}]},"restrict_timelogs":{"weekend":true,"holiday":true,"zpeople_leave":true},"timelog_configuration":{"log_type":"both","is_tasklog_enabled":true,"is_issuelog_enabled":true,"is_generallog_enabled":true},"overlap_restriction":"allow","period_settings":{"past_log":"allow","future_log":"allow","is_editlog_restricted":true,"period_customized_data":{"past_value":1,"past_unit":"day","future_value":1,"future_unit":"day"},"past_log_excluded_users":[{"add":[{"zpuid":"4000000002055"}],"remove":[{"zpuid":"4000000002055"}]}]},"loghour_restriction":{"is_enabled":true,"max_per_day":"08:00","max_per_week":"40:00"},"reminder":{"is_enabled":true,"threshold":1,"daily_reminder":{"minutes":1,"condition":"before_start_of_business_hours","notify_running_timers":"true"},"weekly_reminder":{"minutes":1,"condition":"before_start_of_business_week"},"exclude_reminder_for":{"users":{"add":["4000000002055"],"remove":["4000000002055"]},"profiles":{"add":["4000000002055"],"remove":["4000000002055"]}}},"approval":{"is_enabled":true,"type":"all","is_auto_approval":true,"email_notification":{"is_enabled":true,"frequency":"daily","time":"22:00"}},"is_draft_enabled":true,"ip_based_restriction":true,"allowed_ips":{"type":"range","from":"203.0.113.1","to":"203.0.113.254"},"completion_pct_restriction":true,"timer_restricted_profiles":["4000000002055"]}""") }

    val response = conn.inputStream.bufferedReader().readText()
    println(response)
}
NSURL *url = [NSURL URLWithString:@"https://projects.zoho.com/api/v3/portal/[PORTAL_ID]/settings/timelog"];
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 = [@"{\"allow_timelog_for\":\"everyone\",\"closed_entity_restriction\":true,\"multi_timer_restriction\":false,\"workhour_restriction\":true,\"entity_date_restriction\":true,\"allow_unassigned_entity_logs\":true,\"zpeople_attendance_restriction\":true,\"project_status_restriction\":{\"is_enabled\":true,\"restricted_statuses\":[{\"add\":[{\"id\":\"4000000062001\"}],\"remove\":[{\"id\":\"4000000062001\"}]}]},\"restrict_timelogs\":{\"weekend\":true,\"holiday\":true,\"zpeople_leave\":true},\"timelog_configuration\":{\"log_type\":\"both\",\"is_tasklog_enabled\":true,\"is_issuelog_enabled\":true,\"is_generallog_enabled\":true},\"overlap_restriction\":\"allow\",\"period_settings\":{\"past_log\":\"allow\",\"future_log\":\"allow\",\"is_editlog_restricted\":true,\"period_customized_data\":{\"past_value\":1,\"past_unit\":\"day\",\"future_value\":1,\"future_unit\":\"day\"},\"past_log_excluded_users\":[{\"add\":[{\"zpuid\":\"4000000002055\"}],\"remove\":[{\"zpuid\":\"4000000002055\"}]}]},\"loghour_restriction\":{\"is_enabled\":true,\"max_per_day\":\"08:00\",\"max_per_week\":\"40:00\"},\"reminder\":{\"is_enabled\":true,\"threshold\":1,\"daily_reminder\":{\"minutes\":1,\"condition\":\"before_start_of_business_hours\",\"notify_running_timers\":\"true\"},\"weekly_reminder\":{\"minutes\":1,\"condition\":\"before_start_of_business_week\"},\"exclude_reminder_for\":{\"users\":{\"add\":[\"4000000002055\"],\"remove\":[\"4000000002055\"]},\"profiles\":{\"add\":[\"4000000002055\"],\"remove\":[\"4000000002055\"]}}},\"approval\":{\"is_enabled\":true,\"type\":\"all\",\"is_auto_approval\":true,\"email_notification\":{\"is_enabled\":true,\"frequency\":\"daily\",\"time\":\"22:00\"}},\"is_draft_enabled\":true,\"ip_based_restriction\":true,\"allowed_ips\":{\"type\":\"range\",\"from\":\"203.0.113.1\",\"to\":\"203.0.113.254\"},\"completion_pct_restriction\":true,\"timer_restricted_profiles\":[\"4000000002055\"]}" 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]/settings/timelog" 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|{"allow_timelog_for":"everyone","closed_entity_restriction":true,"multi_timer_restriction":false,"workhour_restriction":true,"entity_date_restriction":true,"allow_unassigned_entity_logs":true,"zpeople_attendance_restriction":true,"project_status_restriction":{"is_enabled":true,"restricted_statuses":[{"add":[{"id":"4000000062001"}],"remove":[{"id":"4000000062001"}]}]},"restrict_timelogs":{"weekend":true,"holiday":true,"zpeople_leave":true},"timelog_configuration":{"log_type":"both","is_tasklog_enabled":true,"is_issuelog_enabled":true,"is_generallog_enabled":true},"overlap_restriction":"allow","period_settings":{"past_log":"allow","future_log":"allow","is_editlog_restricted":true,"period_customized_data":{"past_value":1,"past_unit":"day","future_value":1,"future_unit":"day"},"past_log_excluded_users":[{"add":[{"zpuid":"4000000002055"}],"remove":[{"zpuid":"4000000002055"}]}]},"loghour_restriction":{"is_enabled":true,"max_per_day":"08:00","max_per_week":"40:00"},"reminder":{"is_enabled":true,"threshold":1,"daily_reminder":{"minutes":1,"condition":"before_start_of_business_hours","notify_running_timers":"true"},"weekly_reminder":{"minutes":1,"condition":"before_start_of_business_week"},"exclude_reminder_for":{"users":{"add":["4000000002055"],"remove":["4000000002055"]},"profiles":{"add":["4000000002055"],"remove":["4000000002055"]}}},"approval":{"is_enabled":true,"type":"all","is_auto_approval":true,"email_notification":{"is_enabled":true,"frequency":"daily","time":"22:00"}},"is_draft_enabled":true,"ip_based_restriction":true,"allowed_ips":{"type":"range","from":"203.0.113.1","to":"203.0.113.254"},"completion_pct_restriction":true,"timer_restricted_profiles":["4000000002055"]}|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 = @'
{"allow_timelog_for":"everyone","closed_entity_restriction":true,"multi_timer_restriction":false,"workhour_restriction":true,"entity_date_restriction":true,"allow_unassigned_entity_logs":true,"zpeople_attendance_restriction":true,"project_status_restriction":{"is_enabled":true,"restricted_statuses":[{"add":[{"id":"4000000062001"}],"remove":[{"id":"4000000062001"}]}]},"restrict_timelogs":{"weekend":true,"holiday":true,"zpeople_leave":true},"timelog_configuration":{"log_type":"both","is_tasklog_enabled":true,"is_issuelog_enabled":true,"is_generallog_enabled":true},"overlap_restriction":"allow","period_settings":{"past_log":"allow","future_log":"allow","is_editlog_restricted":true,"period_customized_data":{"past_value":1,"past_unit":"day","future_value":1,"future_unit":"day"},"past_log_excluded_users":[{"add":[{"zpuid":"4000000002055"}],"remove":[{"zpuid":"4000000002055"}]}]},"loghour_restriction":{"is_enabled":true,"max_per_day":"08:00","max_per_week":"40:00"},"reminder":{"is_enabled":true,"threshold":1,"daily_reminder":{"minutes":1,"condition":"before_start_of_business_hours","notify_running_timers":"true"},"weekly_reminder":{"minutes":1,"condition":"before_start_of_business_week"},"exclude_reminder_for":{"users":{"add":["4000000002055"],"remove":["4000000002055"]},"profiles":{"add":["4000000002055"],"remove":["4000000002055"]}}},"approval":{"is_enabled":true,"type":"all","is_auto_approval":true,"email_notification":{"is_enabled":true,"frequency":"daily","time":"22:00"}},"is_draft_enabled":true,"ip_based_restriction":true,"allowed_ips":{"type":"range","from":"203.0.113.1","to":"203.0.113.254"},"completion_pct_restriction":true,"timer_restricted_profiles":["4000000002055"]}
'@

$response = Invoke-RestMethod -Uri "https://projects.zoho.com/api/v3/portal/[PORTAL_ID]/settings/timelog" -Method PATCH -Headers $headers -Body $body

$response | ConvertTo-Json
library(httr)

url <- "https://projects.zoho.com/api/v3/portal/[PORTAL_ID]/settings/timelog"

response <- PATCH(
  url,
  add_headers(Authorization = "Bearer 1000.03xxxxxxxxxxxxxxxxxa5317.dxxxxxxxxxxxxxxxxxfa"),
  content_type_json(),
  body = "{\"allow_timelog_for\":\"everyone\",\"closed_entity_restriction\":true,\"multi_timer_restriction\":false,\"workhour_restriction\":true,\"entity_date_restriction\":true,\"allow_unassigned_entity_logs\":true,\"zpeople_attendance_restriction\":true,\"project_status_restriction\":{\"is_enabled\":true,\"restricted_statuses\":[{\"add\":[{\"id\":\"4000000062001\"}],\"remove\":[{\"id\":\"4000000062001\"}]}]},\"restrict_timelogs\":{\"weekend\":true,\"holiday\":true,\"zpeople_leave\":true},\"timelog_configuration\":{\"log_type\":\"both\",\"is_tasklog_enabled\":true,\"is_issuelog_enabled\":true,\"is_generallog_enabled\":true},\"overlap_restriction\":\"allow\",\"period_settings\":{\"past_log\":\"allow\",\"future_log\":\"allow\",\"is_editlog_restricted\":true,\"period_customized_data\":{\"past_value\":1,\"past_unit\":\"day\",\"future_value\":1,\"future_unit\":\"day\"},\"past_log_excluded_users\":[{\"add\":[{\"zpuid\":\"4000000002055\"}],\"remove\":[{\"zpuid\":\"4000000002055\"}]}]},\"loghour_restriction\":{\"is_enabled\":true,\"max_per_day\":\"08:00\",\"max_per_week\":\"40:00\"},\"reminder\":{\"is_enabled\":true,\"threshold\":1,\"daily_reminder\":{\"minutes\":1,\"condition\":\"before_start_of_business_hours\",\"notify_running_timers\":\"true\"},\"weekly_reminder\":{\"minutes\":1,\"condition\":\"before_start_of_business_week\"},\"exclude_reminder_for\":{\"users\":{\"add\":[\"4000000002055\"],\"remove\":[\"4000000002055\"]},\"profiles\":{\"add\":[\"4000000002055\"],\"remove\":[\"4000000002055\"]}}},\"approval\":{\"is_enabled\":true,\"type\":\"all\",\"is_auto_approval\":true,\"email_notification\":{\"is_enabled\":true,\"frequency\":\"daily\",\"time\":\"22:00\"}},\"is_draft_enabled\":true,\"ip_based_restriction\":true,\"allowed_ips\":{\"type\":\"range\",\"from\":\"203.0.113.1\",\"to\":\"203.0.113.254\"},\"completion_pct_restriction\":true,\"timer_restricted_profiles\":[\"4000000002055\"]}"
)

content(response, "text")
import Foundation

let url = URL(string: "https://projects.zoho.com/api/v3/portal/[PORTAL_ID]/settings/timelog")!
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 = """
{"allow_timelog_for":"everyone","closed_entity_restriction":true,"multi_timer_restriction":false,"workhour_restriction":true,"entity_date_restriction":true,"allow_unassigned_entity_logs":true,"zpeople_attendance_restriction":true,"project_status_restriction":{"is_enabled":true,"restricted_statuses":[{"add":[{"id":"4000000062001"}],"remove":[{"id":"4000000062001"}]}]},"restrict_timelogs":{"weekend":true,"holiday":true,"zpeople_leave":true},"timelog_configuration":{"log_type":"both","is_tasklog_enabled":true,"is_issuelog_enabled":true,"is_generallog_enabled":true},"overlap_restriction":"allow","period_settings":{"past_log":"allow","future_log":"allow","is_editlog_restricted":true,"period_customized_data":{"past_value":1,"past_unit":"day","future_value":1,"future_unit":"day"},"past_log_excluded_users":[{"add":[{"zpuid":"4000000002055"}],"remove":[{"zpuid":"4000000002055"}]}]},"loghour_restriction":{"is_enabled":true,"max_per_day":"08:00","max_per_week":"40:00"},"reminder":{"is_enabled":true,"threshold":1,"daily_reminder":{"minutes":1,"condition":"before_start_of_business_hours","notify_running_timers":"true"},"weekly_reminder":{"minutes":1,"condition":"before_start_of_business_week"},"exclude_reminder_for":{"users":{"add":["4000000002055"],"remove":["4000000002055"]},"profiles":{"add":["4000000002055"],"remove":["4000000002055"]}}},"approval":{"is_enabled":true,"type":"all","is_auto_approval":true,"email_notification":{"is_enabled":true,"frequency":"daily","time":"22:00"}},"is_draft_enabled":true,"ip_based_restriction":true,"allowed_ips":{"type":"range","from":"203.0.113.1","to":"203.0.113.254"},"completion_pct_restriction":true,"timer_restricted_profiles":["4000000002055"]}
""".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

Content-Type: application/json
{ "allow_timelog_for" : "everyone", "closed_entity_restriction" : true, "multi_timer_restriction" : false, "workhour_restriction" : true, "entity_date_restriction" : true, "allow_unassigned_entity_logs" : true, "zpeople_attendance_restriction" : true, "project_status_restriction" : { "is_enabled" : true, "restricted_statuses" : [ { "add" : [ { "id" : "4000000062001" } ], "remove" : [ { "id" : "4000000062001" } ] } ] }, "restrict_timelogs" : { "weekend" : true, "holiday" : true, "zpeople_leave" : true }, "timelog_configuration" : { "log_type" : "both", "is_tasklog_enabled" : true, "is_issuelog_enabled" : true, "is_generallog_enabled" : true }, "overlap_restriction" : "allow", "period_settings" : { "past_log" : "allow", "future_log" : "allow", "is_editlog_restricted" : true, "period_customized_data" : { "past_value" : 1, "past_unit" : "day", "future_value" : 1, "future_unit" : "day" }, "past_log_excluded_users" : [ { "add" : [ { "zpuid" : "4000000002055" } ], "remove" : [ { "zpuid" : "4000000002055" } ] } ] }, "loghour_restriction" : { "is_enabled" : true, "max_per_day" : "08:00", "max_per_week" : "40:00" }, "reminder" : { "is_enabled" : true, "threshold" : 1, "daily_reminder" : { "minutes" : 1, "condition" : "before_start_of_business_hours", "notify_running_timers" : "true" }, "weekly_reminder" : { "minutes" : 1, "condition" : "before_start_of_business_week" }, "exclude_reminder_for" : { "users" : { "add" : [ "4000000002055" ], "remove" : [ "4000000002055" ] }, "profiles" : { "add" : [ "4000000002055" ], "remove" : [ "4000000002055" ] } } }, "approval" : { "is_enabled" : true, "type" : "all", "is_auto_approval" : true, "email_notification" : { "is_enabled" : true, "frequency" : "daily", "time" : "22:00" } }, "is_draft_enabled" : true, "ip_based_restriction" : true, "allowed_ips" : { "type" : "range", "from" : "203.0.113.1", "to" : "203.0.113.254" }, "completion_pct_restriction" : true, "timer_restricted_profiles" : [ "4000000002055" ] }

Sample Response

200{ "timelog_settings_response" : { "overlap_restriction" : "allow", "restrict_timelogs" : { "weekend" : "false", "holiday" : "false", "zpeople_leave" : "false" }, "loghour_restriction" : { "is_enabled" : "false" }, "reminder" : { "is_enabled" : "false" }, "timelog_configuration" : { "log_type" : "both", "is_generallog_enabled" : "true", "is_tasklog_enabled" : "true", "is_issuelog_enabled" : "true" }, "project_status_restriction" : { "is_enabled" : true, "restricted_statuses" : [ { "id" : "12000000000515" }, { "id" : "12000000000507" } ] }, "closed_entity_restriction" : "false", "approval" : { "is_enabled" : "true", "is_auto_approval" : "false", "type" : "all", "email_notification" : { "is_enabled" : "false" } }, "is_draft_enabled" : "false", "period_settings" : { "future_log" : "not_allow", "past_log_excluded_users" : [ { "zpuid" : "5000000002965", "name" : "Monica Hemsworth", "id" : "47913634" } ], "past_log" : "not_allow", "is_editlog_restricted" : false }, "allow_timelog_for" : "owners", "multi_timer_restriction" : "false", "entity_date_restriction" : "true", "allow_unassigned_entity_logs" : "true", "zpeople_attendance_restriction" : "false", "workhour_restriction" : "false", "ip_based_restriction" : "false", "allowed_ips" : [ ], "completion_pct_restriction" : "false", "timer_restricted_profiles" : [ ], "is_timer_profile_restricted" : "false" } }
AI Tools
ChatGPT Open in ChatGPT ↗ Open in ChatGPT to ask questions about this page
Claude Open in Claude ↗ Open in Claude to ask questions about this page
Copy as Markdown Copy this page as markdown to use with AI assistants
View as Markdown ↗ Open this page as markdown in a new tab
Copy OpenAPI Spec Copy the OpenAPI YAML to the clipboard
View as YAML ↗ Open the OpenAPI spec in a new tab
Download YAML Save the OpenAPI spec as a .yaml file