This module covers custom function related operations within Zoho Projects. Use this API to create, update, delete, or retrieve custom functions, manage gallery functions, execute custom functions, and enable or disable REST API for functions.
Execute a Custom Function
Execute a custom function in the Zoho Projects portal.
using System.Net.Http;
using System.Text;
using System.Web;
var client = new HttpClient();
client.DefaultRequestHeaders.Add("Authorization", "Bearer 1000.03xxxxxxxxxxxxxxxxxa5317.dxxxxxxxxxxxxxxxxxfa");
var query = HttpUtility.ParseQueryString(string.Empty);
query["Custom Parameter"] = " custom values";
var uriBuilder = new UriBuilder("https://projects.zoho.com/api/v3/portal/[PORTAL_ID]/automation/customfunction/[CUSTOMFUNCTION_ID]/execute") { Query = query.ToString() };
var request = new HttpRequestMessage(HttpMethod.Post, uriBuilder.Uri);
var response = await client.SendAsync(request);
var body = await response.Content.ReadAsStringAsync();
Console.WriteLine(body);
open Lwt
open Cohttp_lwt_unix
let () =
let enc_Custom Parameter = Uri.pct_encode " custom values" in
let uri = Uri.of_string ("https://projects.zoho.com/api/v3/portal/[PORTAL_ID]/automation/customfunction/[CUSTOMFUNCTION_ID]/execute" ^ "?Custom Parameter=" ^ enc_Custom Parameter) in
let headers = Cohttp.Header.init ()
|> fun h -> Cohttp.Header.add h "Authorization" "Bearer 1000.03xxxxxxxxxxxxxxxxxa5317.dxxxxxxxxxxxxxxxxxfa"
in
Lwt_main.run (
Client.post ~headers uri >>= fun (_, body) ->
Cohttp_lwt.Body.to_string body >|= fun s ->
print_endline s)