跳转到内容

问题任务

任务是较大问题的一部分活动或工作。

属性

id (长整型)
表示任务的唯一 ID

id (长整型)
被认为具有较大值的数字位。

示例

234759602834500

标题 (字符串)
任务标题

标题 (字符串)
纯文本格式。不允许富文本或换行符。

示例

Sample Content

模板 (task_template)
表示用于创建此任务的模板

模板 (task_template)
表示用于创建此任务的模板

示例

{
  "template": {
    "name": "test-template",
    "id": "234567890123456"
  }
}

描述 (html)
包含关于任务的描述

描述 (html)
HTML 是一个文本区域,可使用 html 元素。

示例

<b>The content to be displayed</b>

计划开始时间 (datetime)
计划开始执行任务的日期和时间

计划开始时间 (datetime)
以 JSON 对象表示日期/时间。包含 value 和 display_value 属性。

value :以长整型格式的时间(自 1970 年 1 月 1 日起的毫秒数)。

display_value :以用户个性化格式显示的可读时间。如果未个性化,则使用默认格式。

计划结束时间 (datetime)
计划完成任务的日期和时间

计划结束时间 (datetime)
以 JSON 对象表示日期/时间。包含 value 和 display_value 属性。

value :以长整型格式的时间(自 1970 年 1 月 1 日起的毫秒数)。

display_value :以用户个性化格式显示的可读时间。如果未个性化,则使用默认格式。

更多属性 全部展开

实际开始时间 (datetime)

任务实际开始的日期和时间

实际开始时间 (datetime)
以 JSON 对象表示日期/时间。包含 value 和 display_value 属性。

value :以长整型格式的时间(自 1970 年 1 月 1 日起的毫秒数)。

display_value :以用户个性化格式显示的可读时间。如果未个性化,则使用默认格式。

实际结束时间 (datetime)

任务实际结束的日期和时间

实际结束时间 (datetime)
以 JSON 对象表示日期/时间。包含 value 和 display_value 属性。

value :以长整型格式的时间(自 1970 年 1 月 1 日起的毫秒数)。

display_value :以用户个性化格式显示的可读时间。如果未个性化,则使用默认格式。

email_before (长整型)

指示在计划开始前多少毫秒发送通知。

email_before (长整型)
被认为具有较大值的数字位。

示例

234759602834500

percentage_completion (int)

指示任务的完成百分比进度

percentage_completion (int)
被视为较小数字的数值

示例

39

additional_cost (double)

表示除任务实际费用以外的支出成本

additional_cost (double)
这些是可以包含小数的数字。

示例

23.08

estimated_effort_days (长整型)

估计完成任务所需的天数

estimated_effort_days (长整型)
被认为具有较大值的数字位。

示例

234759602834500

estimated_effort_hours (长整型)

估计完成任务所需的小时数

estimated_effort_hours (长整型)
被认为具有较大值的数字位。

示例

234759602834500

estimated_effort_minutes (长整型)

估计完成任务所需的分钟数

estimated_effort_minutes (长整型)
被认为具有较大值的数字位。

示例

234759602834500

status (status)

指示任务的进度等级

status (status)
指示任务的进度等级

示例

{
  "status": {
    "name": "test status",
    "id": "13333330000112311"
  }
}

group (group)

指示任务分配的组别

group (group)
指示任务分配的组别

示例

{
  "group": {
    "name": "group 1",
    "id": "1003333001243212"
  }
}

owner (user)

分配给任务的用户

owner (user)
分配给任务的用户

示例

{
  "owner": {
    "email_id": "john@zylker.com",
    "name": "John",
    "id": "100000000000220612"
  }
}

marked_technician (user)

任务触发时要分配的用户

marked_technician (user)

priority (priority)

定义任务的紧急程度或重要性

priority (priority)

task_type (task_type)

用于对相似情况的任务进行分类

task_type (task_type)
用于对相似情况的任务进行分类

示例

{
  "task_type": {
    "name": "test task_type",
    "id": "10000000023123"
  }
}

attachments (attachment)

附加到任务的文件。最多可附加10个文件

attachments (attachment)

udf_fields (udf_fields)

存储与任务关联的用户定义字段的值

udf_fields (udf_fields)
存储与任务关联的用户定义字段的值

示例

