<service domain|custom domain>/app/<portal>/api/v3/problems
问题
终端用户在发现所提供的服务中断时,可以提出问题。
属性
添加问题
此操作帮助您添加一个问题。
必填字段:- 标题
Url
属性
更多属性 展开全部
影响详情 (JSONObject)
描述问题将如何影响业务
显示属性
根本原因 (JSONObject)
描述问题的原因
显示属性
症状 (JSONObject)
描述问题对业务的影响症状
显示属性
已知错误详情 (JSONObject)
描述问题的已知错误详情
显示属性
关闭详情 (JSONObject)
包含有关问题关闭的信息
显示属性
解决详情 (JSONObject)
技术员为问题提供的解决方案
显示属性
变通方案详情 (JSONObject)
技术员为问题提供的变通方案
显示属性
$ curl <service domain|custom domain>/app/<portal>/api/v3/problems\
-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='{
"problem": {
"template": {
"id": "4149000000128011",
"name": "General Problem Template"
},
"problem_template_task_ids": [],
"reported_by": {
"id": "4149000000871029",
"name": "John",
"email_id": "john@zlyker.com"
},
"site": {
"id": "4149000001242001",
"name": "Base Site"
},
"impact": {
"id": "4149000000008036",
"name": "Affects Group"
},
"group": {
"id": "4149000001032137",
"name": "DBA Group"
},
"urgency": {
"id": "4149000000007921",
"name": "Normal"
},
"technician": {
"id": "4149000000766091",
"name": "John",
"email_id": "john@zlyker.com"
},
"priority": {
"id": "4149000000006803",
"name": "Medium"
},
"udf_fields": {
"udf_date3": null,
"udf_char6": null,
"udf_char1": "YES",
"udf_date2": null
},
"status": {
"id": "4149000000006657",
"name": "Open"
},
"category": {
"id": "4149000000006689",
"name": "Software"
},
"subcategory": {
"id": "4149000000006717",
"name": "MS Office"
},
"item": {
"id": "4149000000006773",
"name": "item"
},
"due_by_time": {
"value": 1678264620000
},
"closed_time": null,
"services": [
{
"id": "4149000001341526",
"name": "Communication"
},
{
"id": "4149000001341618",
"name": "Application Login"
}
],
"assets": [],
"configuration_items": [
{
"id": "4149000000288117",
"name": "Hardware Problems"
}
],
"title": "Test Problem",
"description": "<div>Description</div>",
"attachments": [],
"impact_details": {
"impact_details_description": "Impact Details"
},
"root_cause": {
"root_cause_description": "Root Cause"
},
"symptoms": {
"symptoms_description": "symptoms"
},
"resolution_details": {
"resolution_details_description": "Resolution"
},
"workaround_details": {
"workaround_details_description": "Workaround"
}
}
}'
// Deluge Sample script
url = "<service domain|custom domain>/app/<portal>/api/v3/problems";
headers = {"Accept":"application/vnd.manageengine.sdp.v3+json",
"Content-Type": "application/x-www-form-urlencoded",
"Authorization": "Zoho-oauthtoken 1000.7xxx98976ab0xxxxxx19901e7551be57.bxxxx921ed64c04f79622bebcfxxxxxx"};
input_data = {
"problem": {
"template": {
"id": "4149000000128011",
"name": "General Problem Template"
},
"problem_template_task_ids": [],
"reported_by": {
"id": "4149000000871029",
"name": "John",
"email_id": "john@zlyker.com"
},
"site": {
"id": "4149000001242001",
"name": "Base Site"
},
"impact": {
"id": "4149000000008036",
"name": "Affects Group"
},
"group": {
"id": "4149000001032137",
"name": "DBA Group"
},
"urgency": {
"id": "4149000000007921",
"name": "Normal"
},
"technician": {
"id": "4149000000766091",
"name": "John",
"email_id": "john@zlyker.com"
},
"priority": {
"id": "4149000000006803",
"name": "Medium"
},
"udf_fields": {
"udf_date3": null,
"udf_char6": null,
"udf_char1": "YES",
"udf_date2": null
},
"status": {
"id": "4149000000006657",
"name": "Open"
},
"category": {
"id": "4149000000006689",
"name": "Software"
},
"subcategory": {
"id": "4149000000006717",
"name": "MS Office"
},
"item": {
"id": "4149000000006773",
"name": "item"
},
"due_by_time": {
"value": 1678264620000
},
"closed_time": null,
"services": [
{
"id": "4149000001341526",
"name": "Communication"
},
{
"id": "4149000001341618",
"name": "Application Login"
}
],
"assets": [],
"configuration_items": [
{
"id": "4149000000288117",
"name": "Hardware Problems"
}
],
"title": "Test Problem",
"description": "<div>Description</div>",
"attachments": [],
"impact_details": {
"impact_details_description": "Impact Details"
},
"root_cause": {
"root_cause_description": "Root Cause"
},
"symptoms": {
"symptoms_description": "symptoms"
},
"resolution_details": {
"resolution_details_description": "Resolution"
},
"workaround_details": {
"workaround_details_description": "Workaround"
}
}
};
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/problems"
$headers = @{ "Accept" = "application/vnd.manageengine.sdp.v3+json"
"Authorization" = "Zoho-oauthtoken 1000.7xxx98976ab0xxxxxx19901e7551be57.bxxxx921ed64c04f79622bebcfxxxxxx"
"Content-Type" = "application/x-www-form-urlencoded"}
$input_data = @'
{
"problem": {
"template": {
"id": "4149000000128011",
"name": "General Problem Template"
},
"problem_template_task_ids": [],
"reported_by": {
"id": "4149000000871029",
"name": "John",
"email_id": "john@zlyker.com"
},
"site": {
"id": "4149000001242001",
"name": "Base Site"
},
"impact": {
"id": "4149000000008036",
"name": "Affects Group"
},
"group": {
"id": "4149000001032137",
"name": "DBA Group"
},
"urgency": {
"id": "4149000000007921",
"name": "Normal"
},
"technician": {
"id": "4149000000766091",
"name": "John",
"email_id": "john@zlyker.com"
},
"priority": {
"id": "4149000000006803",
"name": "Medium"
},
"udf_fields": {
"udf_date3": null,
"udf_char6": null,
"udf_char1": "YES",
"udf_date2": null
},
"status": {
"id": "4149000000006657",
"name": "Open"
},
"category": {
"id": "4149000000006689",
"name": "Software"
},
"subcategory": {
"id": "4149000000006717",
"name": "MS Office"
},
"item": {
"id": "4149000000006773",
"name": "item"
},
"due_by_time": {
"value": 1678264620000
},
"closed_time": null,
"services": [
{
"id": "4149000001341526",
"name": "Communication"
},
{
"id": "4149000001341618",
"name": "Application Login"
}
],
"assets": [],
"configuration_items": [
{
"id": "4149000000288117",
"name": "Hardware Problems"
}
],
"title": "Test Problem",
"description": "<div>Description</div>",
"attachments": [],
"impact_details": {
"impact_details_description": "Impact Details"
},
"root_cause": {
"root_cause_description": "Root Cause"
},
"symptoms": {
"symptoms_description": "symptoms"
},
"resolution_details": {
"resolution_details_description": "Resolution"
},
"workaround_details": {
"workaround_details_description": "Workaround"
}
}
}
'@
$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/problems"
headers ={"Accept": "application/vnd.manageengine.sdp.v3+json",
"Authorization" : "Zoho-oauthtoken 1000.7xxx98976ab0xxxxxx19901e7551be57.bxxxx921ed64c04f79622bebcfxxxxxx",
"Content-Type" : "application/x-www-form-urlencoded"}
input_data = '''{
"problem": {
"template": {
"id": "4149000000128011",
"name": "General Problem Template"
},
"problem_template_task_ids": [],
"reported_by": {
"id": "4149000000871029",
"name": "John",
"email_id": "john@zlyker.com"
},
"site": {
"id": "4149000001242001",
"name": "Base Site"
},
"impact": {
"id": "4149000000008036",
"name": "Affects Group"
},
"group": {
"id": "4149000001032137",
"name": "DBA Group"
},
"urgency": {
"id": "4149000000007921",
"name": "Normal"
},
"technician": {
"id": "4149000000766091",
"name": "John",
"email_id": "john@zlyker.com"
},
"priority": {
"id": "4149000000006803",
"name": "Medium"
},
"udf_fields": {
"udf_date3": null,
"udf_char6": null,
"udf_char1": "YES",
"udf_date2": null
},
"status": {
"id": "4149000000006657",
"name": "Open"
},
"category": {
"id": "4149000000006689",
"name": "Software"
},
"subcategory": {
"id": "4149000000006717",
"name": "MS Office"
},
"item": {
"id": "4149000000006773",
"name": "item"
},
"due_by_time": {
"value": 1678264620000
},
"closed_time": null,
"services": [
{
"id": "4149000001341526",
"name": "Communication"
},
{
"id": "4149000001341618",
"name": "Application Login"
}
],
"assets": [],
"configuration_items": [
{
"id": "4149000000288117",
"name": "Hardware Problems"
}
],
"title": "Test Problem",
"description": "<div>Description</div>",
"attachments": [],
"impact_details": {
"impact_details_description": "Impact Details"
},
"root_cause": {
"root_cause_description": "Root Cause"
},
"symptoms": {
"symptoms_description": "symptoms"
},
"resolution_details": {
"resolution_details_description": "Resolution"
},
"workaround_details": {
"workaround_details_description": "Workaround"
}
}
}'''
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())
{
"problem": {
"known_error_details": {
"known_error_details_updated_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
},
"known_error_details_updated_on": {
"display_value": "Mar 6, 2023 03:21 PM",
"value": "1678096283689"
},
"known_error_comments": null,
"is_known_error": false
},
"template": {
"inactive": false,
"name": "General Problem Template",
"id": "4149000000128011"
},
"updated_time": null,
"attachments": [],
"display_id": {
"display_value": "PB-140",
"value": "140"
},
"description": "<div>Description</div>",
"title": "Test Problem",
"lifecycle": null,
"assets": [],
"configuration_items": [
{
"ci_type": {
"id": "4149000000141328"
},
"name": "Hardware Problems",
"id": "4149000000288117"
}
],
"urgency": {
"name": "Normal",
"id": "4149000000007921"
},
"close_details": {
"close_details_updated_on": null,
"closure_code": null,
"close_details_comments": null,
"close_details_updated_by": null
},
"rel": {
"workarounds": null,
"resolutions": null
},
"reported_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
},
"id": "4149000001355051",
"group": {
"site": {
"id": "4149000001242001"
},
"deleted": false,
"name": "DBA Group",
"id": "4149000001032137"
},
"root_cause": {
"root_cause_updated_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
},
"root_cause_description": "Root Cause",
"root_cause_updated_on": {
"display_value": "Mar 6, 2023 03:21 PM",
"value": "1678096283690"
}
},
"item": {
"name": "Install",
"id": "4149000000006773"
},
"resolution_details": {
"resolution_details_updated_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
},
"resolution_details_description": "Resolution",
"resolution_details_updated_on": {
"display_value": "Mar 6, 2023 03:21 PM",
"value": "1678096283690"
}
},
"workaround_details": {
"workaround_details_description": "Workaround",
"workaround_details_updated_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
},
"workaround_details_updated_on": {
"display_value": "Mar 6, 2023 03:21 PM",
"value": "1678096283690"
}
},
"impact": {
"name": "Affects Group",
"id": "4149000000008036"
},
"technician": {
"email_id": "chine@haods.com",
"is_technician": true,
"sms_mail": null,
"mobile": null,
"last_name": null,
"user_scope": "internal_user",
"sms_mail_id": null,
"cost_per_hour": "0",
"site": {
"id": "4149000001242001"
},
"phone": null,
"employee_id": null,
"name": "china ech",
"id": "4149000000766091",
"photo_url": "https://contacts.localzoho.com/file?exp=10&ID=-1&t=user&height=60&width=60",
"is_vip_user": false,
"department": null,
"first_name": "china ech",
"job_title": null
},
"closed_time": null,
"services": [
{
"inactive": false,
"name": "Communication",
"id": "4149000001341526",
"sort_index": 0
},
{
"inactive": false,
"name": "Application Login",
"id": "4149000001341618",
"sort_index": 0
}
],
"priority": {
"color": "#ff6600",
"name": "Medium",
"id": "4149000000006803"
},
"due_by_time": {
"display_value": "Mar 8, 2023 02:07 PM",
"value": "1678264620000"
},
"symptoms": {
"symptoms_updated_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
},
"symptoms_description": "symptoms",
"symptoms_updated_on": {
"display_value": "Mar 6, 2023 03:21 PM",
"value": "1678096283689"
}
},
"site": {
"deleted": false,
"name": "Base Site",
"id": "4149000001242001",
"is_default": true
},
"udf_fields": {
"udf_char6": null,
"udf_char1": "YES",
"udf_char2": null,
"udf_char5": null,
"udf_ref2": null,
"udf_ref1": null,
"udf_ref8": null,
"udf_ref7": null,
"udf_ref6": null,
"udf_ref5": null,
"udf_ref4": null,
"udf_date3": null,
"udf_date2": null,
"udf_ref3": null
},
"impact_details": {
"impact_details_updated_on": {
"display_value": "Mar 6, 2023 03:21 PM",
"value": "1678096283690"
},
"impact_details_updated_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
},
"impact_details_description": "Impact Details"
},
"reported_time": {
"display_value": "Mar 6, 2023 03:21 PM",
"value": "1678096283612"
},
"problem_template_task_ids": [],
"category": {
"deleted": false,
"name": "Software",
"id": "4149000000006689"
},
"subcategory": {
"name": "MS Office",
"id": "4149000000006717"
},
"notes_present": false,
"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}
属性
更多属性 展开全部
影响详情 (JSONObject)
描述问题将如何影响业务
显示属性
根本原因 (JSONObject)
描述问题的原因
显示属性
症状 (JSONObject)
描述问题对业务的影响症状
显示属性
已知错误详情 (JSONObject)
描述问题的已知错误详情
显示属性
关闭详情 (JSONObject)
包含有关问题关闭的信息
显示属性
解决详情 (JSONObject)
技术员为问题提供的解决方案
显示属性
变通方案详情 (JSONObject)
技术员为问题提供的变通方案
显示属性
$ curl <service domain|custom domain>/app/<portal>/api/v3/problems/{problem_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='{
"problem": {
"template": {
"id": "4149000000128011",
"name": "General Problem Template"
},
"problem_template_task_ids": [],
"reported_by": {
"id": "4149000000871029",
"name": "John",
"email_id": "john@zlyker.com"
},
"site": {
"id": "4149000001242001",
"name": "Base Site"
},
"impact": {
"id": "4149000000008036",
"name": "Affects Group"
},
"group": {
"id": "4149000001032137",
"name": "DBA Group"
},
"urgency": {
"id": "4149000000007921",
"name": "Normal"
},
"technician": {
"id": "4149000000766091",
"name": "John",
"email_id": "john@zlyker.com"
},
"priority": {
"id": "4149000000006803",
"name": "Medium"
},
"udf_fields": {
"udf_date3": null,
"udf_char6": null,
"udf_char1": "YES",
"udf_date2": null
},
"status": {
"id": "4149000000006661",
"name": "Closed"
},
"category": {
"id": "4149000000006689",
"name": "Software"
},
"subcategory": {
"id": "4149000000006717",
"name": "MS Office"
},
"item": {
"id": "4149000000006773",
"name": "item"
},
"due_by_time": {
"value": 1678264620000
},
"close_details": {
"closure_code": {
"id": "4149000001015012",
"name": "Success"
},
"close_details_comments": "Problem Resolved"
},
"title": "Edit Test Problem",
"resolution_details": {
"resolution_details_description": "Resolution"
},
"workaround_details": {
"workaround_details_description": "Workaround"
}
}
}'
// Deluge Sample script
url = "<service domain|custom domain>/app/<portal>/api/v3/problems/{problem_id}";
headers = {"Accept":"application/vnd.manageengine.sdp.v3+json",
"Content-Type": "application/x-www-form-urlencoded",
"Authorization": "Zoho-oauthtoken 1000.7xxx98976ab0xxxxxx19901e7551be57.bxxxx921ed64c04f79622bebcfxxxxxx"};
input_data = {
"problem": {
"template": {
"id": "4149000000128011",
"name": "General Problem Template"
},
"problem_template_task_ids": [],
"reported_by": {
"id": "4149000000871029",
"name": "John",
"email_id": "john@zlyker.com"
},
"site": {
"id": "4149000001242001",
"name": "Base Site"
},
"impact": {
"id": "4149000000008036",
"name": "Affects Group"
},
"group": {
"id": "4149000001032137",
"name": "DBA Group"
},
"urgency": {
"id": "4149000000007921",
"name": "Normal"
},
"technician": {
"id": "4149000000766091",
"name": "John",
"email_id": "john@zlyker.com"
},
"priority": {
"id": "4149000000006803",
"name": "Medium"
},
"udf_fields": {
"udf_date3": null,
"udf_char6": null,
"udf_char1": "YES",
"udf_date2": null
},
"status": {
"id": "4149000000006661",
"name": "Closed"
},
"category": {
"id": "4149000000006689",
"name": "Software"
},
"subcategory": {
"id": "4149000000006717",
"name": "MS Office"
},
"item": {
"id": "4149000000006773",
"name": "item"
},
"due_by_time": {
"value": 1678264620000
},
"close_details": {
"closure_code": {
"id": "4149000001015012",
"name": "Success"
},
"close_details_comments": "Problem Resolved"
},
"title": "Edit Test Problem",
"resolution_details": {
"resolution_details_description": "Resolution"
},
"workaround_details": {
"workaround_details_description": "Workaround"
}
}
};
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}"
$headers = @{"Accept": "application/vnd.manageengine.sdp.v3+json",
"Authorization" : "Zoho-oauthtoken 1000.7xxx98976ab0xxxxxx19901e7551be57.bxxxx921ed64c04f79622bebcfxxxxxx",
"Content-Type" : "application/x-www-form-urlencoded"}
$input_data = @'
{
"problem": {
"template": {
"id": "4149000000128011",
"name": "General Problem Template"
},
"problem_template_task_ids": [],
"reported_by": {
"id": "4149000000871029",
"name": "John",
"email_id": "john@zlyker.com"
},
"site": {
"id": "4149000001242001",
"name": "Base Site"
},
"impact": {
"id": "4149000000008036",
"name": "Affects Group"
},
"group": {
"id": "4149000001032137",
"name": "DBA Group"
},
"urgency": {
"id": "4149000000007921",
"name": "Normal"
},
"technician": {
"id": "4149000000766091",
"name": "John",
"email_id": "john@zlyker.com"
},
"priority": {
"id": "4149000000006803",
"name": "Medium"
},
"udf_fields": {
"udf_date3": null,
"udf_char6": null,
"udf_char1": "YES",
"udf_date2": null
},
"status": {
"id": "4149000000006661",
"name": "Closed"
},
"category": {
"id": "4149000000006689",
"name": "Software"
},
"subcategory": {
"id": "4149000000006717",
"name": "MS Office"
},
"item": {
"id": "4149000000006773",
"name": "item"
},
"due_by_time": {
"value": 1678264620000
},
"close_details": {
"closure_code": {
"id": "4149000001015012",
"name": "Success"
},
"close_details_comments": "Problem Resolved"
},
"title": "Edit Test Problem",
"resolution_details": {
"resolution_details_description": "Resolution"
},
"workaround_details": {
"workaround_details_description": "Workaround"
}
}
}
'@
$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}"
headers ={"Accept": "application/vnd.manageengine.sdp.v3+json",
"Authorization" : "Zoho-oauthtoken 1000.7xxx98976ab0xxxxxx19901e7551be57.bxxxx921ed64c04f79622bebcfxxxxxx",
"Content-Type" : "application/x-www-form-urlencoded"}
input_data = '''{
"problem": {
"template": {
"id": "4149000000128011",
"name": "General Problem Template"
},
"problem_template_task_ids": [],
"reported_by": {
"id": "4149000000871029",
"name": "John",
"email_id": "john@zlyker.com"
},
"site": {
"id": "4149000001242001",
"name": "Base Site"
},
"impact": {
"id": "4149000000008036",
"name": "Affects Group"
},
"group": {
"id": "4149000001032137",
"name": "DBA Group"
},
"urgency": {
"id": "4149000000007921",
"name": "Normal"
},
"technician": {
"id": "4149000000766091",
"name": "John",
"email_id": "john@zlyker.com"
},
"priority": {
"id": "4149000000006803",
"name": "Medium"
},
"udf_fields": {
"udf_date3": null,
"udf_char6": null,
"udf_char1": "YES",
"udf_date2": null
},
"status": {
"id": "4149000000006661",
"name": "Closed"
},
"category": {
"id": "4149000000006689",
"name": "Software"
},
"subcategory": {
"id": "4149000000006717",
"name": "MS Office"
},
"item": {
"id": "4149000000006773",
"name": "item"
},
"due_by_time": {
"value": 1678264620000
},
"close_details": {
"closure_code": {
"id": "4149000001015012",
"name": "Success"
},
"close_details_comments": "Problem Resolved"
},
"title": "Edit Test Problem",
"resolution_details": {
"resolution_details_description": "Resolution"
},
"workaround_details": {
"workaround_details_description": "Workaround"
}
}
}'''
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())
{
"problem": {
"known_error_details": {
"known_error_details_updated_by": {
"email_id": "john@zlyker.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
},
"known_error_details_updated_on": {
"display_value": "Mar 6, 2023 03:21 PM",
"value": "1678096283689"
},
"known_error_comments": null,
"is_known_error": false
},
"template": {
"inactive": false,
"name": "General Problem Template",
"id": "4149000000128011"
},
"updated_time": {
"display_value": "Mar 6, 2023 03:34 PM",
"value": "1678097051883"
},
"attachments": [],
"display_id": {
"display_value": "PB-140",
"value": "140"
},
"description": "<div>Description</div>",
"title": "Edit Test Problem",
"lifecycle": null,
"assets": [],
"configuration_items": [
{
"ci_type": {
"id": "4149000000141328"
},
"name": "Hardware Problems",
"id": "4149000000288117"
}
],
"urgency": {
"name": "Normal",
"id": "4149000000007921"
},
"close_details": {
"close_details_updated_on": {
"display_value": "Mar 6, 2023 03:34 PM",
"value": "1678097051891"
},
"closure_code": {
"name": "Success",
"id": "4149000001015012"
},
"close_details_comments": "Problem Resolved",
"close_details_updated_by": {
"email_id": "john@zlyker.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
}
},
"rel": {
"workarounds": null,
"resolutions": null
},
"reported_by": {
"email_id": "john@zlyker.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
},
"id": "4149000001355051",
"group": {
"site": {
"id": "4149000001242001"
},
"deleted": false,
"name": "DBA Group",
"id": "4149000001032137"
},
"root_cause": {
"root_cause_updated_by": {
"email_id": "john@zlyker.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
},
"root_cause_description": "Root Cause",
"root_cause_updated_on": {
"display_value": "Mar 6, 2023 03:21 PM",
"value": "1678096283690"
}
},
"item": {
"name": "Install",
"id": "4149000000006773"
},
"resolution_details": {
"resolution_details_updated_by": {
"email_id": "john@zlyker.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
},
"resolution_details_description": "Resolution",
"resolution_details_updated_on": {
"display_value": "Mar 6, 2023 03:21 PM",
"value": "1678096283690"
}
},
"workaround_details": {
"workaround_details_description": "Workaround",
"workaround_details_updated_by": {
"email_id": "john@zlyker.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
},
"workaround_details_updated_on": {
"display_value": "Mar 6, 2023 03:21 PM",
"value": "1678096283690"
}
},
"impact": {
"name": "Affects Group",
"id": "4149000000008036"
},
"technician": {
"email_id": "chine@haods.com",
"is_technician": true,
"sms_mail": null,
"mobile": null,
"last_name": null,
"user_scope": "internal_user",
"sms_mail_id": null,
"cost_per_hour": "0",
"site": {
"id": "4149000001242001"
},
"phone": null,
"employee_id": null,
"name": "china ech",
"id": "4149000000766091",
"photo_url": "https://contacts.localzoho.com/file?exp=10&ID=-1&t=user&height=60&width=60",
"is_vip_user": false,
"department": null,
"first_name": "china ech",
"job_title": null
},
"closed_time": {
"display_value": "Mar 6, 2023 03:34 PM",
"value": "1678097051885"
},
"services": [
{
"inactive": false,
"name": "Communication",
"id": "4149000001341526",
"sort_index": 0
},
{
"inactive": false,
"name": "Application Login",
"id": "4149000001341618",
"sort_index": 0
}
],
"priority": {
"color": "#ff6600",
"name": "Medium",
"id": "4149000000006803"
},
"due_by_time": {
"display_value": "Mar 8, 2023 02:07 PM",
"value": "1678264620000"
},
"symptoms": {
"symptoms_updated_by": {
"email_id": "john@zlyker.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
},
"symptoms_description": "symptoms",
"symptoms_updated_on": {
"display_value": "Mar 6, 2023 03:21 PM",
"value": "1678096283689"
}
},
"site": {
"deleted": false,
"name": "Base Site",
"id": "4149000001242001",
"is_default": true
},
"udf_fields": {
"udf_char6": null,
"udf_char1": "YES",
"udf_char2": null,
"udf_char5": null,
"udf_ref2": null,
"udf_ref1": null,
"udf_ref8": null,
"udf_ref7": null,
"udf_ref6": null,
"udf_ref5": null,
"udf_ref4": null,
"udf_date3": null,
"udf_date2": null,
"udf_ref3": null
},
"impact_details": {
"impact_details_updated_on": {
"display_value": "Mar 6, 2023 03:21 PM",
"value": "1678096283690"
},
"impact_details_updated_by": {
"email_id": "john@zlyker.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
},
"impact_details_description": "Impact Details"
},
"reported_time": {
"display_value": "Mar 6, 2023 03:21 PM",
"value": "1678096283612"
},
"problem_template_task_ids": [],
"category": {
"deleted": false,
"name": "Software",
"id": "4149000000006689"
},
"subcategory": {
"name": "MS Office",
"id": "4149000000006717"
},
"notes_present": false,
"status": {
"in_progress": false,
"internal_name": "Closed",
"stop_timer": false,
"color": "#006600",
"name": "Closed",
"id": "4149000000006661"
}
},
"response_status": {
"status_code": 2000,
"status": "success"
}
}
获取问题
此操作帮助您获取一个问题。
Url
<service domain|custom domain>/app/<portal>/api/v3/problems/{problem_id}
属性
更多属性 展开全部
影响详情 (JSONObject)
描述问题将如何影响业务
显示属性
根本原因 (JSONObject)
描述问题的原因
显示属性
症状 (JSONObject)
描述问题对业务的影响症状
显示属性
已知错误详情 (JSONObject)
描述问题的已知错误详情
显示属性
关闭详情 (JSONObject)
包含有关问题关闭的信息
显示属性
解决详情 (JSONObject)
技术员为问题提供的解决方案
显示属性
变通方案详情 (JSONObject)
技术员为问题提供的变通方案
显示属性
$ curl -G <service domain|custom domain>/app/<portal>/api/v3/problems/{problem_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/problems/{problem_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/problems/{problem_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/problems/{problem_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())
{
"response_status": [
{
"status_code": 2000,
"status": "success"
}
],
"list_info": {
"has_more_rows": false,
"row_count": 1
},
"problem": {
"known_error_details": {
"known_error_details_updated_by": {
"email_id": "john@zlyker.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
},
"known_error_details_updated_on": {
"display_value": "Mar 6, 2023 03:21 PM",
"value": "1678096283689"
},
"known_error_comments": null,
"is_known_error": false
},
"template": {
"inactive": false,
"name": "General Problem Template",
"id": "4149000000128011"
},
"updated_time": {
"display_value": "Mar 6, 2023 03:34 PM",
"value": "1678097051883"
},
"attachments": [],
"display_id": {
"display_value": "PB-140",
"value": "140"
},
"description": "<div>Description</div>",
"title": "Edit Test Problem",
"lifecycle": null,
"assets": [],
"configuration_items": [
{
"ci_type": {
"id": "4149000000141328"
},
"name": "Hardware Problems",
"id": "4149000000288117"
}
],
"urgency": {
"name": "Normal",
"id": "4149000000007921"
},
"close_details": {
"close_details_updated_on": {
"display_value": "Mar 6, 2023 03:34 PM",
"value": "1678097051891"
},
"closure_code": {
"name": "Success",
"id": "4149000001015012"
},
"close_details_comments": "Problem Resolved",
"close_details_updated_by": {
"email_id": "john@zlyker.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
}
},
"rel": {
"workarounds": null,
"resolutions": null
},
"reported_by": {
"email_id": "john@zlyker.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
},
"id": "4149000001355051",
"group": {
"site": {
"id": "4149000001242001"
},
"deleted": false,
"name": "DBA Group",
"id": "4149000001032137"
},
"root_cause": {
"root_cause_updated_by": {
"email_id": "john@zlyker.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
},
"root_cause_description": "Root Cause",
"root_cause_updated_on": {
"display_value": "Mar 6, 2023 03:21 PM",
"value": "1678096283690"
}
},
"item": {
"name": "Install",
"id": "4149000000006773"
},
"resolution_details": {
"resolution_details_updated_by": {
"email_id": "john@zlyker.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
},
"resolution_details_description": "Resolution",
"resolution_details_updated_on": {
"display_value": "Mar 6, 2023 03:21 PM",
"value": "1678096283690"
}
},
"workaround_details": {
"workaround_details_description": "Workaround",
"workaround_details_updated_by": {
"email_id": "john@zlyker.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
},
"workaround_details_updated_on": {
"display_value": "Mar 6, 2023 03:21 PM",
"value": "1678096283690"
}
},
"impact": {
"name": "Affects Group",
"id": "4149000000008036"
},
"technician": {
"email_id": "chine@haods.com",
"is_technician": true,
"sms_mail": null,
"mobile": null,
"last_name": null,
"user_scope": "internal_user",
"sms_mail_id": null,
"cost_per_hour": "0",
"site": {
"id": "4149000001242001"
},
"phone": null,
"employee_id": null,
"name": "china ech",
"id": "4149000000766091",
"photo_url": "https://contacts.localzoho.com/file?exp=10&ID=-1&t=user&height=60&width=60",
"is_vip_user": false,
"department": null,
"first_name": "china ech",
"job_title": null
},
"closed_time": {
"display_value": "Mar 6, 2023 03:34 PM",
"value": "1678097051885"
},
"services": [
{
"inactive": false,
"name": "Communication",
"id": "4149000001341526",
"sort_index": 0
},
{
"inactive": false,
"name": "Application Login",
"id": "4149000001341618",
"sort_index": 0
}
],
"priority": {
"color": "#ff6600",
"name": "Medium",
"id": "4149000000006803"
},
"due_by_time": {
"display_value": "Mar 8, 2023 02:07 PM",
"value": "1678264620000"
},
"symptoms": {
"symptoms_updated_by": {
"email_id": "john@zlyker.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
},
"symptoms_description": "symptoms",
"symptoms_updated_on": {
"display_value": "Mar 6, 2023 03:21 PM",
"value": "1678096283689"
}
},
"site": {
"deleted": false,
"name": "Base Site",
"id": "4149000001242001",
"is_default": true
},
"udf_fields": {
"udf_char6": null,
"udf_char1": "YES",
"udf_char2": null,
"udf_char5": null,
"udf_ref2": null,
"udf_ref1": null,
"udf_ref8": null,
"udf_ref7": null,
"udf_ref6": null,
"udf_ref5": null,
"udf_ref4": null,
"udf_date3": null,
"udf_date2": null,
"udf_ref3": null
},
"impact_details": {
"impact_details_updated_on": {
"display_value": "Mar 6, 2023 03:21 PM",
"value": "1678096283690"
},
"impact_details_updated_by": {
"email_id": "john@zlyker.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
},
"impact_details_description": "Impact Details"
},
"reported_time": {
"display_value": "Mar 6, 2023 03:21 PM",
"value": "1678096283612"
},
"problem_template_task_ids": [],
"category": {
"deleted": false,
"name": "Software",
"id": "4149000000006689"
},
"subcategory": {
"name": "MS Office",
"id": "4149000000006717"
},
"notes_present": false,
"status": {
"in_progress": false,
"internal_name": "Closed",
"stop_timer": false,
"color": "#006600",
"name": "Closed",
"id": "4149000000006661"
}
}
}
获取问题列表
此操作帮助您获取所有问题。
Url
<service domain|custom domain>/app/<portal>/api/v3/problems
属性
更多属性 展开全部
$ curl -G <service domain|custom domain>/app/<portal>/api/v3/problems\
-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";
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"
$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"
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
},
"problems": [
{
"template": {
"name": "test-name",
"id": "1682944423003748"
},
"updated_time": {
"display_value": "Nov 10, 2016 11:44 AM",
"value": "1478758440000"
},
"display_id": {
"display_value": "PB-3",
"value": "3"
},
"description": "test-description",
"title": "test-title",
"urgency": {
"name": "Urgent",
"id": "2356072979101894"
},
"reported_by": {
"email_id": "lincoln@zmail.com",
"is_technician": false,
"sms_mail": "linc123@xys_sms.co",
"phone": "test-phone",
"name": "Lincoln",
"mobile": "test-mobile",
"id": "2210656321195338",
"photo_url": "test-photo_url",
"is_vip_user": false,
"job_title": "test-job_title"
},
"id": "1760624530278842",
"group": {
"site": {
"id": "100000001111005757"
},
"deleted": false,
"name": "Hardware Problems",
"id": "2387199213602060"
},
"item": {
"name": "Install",
"id": "2389245760765183"
},
"impact": {
"name": "Affects Business",
"id": "1755679161346636"
},
"technician": {
"email_id": "test@test.com",
"cost_per_hour": 1343434.4333,
"phone": "test-phone",
"name": "Einstein",
"mobile": "test-mobile",
"id": "2281141910381802",
"photo_url": "test-photo_url",
"sms_mail_id": "test-sms_mail_id"
},
"closed_time": null,
"priority": {
"color": "#ffffff",
"name": "High",
"id": "2190663872127443"
},
"due_by_time": {
"display_value": "Nov 10, 2016 11:44 AM",
"value": "1478758440000"
},
"site": {
"deleted": false,
"name": "Custom Site",
"id": "2038147713121720"
},
"udf_fields": {
"udf_long1": "2430314675163833",
"udf_char1": "test-udf_char1"
},
"category": {
"deleted": false,
"name": "Software",
"id": "2121363349144358"
},
"subcategory": {
"name": "Adobe Reader",
"id": "2343366083030176"
},
"notes_present": false,
"status": {
"in_progress": false,
"internal_name": "test-internal_name",
"stop_timer": false,
"color": "#ffffff",
"name": "Open",
"id": "1984587510883300"
}
}
]
}
删除问题
此操作帮助您删除一个问题。
Url
<service domain|custom domain>/app/<portal>/api/v3/problems/{problem_id}
$ curl <service domain|custom domain>/app/<portal>/api/v3/problems/{problem_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/problems/{problem_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/problems/{problem_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/problems/{problem_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"
}
}