<service domain|custom domain>/app/<portal>/api/v3/probles/{problem_id}/tasks
Problem Task
A task is an activity or piece of work that is a part of a larger problem.
Attributes
id (long)
Indicates the unique ID of the task
title (string)
Title of the task
template (task_template)
Indicates the template which is used to create this task
description (html)
Contains description about the task
scheduled_start_time (datetime)
Date and time at which the task is scheduled to start
scheduled_end_time (datetime)
Date and time at which the task is scheduled to finish
More Attributes Expand all
Add Problem Task
This operation helps you to add a problem task.
Mandatory Fields :- [“title”]
Url
Attributes
id (long)
Indicates the unique ID of the task
title (string)
Title of the task
template (task_template)
Indicates the template which is used to create this task
description (html)
Contains description about the task
scheduled_start_time (datetime)
Date and time at which the task is scheduled to start
scheduled_end_time (datetime)
Date and time at which the task is scheduled to finish
More Attributes Expand all
$ curl <service domain|custom domain>/app/<portal>/api/v3/probles/{problem_id}/tasks\
-X POST\
-H "Accept: application/vnd.manageengine.sdp.v3+json"\
-H "Authorization: Zoho-oauthtoken 1000.7xxx98976ab0xxxxxx19901e7551be57.bxxxx921ed64c04f79622bebcfxxxxxx"\
-H "Content-Type: application/x-www-form-urlencoded"\
-d input_data='{
"task": {
"template": {
"name": "Default Task",
"id": "1822002620872075"
},
"email_before": "1800000",
"owner": {
"id": "4149000000871029"
},
"status": {
"id": "4149000000006657"
},
"title": "Add Problem Task",
"description": "<div>Add Task</div>",
"scheduled_start_time": {
"value": 1675329240000
},
"scheduled_end_time": {
"value": 1675934040000
},
"actual_start_time": {
"value": 1675415640000
},
"actual_end_time": {
"value": 1675761240000
},
"priority": {
"id": "4149000000006803"
},
"estimated_effort_days": "12",
"percentage_completion": "45",
"additional_cost": "150",
"udf_fields": {
"udf_long1": "1563389026964443",
"udf_date1": {
"value": "1478758440000"
},
"udf_char1": "test-udf_char1"
}
}
}'
// Deluge Sample script
url = "<service domain|custom domain>/app/<portal>/api/v3/probles/{problem_id}/tasks";
headers = {"Accept":"application/vnd.manageengine.sdp.v3+json",
"Content-Type": "application/x-www-form-urlencoded",
"Authorization": "Zoho-oauthtoken 1000.7xxx98976ab0xxxxxx19901e7551be57.bxxxx921ed64c04f79622bebcfxxxxxx"};
input_data = {
"task": {
"template": {
"name": "Default Task",
"id": "1822002620872075"
},
"email_before": "1800000",
"owner": {
"id": "4149000000871029"
},
"status": {
"id": "4149000000006657"
},
"title": "Add Problem Task",
"description": "<div>Add Task</div>",
"scheduled_start_time": {
"value": 1675329240000
},
"scheduled_end_time": {
"value": 1675934040000
},
"actual_start_time": {
"value": 1675415640000
},
"actual_end_time": {
"value": 1675761240000
},
"priority": {
"id": "4149000000006803"
},
"estimated_effort_days": "12",
"percentage_completion": "45",
"additional_cost": "150",
"udf_fields": {
"udf_long1": "1563389026964443",
"udf_date1": {
"value": "1478758440000"
},
"udf_char1": "test-udf_char1"
}
}
};
params = {"input_data": input_data};
response = invokeurl
[
url: url
type: POST
parameters: params
headers: headers
];
info response;
#Powershell version - 5.1
$url = "<service domain|custom domain>/app/<portal>/api/v3/probles/{problem_id}/tasks"
$headers = @{ "Accept" = "application/vnd.manageengine.sdp.v3+json"
"Authorization" = "Zoho-oauthtoken 1000.7xxx98976ab0xxxxxx19901e7551be57.bxxxx921ed64c04f79622bebcfxxxxxx"
"Content-Type" = "application/x-www-form-urlencoded"}
$input_data = @'
{
"task": {
"template": {
"name": "Default Task",
"id": "1822002620872075"
},
"email_before": "1800000",
"owner": {
"id": "4149000000871029"
},
"status": {
"id": "4149000000006657"
},
"title": "Add Problem Task",
"description": "<div>Add Task</div>",
"scheduled_start_time": {
"value": 1675329240000
},
"scheduled_end_time": {
"value": 1675934040000
},
"actual_start_time": {
"value": 1675415640000
},
"actual_end_time": {
"value": 1675761240000
},
"priority": {
"id": "4149000000006803"
},
"estimated_effort_days": "12",
"percentage_completion": "45",
"additional_cost": "150",
"udf_fields": {
"udf_long1": "1563389026964443",
"udf_date1": {
"value": "1478758440000"
},
"udf_char1": "test-udf_char1"
}
}
}
'@
$data = @{ 'input_data' = $input_data}
$response = Invoke-RestMethod -Uri $url -Method post -Body $data -Headers $headers
$response
#Python version - 3.10
from urllib.error import HTTPError
from urllib.parse import urlencode
from urllib.request import urlopen,Request
url = "<service domain|custom domain>/app/<portal>/api/v3/probles/{problem_id}/tasks"
headers ={"Accept": "application/vnd.manageengine.sdp.v3+json",
"Authorization" : "Zoho-oauthtoken 1000.7xxx98976ab0xxxxxx19901e7551be57.bxxxx921ed64c04f79622bebcfxxxxxx",
"Content-Type" : "application/x-www-form-urlencoded"}
input_data = '''{
"task": {
"template": {
"name": "Default Task",
"id": "1822002620872075"
},
"email_before": "1800000",
"owner": {
"id": "4149000000871029"
},
"status": {
"id": "4149000000006657"
},
"title": "Add Problem Task",
"description": "<div>Add Task</div>",
"scheduled_start_time": {
"value": 1675329240000
},
"scheduled_end_time": {
"value": 1675934040000
},
"actual_start_time": {
"value": 1675415640000
},
"actual_end_time": {
"value": 1675761240000
},
"priority": {
"id": "4149000000006803"
},
"estimated_effort_days": "12",
"percentage_completion": "45",
"additional_cost": "150",
"udf_fields": {
"udf_long1": "1563389026964443",
"udf_date1": {
"value": "1478758440000"
},
"udf_char1": "test-udf_char1"
}
}
}'''
data = urlencode({"input_data":input_data}).encode()
httprequest = Request(url, headers=headers,data=data, method="POST")
try:
with urlopen(httprequest) as response:
print(response.read().decode())
except HTTPError as e:
print(e.read().decode())
{
"task": {
"template": {
"inactive": false,
"name": "Default Task",
"id": "1822002620872075"
},
"percentage_completion": 45,
"estimated_effort_hours": null,
"attachments": [],
"email_before": "1800000",
"description": "<div>Add Task<\/div>",
"title": "Add Problem Task",
"marked_technician": null,
"problem": {
"id": "4149000001305071"
},
"overdue": false,
"additional_cost": "150",
"actual_end_time": {
"display_value": "Feb 7, 2023 02:44 PM",
"value": "1675761240000"
},
"id": "4149000001305075",
"actual_start_time": {
"display_value": "Feb 3, 2023 02:44 PM",
"value": "1675415640000"
},
"group": null,
"owner": {
"email_id": "john@zylker.com",
"is_technician": true,
"sms_mail": null,
"mobile": null,
"last_name": null,
"user_scope": "internal_user",
"sms_mail_id": null,
"site": {
"deleted": false,
"name": "Base Site",
"id": "4149000001242001",
"is_default": true
},
"phone": null,
"employee_id": null,
"name": "John",
"id": "4149000000871029",
"photo_url": "https://contacts.localzoho.com/file?sample",
"is_vip_user": false,
"department": null,
"first_name": "John",
"job_title": null
},
"associated_entity": "problem",
"module": "Problem",
"index": 1,
"priority": {
"color": "#ff6600",
"name": "Medium",
"id": "4149000000006803"
},
"created_by": {
"email_id": "john@zylker.com",
"is_technician": true,
"sms_mail": null,
"mobile": null,
"last_name": null,
"user_scope": "internal_user",
"sms_mail_id": null,
"site": {
"deleted": false,
"name": "Base Site",
"id": "4149000001242001",
"is_default": true
},
"phone": null,
"employee_id": null,
"name": "John",
"id": "4149000000871029",
"photo_url": "https://contacts.localzoho.com/file?sample",
"is_vip_user": false,
"department": null,
"first_name": "John",
"job_title": null
},
"scheduled_end_time": {
"display_value": "Feb 9, 2023 02:44 PM",
"value": "1675934040000"
},
"marked_group": null,
"site": {
"deleted": false,
"name": "Base Site",
"id": "4149000001242001",
"is_default": true
},
"estimated_effort_minutes": null,
"udf_fields": {
"udf_long1": "1563389026964443",
"udf_date1": {
"display_value": "Nov 10, 2016 11:44 AM",
"value": "1478758440000"
},
"udf_char1": "test-udf_char1"
},
"deleted": false,
"estimated_effort": "1036800000",
"created_date": {
"display_value": "Feb 2, 2023 02:44 PM",
"value": "1675329299172"
},
"estimated_effort_days": "12",
"task_type": null,
"scheduled_start_time": {
"display_value": "Feb 2, 2023 02:44 PM",
"value": "1675329240000"
},
"status": {
"in_progress": true,
"internal_name": "Open",
"stop_timer": false,
"color": "#0066ff",
"name": "Open",
"id": "4149000000006657"
}
},
"response_status": {
"status_code": 2000,
"status": "success"
}
}
Edit Problem Task
This operation helps you update a problem task.
Url
<service domain|custom domain>/app/<portal>/api/v3/problems/{problem_id}/tasks/{task_id}
Attributes
id (long)
Indicates the unique ID of the task
title (string)
Title of the task
template (task_template)
Indicates the template which is used to create this task
description (html)
Contains description about the task
scheduled_start_time (datetime)
Date and time at which the task is scheduled to start
scheduled_end_time (datetime)
Date and time at which the task is scheduled to finish
More Attributes Expand all
$ curl <service domain|custom domain>/app/<portal>/api/v3/problems/{problem_id}/tasks/{task_id}\
-X PUT\
-H "Accept: application/vnd.manageengine.sdp.v3+json"\
-H "Authorization: Zoho-oauthtoken 1000.7xxx98976ab0xxxxxx19901e7551be57.bxxxx921ed64c04f79622bebcfxxxxxx"\
-H "Content-Type: application/x-www-form-urlencoded"\
-d input_data='{
"task": {
"description": "<div>Edit Task</div>",
"priority": {
"id": "4149000000163189"
},
"additional_cost": "250",
"percentage_completion": "75"
}
}'
// Deluge Sample script
url = "<service domain|custom domain>/app/<portal>/api/v3/problems/{problem_id}/tasks/{task_id}";
headers = {"Accept":"application/vnd.manageengine.sdp.v3+json",
"Content-Type": "application/x-www-form-urlencoded",
"Authorization": "Zoho-oauthtoken 1000.7xxx98976ab0xxxxxx19901e7551be57.bxxxx921ed64c04f79622bebcfxxxxxx"};
input_data = {
"task": {
"description": "<div>Edit Task</div>",
"priority": {
"id": "4149000000163189"
},
"additional_cost": "250",
"percentage_completion": "75"
}
};
params = {"input_data": input_data};
response = invokeurl
[
url: url
type: PUT
parameters: params
headers: headers
];
info response;
#Powershell version - 5.1
$url = "<service domain|custom domain>/app/<portal>/api/v3/problems/{problem_id}/tasks/{task_id}"
$headers = @{"Accept": "application/vnd.manageengine.sdp.v3+json",
"Authorization" : "Zoho-oauthtoken 1000.7xxx98976ab0xxxxxx19901e7551be57.bxxxx921ed64c04f79622bebcfxxxxxx",
"Content-Type" : "application/x-www-form-urlencoded"}
$input_data = @'
{
"task": {
"description": "<div>Edit Task</div>",
"priority": {
"id": "4149000000163189"
},
"additional_cost": "250",
"percentage_completion": "75"
}
}
'@
$data = @{ 'input_data' = $input_data}
$response = Invoke-RestMethod -Uri $url -Method put -Body $data -Headers $headers
$response
#Python version - 3.10
from urllib.error import HTTPError
from urllib.parse import urlencode
from urllib.request import urlopen,Request
url = "<service domain|custom domain>/app/<portal>/api/v3/problems/{problem_id}/tasks/{task_id}"
headers ={"Accept": "application/vnd.manageengine.sdp.v3+json",
"Authorization" : "Zoho-oauthtoken 1000.7xxx98976ab0xxxxxx19901e7551be57.bxxxx921ed64c04f79622bebcfxxxxxx",
"Content-Type" : "application/x-www-form-urlencoded"}
input_data = '''{
"task": {
"description": "<div>Edit Task</div>",
"priority": {
"id": "4149000000163189"
},
"additional_cost": "250",
"percentage_completion": "75"
}
}'''
data = urlencode({"input_data":input_data}).encode()
httprequest = Request(url, headers=headers,data=data, method="PUT")
try:
with urlopen(httprequest) as response:
print(response.read().decode())
except HTTPError as e:
print(e.read().decode())
{
"task": {
"template": {
"inactive": false,
"name": "Default Task",
"id": "1822002620872075"
},
"percentage_completion": 75,
"estimated_effort_hours": null,
"attachments": [],
"email_before": "1800000",
"description": "<div>Edit Task<\/div>",
"title": "Add Problem Task",
"marked_technician": null,
"problem": {
"id": "4149000001305071"
},
"overdue": false,
"additional_cost": "250",
"actual_end_time": {
"display_value": "Feb 7, 2023 02:44 PM",
"value": "1675761240000"
},
"id": "4149000001305075",
"actual_start_time": {
"display_value": "Feb 3, 2023 02:44 PM",
"value": "1675415640000"
},
"group": null,
"owner": {
"email_id": "john@zylker.com",
"is_technician": true,
"sms_mail": null,
"mobile": null,
"last_name": null,
"user_scope": "internal_user",
"sms_mail_id": null,
"site": {
"deleted": false,
"name": "Base Site",
"id": "4149000001242001",
"is_default": true
},
"phone": null,
"employee_id": null,
"name": "John",
"id": "4149000000871029",
"photo_url": "https://contacts.localzoho.com/file?sample",
"is_vip_user": false,
"department": null,
"first_name": "John",
"job_title": null
},
"associated_entity": "problem",
"module": "Problem",
"index": 1,
"priority": {
"color": "#006600",
"name": "Urgent",
"id": "4149000000163189"
},
"created_by": {
"email_id": "john@zylker.com",
"is_technician": true,
"sms_mail": null,
"mobile": null,
"last_name": null,
"user_scope": "internal_user",
"sms_mail_id": null,
"site": {
"deleted": false,
"name": "Base Site",
"id": "4149000001242001",
"is_default": true
},
"phone": null,
"employee_id": null,
"name": "John",
"id": "4149000000871029",
"photo_url": "https://contacts.localzoho.com/file?sample",
"is_vip_user": false,
"department": null,
"first_name": "John",
"job_title": null
},
"scheduled_end_time": {
"display_value": "Feb 9, 2023 02:44 PM",
"value": "1675934040000"
},
"marked_group": null,
"site": {
"deleted": false,
"name": "Base Site",
"id": "4149000001242001",
"is_default": true
},
"estimated_effort_minutes": null,
"udf_fields": {
"udf_long1": "1563389026964443",
"udf_date1": {
"display_value": "Nov 10, 2016 11:44 AM",
"value": "1478758440000"
},
"udf_char1": "test-udf_char1"
},
"deleted": false,
"estimated_effort": "1036800000",
"created_date": {
"display_value": "Feb 2, 2023 02:44 PM",
"value": "1675329299172"
},
"estimated_effort_days": "12",
"task_type": null,
"scheduled_start_time": {
"display_value": "Feb 2, 2023 02:44 PM",
"value": "1675329240000"
},
"status": {
"in_progress": true,
"internal_name": "Open",
"stop_timer": false,
"color": "#0066ff",
"name": "Open",
"id": "4149000000006657"
}
},
"response_status": {
"status_code": 2000,
"status": "success"
}
}
Get Problem Task
This operation helps you get a problem task.
Url
<service domain|custom domain>/app/<portal>/api/v3/problem/{problem_id}/tasks/{task_id}
Attributes
id (long)
Indicates the unique ID of the task
title (string)
Title of the task
template (task_template)
Indicates the template which is used to create this task
description (html)
Contains description about the task
scheduled_start_time (datetime)
Date and time at which the task is scheduled to start
scheduled_end_time (datetime)
Date and time at which the task is scheduled to finish
More Attributes Expand all
$ curl -G <service domain|custom domain>/app/<portal>/api/v3/problem/{problem_id}/tasks/{task_id}\
-X GET\
-H "Accept: application/vnd.manageengine.sdp.v3+json"\
-H "Authorization: Zoho-oauthtoken 1000.7xxx98976ab0xxxxxx19901e7551be57.bxxxx921ed64c04f79622bebcfxxxxxx"\
-H "Content-Type: application/x-www-form-urlencoded"
// Deluge Sample script
url = "<service domain|custom domain>/app/<portal>/api/v3/problem/{problem_id}/tasks/{task_id}";
headers = {"Accept":"application/vnd.manageengine.sdp.v3+json",
"Content-Type": "application/x-www-form-urlencoded",
"Authorization": "Zoho-oauthtoken 1000.7xxx98976ab0xxxxxx19901e7551be57.bxxxx921ed64c04f79622bebcfxxxxxx"};
response = invokeurl
[
url: url
type: GET
headers: headers
];
info response;
#Powershell version - 5.1
$url = "<service domain|custom domain>/app/<portal>/api/v3/problem/{problem_id}/tasks/{task_id}"
$headers = @{ "Accept" = "application/vnd.manageengine.sdp.v3+json"
"Authorization" = "Zoho-oauthtoken 1000.7xxx98976ab0xxxxxx19901e7551be57.bxxxx921ed64c04f79622bebcfxxxxxx"
"Content-Type" = "application/x-www-form-urlencoded"}
$response = Invoke-RestMethod -Uri $url -Method get -Headers $headers
$response
#Python version - 3.8
#This script requires requests module installed in python.
from urllib.error import HTTPError
from urllib.parse import urlencode
from urllib.request import urlopen,Request
url = "<service domain|custom domain>/app/<portal>/api/v3/problem/{problem_id}/tasks/{task_id}"
headers ={"Accept": "application/vnd.manageengine.sdp.v3+json",
"Authorization" : "Zoho-oauthtoken 1000.7xxx98976ab0xxxxxx19901e7551be57.bxxxx921ed64c04f79622bebcfxxxxxx",
"Content-Type" : "application/x-www-form-urlencoded"}
httprequest = Request(url, headers=headers)
try:
with urlopen(httprequest) as response:
print(response.read().decode())
except HTTPError as e:
print(e.read().decode())
{
"task": {
"template": {
"inactive": false,
"name": "Default Task",
"id": "1822002620872075"
},
"percentage_completion": 75,
"estimated_effort_hours": null,
"attachments": [],
"email_before": "1800000",
"description": "<div>Edit Task<br /><\/div>",
"title": "Add Problem Task",
"marked_technician": null,
"problem": {
"display_id": {
"display_value": "PB-133",
"value": "133"
},
"id": "4149000001305071",
"title": "Test Problem"
},
"overdue": false,
"additional_cost": "250",
"actual_end_time": {
"display_value": "Feb 7, 2023 02:44 PM",
"value": "1675761240000"
},
"id": "4149000001305075",
"actual_start_time": {
"display_value": "Feb 3, 2023 02:44 PM",
"value": "1675415640000"
},
"group": null,
"owner": {
"email_id": "john@zylker.com",
"is_technician": true,
"sms_mail": null,
"mobile": null,
"last_name": null,
"user_scope": "internal_user",
"sms_mail_id": null,
"site": {
"deleted": false,
"name": "Base Site",
"id": "4149000001242001",
"is_default": true
},
"phone": null,
"employee_id": null,
"name": "John",
"id": "4149000000871029",
"photo_url": "https://contacts.localzoho.com/file?sample",
"is_vip_user": false,
"department": null,
"first_name": "John",
"job_title": null
},
"associated_entity": "problem",
"module": "Problem",
"index": 1,
"priority": {
"color": "#006600",
"name": "Urgent",
"id": "4149000000163189"
},
"created_by": {
"email_id": "john@zylker.com",
"is_technician": true,
"sms_mail": null,
"mobile": null,
"last_name": null,
"user_scope": "internal_user",
"sms_mail_id": null,
"site": {
"deleted": false,
"name": "Base Site",
"id": "4149000001242001",
"is_default": true
},
"phone": null,
"employee_id": null,
"name": "John",
"id": "4149000000871029",
"photo_url": "https://contacts.localzoho.com/file?sample",
"is_vip_user": false,
"department": null,
"first_name": "John",
"job_title": null
},
"scheduled_end_time": {
"display_value": "Feb 9, 2023 02:44 PM",
"value": "1675934040000"
},
"marked_group": null,
"site": {
"deleted": false,
"name": "Base Site",
"id": "4149000001242001",
"is_default": true
},
"estimated_effort_minutes": null,
"udf_fields": {
"udf_long1": "1563389026964443",
"udf_date1": {
"display_value": "Nov 10, 2016 11:44 AM",
"value": "1478758440000"
},
"udf_char1": "test-udf_char1"
},
"deleted": false,
"estimated_effort": "1036800000",
"created_date": {
"display_value": "Feb 2, 2023 02:44 PM",
"value": "1675329299172"
},
"estimated_effort_days": "12",
"task_type": null,
"scheduled_start_time": {
"display_value": "Feb 2, 2023 02:44 PM",
"value": "1675329240000"
},
"status": {
"in_progress": true,
"internal_name": "Open",
"stop_timer": false,
"color": "#0066ff",
"name": "Open",
"id": "4149000000006657"
}
},
"response_status": {
"status_code": 2000,
"status": "success"
}
}
Get List Problem Task
This operation helps you get all problem tasks.
Url
<service domain|custom domain>/app/<portal>/api/v3/problems/{problem_id}/tasks
Attributes
id (long)
Indicates the unique ID of the task
title (string)
Title of the task
template (task_template)
Indicates the template which is used to create this task
description (html)
Contains description about the task
scheduled_start_time (datetime)
Date and time at which the task is scheduled to start
scheduled_end_time (datetime)
Date and time at which the task is scheduled to finish
More Attributes Expand all
$ curl -G <service domain|custom domain>/app/<portal>/api/v3/problems/{problem_id}/tasks\
-X GET\
-H "Accept: application/vnd.manageengine.sdp.v3+json"\
-H "Authorization: Zoho-oauthtoken 1000.7xxx98976ab0xxxxxx19901e7551be57.bxxxx921ed64c04f79622bebcfxxxxxx"\
-H "Content-Type: application/x-www-form-urlencoded"\
--data-urlencode input_data=''
// Deluge Sample script
url = "<service domain|custom domain>/app/<portal>/api/v3/problems/{problem_id}/tasks";
headers = {"Accept":"application/vnd.manageengine.sdp.v3+json",
"Content-Type": "application/x-www-form-urlencoded",
"Authorization": "Zoho-oauthtoken 1000.7xxx98976ab0xxxxxx19901e7551be57.bxxxx921ed64c04f79622bebcfxxxxxx"};
input_data = ;
params = {"input_data":input_data};
response = invokeurl
[
url: url
type: GET
parameters:params
headers: headers
];
info response;
#Powershell version - 5.1
$url = "<service domain|custom domain>/app/<portal>/api/v3/problems/{problem_id}/tasks"
$headers = @{ "Accept" = "application/vnd.manageengine.sdp.v3+json"
"Authorization" = "Zoho-oauthtoken 1000.7xxx98976ab0xxxxxx19901e7551be57.bxxxx921ed64c04f79622bebcfxxxxxx"
"Content-Type" = "application/x-www-form-urlencoded"}
$input_data = @''@
$data = @{ 'input_data' = $input_data}
$response = Invoke-RestMethod -Uri $url -Method get -Body $data -Headers $headers
$response
#Python version - 3.8
#This script requires requests module installed in python.
from urllib.error import HTTPError
from urllib.parse import urlencode
from urllib.request import urlopen,Request
url = "<service domain|custom domain>/app/<portal>/api/v3/problems/{problem_id}/tasks"
headers ={"Accept": "application/vnd.manageengine.sdp.v3+json",
"Authorization" : "Zoho-oauthtoken 1000.7xxx98976ab0xxxxxx19901e7551be57.bxxxx921ed64c04f79622bebcfxxxxxx",
"Content-Type" : "application/x-www-form-urlencoded"}
input_data = ''''''
url += "?" + urlencode({"input_data":input_data})
httprequest = Request(url, headers=headers)
try:
with urlopen(httprequest) as response:
print(response.read().decode())
except HTTPError as e:
print(e.read().decode())
{
"response_status": [
{
"status_code": 2000,
"status": "success"
}
],
"list_info": {
"has_more_rows": false,
"row_count": 1
},
"tasks": [
{
"template": {
"inactive": false,
"name": "Default Task",
"id": "1822002620872075"
},
"percentage_completion": 75,
"estimated_effort_hours": null,
"attachments": [],
"email_before": "1800000",
"description": "<div>Edit Task<br /><\/div>",
"title": "Add Problem Task",
"marked_technician": null,
"problem": {
"display_id": {
"display_value": "PB-133",
"value": "133"
},
"id": "4149000001305071",
"title": "Test Problem"
},
"overdue": false,
"additional_cost": "250",
"actual_end_time": {
"display_value": "Feb 7, 2023 02:44 PM",
"value": "1675761240000"
},
"id": "4149000001305075",
"actual_start_time": {
"display_value": "Feb 3, 2023 02:44 PM",
"value": "1675415640000"
},
"group": null,
"owner": {
"email_id": "john@zylker.com",
"is_technician": true,
"sms_mail": null,
"mobile": null,
"last_name": null,
"user_scope": "internal_user",
"sms_mail_id": null,
"site": {
"deleted": false,
"name": "Base Site",
"id": "4149000001242001",
"is_default": true
},
"phone": null,
"employee_id": null,
"name": "John",
"id": "4149000000871029",
"photo_url": "https://contacts.localzoho.com/file?sample",
"is_vip_user": false,
"department": null,
"first_name": "John",
"job_title": null
},
"associated_entity": "problem",
"module": "Problem",
"index": 1,
"priority": {
"color": "#006600",
"name": "Urgent",
"id": "4149000000163189"
},
"created_by": {
"email_id": "john@zylker.com",
"is_technician": true,
"sms_mail": null,
"mobile": null,
"last_name": null,
"user_scope": "internal_user",
"sms_mail_id": null,
"site": {
"deleted": false,
"name": "Base Site",
"id": "4149000001242001",
"is_default": true
},
"phone": null,
"employee_id": null,
"name": "John",
"id": "4149000000871029",
"photo_url": "https://contacts.localzoho.com/file?sample",
"is_vip_user": false,
"department": null,
"first_name": "John",
"job_title": null
},
"scheduled_end_time": {
"display_value": "Feb 9, 2023 02:44 PM",
"value": "1675934040000"
},
"marked_group": null,
"site": {
"deleted": false,
"name": "Base Site",
"id": "4149000001242001",
"is_default": true
},
"estimated_effort_minutes": null,
"udf_fields": {
"udf_long1": "1563389026964443",
"udf_date1": {
"display_value": "Nov 10, 2016 11:44 AM",
"value": "1478758440000"
},
"udf_char1": "test-udf_char1"
},
"deleted": false,
"estimated_effort": "1036800000",
"created_date": {
"display_value": "Feb 2, 2023 02:44 PM",
"value": "1675329299172"
},
"estimated_effort_days": "12",
"task_type": null,
"scheduled_start_time": {
"display_value": "Feb 2, 2023 02:44 PM",
"value": "1675329240000"
},
"status": {
"in_progress": true,
"internal_name": "Open",
"stop_timer": false,
"color": "#0066ff",
"name": "Open",
"id": "4149000000006657"
}
}
]
}
Delete Problem Task
This operation helps you delete a problem task.
Url
<service domain|custom domain>/app/<portal>/api/v3/problem/{problem_id}/tasks/{task_id}
$ curl <service domain|custom domain>/app/<portal>/api/v3/problem/{problem_id}/tasks/{task_id}\
-X DELETE\
-H "Accept: application/vnd.manageengine.sdp.v3+json"\
-H "Authorization: Zoho-oauthtoken 1000.7xxx98976ab0xxxxxx19901e7551be57.bxxxx921ed64c04f79622bebcfxxxxxx"\
-H "Content-Type: application/x-www-form-urlencoded"
// Deluge Sample script
url = "<service domain|custom domain>/app/<portal>/api/v3/problem/{problem_id}/tasks/{task_id}";
headers = {"Accept":"application/vnd.manageengine.sdp.v3+json",
"Content-Type": "application/x-www-form-urlencoded",
"Authorization": "Zoho-oauthtoken 1000.7xxx98976ab0xxxxxx19901e7551be57.bxxxx921ed64c04f79622bebcfxxxxxx"};
response = invokeurl
[
url: url
type: DELETE
headers: headers
];
info response;
#Powershell version - 5.1
$url = "<service domain|custom domain>/app/<portal>/api/v3/problem/{problem_id}/tasks/{task_id}"
$headers = @{ "Accept" = "application/vnd.manageengine.sdp.v3+json"
"Authorization" = "Zoho-oauthtoken 1000.7xxx98976ab0xxxxxx19901e7551be57.bxxxx921ed64c04f79622bebcfxxxxxx"
"Content-Type" = "application/x-www-form-urlencoded"}
$response = Invoke-RestMethod -Uri $url -Method delete -Headers $headers
$response
#Python version - 3.10
from urllib.error import HTTPError
from urllib.request import urlopen,Request
url = "<service domain|custom domain>/app/<portal>/api/v3/problem/{problem_id}/tasks/{task_id}"
headers ={"Accept": "application/vnd.manageengine.sdp.v3+json",
"Authorization" : "Zoho-oauthtoken 1000.7xxx98976ab0xxxxxx19901e7551be57.bxxxx921ed64c04f79622bebcfxxxxxx",
"Content-Type" : "application/x-www-form-urlencoded"}
httprequest = Request(url, headers=headers,method="DELETE")
try:
with urlopen(httprequest) as response:
print(response.read().decode())
except HTTPError as e:
print(e.read().decode())
{
"response_status": {
"status_code": 2000,
"status": "success"
}
}