{
  "udf_fields": {
    "udf_long2": "1225",
    "udf_long1": "1459402730964",
    "udf_date1": {
      "display_value": "Feb 26, 2016 11:00 AM",
      "value": "1456464639051"
    },
    "udf_char1": "abc@test.com",
    "udf_char2": "Ned Stark"
  }
}

module (字符串)read only

任务所属模块

module (字符串)
纯文本格式。不允许富文本或换行符。

示例

Sample Content

created_date (datetime)read only

任务创建的日期和时间

created_date (datetime)
以 JSON 对象表示日期/时间。包含 value 和 display_value 属性。

value :以长整型格式的时间(自 1970 年 1 月 1 日起的毫秒数)。

display_value :以用户个性化格式显示的可读时间。如果未个性化,则使用默认格式。

created_by (user)read only

创建任务的用户名称和ID,采用JSON格式

created_by (user)

estimated_effort (长整型)read only

完成任务所需的估计工作量

estimated_effort (长整型)
被认为具有较大值的数字位。

示例

234759602834500

overdue (boolean)read only

指示任务是否已逾期

overdue (boolean)
布尔值,可有两个可能值。值为 true 和 false。

associated_entity (字符串)read only

与任务关联的实体

associated_entity (字符串)
纯文本格式。不允许富文本或换行符。

示例

Sample Content

problem (problem)read only

任务将关联的问题实体。只有当任务关联到该问题时才会提供问题信息。

problem (problem)
任务将关联的问题实体。只有当任务关联到该问题时才会提供问题信息。

示例

{
  "problem": {
    "id": "100000000000032142"
  }
}

添加问题任务

此操作可帮助您添加问题任务。

必填字段:[-“title”]

Url

<service domain|custom domain>/app/<portal>/api/v3/probles/{problem_id}/tasks

属性

id (长整型)
表示任务的唯一 ID

id (长整型)
被认为具有较大值的数字位。

示例

234759602834500

标题 (字符串)
任务标题

标题 (字符串)
纯文本格式。不允许富文本或换行符。

示例

Sample Content

模板 (task_template)
表示用于创建此任务的模板

模板 (task_template)
表示用于创建此任务的模板

示例

{
  "template": {
    "name": "test-template",
    "id": "234567890123456"
  }
}

描述 (html)
包含关于任务的描述

描述 (html)
HTML 是一个文本区域,可使用 html 元素。

示例

<b>The content to be displayed</b>

计划开始时间 (datetime)
计划开始执行任务的日期和时间

计划开始时间 (datetime)
以 JSON 对象表示日期/时间。包含 value 和 display_value 属性。

value :以长整型格式的时间(自 1970 年 1 月 1 日起的毫秒数)。

display_value :以用户个性化格式显示的可读时间。如果未个性化,则使用默认格式。

计划结束时间 (datetime)
计划完成任务的日期和时间

计划结束时间 (datetime)
以 JSON 对象表示日期/时间。包含 value 和 display_value 属性。

value :以长整型格式的时间(自 1970 年 1 月 1 日起的毫秒数)。

display_value :以用户个性化格式显示的可读时间。如果未个性化,则使用默认格式。

更多属性 全部展开

实际开始时间 (datetime)

任务实际开始的日期和时间

实际开始时间 (datetime)
以 JSON 对象表示日期/时间。包含 value 和 display_value 属性。

value :以长整型格式的时间(自 1970 年 1 月 1 日起的毫秒数)。

display_value :以用户个性化格式显示的可读时间。如果未个性化,则使用默认格式。

实际结束时间 (datetime)

任务实际结束的日期和时间

实际结束时间 (datetime)
以 JSON 对象表示日期/时间。包含 value 和 display_value 属性。

value :以长整型格式的时间(自 1970 年 1 月 1 日起的毫秒数)。

display_value :以用户个性化格式显示的可读时间。如果未个性化,则使用默认格式。

email_before (长整型)

指示在计划开始前多少毫秒发送通知。

email_before (长整型)
被认为具有较大值的数字位。

示例

234759602834500

percentage_completion (int)

指示任务的完成百分比进度

percentage_completion (int)
被视为较小数字的数值

示例

39

additional_cost (double)

表示除任务实际费用以外的支出成本

additional_cost (double)
这些是可以包含小数的数字。

示例

23.08

