<service domain|custom domain>/app/<portal>/api/v3/changes
更改
更改管理是在组织内结构化处理目标、流程或已实施技术变更的方法。
属性
更多属性 展开全部
roll_out_plan (JSONObject)
描述变更过程的实施方案。
show attribute
back_out_plan (JSONObject)
如果变更技术人员决定撤销变更,预备的应急计划会在撤销计划部分进行记录/规划。
show attribute
impact_details (JSONObject)
描述变更过程将如何影响业务。
show attribute
checklist (JSONObject)
列出变更过程中的任务。
show attribute
uat_details (JSONObject)
包含UAT阶段配置的各种数据,如描述、最后更新者和更新时间及UAT日程。
show attribute
release_details (JSONObject)
包含在发布阶段配置的各种数据的信息,如描述、更新者及该描述的更新时间和UAT计划。
show attribute
review_details (JSONObject)
包含团队对发起变更整个生命周期的评估
show attribute
close_details (JSONObject)
包含有关变更关闭的信息
show attribute
添加更改
此操作帮助您添加新变更。
必填字段 :- title, stage, status
Url
属性
更多属性 展开全部
roll_out_plan (JSONObject)
描述变更过程的实施方案。
show attribute
back_out_plan (JSONObject)
如果变更技术人员决定撤销变更,预备的应急计划会在撤销计划部分进行记录/规划。
show attribute
impact_details (JSONObject)
描述变更过程将如何影响业务。
show attribute
checklist (JSONObject)
列出变更过程中的任务。
show attribute
uat_details (JSONObject)
包含UAT阶段配置的各种数据,如描述、最后更新者和更新时间及UAT日程。
show attribute
release_details (JSONObject)
包含在发布阶段配置的各种数据的信息,如描述、更新者及该描述的更新时间和UAT计划。
show attribute
review_details (JSONObject)
包含团队对发起变更整个生命周期的评估
show attribute
close_details (JSONObject)
包含有关变更关闭的信息
show attribute
$ curl <service domain|custom domain>/app/<portal>/api/v3/changes\
-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='{
"change": {
"template": {
"name": "test-name",
"id": "2249789216885016"
},
"roles": [
{
"role": {
"internal_name": "test-internal_name",
"user_type": "test-user_type",
"name": "test-name",
"id": "2352961137062860"
},
"name": "Line Manager",
"user": {
"is_technician": false,
"name": "Albert Cruze",
"mobile": "test-mobile",
"id": "2282798961449328",
"is_vip_user": false
}
}
],
"description": "test-description",
"change_type": {
"name": "test-name",
"id": "2367408954946571"
},
"title": "test-title",
"review_details": {
"review_details_updated_by": null,
"next_review_on": null,
"review_details_updated_on": null,
"review_details_description": null
},
"change_owner": {
"name": "Einstein",
"id": "2195971144069417"
},
"assets": [
{
"name": "192.0.2.1",
"id": "2228038138667552",
"barcode": "test-barcode"
}
],
"configuration_items": [
{
"name" : "Floor 1 - Router",
"id": "100000000000028792"
},
{
"name" : "Floor 12 - Router",
"id": "100000000000028796"
}
],
"urgency": {
"name": "Urgent",
"id": "1825863305605393"
},
"close_details": {
"close_details_updated_on": null,
"close_details_description": null,
"closure_code": null,
"close_details_updated_by": null
},
"change_requester": {
"name": "Lincoln",
"id": "2196485986952682"
},
"group": {
"name": "Hardware Problems",
"id": "1589042733215187"
},
"created_time": {
"value": "1478758440000"
},
"item": {
"name": "Install",
"id": "2401022143517103"
},
"workflow": {
"name": "test-name",
"id": "2144391052937097"
},
"change_manager": {
"name": "Einstein",
"id": "2103324562120781"
},
"impact": {
"name": "Affects Business",
"id": "1870161812658889"
},
"retrospective": false,
"checklist": {
"checklist_description": null,
"checklist_updated_on": null,
"checklist_updated_by": null
},
"release_details": {
"release_actual_start": {
"value": "1478758440000"
},
"release_actual_end": {
"value": "1478758440000"
},
"release_details_description": "test-release_details_description",
"release_scheduled_end": {
"value": "1478758440000"
},
"release_details_updated_on": {
"value": "1478758440000"
},
"release_scheduled_start": {
"value": "1478758440000"
},
"release_details_updated_by": {
"email_id": "test@test.com",
"cost_per_hour": 1343434.4333,
"phone": "test-phone",
"name": "test-name",
"mobile": "test-mobile",
"id": "1710036453771368",
"photo_url": "test-photo_url",
"sms_mail_id": "test-sms_mail_id"
}
},
"services": [
{
"name": "Corporate Website",
"id": "1679812298253198"
}
],
"delete_pre_template_tasks": false,
"priority": {
"name": "High",
"id": "1587486096836333"
},
"scheduled_end_time": {
"value": "1512974940000"
},
"back_out_plan": {
"back_out_plan_updated_by": null,
"back_out_plan_updated_on": null,
"back_out_plan_description": null
},
"uat_details": {
"uat_scheduled_start": {
"value": "1478758440000"
},
"uat_actual_end": {
"value": "1478758440000"
},
"uat_details_updated_by": {
"email_id": "test@test.com",
"cost_per_hour": 1343434.4333,
"phone": "test-phone",
"name": "test-name",
"mobile": "test-mobile",
"id": "1675191961742215",
"photo_url": "test-photo_url",
"sms_mail_id": "test-sms_mail_id"
},
"uat_details_description": "test-uat_details_description",
"uat_details_updated_on": {
"value": "1478758440000"
},
"uat_scheduled_end": {
"value": "1478758440000"
},
"uat_actual_start": {
"value": "1478758440000"
}
},
"site": {
"name": "Custom Site",
"id": "2319241473881783"
},
"completed_time": {
"value": "1478758440000"
},
"reason_for_change": {
"name": "test-name",
"id": "2182856108781629"
},
"stage": {
"name": "test-name",
"id": "2183280471092238"
},
"udf_fields": {
"udf_ref1": {
"name": "test-name",
"id": "1797107431556335"
},
"udf_boolean1": false,
"udf_long1": "1987983912305442",
"udf_date1": {
"value": "1478758440000"
},
"udf_double1": "test-udf_double1",
"udf_char1": "test-udf_char1",
"deptheadid": {
"name": "test-name",
"id": "2063083930173794"
}
},
"comment": "test-comment",
"impact_details": {
"impact_details_updated_on": null,
"impact_details_updated_by": null,
"impact_details_description": null
},
"risk": {
"name": "test-name",
"id": "1693613478361117"
},
"category": {
"name": "Software",
"id": "1804844492538901"
},
"subcategory": {
"name": "Adobe Reader",
"id": "1664828993104304"
},
"scheduled_start_time": {
"value": "1421988300000"
},
"status": {
"name": "test-name",
"id": "2473586262654731"
}
}
}'
// Deluge Sample script
url = "<service domain|custom domain>/app/<portal>/api/v3/changes";
headers = {"Accept":"application/vnd.manageengine.sdp.v3+json",
"Content-Type": "application/x-www-form-urlencoded",
"Authorization": "Zoho-oauthtoken 1000.7xxx98976ab0xxxxxx19901e7551be57.bxxxx921ed64c04f79622bebcfxxxxxx"};
input_data = {
"change": {
"template": {
"name": "test-name",
"id": "2249789216885016"
},
"roles": [
{
"role": {
"internal_name": "test-internal_name",
"user_type": "test-user_type",
"name": "test-name",
"id": "2352961137062860"
},
"name": "Line Manager",
"user": {
"is_technician": false,
"name": "Albert Cruze",
"mobile": "test-mobile",
"id": "2282798961449328",
"is_vip_user": false
}
}
],
"description": "test-description",
"change_type": {
"name": "test-name",
"id": "2367408954946571"
},
"title": "test-title",
"review_details": {
"review_details_updated_by": null,
"next_review_on": null,
"review_details_updated_on": null,
"review_details_description": null
},
"change_owner": {
"name": "Einstein",
"id": "2195971144069417"
},
"assets": [
{
"name": "192.0.2.1",
"id": "2228038138667552",
"barcode": "test-barcode"
}
],
"configuration_items": [
{
"name" : "Floor 1 - Router",
"id": "100000000000028792"
},
{
"name" : "Floor 12 - Router",
"id": "100000000000028796"
}
],
"urgency": {
"name": "Urgent",
"id": "1825863305605393"
},
"close_details": {
"close_details_updated_on": null,
"close_details_description": null,
"closure_code": null,
"close_details_updated_by": null
},
"change_requester": {
"name": "Lincoln",
"id": "2196485986952682"
},
"group": {
"name": "Hardware Problems",
"id": "1589042733215187"
},
"created_time": {
"value": "1478758440000"
},
"item": {
"name": "Install",
"id": "2401022143517103"
},
"workflow": {
"name": "test-name",
"id": "2144391052937097"
},
"change_manager": {
"name": "Einstein",
"id": "2103324562120781"
},
"impact": {
"name": "Affects Business",
"id": "1870161812658889"
},
"retrospective": false,
"checklist": {
"checklist_description": null,
"checklist_updated_on": null,
"checklist_updated_by": null
},
"release_details": {
"release_actual_start": {
"value": "1478758440000"
},
"release_actual_end": {
"value": "1478758440000"
},
"release_details_description": "test-release_details_description",
"release_scheduled_end": {
"value": "1478758440000"
},
"release_details_updated_on": {
"value": "1478758440000"
},
"release_scheduled_start": {
"value": "1478758440000"
},
"release_details_updated_by": {
"email_id": "test@test.com",
"cost_per_hour": 1343434.4333,
"phone": "test-phone",
"name": "test-name",
"mobile": "test-mobile",
"id": "1710036453771368",
"photo_url": "test-photo_url",
"sms_mail_id": "test-sms_mail_id"
}
},
"services": [
{
"name": "Corporate Website",
"id": "1679812298253198"
}
],
"delete_pre_template_tasks": false,
"priority": {
"name": "High",
"id": "1587486096836333"
},
"scheduled_end_time": {
"value": "1512974940000"
},
"back_out_plan": {
"back_out_plan_updated_by": null,
"back_out_plan_updated_on": null,
"back_out_plan_description": null
},
"uat_details": {
"uat_scheduled_start": {
"value": "1478758440000"
},
"uat_actual_end": {
"value": "1478758440000"
},
"uat_details_updated_by": {
"email_id": "test@test.com",
"cost_per_hour": 1343434.4333,
"phone": "test-phone",
"name": "test-name",
"mobile": "test-mobile",
"id": "1675191961742215",
"photo_url": "test-photo_url",
"sms_mail_id": "test-sms_mail_id"
},
"uat_details_description": "test-uat_details_description",
"uat_details_updated_on": {
"value": "1478758440000"
},
"uat_scheduled_end": {
"value": "1478758440000"
},
"uat_actual_start": {
"value": "1478758440000"
}
},
"site": {
"name": "Custom Site",
"id": "2319241473881783"
},
"completed_time": {
"value": "1478758440000"
},
"reason_for_change": {
"name": "test-name",
"id": "2182856108781629"
},
"stage": {
"name": "test-name",
"id": "2183280471092238"
},
"udf_fields": {
"udf_ref1": {
"name": "test-name",
"id": "1797107431556335"
},
"udf_boolean1": false,
"udf_long1": "1987983912305442",
"udf_date1": {
"value": "1478758440000"
},
"udf_double1": "test-udf_double1",
"udf_char1": "test-udf_char1",
"deptheadid": {
"name": "test-name",
"id": "2063083930173794"
}
},
"comment": "test-comment",
"impact_details": {
"impact_details_updated_on": null,
"impact_details_updated_by": null,
"impact_details_description": null
},
"risk": {
"name": "test-name",
"id": "1693613478361117"
},
"category": {
"name": "Software",
"id": "1804844492538901"
},
"subcategory": {
"name": "Adobe Reader",
"id": "1664828993104304"
},
"scheduled_start_time": {
"value": "1421988300000"
},
"status": {
"name": "test-name",
"id": "2473586262654731"
}
}
};
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/changes"
$headers = @{ "Accept" = "application/vnd.manageengine.sdp.v3+json"
"Authorization" = "Zoho-oauthtoken 1000.7xxx98976ab0xxxxxx19901e7551be57.bxxxx921ed64c04f79622bebcfxxxxxx"
"Content-Type" = "application/x-www-form-urlencoded"}
$input_data = @'
{
"change": {
"template": {
"name": "test-name",
"id": "2249789216885016"
},
"roles": [
{
"role": {
"internal_name": "test-internal_name",
"user_type": "test-user_type",
"name": "test-name",
"id": "2352961137062860"
},
"name": "Line Manager",
"user": {
"is_technician": false,
"name": "Albert Cruze",
"mobile": "test-mobile",
"id": "2282798961449328",
"is_vip_user": false
}
}
],
"description": "test-description",
"change_type": {
"name": "test-name",
"id": "2367408954946571"
},
"title": "test-title",
"review_details": {
"review_details_updated_by": null,
"next_review_on": null,
"review_details_updated_on": null,
"review_details_description": null
},
"change_owner": {
"name": "Einstein",
"id": "2195971144069417"
},
"assets": [
{
"name": "192.0.2.1",
"id": "2228038138667552",
"barcode": "test-barcode"
}
],
"configuration_items": [
{
"name" : "Floor 1 - Router",
"id": "100000000000028792"
},
{
"name" : "Floor 12 - Router",
"id": "100000000000028796"
}
],
"urgency": {
"name": "Urgent",
"id": "1825863305605393"
},
"close_details": {
"close_details_updated_on": null,
"close_details_description": null,
"closure_code": null,
"close_details_updated_by": null
},
"change_requester": {
"name": "Lincoln",
"id": "2196485986952682"
},
"group": {
"name": "Hardware Problems",
"id": "1589042733215187"
},
"created_time": {
"value": "1478758440000"
},
"item": {
"name": "Install",
"id": "2401022143517103"
},
"workflow": {
"name": "test-name",
"id": "2144391052937097"
},
"change_manager": {
"name": "Einstein",
"id": "2103324562120781"
},
"impact": {
"name": "Affects Business",
"id": "1870161812658889"
},
"retrospective": false,
"checklist": {
"checklist_description": null,
"checklist_updated_on": null,
"checklist_updated_by": null
},
"release_details": {
"release_actual_start": {
"value": "1478758440000"
},
"release_actual_end": {
"value": "1478758440000"
},
"release_details_description": "test-release_details_description",
"release_scheduled_end": {
"value": "1478758440000"
},
"release_details_updated_on": {
"value": "1478758440000"
},
"release_scheduled_start": {
"value": "1478758440000"
},
"release_details_updated_by": {
"email_id": "test@test.com",
"cost_per_hour": 1343434.4333,
"phone": "test-phone",
"name": "test-name",
"mobile": "test-mobile",
"id": "1710036453771368",
"photo_url": "test-photo_url",
"sms_mail_id": "test-sms_mail_id"
}
},
"services": [
{
"name": "Corporate Website",
"id": "1679812298253198"
}
],
"delete_pre_template_tasks": false,
"priority": {
"name": "High",
"id": "1587486096836333"
},
"scheduled_end_time": {
"value": "1512974940000"
},
"back_out_plan": {
"back_out_plan_updated_by": null,
"back_out_plan_updated_on": null,
"back_out_plan_description": null
},
"uat_details": {
"uat_scheduled_start": {
"value": "1478758440000"
},
"uat_actual_end": {
"value": "1478758440000"
},
"uat_details_updated_by": {
"email_id": "test@test.com",
"cost_per_hour": 1343434.4333,
"phone": "test-phone",
"name": "test-name",
"mobile": "test-mobile",
"id": "1675191961742215",
"photo_url": "test-photo_url",
"sms_mail_id": "test-sms_mail_id"
},
"uat_details_description": "test-uat_details_description",
"uat_details_updated_on": {
"value": "1478758440000"
},
"uat_scheduled_end": {
"value": "1478758440000"
},
"uat_actual_start": {
"value": "1478758440000"
}
},
"site": {
"name": "Custom Site",
"id": "2319241473881783"
},
"completed_time": {
"value": "1478758440000"
},
"reason_for_change": {
"name": "test-name",
"id": "2182856108781629"
},
"stage": {
"name": "test-name",
"id": "2183280471092238"
},
"udf_fields": {
"udf_ref1": {
"name": "test-name",
"id": "1797107431556335"
},
"udf_boolean1": false,
"udf_long1": "1987983912305442",
"udf_date1": {
"value": "1478758440000"
},
"udf_double1": "test-udf_double1",
"udf_char1": "test-udf_char1",
"deptheadid": {
"name": "test-name",
"id": "2063083930173794"
}
},
"comment": "test-comment",
"impact_details": {
"impact_details_updated_on": null,
"impact_details_updated_by": null,
"impact_details_description": null
},
"risk": {
"name": "test-name",
"id": "1693613478361117"
},
"category": {
"name": "Software",
"id": "1804844492538901"
},
"subcategory": {
"name": "Adobe Reader",
"id": "1664828993104304"
},
"scheduled_start_time": {
"value": "1421988300000"
},
"status": {
"name": "test-name",
"id": "2473586262654731"
}
}
}
'@
$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/changes"
headers ={"Accept": "application/vnd.manageengine.sdp.v3+json",
"Authorization" : "Zoho-oauthtoken 1000.7xxx98976ab0xxxxxx19901e7551be57.bxxxx921ed64c04f79622bebcfxxxxxx",
"Content-Type" : "application/x-www-form-urlencoded"}
input_data = '''{
"change": {
"template": {
"name": "test-name",
"id": "2249789216885016"
},
"roles": [
{
"role": {
"internal_name": "test-internal_name",
"user_type": "test-user_type",
"name": "test-name",
"id": "2352961137062860"
},
"name": "Line Manager",
"user": {
"is_technician": false,
"name": "Albert Cruze",
"mobile": "test-mobile",
"id": "2282798961449328",
"is_vip_user": false
}
}
],
"description": "test-description",
"change_type": {
"name": "test-name",
"id": "2367408954946571"
},
"title": "test-title",
"review_details": {
"review_details_updated_by": null,
"next_review_on": null,
"review_details_updated_on": null,
"review_details_description": null
},
"change_owner": {
"name": "Einstein",
"id": "2195971144069417"
},
"assets": [
{
"name": "192.0.2.1",
"id": "2228038138667552",
"barcode": "test-barcode"
}
],
"configuration_items": [
{
"name" : "Floor 1 - Router",
"id": "100000000000028792"
},
{
"name" : "Floor 12 - Router",
"id": "100000000000028796"
}
],
"urgency": {
"name": "Urgent",
"id": "1825863305605393"
},
"close_details": {
"close_details_updated_on": null,
"close_details_description": null,
"closure_code": null,
"close_details_updated_by": null
},
"change_requester": {
"name": "Lincoln",
"id": "2196485986952682"
},
"group": {
"name": "Hardware Problems",
"id": "1589042733215187"
},
"created_time": {
"value": "1478758440000"
},
"item": {
"name": "Install",
"id": "2401022143517103"
},
"workflow": {
"name": "test-name",
"id": "2144391052937097"
},
"change_manager": {
"name": "Einstein",
"id": "2103324562120781"
},
"impact": {
"name": "Affects Business",
"id": "1870161812658889"
},
"retrospective": false,
"checklist": {
"checklist_description": null,
"checklist_updated_on": null,
"checklist_updated_by": null
},
"release_details": {
"release_actual_start": {
"value": "1478758440000"
},
"release_actual_end": {
"value": "1478758440000"
},
"release_details_description": "test-release_details_description",
"release_scheduled_end": {
"value": "1478758440000"
},
"release_details_updated_on": {
"value": "1478758440000"
},
"release_scheduled_start": {
"value": "1478758440000"
},
"release_details_updated_by": {
"email_id": "test@test.com",
"cost_per_hour": 1343434.4333,
"phone": "test-phone",
"name": "test-name",
"mobile": "test-mobile",
"id": "1710036453771368",
"photo_url": "test-photo_url",
"sms_mail_id": "test-sms_mail_id"
}
},
"services": [
{
"name": "Corporate Website",
"id": "1679812298253198"
}
],
"delete_pre_template_tasks": false,
"priority": {
"name": "High",
"id": "1587486096836333"
},
"scheduled_end_time": {
"value": "1512974940000"
},
"back_out_plan": {
"back_out_plan_updated_by": null,
"back_out_plan_updated_on": null,
"back_out_plan_description": null
},
"uat_details": {
"uat_scheduled_start": {
"value": "1478758440000"
},
"uat_actual_end": {
"value": "1478758440000"
},
"uat_details_updated_by": {
"email_id": "test@test.com",
"cost_per_hour": 1343434.4333,
"phone": "test-phone",
"name": "test-name",
"mobile": "test-mobile",
"id": "1675191961742215",
"photo_url": "test-photo_url",
"sms_mail_id": "test-sms_mail_id"
},
"uat_details_description": "test-uat_details_description",
"uat_details_updated_on": {
"value": "1478758440000"
},
"uat_scheduled_end": {
"value": "1478758440000"
},
"uat_actual_start": {
"value": "1478758440000"
}
},
"site": {
"name": "Custom Site",
"id": "2319241473881783"
},
"completed_time": {
"value": "1478758440000"
},
"reason_for_change": {
"name": "test-name",
"id": "2182856108781629"
},
"stage": {
"name": "test-name",
"id": "2183280471092238"
},
"udf_fields": {
"udf_ref1": {
"name": "test-name",
"id": "1797107431556335"
},
"udf_boolean1": false,
"udf_long1": "1987983912305442",
"udf_date1": {
"value": "1478758440000"
},
"udf_double1": "test-udf_double1",
"udf_char1": "test-udf_char1",
"deptheadid": {
"name": "test-name",
"id": "2063083930173794"
}
},
"comment": "test-comment",
"impact_details": {
"impact_details_updated_on": null,
"impact_details_updated_by": null,
"impact_details_description": null
},
"risk": {
"name": "test-name",
"id": "1693613478361117"
},
"category": {
"name": "Software",
"id": "1804844492538901"
},
"subcategory": {
"name": "Adobe Reader",
"id": "1664828993104304"
},
"scheduled_start_time": {
"value": "1421988300000"
},
"status": {
"name": "test-name",
"id": "2473586262654731"
}
}
}'''
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())
{
"response_status": {
"status_code": 2000,
"status": "success"
},
"change": {
"roll_out_plan": {
"roll_out_plan_updated_on": null,
"roll_out_plan_updated_by": null,
"roll_out_plan_description": null
},
"emergency": false,
"change_type": {
"color": "#ffffff",
"pre_approved": false,
"name": "test-name",
"id": "2367408954946571"
},
"review_details": {
"review_details_updated_by": null,
"next_review_on": null,
"review_details_updated_on": null,
"review_details_description": null
},
"assets": [
{
"name": "192.0.2.1",
"id": "2228038138667552",
"barcode": "test-barcode"
}
],
"configuration_items": [
{
"name" : "Floor 1 - Router",
"id": "100000000000028792"
},
{
"name" : "Floor 12 - Router",
"id": "100000000000028796"
}
],
"workflow_instance_details": {
"id": "1573951252045982",
"status": {
"name": "In Progress",
"id": "3452123479302930"
}
},
"id": "1491795271551812",
"change_requester": {
"email_id": "lincoln@zmail.com",
"is_technician": false,
"sms_mail": "linc123@xys_sms.co",
"phone": "test-phone",
"name": "Lincoln",
"mobile": "test-mobile",
"id": "2196485986952682",
"photo_url": "test-photo_url",
"is_vip_user": false
},
"group": {
"deleted": false,
"name": "Hardware Problems",
"id": "1589042733215187"
},
"created_time": {
"display_value": "Nov 10, 2016 11:44 AM",
"value": "1478758440000"
},
"item": {
"name": "Install",
"id": "2401022143517103"
},
"workflow": {
"validated": false,
"name": "test-name",
"id": "2144391052937097"
},
"approval_status": {
"name": "test-name",
"id": "1575261752667948"
},
"impact": {
"name": "Affects Business",
"id": "1870161812658889"
},
"release_details": {
"release_actual_start": {
"display_value": "Nov 10, 2016 11:44 AM",
"value": "1478758440000"
},
"release_actual_end": {
"display_value": "Nov 10, 2016 11:44 AM",
"value": "1478758440000"
},
"release_details_description": "test-release_details_description",
"release_scheduled_end": {
"display_value": "Nov 10, 2016 11:44 AM",
"value": "1478758440000"
},
"release_details_updated_on": {
"display_value": "Nov 10, 2016 11:44 AM",
"value": "1478758440000"
},
"release_scheduled_start": {
"display_value": "Nov 10, 2016 11:44 AM",
"value": "1478758440000"
},
"release_details_updated_by": {
"email_id": "test@test.com",
"cost_per_hour": 1343434.4333,
"phone": "test-phone",
"name": "test-name",
"mobile": "test-mobile",
"id": "1710036453771368",
"photo_url": "test-photo_url",
"sms_mail_id": "test-sms_mail_id"
}
},
"priority": {
"color": "#ffffff",
"name": "High",
"id": "1587486096836333"
},
"scheduled_end_time": {
"display_value": "Dec 11, 2017 12:19 PM",
"value": "1512974940000"
},
"uat_details": {
"uat_scheduled_start": {
"display_value": "Nov 10, 2016 11:44 AM",
"value": "1478758440000"
},
"uat_actual_end": {
"display_value": "Nov 10, 2016 11:44 AM",
"value": "1478758440000"
},
"uat_details_updated_by": {
"email_id": "test@test.com",
"cost_per_hour": 1343434.4333,
"phone": "test-phone",
"name": "test-name",
"mobile": "test-mobile",
"id": "1675191961742215",
"photo_url": "test-photo_url",
"sms_mail_id": "test-sms_mail_id"
},
"uat_details_description": "test-uat_details_description",
"uat_details_updated_on": {
"display_value": "Nov 10, 2016 11:44 AM",
"value": "1478758440000"
},
"uat_scheduled_end": {
"display_value": "Nov 10, 2016 11:44 AM",
"value": "1478758440000"
},
"uat_actual_start": {
"display_value": "Nov 10, 2016 11:44 AM",
"value": "1478758440000"
}
},
"reason_for_change": {
"name": "test-name",
"id": "2182856108781629"
},
"udf_fields": {
"udf_ref1": {
"name": "test-name",
"id": "1797107431556335"
},
"udf_boolean1": false,
"udf_long1": "1987983912305442",
"udf_date1": {
"display_value": "Nov 10, 2016 11:44 AM",
"value": "1478758440000"
},
"udf_double1": "test-udf_double1",
"udf_char1": "test-udf_char1",
"deptheadid": {
"name": "test-name",
"id": "2063083930173794"
}
},
"impact_details": {
"impact_details_updated_on": null,
"impact_details_updated_by": null,
"impact_details_description": null
},
"subcategory": {
"name": "Adobe Reader",
"id": "1664828993104304"
},
"deleted_time": null,
"scheduled_start_time": {
"display_value": "Jan 23, 2015 10:15 AM",
"value": "1421988300000"
},
"status": {
"internal_name": "test-internal_name",
"stage": {
"id": "2183280471092238"
},
"name": "test-name",
"id": "2473586262654731"
},
"template": {
"inactive": false,
"name": "test-name",
"id": "2249789216885016"
},
"attachments": [],
"display_id": {
"display_value": "CH 44",
"value": "44"
},
"roles": [
{
"role": {
"internal_name": "line_manager",
"user_type": "TECH",
"name": "Line Manager",
"id": "2352961137062860"
},
"user": {
"email_id": "albertcruze@zinmail.com",
"is_technician": false,
"sms_mail": "test-sms_mail",
"phone": "32323413431",
"name": "Albert Cruze",
"mobile": "test-mobile",
"id": "2282798961449328",
"photo_url": "test-photo_url",
"is_vip_user": false
}
}
],
"description": "test-description",
"title": "test-title",
"change_owner": {
"email_id": "test@test.com",
"cost_per_hour": 1343434.4333,
"phone": "test-phone",
"name": "Einstein",
"mobile": "test-mobile",
"id": "2195971144069417",
"photo_url": "test-photo_url",
"sms_mail_id": "test-sms_mail_id"
},
"urgency": {
"name": "Urgent",
"id": "1825863305605393"
},
"close_details": {
"close_details_updated_on": null,
"close_details_description": null,
"closure_code": null,
"close_details_updated_by": null
},
"change_manager": {
"email_id": "test@test.com",
"cost_per_hour": 1343434.4333,
"phone": "test-phone",
"name": "Einstein",
"mobile": "test-mobile",
"id": "2103324562120781",
"photo_url": "test-photo_url",
"sms_mail_id": "test-sms_mail_id"
},
"retrospective": false,
"checklist": {
"checklist_description": null,
"checklist_updated_on": null,
"checklist_updated_by": null
},
"services": [
{
"name": "Corporate Website",
"id": "1679812298253198"
}
],
"delete_pre_template_tasks": false,
"back_out_plan": {
"back_out_plan_updated_by": null,
"back_out_plan_updated_on": null,
"back_out_plan_description": null
},
"releases": {
"display_id": {
"display_value": "CH 44",
"value": "44"
},
"id": "1684472874995103",
"title": "test-title"
},
"site": {
"deleted": false,
"name": "Custom Site",
"id": "2319241473881783"
},
"completed_time": null,
"stage": {
"internal_name": "test-internal_name",
"stage_index": 44,
"name": "test-name",
"id": "2183280471092238"
},
"comment": "test-comment",
"risk": {
"name": "test-name",
"id": "1693613478361117"
},
"category": {
"deleted": false,
"name": "Software",
"id": "1804844492538901"
},
"notes_present": false
}
}
编辑更改
此操作帮助您编辑或更新变更。
Url
<service domain|custom domain>/app/<portal>/api/v3/changes/{change_id}
属性
更多属性 展开全部
roll_out_plan (JSONObject)
描述变更过程的实施方案。
show attribute
back_out_plan (JSONObject)
如果变更技术人员决定撤销变更,预备的应急计划会在撤销计划部分进行记录/规划。
show attribute
impact_details (JSONObject)
描述变更过程将如何影响业务。
show attribute
checklist (JSONObject)
列出变更过程中的任务。
show attribute
uat_details (JSONObject)
包含UAT阶段配置的各种数据,如描述、最后更新者和更新时间及UAT日程。
show attribute
release_details (JSONObject)
包含在发布阶段配置的各种数据的信息,如描述、更新者及该描述的更新时间和UAT计划。
show attribute
review_details (JSONObject)
包含团队对发起变更整个生命周期的评估
show attribute
close_details (JSONObject)
包含有关变更关闭的信息
show attribute
$ curl <service domain|custom domain>/app/<portal>/api/v3/changes/{change_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='{
"change": {
"template": {
"name": "test-name",
"id": "1704938980159685"
},
"roll_out_plan": {
"roll_out_plan_description": "test-description"
},
"roles": [
{
"role": {
"internal_name": "test-internal_name",
"user_type": "test-user_type",
"name": "test-name",
"id": "1552677144092358"
},
"name": "Line Manager",
"user": {
"is_technician": false,
"name": "Albert Cruze",
"mobile": "test-mobile",
"id": "1802315678792037",
"is_vip_user": false
}
}
],
"description": "test-description",
"change_type": {
"name": "test-name",
"id": "2087319749249643"
},
"title": "test-title",
"review_details": {
"review_details_description": "test-description"
},
"change_owner": {
"name": "Einstein",
"id": "1716116370588679"
},
"assets": [
{
"name": "192.0.2.1",
"id": "2226029941680060",
"barcode": "test-barcode"
}
],
"configuration_items": [
{
"name" : "Floor 1 - Router",
"id": "100000000000028792"
},
{
"name" : "Floor 12 - Router",
"id": "100000000000028796"
}
],
"urgency": {
"name": "Urgent",
"id": "1734237401677507"
},
"close_details": {
"close_details_description": "test-description"
},
"change_requester": {
"name": "Lincoln",
"id": "2232526649014753"
},
"group": {
"name": "Hardware Problems",
"id": "2428154258371023"
},
"created_time": {
"value": "1478758440000"
},
"item": {
"name": "Install",
"id": "1740314986015065"
},
"workflow": {
"name": "test-name",
"id": "2019043425446392"
},
"change_manager": {
"name": "Einstein",
"id": "1602112260245650"
},
"impact": {
"name": "Affects Business",
"id": "2470067232171763"
},
"retrospective": false,
"checklist": {
"checklist_description": "test-description"
},
"release_details": {
"release_actual_start": {
"value": "1478758440000"
},
"release_actual_end": {
"value": "1478758440000"
},
"release_details_description": "test-release_details_description",
"release_scheduled_end": {
"value": "1478758440000"
},
"release_details_updated_on": {
"value": "1478758440000"
},
"release_scheduled_start": {
"value": "1478758440000"
},
"release_details_updated_by": {
"email_id": "test@test.com",
"cost_per_hour": 1343434.4333,
"phone": "test-phone",
"name": "test-name",
"mobile": "test-mobile",
"id": "2153805775491139",
"photo_url": "test-photo_url",
"sms_mail_id": "test-sms_mail_id"
}
},
"services": [
{
"name": "Corporate Website",
"id": "1892401880668720"
}
],
"delete_pre_template_tasks": false,
"priority": {
"name": "High",
"id": "2296053957444682"
},
"scheduled_end_time": {
"value": "1512974940000"
},
"back_out_plan": {
"back_out_plan_description": "test-description"
},
"uat_details": {
"uat_scheduled_start": {
"value": "1478758440000"
},
"uat_actual_end": {
"value": "1478758440000"
},
"uat_details_updated_by": {
"email_id": "test@test.com",
"cost_per_hour": 1343434.4333,
"phone": "test-phone",
"name": "test-name",
"mobile": "test-mobile",
"id": "2368551784060250",
"photo_url": "test-photo_url",
"sms_mail_id": "test-sms_mail_id"
},
"uat_details_description": "test-uat_details_description",
"uat_details_updated_on": {
"value": "1478758440000"
},
"uat_scheduled_end": {
"value": "1478758440000"
},
"uat_actual_start": {
"value": "1478758440000"
}
},
"site": {
"name": "Custom Site",
"id": "1496371046989069"
},
"completed_time": {
"value": "1478758440000"
},
"reason_for_change": {
"name": "test-name",
"id": "2180548858554848"
},
"stage": {
"name": "test-name",
"id": "1847775600218021"
},
"udf_fields": {
"udf_ref1": {
"name": "test-name",
"id": "2311862740452328"
},
"udf_boolean1": false,
"udf_long1": "1747198022789993",
"udf_date1": {
"value": "1478758440000"
},
"udf_double1": "test-udf_double1",
"udf_char1": "test-udf_char1",
"deptheadid": {
"name": "test-name",
"id": "2290848089364510"
}
},
"comment": "test-comment",
"impact_details": {
"impact_details_description": "test-description"
},
"risk": {
"name": "test-name",
"id": "1912543969897144"
},
"category": {
"name": "Software",
"id": "1916760146315065"
},
"subcategory": {
"name": "Adobe Reader",
"id": "1645140476753251"
},
"scheduled_start_time": {
"value": "1421988300000"
},
"status": {
"name": "test-name",
"id": "1707089569556164"
}
}
}'
// Deluge Sample script
url = "<service domain|custom domain>/app/<portal>/api/v3/changes/{change_id}";
headers = {"Accept":"application/vnd.manageengine.sdp.v3+json",
"Content-Type": "application/x-www-form-urlencoded",
"Authorization": "Zoho-oauthtoken 1000.7xxx98976ab0xxxxxx19901e7551be57.bxxxx921ed64c04f79622bebcfxxxxxx"};
input_data = {
"change": {
"template": {
"name": "test-name",
"id": "1704938980159685"
},
"roll_out_plan": {
"roll_out_plan_description": "test-description"
},
"roles": [
{
"role": {
"internal_name": "test-internal_name",
"user_type": "test-user_type",
"name": "test-name",
"id": "1552677144092358"
},
"name": "Line Manager",
"user": {
"is_technician": false,
"name": "Albert Cruze",
"mobile": "test-mobile",
"id": "1802315678792037",
"is_vip_user": false
}
}
],
"description": "test-description",
"change_type": {
"name": "test-name",
"id": "2087319749249643"
},
"title": "test-title",
"review_details": {
"review_details_description": "test-description"
},
"change_owner": {
"name": "Einstein",
"id": "1716116370588679"
},
"assets": [
{
"name": "192.0.2.1",
"id": "2226029941680060",
"barcode": "test-barcode"
}
],
"configuration_items": [
{
"name" : "Floor 1 - Router",
"id": "100000000000028792"
},
{
"name" : "Floor 12 - Router",
"id": "100000000000028796"
}
],
"urgency": {
"name": "Urgent",
"id": "1734237401677507"
},
"close_details": {
"close_details_description": "test-description"
},
"change_requester": {
"name": "Lincoln",
"id": "2232526649014753"
},
"group": {
"name": "Hardware Problems",
"id": "2428154258371023"
},
"created_time": {
"value": "1478758440000"
},
"item": {
"name": "Install",
"id": "1740314986015065"
},
"workflow": {
"name": "test-name",
"id": "2019043425446392"
},
"change_manager": {
"name": "Einstein",
"id": "1602112260245650"
},
"impact": {
"name": "Affects Business",
"id": "2470067232171763"
},
"retrospective": false,
"checklist": {
"checklist_description": "test-description"
},
"release_details": {
"release_actual_start": {
"value": "1478758440000"
},
"release_actual_end": {
"value": "1478758440000"
},
"release_details_description": "test-release_details_description",
"release_scheduled_end": {
"value": "1478758440000"
},
"release_details_updated_on": {
"value": "1478758440000"
},
"release_scheduled_start": {
"value": "1478758440000"
},
"release_details_updated_by": {
"email_id": "test@test.com",
"cost_per_hour": 1343434.4333,
"phone": "test-phone",
"name": "test-name",
"mobile": "test-mobile",
"id": "2153805775491139",
"photo_url": "test-photo_url",
"sms_mail_id": "test-sms_mail_id"
}
},
"services": [
{
"name": "Corporate Website",
"id": "1892401880668720"
}
],
"delete_pre_template_tasks": false,
"priority": {
"name": "High",
"id": "2296053957444682"
},
"scheduled_end_time": {
"value": "1512974940000"
},
"back_out_plan": {
"back_out_plan_description": "test-description"
},
"uat_details": {
"uat_scheduled_start": {
"value": "1478758440000"
},
"uat_actual_end": {
"value": "1478758440000"
},
"uat_details_updated_by": {
"email_id": "test@test.com",
"cost_per_hour": 1343434.4333,
"phone": "test-phone",
"name": "test-name",
"mobile": "test-mobile",
"id": "2368551784060250",
"photo_url": "test-photo_url",
"sms_mail_id": "test-sms_mail_id"
},
"uat_details_description": "test-uat_details_description",
"uat_details_updated_on": {
"value": "1478758440000"
},
"uat_scheduled_end": {
"value": "1478758440000"
},
"uat_actual_start": {
"value": "1478758440000"
}
},
"site": {
"name": "Custom Site",
"id": "1496371046989069"
},
"completed_time": {
"value": "1478758440000"
},
"reason_for_change": {
"name": "test-name",
"id": "2180548858554848"
},
"stage": {
"name": "test-name",
"id": "1847775600218021"
},
"udf_fields": {
"udf_ref1": {
"name": "test-name",
"id": "2311862740452328"
},
"udf_boolean1": false,
"udf_long1": "1747198022789993",
"udf_date1": {
"value": "1478758440000"
},
"udf_double1": "test-udf_double1",
"udf_char1": "test-udf_char1",
"deptheadid": {
"name": "test-name",
"id": "2290848089364510"
}
},
"comment": "test-comment",
"impact_details": {
"impact_details_description": "test-description"
},
"risk": {
"name": "test-name",
"id": "1912543969897144"
},
"category": {
"name": "Software",
"id": "1916760146315065"
},
"subcategory": {
"name": "Adobe Reader",
"id": "1645140476753251"
},
"scheduled_start_time": {
"value": "1421988300000"
},
"status": {
"name": "test-name",
"id": "1707089569556164"
}
}
};
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/changes/{change_id}"
$headers = @{"Accept": "application/vnd.manageengine.sdp.v3+json",
"Authorization" : "Zoho-oauthtoken 1000.7xxx98976ab0xxxxxx19901e7551be57.bxxxx921ed64c04f79622bebcfxxxxxx",
"Content-Type" : "application/x-www-form-urlencoded"}
$input_data = @'
{
"change": {
"template": {
"name": "test-name",
"id": "1704938980159685"
},
"roll_out_plan": {
"roll_out_plan_description": "test-description"
},
"roles": [
{
"role": {
"internal_name": "test-internal_name",
"user_type": "test-user_type",
"name": "test-name",
"id": "1552677144092358"
},
"name": "Line Manager",
"user": {
"is_technician": false,
"name": "Albert Cruze",
"mobile": "test-mobile",
"id": "1802315678792037",
"is_vip_user": false
}
}
],
"description": "test-description",
"change_type": {
"name": "test-name",
"id": "2087319749249643"
},
"title": "test-title",
"review_details": {
"review_details_description": "test-description"
},
"change_owner": {
"name": "Einstein",
"id": "1716116370588679"
},
"assets": [
{
"name": "192.0.2.1",
"id": "2226029941680060",
"barcode": "test-barcode"
}
],
"configuration_items": [
{
"name" : "Floor 1 - Router",
"id": "100000000000028792"
},
{
"name" : "Floor 12 - Router",
"id": "100000000000028796"
}
],
"urgency": {
"name": "Urgent",
"id": "1734237401677507"
},
"close_details": {
"close_details_description": "test-description"
},
"change_requester": {
"name": "Lincoln",
"id": "2232526649014753"
},
"group": {
"name": "Hardware Problems",
"id": "2428154258371023"
},
"created_time": {
"value": "1478758440000"
},
"item": {
"name": "Install",
"id": "1740314986015065"
},
"workflow": {
"name": "test-name",
"id": "2019043425446392"
},
"change_manager": {
"name": "Einstein",
"id": "1602112260245650"
},
"impact": {
"name": "Affects Business",
"id": "2470067232171763"
},
"retrospective": false,
"checklist": {
"checklist_description": "test-description"
},
"release_details": {
"release_actual_start": {
"value": "1478758440000"
},
"release_actual_end": {
"value": "1478758440000"
},
"release_details_description": "test-release_details_description",
"release_scheduled_end": {
"value": "1478758440000"
},
"release_details_updated_on": {
"value": "1478758440000"
},
"release_scheduled_start": {
"value": "1478758440000"
},
"release_details_updated_by": {
"email_id": "test@test.com",
"cost_per_hour": 1343434.4333,
"phone": "test-phone",
"name": "test-name",
"mobile": "test-mobile",
"id": "2153805775491139",
"photo_url": "test-photo_url",
"sms_mail_id": "test-sms_mail_id"
}
},
"services": [
{
"name": "Corporate Website",
"id": "1892401880668720"
}
],
"delete_pre_template_tasks": false,
"priority": {
"name": "High",
"id": "2296053957444682"
},
"scheduled_end_time": {
"value": "1512974940000"
},
"back_out_plan": {
"back_out_plan_description": "test-description"
},
"uat_details": {
"uat_scheduled_start": {
"value": "1478758440000"
},
"uat_actual_end": {
"value": "1478758440000"
},
"uat_details_updated_by": {
"email_id": "test@test.com",
"cost_per_hour": 1343434.4333,
"phone": "test-phone",
"name": "test-name",
"mobile": "test-mobile",
"id": "2368551784060250",
"photo_url": "test-photo_url",
"sms_mail_id": "test-sms_mail_id"
},
"uat_details_description": "test-uat_details_description",
"uat_details_updated_on": {
"value": "1478758440000"
},
"uat_scheduled_end": {
"value": "1478758440000"
},
"uat_actual_start": {
"value": "1478758440000"
}
},
"site": {
"name": "Custom Site",
"id": "1496371046989069"
},
"completed_time": {
"value": "1478758440000"
},
"reason_for_change": {
"name": "test-name",
"id": "2180548858554848"
},
"stage": {
"name": "test-name",
"id": "1847775600218021"
},
"udf_fields": {
"udf_ref1": {
"name": "test-name",
"id": "2311862740452328"
},
"udf_boolean1": false,
"udf_long1": "1747198022789993",
"udf_date1": {
"value": "1478758440000"
},
"udf_double1": "test-udf_double1",
"udf_char1": "test-udf_char1",
"deptheadid": {
"name": "test-name",
"id": "2290848089364510"
}
},
"comment": "test-comment",
"impact_details": {
"impact_details_description": "test-description"
},
"risk": {
"name": "test-name",
"id": "1912543969897144"
},
"category": {
"name": "Software",
"id": "1916760146315065"
},
"subcategory": {
"name": "Adobe Reader",
"id": "1645140476753251"
},
"scheduled_start_time": {
"value": "1421988300000"
},
"status": {
"name": "test-name",
"id": "1707089569556164"
}
}
}
'@
$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/changes/{change_id}"
headers ={"Accept": "application/vnd.manageengine.sdp.v3+json",
"Authorization" : "Zoho-oauthtoken 1000.7xxx98976ab0xxxxxx19901e7551be57.bxxxx921ed64c04f79622bebcfxxxxxx",
"Content-Type" : "application/x-www-form-urlencoded"}
input_data = '''{
"change": {
"template": {
"name": "test-name",
"id": "1704938980159685"
},
"roll_out_plan": {
"roll_out_plan_description": "test-description"
},
"roles": [
{
"role": {
"internal_name": "test-internal_name",
"user_type": "test-user_type",
"name": "test-name",
"id": "1552677144092358"
},
"name": "Line Manager",
"user": {
"is_technician": false,
"name": "Albert Cruze",
"mobile": "test-mobile",
"id": "1802315678792037",
"is_vip_user": false
}
}
],
"description": "test-description",
"change_type": {
"name": "test-name",
"id": "2087319749249643"
},
"title": "test-title",
"review_details": {
"review_details_description": "test-description"
},
"change_owner": {
"name": "Einstein",
"id": "1716116370588679"
},
"assets": [
{
"name": "192.0.2.1",
"id": "2226029941680060",
"barcode": "test-barcode"
}
],
"configuration_items": [
{
"name" : "Floor 1 - Router",
"id": "100000000000028792"
},
{
"name" : "Floor 12 - Router",
"id": "100000000000028796"
}
],
"urgency": {
"name": "Urgent",
"id": "1734237401677507"
},
"close_details": {
"close_details_description": "test-description"
},
"change_requester": {
"name": "Lincoln",
"id": "2232526649014753"
},
"group": {
"name": "Hardware Problems",
"id": "2428154258371023"
},
"created_time": {
"value": "1478758440000"
},
"item": {
"name": "Install",
"id": "1740314986015065"
},
"workflow": {
"name": "test-name",
"id": "2019043425446392"
},
"change_manager": {
"name": "Einstein",
"id": "1602112260245650"
},
"impact": {
"name": "Affects Business",
"id": "2470067232171763"
},
"retrospective": false,
"checklist": {
"checklist_description": "test-description"
},
"release_details": {
"release_actual_start": {
"value": "1478758440000"
},
"release_actual_end": {
"value": "1478758440000"
},
"release_details_description": "test-release_details_description",
"release_scheduled_end": {
"value": "1478758440000"
},
"release_details_updated_on": {
"value": "1478758440000"
},
"release_scheduled_start": {
"value": "1478758440000"
},
"release_details_updated_by": {
"email_id": "test@test.com",
"cost_per_hour": 1343434.4333,
"phone": "test-phone",
"name": "test-name",
"mobile": "test-mobile",
"id": "2153805775491139",
"photo_url": "test-photo_url",
"sms_mail_id": "test-sms_mail_id"
}
},
"services": [
{
"name": "Corporate Website",
"id": "1892401880668720"
}
],
"delete_pre_template_tasks": false,
"priority": {
"name": "High",
"id": "2296053957444682"
},
"scheduled_end_time": {
"value": "1512974940000"
},
"back_out_plan": {
"back_out_plan_description": "test-description"
},
"uat_details": {
"uat_scheduled_start": {
"value": "1478758440000"
},
"uat_actual_end": {
"value": "1478758440000"
},
"uat_details_updated_by": {
"email_id": "test@test.com",
"cost_per_hour": 1343434.4333,
"phone": "test-phone",
"name": "test-name",
"mobile": "test-mobile",
"id": "2368551784060250",
"photo_url": "test-photo_url",
"sms_mail_id": "test-sms_mail_id"
},
"uat_details_description": "test-uat_details_description",
"uat_details_updated_on": {
"value": "1478758440000"
},
"uat_scheduled_end": {
"value": "1478758440000"
},
"uat_actual_start": {
"value": "1478758440000"
}
},
"site": {
"name": "Custom Site",
"id": "1496371046989069"
},
"completed_time": {
"value": "1478758440000"
},
"reason_for_change": {
"name": "test-name",
"id": "2180548858554848"
},
"stage": {
"name": "test-name",
"id": "1847775600218021"
},
"udf_fields": {
"udf_ref1": {
"name": "test-name",
"id": "2311862740452328"
},
"udf_boolean1": false,
"udf_long1": "1747198022789993",
"udf_date1": {
"value": "1478758440000"
},
"udf_double1": "test-udf_double1",
"udf_char1": "test-udf_char1",
"deptheadid": {
"name": "test-name",
"id": "2290848089364510"
}
},
"comment": "test-comment",
"impact_details": {
"impact_details_description": "test-description"
},
"risk": {
"name": "test-name",
"id": "1912543969897144"
},
"category": {
"name": "Software",
"id": "1916760146315065"
},
"subcategory": {
"name": "Adobe Reader",
"id": "1645140476753251"
},
"scheduled_start_time": {
"value": "1421988300000"
},
"status": {
"name": "test-name",
"id": "1707089569556164"
}
}
}'''
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())
{
"response_status": {
"status_code": 2000,
"status": "success"
},
"change": {
"roll_out_plan": {
"roll_out_plan_updated_on": {
"display_value": "Oct 10, 2018 02:41 PM",
"value": "1539162689719"
},
"roll_out_plan_updated_by": {
"email_id": "albertd@zinmail.com",
"sms_mail": "test-sms_mail",
"phone": "98764342344",
"name": "Albert",
"id": "1633000000074011",
"photo_url": "test-photo_url",
"department": null
},
"roll_out_plan_description": "test-description"
},
"emergency": false,
"change_type": {
"color": "#ffffff",
"pre_approved": false,
"name": "test-name",
"id": "2087319749249643"
},
"review_details": {
"review_details_updated_by": {
"email_id": "albertd@zinmail.com",
"sms_mail": "test-sms_mail",
"phone": "98764342344",
"name": "Albert",
"id": "1633000000074011",
"photo_url": "test-photo_url",
"department": null
},
"next_review_on": null,
"review_details_updated_on": {
"display_value": "Oct 10, 2018 02:41 PM",
"value": "1539162689719"
},
"review_details_description": "test-description"
},
"assets": [
{
"name": "192.0.2.1",
"id": "2226029941680060",
"barcode": "test-barcode"
}
],
"configuration_items": [
{
"name" : "Floor 1 - Router",
"id": "100000000000028792"
},
{
"name" : "Floor 12 - Router",
"id": "100000000000028796"
}
],
"workflow_instance_details": {
"id": "1772953903460574",
"status": {
"name": "In Progress",
"id": "3452123479302930"
}
},
"id": "1652462662641351",
"change_requester": {
"email_id": "lincoln@zmail.com",
"is_technician": false,
"sms_mail": "linc123@xys_sms.co",
"phone": "test-phone",
"name": "Lincoln",
"mobile": "test-mobile",
"id": "2232526649014753",
"photo_url": "test-photo_url",
"is_vip_user": false
},
"group": {
"deleted": false,
"name": "Hardware Problems",
"id": "2428154258371023"
},
"created_time": {
"display_value": "Nov 10, 2016 11:44 AM",
"value": "1478758440000"
},
"item": {
"name": "Install",
"id": "1740314986015065"
},
"workflow": {
"validated": false,
"name": "test-name",
"id": "2019043425446392"
},
"approval_status": {
"name": "test-name",
"id": "1537978368756872"
},
"impact": {
"name": "Affects Business",
"id": "2470067232171763"
},
"release_details": {
"release_actual_start": {
"display_value": "Nov 10, 2016 11:44 AM",
"value": "1478758440000"
},
"release_actual_end": {
"display_value": "Nov 10, 2016 11:44 AM",
"value": "1478758440000"
},
"release_details_description": "test-release_details_description",
"release_scheduled_end": {
"display_value": "Nov 10, 2016 11:44 AM",
"value": "1478758440000"
},
"release_details_updated_on": {
"display_value": "Nov 10, 2016 11:44 AM",
"value": "1478758440000"
},
"release_scheduled_start": {
"display_value": "Nov 10, 2016 11:44 AM",
"value": "1478758440000"
},
"release_details_updated_by": {
"email_id": "test@test.com",
"cost_per_hour": 1343434.4333,
"phone": "test-phone",
"name": "test-name",
"mobile": "test-mobile",
"id": "2153805775491139",
"photo_url": "test-photo_url",
"sms_mail_id": "test-sms_mail_id"
}
},
"priority": {
"color": "#ffffff",
"name": "High",
"id": "2296053957444682"
},
"scheduled_end_time": {
"display_value": "Dec 11, 2017 12:19 PM",
"value": "1512974940000"
},
"uat_details": {
"uat_scheduled_start": {
"display_value": "Nov 10, 2016 11:44 AM",
"value": "1478758440000"
},
"uat_actual_end": {
"display_value": "Nov 10, 2016 11:44 AM",
"value": "1478758440000"
},
"uat_details_updated_by": {
"email_id": "test@test.com",
"cost_per_hour": 1343434.4333,
"phone": "test-phone",
"name": "test-name",
"mobile": "test-mobile",
"id": "2368551784060250",
"photo_url": "test-photo_url",
"sms_mail_id": "test-sms_mail_id"
},
"uat_details_description": "test-uat_details_description",
"uat_details_updated_on": {
"display_value": "Nov 10, 2016 11:44 AM",
"value": "1478758440000"
},
"uat_scheduled_end": {
"display_value": "Nov 10, 2016 11:44 AM",
"value": "1478758440000"
},
"uat_actual_start": {
"display_value": "Nov 10, 2016 11:44 AM",
"value": "1478758440000"
}
},
"reason_for_change": {
"name": "test-name",
"id": "2180548858554848"
},
"udf_fields": {
"udf_ref1": {
"name": "test-name",
"id": "2311862740452328"
},
"udf_boolean1": false,
"udf_long1": "1747198022789993",
"udf_date1": {
"display_value": "Nov 10, 2016 11:44 AM",
"value": "1478758440000"
},
"udf_double1": "test-udf_double1",
"udf_char1": "test-udf_char1",
"deptheadid": {
"name": "test-name",
"id": "2290848089364510"
}
},
"impact_details": {
"roll_out_plan_updated_on": {
"display_value": "Oct 10, 2018 02:41 PM",
"value": "1539162689719"
},
"impact_details_updated_on": null,
"roll_out_plan_updated_by": {
"email_id": "albertd@zinmail.com",
"sms_mail": "test-sms_mail",
"phone": "98764342344",
"name": "Albert",
"id": "1633000000074011",
"photo_url": "test-photo_url",
"department": null
},
"impact_details_updated_by": null,
"impact_details_description": "test-description"
},
"subcategory": {
"name": "Adobe Reader",
"id": "1645140476753251"
},
"deleted_time": null,
"scheduled_start_time": {
"display_value": "Jan 23, 2015 10:15 AM",
"value": "1421988300000"
},
"status": {
"internal_name": "test-internal_name",
"stage": {
"id": "1847775600218021"
},
"name": "test-name",
"id": "1707089569556164"
},
"template": {
"inactive": false,
"name": "test-name",
"id": "1704938980159685"
},
"attachments": [],
"display_id": {
"display_value": "CH 44",
"value": "44"
},
"roles": [
{
"role": {
"internal_name": "line_manager",
"user_type": "TECH",
"name": "Line Manager",
"id": "1552677144092358"
},
"user": {
"email_id": "albertcruze@zinmail.com",
"is_technician": false,
"sms_mail": "test-sms_mail",
"phone": "32323413431",
"name": "Albert Cruze",
"mobile": "test-mobile",
"id": "1802315678792037",
"photo_url": "test-photo_url",
"is_vip_user": false
}
}
],
"description": "test-description",
"title": "test-title",
"change_owner": {
"email_id": "test@test.com",
"cost_per_hour": 1343434.4333,
"phone": "test-phone",
"name": "Einstein",
"mobile": "test-mobile",
"id": "1716116370588679",
"photo_url": "test-photo_url",
"sms_mail_id": "test-sms_mail_id"
},
"urgency": {
"name": "Urgent",
"id": "1734237401677507"
},
"close_details": {
"close_details_updated_on": {
"display_value": "Oct 10, 2018 02:41 PM",
"value": "1539162689719"
},
"close_details_description": "test-description",
"closure_code": null,
"close_details_updated_by": {
"email_id": "albertd@zinmail.com",
"sms_mail": "test-sms_mail",
"phone": "98764342344",
"name": "Albert",
"id": "1633000000074011",
"photo_url": "test-photo_url",
"department": null
}
},
"change_manager": {
"email_id": "test@test.com",
"cost_per_hour": 1343434.4333,
"phone": "test-phone",
"name": "Einstein",
"mobile": "test-mobile",
"id": "1602112260245650",
"photo_url": "test-photo_url",
"sms_mail_id": "test-sms_mail_id"
},
"retrospective": false,
"checklist": {
"checklist_description": "test-description",
"checklist_updated_on": {
"display_value": "Oct 10, 2018 02:41 PM",
"value": "1539162689719"
},
"checklist_updated_by": {
"email_id": "albertd@zinmail.com",
"sms_mail": "test-sms_mail",
"phone": "98764342344",
"name": "Albert",
"id": "1633000000074011",
"photo_url": "test-photo_url",
"department": null
}
},
"services": [
{
"name": "Corporate Website",
"id": "1892401880668720"
}
],
"delete_pre_template_tasks": false,
"back_out_plan": {
"back_out_plan_updated_by": {
"email_id": "albertd@zinmail.com",
"sms_mail": "test-sms_mail",
"phone": "98764342344",
"name": "Albert",
"id": "1633000000074011",
"photo_url": "test-photo_url",
"department": null
},
"back_out_plan_updated_on": {
"display_value": "Oct 10, 2018 02:41 PM",
"value": "1539162689719"
},
"back_out_plan_description": "test-description"
},
"releases": {
"display_id": {
"display_value": "CH 44",
"value": "44"
},
"id": "2386023254230601",
"title": "test-title"
},
"site": {
"deleted": false,
"name": "Custom Site",
"id": "1496371046989069"
},
"completed_time": null,
"stage": {
"internal_name": "test-internal_name",
"stage_index": 45,
"name": "test-name",
"id": "1847775600218021"
},
"comment": "test-comment",
"risk": {
"name": "test-name",
"id": "1912543969897144"
},
"category": {
"deleted": false,
"name": "Software",
"id": "1916760146315065"
},
"notes_present": false
}
}
获取更改
此操作帮助您获取变更。
Url
<service domain|custom domain>/app/<portal>/api/v3/changes/{change_id}
属性
更多属性 展开全部
roll_out_plan (JSONObject)
描述变更过程的实施方案。
show attribute
back_out_plan (JSONObject)
如果变更技术人员决定撤销变更,预备的应急计划会在撤销计划部分进行记录/规划。
show attribute
impact_details (JSONObject)
描述变更过程将如何影响业务。
show attribute
checklist (JSONObject)
列出变更过程中的任务。
show attribute
uat_details (JSONObject)
包含UAT阶段配置的各种数据,如描述、最后更新者和更新时间及UAT日程。
show attribute
release_details (JSONObject)
包含在发布阶段配置的各种数据的信息,如描述、更新者及该描述的更新时间和UAT计划。
show attribute
review_details (JSONObject)
包含团队对发起变更整个生命周期的评估
show attribute
close_details (JSONObject)
包含有关变更关闭的信息
show attribute
$ curl -G <service domain|custom domain>/app/<portal>/api/v3/changes/{change_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/changes/{change_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/changes/{change_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/changes/{change_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"
},
"change": {
"roll_out_plan": {
"roll_out_plan_updated_on": null,
"roll_out_plan_updated_by": null,
"roll_out_plan_description": null
},
"emergency": false,
"change_type": {
"color": "#ffffff",
"pre_approved": false,
"name": "test-name",
"id": "1963273108885322"
},
"review_details": {
"review_details_updated_by": null,
"next_review_on": null,
"review_details_updated_on": null,
"review_details_description": null
},
"assets": [
{
"name": "192.0.2.1",
"id": "1756423109337292",
"barcode": "test-barcode"
}
],
"configuration_items": [
{
"name" : "Floor 1 - Router",
"id": "100000000000028792"
},
{
"name" : "Floor 12 - Router",
"id": "100000000000028796"
}
],
"workflow_instance_details": {
"id": "2453784700037791",
"status": {
"name": "In Progress",
"id": "3452123479302930"
}
},
"id": "2114915285351563",
"change_requester": {
"email_id": "lincoln@zmail.com",
"is_technician": false,
"sms_mail": "linc123@xys_sms.co",
"phone": "test-phone",
"name": "Lincoln",
"mobile": "test-mobile",
"id": "2143623015686023",
"photo_url": "test-photo_url",
"is_vip_user": false
},
"group": {
"deleted": false,
"name": "Hardware Problems",
"id": "2326981627291940"
},
"created_time": {
"display_value": "Nov 10, 2016 11:44 AM",
"value": "1478758440000"
},
"item": {
"name": "Install",
"id": "2239903113686979"
},
"workflow": {
"validated": false,
"name": "test-name",
"id": "1956173348364778"
},
"approval_status": {
"name": "test-name",
"id": "2041901462809084"
},
"impact": {
"name": "Affects Business",
"id": "2330967135475344"
},
"release_details": {
"release_actual_start": {
"display_value": "Nov 10, 2016 11:44 AM",
"value": "1478758440000"
},
"release_actual_end": {
"display_value": "Nov 10, 2016 11:44 AM",
"value": "1478758440000"
},
"release_details_description": "test-release_details_description",
"release_scheduled_end": {
"display_value": "Nov 10, 2016 11:44 AM",
"value": "1478758440000"
},
"release_details_updated_on": {
"display_value": "Nov 10, 2016 11:44 AM",
"value": "1478758440000"
},
"release_scheduled_start": {
"display_value": "Nov 10, 2016 11:44 AM",
"value": "1478758440000"
},
"release_details_updated_by": {
"email_id": "test@test.com",
"cost_per_hour": 1343434.4333,
"phone": "test-phone",
"name": "test-name",
"mobile": "test-mobile",
"id": "2420149677285344",
"photo_url": "test-photo_url",
"sms_mail_id": "test-sms_mail_id"
}
},
"priority": {
"color": "#ffffff",
"name": "High",
"id": "2478345380733251"
},
"scheduled_end_time": {
"display_value": "Dec 11, 2017 12:19 PM",
"value": "1512974940000"
},
"uat_details": {
"uat_scheduled_start": {
"display_value": "Nov 10, 2016 11:44 AM",
"value": "1478758440000"
},
"uat_actual_end": {
"display_value": "Nov 10, 2016 11:44 AM",
"value": "1478758440000"
},
"uat_details_updated_by": {
"email_id": "test@test.com",
"cost_per_hour": 1343434.4333,
"phone": "test-phone",
"name": "test-name",
"mobile": "test-mobile",
"id": "2286640656217471",
"photo_url": "test-photo_url",
"sms_mail_id": "test-sms_mail_id"
},
"uat_details_description": "test-uat_details_description",
"uat_details_updated_on": {
"display_value": "Nov 10, 2016 11:44 AM",
"value": "1478758440000"
},
"uat_scheduled_end": {
"display_value": "Nov 10, 2016 11:44 AM",
"value": "1478758440000"
},
"uat_actual_start": {
"display_value": "Nov 10, 2016 11:44 AM",
"value": "1478758440000"
}
},
"reason_for_change": {
"name": "test-name",
"id": "2432121386745895"
},
"udf_fields": {
"udf_ref1": {
"name": "test-name",
"id": "2063976644117304"
},
"udf_boolean1": false,
"udf_long1": "1667483876978281",
"udf_date1": {
"display_value": "Nov 10, 2016 11:44 AM",
"value": "1478758440000"
},
"udf_double1": "test-udf_double1",
"udf_char1": "test-udf_char1",
"deptheadid": {
"name": "test-name",
"id": "2219634624007575"
}
},
"impact_details": {
"impact_details_updated_on": null,
"impact_details_updated_by": null,
"impact_details_description": null
},
"subcategory": {
"name": "Adobe Reader",
"id": "1850628057840218"
},
"deleted_time": null,
"scheduled_start_time": {
"display_value": "Jan 23, 2015 10:15 AM",
"value": "1421988300000"
},
"status": {
"internal_name": "test-internal_name",
"stage": {
"id": "2268784442596563"
},
"name": "test-name",
"id": "1582705030052408"
},
"template": {
"inactive": false,
"name": "test-name",
"id": "1787794725968476"
},
"attachments": [],
"display_id": {
"display_value": "CH 44",
"value": "44"
},
"roles": [
{
"role": {
"internal_name": "line_manager",
"user_type": "TECH",
"name": "Line Manager",
"id": "1907459556441749"
},
"user": {
"email_id": "albertcruze@zinmail.com",
"is_technician": false,
"sms_mail": "test-sms_mail",
"phone": "32323413431",
"name": "Albert Cruze",
"mobile": "test-mobile",
"id": "1901459274222583",
"photo_url": "test-photo_url",
"is_vip_user": false
}
}
],
"description": "test-description",
"title": "test-title",
"change_owner": {
"email_id": "test@test.com",
"cost_per_hour": 1343434.4333,
"phone": "test-phone",
"name": "Einstein",
"mobile": "test-mobile",
"id": "1604901177816412",
"photo_url": "test-photo_url",
"sms_mail_id": "test-sms_mail_id"
},
"urgency": {
"name": "Urgent",
"id": "1813225591573218"
},
"close_details": {
"close_details_updated_on": null,
"close_details_description": null,
"closure_code": null,
"close_details_updated_by": null
},
"change_manager": {
"email_id": "test@test.com",
"cost_per_hour": 1343434.4333,
"phone": "test-phone",
"name": "Einstein",
"mobile": "test-mobile",
"id": "2363542503492817",
"photo_url": "test-photo_url",
"sms_mail_id": "test-sms_mail_id"
},
"retrospective": false,
"checklist": {
"checklist_description": null,
"checklist_updated_on": null,
"checklist_updated_by": null
},
"services": [
{
"name": "Corporate Website",
"id": "2077725021891134"
}
],
"delete_pre_template_tasks": false,
"back_out_plan": {
"back_out_plan_updated_by": null,
"back_out_plan_updated_on": null,
"back_out_plan_description": null
},
"releases": {
"display_id": {
"display_value": "CH 44",
"value": "44"
},
"id": "2093112654013158",
"title": "test-title"
},
"site": {
"deleted": false,
"name": "Custom Site",
"id": "2115240451795000"
},
"completed_time": null,
"stage": {
"internal_name": "test-internal_name",
"stage_index": 6,
"name": "test-name",
"id": "2268784442596563"
},
"comment": "test-comment",
"risk": {
"name": "test-name",
"id": "2239610263642176"
},
"category": {
"deleted": false,
"name": "Software",
"id": "1527029570503853"
},
"notes_present": false
}
}
获取更改列表
此操作帮助您获取变更列表。
Url
<service domain|custom domain>/app/<portal>/api/v3/changes
属性
评论 (字符串)
状态更新的原因。每当用户修改状态时,评论为必填项。
更多属性 展开全部
$ curl -G <service domain|custom domain>/app/<portal>/api/v3/changes\
-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/changes";
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/changes"
$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/changes"
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"
}
],
"changes": [
{
"template": {
"inactive": false,
"name": "test-name",
"id": "1924965505586033"
},
"display_id": {
"display_value": "CH 44",
"value": "44"
},
"emergency": false,
"description": "test-description",
"change_type": {
"color": "#ffffff",
"pre_approved": false,
"name": "test-name",
"id": "2056305642655070"
},
"title": "test-title",
"change_owner": {
"email_id": "test@test.com",
"cost_per_hour": 1343434.4333,
"phone": "test-phone",
"name": "Einstein",
"mobile": "test-mobile",
"id": "2209549077213490",
"photo_url": "test-photo_url",
"sms_mail_id": "test-sms_mail_id"
},
"urgency": {
"name": "Urgent",
"id": "2417492411519595"
},
"workflow_instance_details": {
"id": "1962823710569268",
"status": {
"name": "In Progress",
"id": "3452123479302930"
}
},
"id": "1859624692473527",
"change_requester": {
"email_id": "lincoln@zmail.com",
"is_technician": false,
"sms_mail": "linc123@xys_sms.co",
"phone": "test-phone",
"name": "Lincoln",
"mobile": "test-mobile",
"id": "2451334730959688",
"photo_url": "test-photo_url",
"is_vip_user": false
},
"group": {
"deleted": false,
"name": "Hardware Problems",
"id": "2023579893907353"
},
"created_time": {
"display_value": "Nov 10, 2016 11:44 AM",
"value": "1478758440000"
},
"item": {
"name": "Install",
"id": "1686887736957235"
},
"workflow": {
"validated": false,
"name": "test-name",
"id": "1978299325330681"
},
"approval_status": {
"name": "test-name",
"id": "2105266780548568"
},
"change_manager": {
"email_id": "test@test.com",
"cost_per_hour": 1343434.4333,
"phone": "test-phone",
"name": "Einstein",
"mobile": "test-mobile",
"id": "2186370918474622",
"photo_url": "test-photo_url",
"sms_mail_id": "test-sms_mail_id"
},
"impact": {
"name": "Affects Business",
"id": "1724445741264630"
},
"retrospective": false,
"delete_pre_template_tasks": false,
"priority": {
"color": "#ffffff",
"name": "High",
"id": "2397808401865502"
},
"scheduled_end_time": {
"display_value": "Dec 11, 2017 12:19 PM",
"value": "1512974940000"
},
"releases": {
"display_id": {
"display_value": "CH 44",
"value": "44"
},
"id": "1835340614954232",
"title": "test-title"
},
"site": {
"deleted": false,
"name": "Custom Site",
"id": "2258496366874075"
},
"completed_time": null,
"reason_for_change": {
"name": "test-name",
"id": "1487857248355675"
},
"stage": {
"internal_name": "test-internal_name",
"stage_index": 11,
"name": "test-name",
"id": "1730009360431441"
},
"udf_fields": {
"udf_ref1": {
"name": "test-name",
"id": "2424024210107882"
},
"udf_boolean1": false,
"udf_long1": "2015859966139417",
"udf_date1": {
"display_value": "Nov 10, 2016 11:44 AM",
"value": "1478758440000"
},
"udf_double1": "test-udf_double1",
"udf_char1": "test-udf_char1",
"deptheadid": {
"name": "test-name",
"id": "1772916434008438"
}
},
"comment": "test-comment",
"risk": {
"name": "test-name",
"id": "2257909268685090"
},
"category": {
"deleted": false,
"name": "Software",
"id": "2028157694682226"
},
"subcategory": {
"name": "Adobe Reader",
"id": "2437196587765037"
},
"deleted_time": null,
"notes_present": false,
"scheduled_start_time": {
"display_value": "Jan 23, 2015 10:15 AM",
"value": "1421988300000"
},
"status": {
"internal_name": "test-internal_name",
"stage": {
"id": "1730009360431441"
},
"name": "test-name",
"id": "2119671327610528"
}
}
],
"list_info": {
"row_count": 1,
"start_index": 1,
"search_criteria": [
{
"field": "title",
"condition": "is",
"value": "DB server upgrade"
}
]
}
}
删除更改
此操作帮助您删除变更。
Url
<service domain|custom domain>/app/<portal>/api/v3/changes/{change_id}
$ curl <service domain|custom domain>/app/<portal>/api/v3/changes/{change_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/changes/{change_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/changes/{change_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/changes/{change_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"
}
}