estimated_effort_days (长整型)

估计完成任务所需的天数

estimated_effort_days (长整型)
被认为具有较大值的数字位。

示例

234759602834500

estimated_effort_hours (长整型)

估计完成任务所需的小时数

estimated_effort_hours (长整型)
被认为具有较大值的数字位。

示例

234759602834500

estimated_effort_minutes (长整型)

估计完成任务所需的分钟数

estimated_effort_minutes (长整型)
被认为具有较大值的数字位。

示例

234759602834500

status (status)

指示任务的进度等级

status (status)
指示任务的进度等级

示例

{
  "status": {
    "name": "test status",
    "id": "13333330000112311"
  }
}

group (group)

指示任务分配的组别

group (group)
指示任务分配的组别

示例

{
  "group": {
    "name": "group 1",
    "id": "1003333001243212"
  }
}

owner (user)

分配给任务的用户

owner (user)
分配给任务的用户

示例

{
  "owner": {
    "email_id": "john@zylker.com",
    "name": "John",
    "id": "100000000000220612"
  }
}

marked_technician (user)

任务触发时要分配的用户

marked_technician (user)

priority (priority)

定义任务的紧急程度或重要性

priority (priority)

task_type (task_type)

用于对相似情况的任务进行分类

task_type (task_type)
用于对相似情况的任务进行分类

示例

{
  "task_type": {
    "name": "test task_type",
    "id": "10000000023123"
  }
}

attachments (attachment)

附加到任务的文件。最多可附加10个文件

attachments (attachment)

udf_fields (udf_fields)

存储与任务关联的用户定义字段的值

udf_fields (udf_fields)
存储与任务关联的用户定义字段的值

示例

{
  "udf_fields": {
    "udf_long2": "1225",
    "udf_long1": "1459402730964",
    "udf_date1": {
      "display_value": "Feb 26, 2016 11:00 AM",
      "value": "1456464639051"
    },
    "udf_char1": "abc@test.com",
    "udf_char2": "Ned Stark"
  }
}

module (字符串)read only

任务所属模块

module (字符串)
纯文本格式。不允许富文本或换行符。

示例

Sample Content

created_date (datetime)read only

任务创建的日期和时间

created_date (datetime)
以 JSON 对象表示日期/时间。包含 value 和 display_value 属性。

value :以长整型格式的时间(自 1970 年 1 月 1 日起的毫秒数)。

display_value :以用户个性化格式显示的可读时间。如果未个性化,则使用默认格式。

created_by (user)read only

创建任务的用户名称和ID,采用JSON格式

created_by (user)

estimated_effort (长整型)read only

完成任务所需的估计工作量

estimated_effort (长整型)
被认为具有较大值的数字位。

示例

234759602834500

overdue (boolean)read only

指示任务是否已逾期

overdue (boolean)
布尔值,可有两个可能值。值为 true 和 false。

associated_entity (字符串)read only

与任务关联的实体

associated_entity (字符串)
纯文本格式。不允许富文本或换行符。

示例

Sample Content

problem (problem)read only

任务将关联的问题实体。只有当任务关联到该问题时才会提供问题信息。

problem (problem)
任务将关联的问题实体。只有当任务关联到该问题时才会提供问题信息。

示例

{
  "problem": {
    "id": "100000000000032142"
  }
}

$ 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"
    }
}

编辑问题任务

此操作可帮助您更新问题任务。

Url

<service domain|custom domain>/app/<portal>/api/v3/problems/{problem_id}/tasks/{task_id}

属性

id (长整型)
表示任务的唯一 ID

id (长整型)
被认为具有较大值的数字位。

示例

234759602834500

标题 (字符串)
任务标题

标题 (字符串)
纯文本格式。不允许富文本或换行符。

示例

Sample Content

模板 (task_template)
表示用于创建此任务的模板

模板 (task_template)
表示用于创建此任务的模板

示例

{
  "template": {
    "name": "test-template",
    "id": "234567890123456"
  }
}

描述 (html)
包含关于任务的描述

描述 (html)
HTML 是一个文本区域,可使用 html 元素。

示例

<b>The content to be displayed</b>

计划开始时间 (datetime)
计划开始执行任务的日期和时间

计划开始时间 (datetime)
以 JSON 对象表示日期/时间。包含 value 和 display_value 属性。

value :以长整型格式的时间(自 1970 年 1 月 1 日起的毫秒数)。

display_value :以用户个性化格式显示的可读时间。如果未个性化,则使用默认格式。

计划结束时间 (datetime)
计划完成任务的日期和时间

计划结束时间 (datetime)
以 JSON 对象表示日期/时间。包含 value 和 display_value 属性。

value :以长整型格式的时间(自 1970 年 1 月 1 日起的毫秒数)。

display_value :以用户个性化格式显示的可读时间。如果未个性化,则使用默认格式。

更多属性 全部展开

实际开始时间 (datetime)

任务实际开始的日期和时间

实际开始时间 (datetime)
以 JSON 对象表示日期/时间。包含 value 和 display_value 属性。

value :以长整型格式的时间(自 1970 年 1 月 1 日起的毫秒数)。

display_value :以用户个性化格式显示的可读时间。如果未个性化,则使用默认格式。

实际结束时间 (datetime)

任务实际结束的日期和时间

实际结束时间 (datetime)
以 JSON 对象表示日期/时间。包含 value 和 display_value 属性。

value :以长整型格式的时间(自 1970 年 1 月 1 日起的毫秒数)。

display_value :以用户个性化格式显示的可读时间。如果未个性化,则使用默认格式。

email_before (长整型)

指示在计划开始前多少毫秒发送通知。

email_before (长整型)
被认为具有较大值的数字位。

示例

234759602834500

percentage_completion (int)

指示任务的完成百分比进度

percentage_completion (int)
被视为较小数字的数值

示例

39

additional_cost (double)

表示除任务实际费用以外的支出成本

additional_cost (double)
这些是可以包含小数的数字。

示例

23.08

estimated_effort_days (长整型)

估计完成任务所需的天数

estimated_effort_days (长整型)
被认为具有较大值的数字位。

示例

234759602834500

estimated_effort_hours (长整型)

估计完成任务所需的小时数

estimated_effort_hours (长整型)
被认为具有较大值的数字位。

示例

234759602834500

estimated_effort_minutes (长整型)

估计完成任务所需的分钟数

estimated_effort_minutes (长整型)
被认为具有较大值的数字位。

示例

234759602834500

status (status)

指示任务的进度等级

status (status)
指示任务的进度等级

示例

{
  "status": {
    "name": "test status",
    "id": "13333330000112311"
  }
}

group (group)

指示任务分配的组别

group (group)
指示任务分配的组别

示例

{
  "group": {
    "name": "group 1",
    "id": "1003333001243212"
  }
}

owner (user)

分配给任务的用户

owner (user)
分配给任务的用户

示例

{
  "owner": {
    "email_id": "john@zylker.com",
    "name": "John",
    "id": "100000000000220612"
  }
}

marked_technician (user)

任务触发时要分配的用户

marked_technician (user)

priority (priority)

定义任务的紧急程度或重要性

priority (priority)

task_type (task_type)

用于对相似情况的任务进行分类

task_type (task_type)
用于对相似情况的任务进行分类

示例

{
  "task_type": {
    "name": "test task_type",
    "id": "10000000023123"
  }
}

attachments (attachment)

附加到任务的文件。最多可附加10个文件

attachments (attachment)

udf_fields (udf_fields)

存储与任务关联的用户定义字段的值

udf_fields (udf_fields)
存储与任务关联的用户定义字段的值

示例

{
  "udf_fields": {
    "udf_long2": "1225",
    "udf_long1": "1459402730964",
    "udf_date1": {
      "display_value": "Feb 26, 2016 11:00 AM",
      "value": "1456464639051"
    },
    "udf_char1": "abc@test.com",
    "udf_char2": "Ned Stark"
  }
}

module (字符串)read only

任务所属模块

module (字符串)
纯文本格式。不允许富文本或换行符。

示例

Sample Content

created_date (datetime)read only

任务创建的日期和时间

created_date (datetime)
以 JSON 对象表示日期/时间。包含 value 和 display_value 属性。

value :以长整型格式的时间(自 1970 年 1 月 1 日起的毫秒数)。

display_value :以用户个性化格式显示的可读时间。如果未个性化,则使用默认格式。

created_by (user)read only

创建任务的用户名称和ID,采用JSON格式

created_by (user)

estimated_effort (长整型)read only

完成任务所需的估计工作量

estimated_effort (长整型)
被认为具有较大值的数字位。

示例

234759602834500

overdue (boolean)read only

指示任务是否已逾期

overdue (boolean)
布尔值,可有两个可能值。值为 true 和 false。

associated_entity (字符串)read only

与任务关联的实体

associated_entity (字符串)
纯文本格式。不允许富文本或换行符。

示例

Sample Content

problem (problem)read only

任务将关联的问题实体。只有当任务关联到该问题时才会提供问题信息。

problem (problem)
任务将关联的问题实体。只有当任务关联到该问题时才会提供问题信息。

示例

{
  "problem": {
    "id": "100000000000032142"
  }
}

$ 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"
    }
}

获取问题任务

此操作可帮助您获取问题任务。

Url

<service domain|custom domain>/app/<portal>/api/v3/problem/{problem_id}/tasks/{task_id}

属性

id (长整型)
表示任务的唯一 ID

id (长整型)
被认为具有较大值的数字位。

示例

234759602834500

标题 (字符串)
任务标题

标题 (字符串)
纯文本格式。不允许富文本或换行符。

示例

Sample Content

模板 (task_template)
表示用于创建此任务的模板

模板 (task_template)
表示用于创建此任务的模板

示例

{
  "template": {
    "name": "test-template",
    "id": "234567890123456"
  }
}

描述 (html)
包含关于任务的描述

描述 (html)
HTML 是一个文本区域,可使用 html 元素。

示例

<b>The content to be displayed</b>

计划开始时间 (datetime)
计划开始执行任务的日期和时间

计划开始时间 (datetime)
以 JSON 对象表示日期/时间。包含 value 和 display_value 属性。

value :以长整型格式的时间(自 1970 年 1 月 1 日起的毫秒数)。

display_value :以用户个性化格式显示的可读时间。如果未个性化,则使用默认格式。

计划结束时间 (datetime)
计划完成任务的日期和时间

计划结束时间 (datetime)
以 JSON 对象表示日期/时间。包含 value 和 display_value 属性。

value :以长整型格式的时间(自 1970 年 1 月 1 日起的毫秒数)。

display_value :以用户个性化格式显示的可读时间。如果未个性化,则使用默认格式。

更多属性 全部展开

实际开始时间 (datetime)

任务实际开始的日期和时间

实际开始时间 (datetime)
以 JSON 对象表示日期/时间。包含 value 和 display_value 属性。

value :以长整型格式的时间(自 1970 年 1 月 1 日起的毫秒数)。

display_value :以用户个性化格式显示的可读时间。如果未个性化,则使用默认格式。

实际结束时间 (datetime)

任务实际结束的日期和时间

实际结束时间 (datetime)
以 JSON 对象表示日期/时间。包含 value 和 display_value 属性。

value :以长整型格式的时间(自 1970 年 1 月 1 日起的毫秒数)。

display_value :以用户个性化格式显示的可读时间。如果未个性化,则使用默认格式。

email_before (长整型)

指示在计划开始前多少毫秒发送通知。

email_before (长整型)
被认为具有较大值的数字位。

示例

234759602834500

percentage_completion (int)

指示任务的完成百分比进度

percentage_completion (int)
被视为较小数字的数值

示例

39

additional_cost (double)

表示除任务实际费用以外的支出成本

additional_cost (double)
这些是可以包含小数的数字。

示例

23.08

estimated_effort_days (长整型)

估计完成任务所需的天数

estimated_effort_days (长整型)
被认为具有较大值的数字位。

示例

234759602834500

estimated_effort_hours (长整型)

估计完成任务所需的小时数

estimated_effort_hours (长整型)
被认为具有较大值的数字位。

示例

234759602834500

estimated_effort_minutes (长整型)

估计完成任务所需的分钟数

estimated_effort_minutes (长整型)
被认为具有较大值的数字位。

示例

234759602834500

status (status)

指示任务的进度等级

status (status)
指示任务的进度等级

示例

{
  "status": {
    "name": "test status",
    "id": "13333330000112311"
  }
}

group (group)

指示任务分配的组别

group (group)
指示任务分配的组别

示例

{
  "group": {
    "name": "group 1",
    "id": "1003333001243212"
  }
}

owner (user)

分配给任务的用户

owner (user)
分配给任务的用户

示例

{
  "owner": {
    "email_id": "john@zylker.com",
    "name": "John",
    "id": "100000000000220612"
  }
}

marked_technician (user)

任务触发时要分配的用户

marked_technician (user)

priority (priority)

定义任务的紧急程度或重要性

priority (priority)

task_type (task_type)

用于对相似情况的任务进行分类

task_type (task_type)
用于对相似情况的任务进行分类

示例

{
  "task_type": {
    "name": "test task_type",
    "id": "10000000023123"
  }
}

attachments (attachment)

附加到任务的文件。最多可附加10个文件

attachments (attachment)

udf_fields (udf_fields)

存储与任务关联的用户定义字段的值

udf_fields (udf_fields)
存储与任务关联的用户定义字段的值

示例

{
  "udf_fields": {
    "udf_long2": "1225",
    "udf_long1": "1459402730964",
    "udf_date1": {
      "display_value": "Feb 26, 2016 11:00 AM",
      "value": "1456464639051"
    },
    "udf_char1": "abc@test.com",
    "udf_char2": "Ned Stark"
  }
}

module (字符串)read only

任务所属模块

module (字符串)
纯文本格式。不允许富文本或换行符。

示例

Sample Content

created_date (datetime)read only

任务创建的日期和时间

created_date (datetime)
以 JSON 对象表示日期/时间。包含 value 和 display_value 属性。

value :以长整型格式的时间(自 1970 年 1 月 1 日起的毫秒数)。

display_value :以用户个性化格式显示的可读时间。如果未个性化,则使用默认格式。

created_by (user)read only

创建任务的用户名称和ID,采用JSON格式

created_by (user)

estimated_effort (长整型)read only

完成任务所需的估计工作量

estimated_effort (长整型)
被认为具有较大值的数字位。

示例

234759602834500

overdue (boolean)read only

指示任务是否已逾期

overdue (boolean)
布尔值,可有两个可能值。值为 true 和 false。

associated_entity (字符串)read only

与任务关联的实体

associated_entity (字符串)
纯文本格式。不允许富文本或换行符。

示例

Sample Content

problem (problem)read only

任务将关联的问题实体。只有当任务关联到该问题时才会提供问题信息。

problem (problem)
任务将关联的问题实体。只有当任务关联到该问题时才会提供问题信息。

示例

{
  "problem": {
    "id": "100000000000032142"
  }
}

$ 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"
    }
}

获取问题任务列表

此操作可帮助您获取所有问题任务。

Url

<service domain|custom domain>/app/<portal>/api/v3/problems/{problem_id}/tasks

属性

id (长整型)
表示任务的唯一 ID

id (长整型)
被认为具有较大值的数字位。

示例

234759602834500

标题 (字符串)
任务标题

标题 (字符串)
纯文本格式。不允许富文本或换行符。

示例

Sample Content

模板 (task_template)
表示用于创建此任务的模板

模板 (task_template)
表示用于创建此任务的模板

示例

{
  "template": {
    "name": "test-template",
    "id": "234567890123456"
  }
}

描述 (html)
包含关于任务的描述

描述 (html)
HTML 是一个文本区域,可使用 html 元素。

示例

<b>The content to be displayed</b>

计划开始时间 (datetime)
计划开始执行任务的日期和时间

计划开始时间 (datetime)
以 JSON 对象表示日期/时间。包含 value 和 display_value 属性。

value :以长整型格式的时间(自 1970 年 1 月 1 日起的毫秒数)。

display_value :以用户个性化格式显示的可读时间。如果未个性化,则使用默认格式。

计划结束时间 (datetime)
计划完成任务的日期和时间

计划结束时间 (datetime)
以 JSON 对象表示日期/时间。包含 value 和 display_value 属性。

value :以长整型格式的时间(自 1970 年 1 月 1 日起的毫秒数)。

display_value :以用户个性化格式显示的可读时间。如果未个性化,则使用默认格式。

更多属性 全部展开

实际开始时间 (datetime)

任务实际开始的日期和时间

实际开始时间 (datetime)
以 JSON 对象表示日期/时间。包含 value 和 display_value 属性。

value :以长整型格式的时间(自 1970 年 1 月 1 日起的毫秒数)。

display_value :以用户个性化格式显示的可读时间。如果未个性化,则使用默认格式。

实际结束时间 (datetime)

任务实际结束的日期和时间

实际结束时间 (datetime)
以 JSON 对象表示日期/时间。包含 value 和 display_value 属性。

value :以长整型格式的时间(自 1970 年 1 月 1 日起的毫秒数)。

display_value :以用户个性化格式显示的可读时间。如果未个性化,则使用默认格式。

email_before (长整型)

指示在计划开始前多少毫秒发送通知。

email_before (长整型)
被认为具有较大值的数字位。

示例

234759602834500

percentage_completion (int)

指示任务的完成百分比进度

percentage_completion (int)
被视为较小数字的数值

示例

39

additional_cost (double)

表示除任务实际费用以外的支出成本

additional_cost (double)
这些是可以包含小数的数字。

示例

23.08

estimated_effort_days (长整型)

估计完成任务所需的天数

estimated_effort_days (长整型)
被认为具有较大值的数字位。

示例

234759602834500

estimated_effort_hours (长整型)

估计完成任务所需的小时数

estimated_effort_hours (长整型)
被认为具有较大值的数字位。

示例

234759602834500

estimated_effort_minutes (长整型)

估计完成任务所需的分钟数

estimated_effort_minutes (长整型)
被认为具有较大值的数字位。

示例

234759602834500

status (status)

指示任务的进度等级

status (status)
指示任务的进度等级

示例

{
  "status": {
    "name": "test status",
    "id": "13333330000112311"
  }
}

group (group)

指示任务分配的组别

group (group)
指示任务分配的组别

示例

{
  "group": {
    "name": "group 1",
    "id": "1003333001243212"
  }
}

owner (user)

分配给任务的用户

owner (user)
分配给任务的用户

示例

{
  "owner": {
    "email_id": "john@zylker.com",
    "name": "John",
    "id": "100000000000220612"
  }
}

marked_technician (user)

任务触发时要分配的用户

marked_technician (user)

priority (priority)

定义任务的紧急程度或重要性

priority (priority)

task_type (task_type)

用于对相似情况的任务进行分类

task_type (task_type)
用于对相似情况的任务进行分类

示例

{
  "task_type": {
    "name": "test task_type",
    "id": "10000000023123"
  }
}

attachments (attachment)

附加到任务的文件。最多可附加10个文件

attachments (attachment)

udf_fields (udf_fields)

存储与任务关联的用户定义字段的值

udf_fields (udf_fields)
存储与任务关联的用户定义字段的值

示例

{
  "udf_fields": {
    "udf_long2": "1225",
    "udf_long1": "1459402730964",
    "udf_date1": {
      "display_value": "Feb 26, 2016 11:00 AM",
      "value": "1456464639051"
    },
    "udf_char1": "abc@test.com",
    "udf_char2": "Ned Stark"
  }
}

module (字符串)read only

任务所属模块

module (字符串)
纯文本格式。不允许富文本或换行符。

示例

Sample Content

created_date (datetime)read only

任务创建的日期和时间

created_date (datetime)
以 JSON 对象表示日期/时间。包含 value 和 display_value 属性。

value :以长整型格式的时间(自 1970 年 1 月 1 日起的毫秒数)。

display_value :以用户个性化格式显示的可读时间。如果未个性化,则使用默认格式。

created_by (user)read only

创建任务的用户名称和ID,采用JSON格式

created_by (user)

estimated_effort (长整型)read only

完成任务所需的估计工作量

estimated_effort (长整型)
被认为具有较大值的数字位。

示例

234759602834500

overdue (boolean)read only

指示任务是否已逾期

overdue (boolean)
布尔值,可有两个可能值。值为 true 和 false。

associated_entity (字符串)read only

与任务关联的实体

associated_entity (字符串)
纯文本格式。不允许富文本或换行符。

示例

Sample Content

problem (problem)read only

任务将关联的问题实体。只有当任务关联到该问题时才会提供问题信息。

problem (problem)
任务将关联的问题实体。只有当任务关联到该问题时才会提供问题信息。

示例

{
  "problem": {
    "id": "100000000000032142"
  }
}

$ 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"
            }
        }
    ]
}

删除问题任务

此操作可帮助您删除问题任务。

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"
  }
}