<service domain|custom domain>/app/<portal>/api/v3/request_maintenances
请求维护
根据给定的请求字段配置和计划配置自动创建请求,确保系统性生成周期性请求。这有助于简化维护操作,减少人工工作量。
属性
添加请求维护
此操作帮助创建请求维护
必填字段:- subject
Url
属性
subject (字符串)
此维护的主题[最大长度:250]
created_time (日期时间)
指示此维护创建的时间
one_time_schedule (one_time_schedule)
指示维护的一次性计划
更多属性 展开全部
$ curl <service domain|custom domain>/app/<portal>/api/v3/request_maintenances\
-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='{
"request_maintenance": {
"template": {
"id": "4291000000006655"
},
"request_template_task_ids": [
{
"id": "4291000001479001"
}
],
"priority": {
"id": "4291000000006805"
},
"impact": {
"id": "4291000000008033"
},
"status": {
"id": "4291000000006657"
},
"impact_details": "Impacts Business in many aspects",
"configuration_items": [],
"urgency": {
"id": "4291000000007919"
},
"mode": {
"id": "4291000000006665"
},
"level": {
"id": "4291000000006671"
},
"email_ids_to_notify": [],
"requester": {
"id": "4291000000145236"
},
"assets": [
{
"id": "4291000003115020"
}
],
"site": {
"id": "4291000001327001"
},
"category": {
"id": "4291000002997019"
},
"subcategory": {
"id": "4291000002997021"
},
"technician": {
"id": "4291000000145236"
},
"subject": "Request Maintenance Subject Here",
"description": "Description goes here",
"attachments": [],
"resolution": {
"content": "\u003cdiv class\u003d\"personalize-wrapper\" style\u003d\"font-family: \u0027Zoho Puvi\u0027,Roboto, sans-serif;font-size: 13px;\"\u003e\u003cdiv\u003eResolution for created Maintenance\u003cbr\u003e\u003c/div\u003e\u003c/div\u003e"
},
"department": {
"id": "4291000000006625"
},
"repetitive_schedule": {
"start_time": {
"value": 1742279400000,
"display_value": "Mar 18, 2025 12:00 pm"
},
"frequency": "Weekly",
"is_advanced": true,
"skip_frequency": 0,
"exclude_weekends": false,
"days_of_week": [
3,
5
],
"is_first_day_of_month": false,
"end_after_occurrences": "7"
}
}
}'
// Deluge Sample script
url = "<service domain|custom domain>/app/<portal>/api/v3/request_maintenances";
headers = {"Accept":"application/vnd.manageengine.sdp.v3+json",
"Content-Type": "application/x-www-form-urlencoded",
"Authorization": "Zoho-oauthtoken 1000.7xxx98976ab0xxxxxx19901e7551be57.bxxxx921ed64c04f79622bebcfxxxxxx"};
input_data = {
"request_maintenance": {
"template": {
"id": "4291000000006655"
},
"request_template_task_ids": [
{
"id": "4291000001479001"
}
],
"priority": {
"id": "4291000000006805"
},
"impact": {
"id": "4291000000008033"
},
"status": {
"id": "4291000000006657"
},
"impact_details": "Impacts Business in many aspects",
"configuration_items": [],
"urgency": {
"id": "4291000000007919"
},
"mode": {
"id": "4291000000006665"
},
"level": {
"id": "4291000000006671"
},
"email_ids_to_notify": [],
"requester": {
"id": "4291000000145236"
},
"assets": [
{
"id": "4291000003115020"
}
],
"site": {
"id": "4291000001327001"
},
"category": {
"id": "4291000002997019"
},
"subcategory": {
"id": "4291000002997021"
},
"technician": {
"id": "4291000000145236"
},
"subject": "Request Maintenance Subject Here",
"description": "Description goes here",
"attachments": [],
"resolution": {
"content": "\u003cdiv class\u003d\"personalize-wrapper\" style\u003d\"font-family: \u0027Zoho Puvi\u0027,Roboto, sans-serif;font-size: 13px;\"\u003e\u003cdiv\u003eResolution for created Maintenance\u003cbr\u003e\u003c/div\u003e\u003c/div\u003e"
},
"department": {
"id": "4291000000006625"
},
"repetitive_schedule": {
"start_time": {
"value": 1742279400000,
"display_value": "Mar 18, 2025 12:00 pm"
},
"frequency": "Weekly",
"is_advanced": true,
"skip_frequency": 0,
"exclude_weekends": false,
"days_of_week": [
3,
5
],
"is_first_day_of_month": false,
"end_after_occurrences": "7"
}
}
};
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/request_maintenances"
$headers = @{ "Accept" = "application/vnd.manageengine.sdp.v3+json"
"Authorization" = "Zoho-oauthtoken 1000.7xxx98976ab0xxxxxx19901e7551be57.bxxxx921ed64c04f79622bebcfxxxxxx"
"Content-Type" = "application/x-www-form-urlencoded"}
$input_data = @'
{
"request_maintenance": {
"template": {
"id": "4291000000006655"
},
"request_template_task_ids": [
{
"id": "4291000001479001"
}
],
"priority": {
"id": "4291000000006805"
},
"impact": {
"id": "4291000000008033"
},
"status": {
"id": "4291000000006657"
},
"impact_details": "Impacts Business in many aspects",
"configuration_items": [],
"urgency": {
"id": "4291000000007919"
},
"mode": {
"id": "4291000000006665"
},
"level": {
"id": "4291000000006671"
},
"email_ids_to_notify": [],
"requester": {
"id": "4291000000145236"
},
"assets": [
{
"id": "4291000003115020"
}
],
"site": {
"id": "4291000001327001"
},
"category": {
"id": "4291000002997019"
},
"subcategory": {
"id": "4291000002997021"
},
"technician": {
"id": "4291000000145236"
},
"subject": "Request Maintenance Subject Here",
"description": "Description goes here",
"attachments": [],
"resolution": {
"content": "\u003cdiv class\u003d\"personalize-wrapper\" style\u003d\"font-family: \u0027Zoho Puvi\u0027,Roboto, sans-serif;font-size: 13px;\"\u003e\u003cdiv\u003eResolution for created Maintenance\u003cbr\u003e\u003c/div\u003e\u003c/div\u003e"
},
"department": {
"id": "4291000000006625"
},
"repetitive_schedule": {
"start_time": {
"value": 1742279400000,
"display_value": "Mar 18, 2025 12:00 pm"
},
"frequency": "Weekly",
"is_advanced": true,
"skip_frequency": 0,
"exclude_weekends": false,
"days_of_week": [
3,
5
],
"is_first_day_of_month": false,
"end_after_occurrences": "7"
}
}
}
'@
$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/request_maintenances"
headers ={"Accept": "application/vnd.manageengine.sdp.v3+json",
"Authorization" : "Zoho-oauthtoken 1000.7xxx98976ab0xxxxxx19901e7551be57.bxxxx921ed64c04f79622bebcfxxxxxx",
"Content-Type" : "application/x-www-form-urlencoded"}
input_data = '''{
"request_maintenance": {
"template": {
"id": "4291000000006655"
},
"request_template_task_ids": [
{
"id": "4291000001479001"
}
],
"priority": {
"id": "4291000000006805"
},
"impact": {
"id": "4291000000008033"
},
"status": {
"id": "4291000000006657"
},
"impact_details": "Impacts Business in many aspects",
"configuration_items": [],
"urgency": {
"id": "4291000000007919"
},
"mode": {
"id": "4291000000006665"
},
"level": {
"id": "4291000000006671"
},
"email_ids_to_notify": [],
"requester": {
"id": "4291000000145236"
},
"assets": [
{
"id": "4291000003115020"
}
],
"site": {
"id": "4291000001327001"
},
"category": {
"id": "4291000002997019"
},
"subcategory": {
"id": "4291000002997021"
},
"technician": {
"id": "4291000000145236"
},
"subject": "Request Maintenance Subject Here",
"description": "Description goes here",
"attachments": [],
"resolution": {
"content": "\u003cdiv class\u003d\"personalize-wrapper\" style\u003d\"font-family: \u0027Zoho Puvi\u0027,Roboto, sans-serif;font-size: 13px;\"\u003e\u003cdiv\u003eResolution for created Maintenance\u003cbr\u003e\u003c/div\u003e\u003c/div\u003e"
},
"department": {
"id": "4291000000006625"
},
"repetitive_schedule": {
"start_time": {
"value": 1742279400000,
"display_value": "Mar 18, 2025 12:00 pm"
},
"frequency": "Weekly",
"is_advanced": true,
"skip_frequency": 0,
"exclude_weekends": false,
"days_of_week": [
3,
5
],
"is_first_day_of_month": false,
"end_after_occurrences": "7"
}
}
}'''
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"
},
"request_maintenance": {
"template": {
"id": "4291000000006655",
"name": "Default Request"
},
"attachments": [],
"request_type": null,
"subject": "Request Maintenance Subject Here",
"description": "Description goes here",
"next_schedule": {
"display_value": "Mar 18, 2025 12:00 PM",
"value": "1742279400000"
},
"title": "Request Maintenance Subject Here",
"resolution": {
"content": "<div class=\"personalize-wrapper\" style=\"font-family:"Zoho Puvi", Roboto, sans-serif; font-size:13px\"><div>Resolution for created Maintenance<br><\/div><\/div>"
},
"repetitive_schedule": {
"is_advanced": true,
"next_execution_time": {
"display_value": "Mar 18, 2025 12:00 PM",
"value": "1742279400000"
},
"ends_on": null,
"days_of_month": null,
"parent_entity": "request_maintenance",
"last_execution_time": null,
"is_first_day_of_month": false,
"frequency": "Weekly",
"days_of_week": [
3,
5
],
"weeks_of_month": null,
"start_time": {
"display_value": "Mar 18, 2025 12:00 PM",
"value": "1742279400000"
},
"last_updated_by": {
"email_id": "testuser@domain.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": {
"deleted": false,
"name": "Base Site",
"id": "4291000001327001",
"is_default": true
},
"phone": null,
"employee_id": null,
"name": "test",
"id": "4291000000145236",
"photo_url": "https://contacts.domain.com/file?exp=10&ID=63184126&t=user&height=60&width=60",
"is_vip_user": false,
"department": {
"site": {
"id": "4291000001327001"
},
"name": "Engineering",
"id": "4291000000006625"
},
"first_name": "testuser",
"job_title": null
},
"exclude_weekends": false,
"months_of_year": null,
"day_config_of_month": null,
"last_updated_time": null,
"skip_frequency": "0",
"end_after_occurrences": "7",
"id": "4291000004120008",
"status": "enabled"
},
"mode": {
"internal_name": "E-Mail",
"name": "E-Mail",
"id": "4291000000006665"
},
"is_service": false,
"assets": [
{
"site": {
"id": "4291000001327001"
},
"product": {
"id": "4291000003115016"
},
"product_type": {
"id": "4291000000005925"
},
"name": "a1",
"id": "4291000003115020"
}
],
"configuration_items": [],
"urgency": {
"name": "High",
"id": "4291000000007919"
},
"maintenance_end": "After 7 Occurrences",
"id": "4291000004120001",
"request_template_task_ids": [
{
"id": "4291000001479001"
}
],
"events": [
{
"end_date": "2025-04-09 12:00",
"event_length": "1",
"rec_type": "week_1___2,4#7",
"module": "request_maintenance",
"is_created": false,
"start_longvalue": "1742279400000",
"maintenance": "4291000004120001",
"start_date": "2025-03-18 12:00"
}
],
"group": null,
"requester": {
"email_id": "testuser@domain.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": {
"deleted": false,
"name": "Base Site",
"id": "4291000001327001",
"is_default": true
},
"phone": null,
"employee_id": null,
"name": "test",
"id": "4291000000145236",
"photo_url": "https://contacts.domain.com/file?exp=10&ID=63184126&t=user&height=60&width=60",
"is_vip_user": false,
"department": {
"site": {
"id": "4291000001327001"
},
"name": "Engineering",
"id": "4291000000006625"
},
"first_name": "testuser",
"job_title": null
},
"created_time": {
"display_value": "Mar 18, 2025 11:12 AM",
"value": "1742276532086"
},
"item": null,
"one_time_schedule": null,
"level": {
"name": "Tier 1",
"id": "4291000000006671"
},
"schedule_frequency": "Weekly",
"impact": {
"name": "Affects Business",
"id": "4291000000008033"
},
"module": {
"api_plural_name": "requests",
"name": "request",
"display_name_plural": "sdp.module.pluralname.request",
"id": "4291000000085038",
"display_name": "Request",
"category": "SYSTEM",
"icon_name": null
},
"sla": null,
"technician": {
"email_id": "testuser@domain.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": "4291000001327001"
},
"phone": null,
"employee_id": null,
"name": "test",
"id": "4291000000145236",
"is_vip_user": false,
"photo_url": "https://contacts.domain.com/file?exp=10&ID=63184126&t=user&height=60&width=60",
"department": {
"id": "4291000000006625"
},
"first_name": "testuser",
"job_title": null
},
"priority": {
"color": "#ff0000",
"name": "High",
"id": "4291000000006805"
},
"created_by": {
"email_id": "testuser@domain.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": {
"deleted": false,
"name": "Base Site",
"id": "4291000001327001",
"is_default": true
},
"phone": null,
"employee_id": null,
"name": "test",
"id": "4291000000145236",
"photo_url": "https://contacts.domain.com/file?exp=10&ID=63184126&t=user&height=60&width=60",
"is_vip_user": false,
"department": {
"site": {
"id": "4291000001327001"
},
"name": "Engineering",
"id": "4291000000006625"
},
"first_name": "testuser",
"job_title": null
},
"site": {
"deleted": false,
"name": "Base Site",
"id": "4291000001327001",
"is_default": true
},
"udf_fields": {
"udf_ref9": null
},
"repeat_details": "Every 1 week on Tue, Thu ",
"maintenancestate": 1,
"impact_details": "Impacts Business in many aspects",
"category": {
"deleted": false,
"name": "Centenary Court Building Maintenance",
"id": "4291000002997019"
},
"subcategory": {
"name": "Hard FM",
"id": "4291000002997021"
},
"generated_events": [],
"status": {
"in_progress": true,
"internal_name": "Open",
"stop_timer": false,
"color": "#0066ff",
"name": "Open",
"id": "4291000000006657"
}
}
}
编辑请求维护
此操作帮助编辑请求维护
Url
<service domain|custom domain>/app/<portal>/api/v3/request_maintenances/{request_maintenance_id}
属性
subject (字符串)
此维护的主题[最大长度:250]
created_time (日期时间)
指示此维护创建的时间
one_time_schedule (one_time_schedule)
指示维护的一次性计划
更多属性 展开全部
$ curl <service domain|custom domain>/app/<portal>/api/v3/request_maintenances/{request_maintenance_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='{
"request_maintenance": {
"subject": "Request Maintenance Subject Here - Edited",
"impact_details": "Impacts Business in many aspects- edited"
}
}'
// Deluge Sample script
url = "<service domain|custom domain>/app/<portal>/api/v3/request_maintenances/{request_maintenance_id}";
headers = {"Accept":"application/vnd.manageengine.sdp.v3+json",
"Content-Type": "application/x-www-form-urlencoded",
"Authorization": "Zoho-oauthtoken 1000.7xxx98976ab0xxxxxx19901e7551be57.bxxxx921ed64c04f79622bebcfxxxxxx"};
input_data = {
"request_maintenance": {
"subject": "Request Maintenance Subject Here - Edited",
"impact_details": "Impacts Business in many aspects- edited"
}
};
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/request_maintenances/{request_maintenance_id}"
$headers = @{"Accept": "application/vnd.manageengine.sdp.v3+json",
"Authorization" : "Zoho-oauthtoken 1000.7xxx98976ab0xxxxxx19901e7551be57.bxxxx921ed64c04f79622bebcfxxxxxx",
"Content-Type" : "application/x-www-form-urlencoded"}
$input_data = @'
{
"request_maintenance": {
"subject": "Request Maintenance Subject Here - Edited",
"impact_details": "Impacts Business in many aspects- edited"
}
}
'@
$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/request_maintenances/{request_maintenance_id}"
headers ={"Accept": "application/vnd.manageengine.sdp.v3+json",
"Authorization" : "Zoho-oauthtoken 1000.7xxx98976ab0xxxxxx19901e7551be57.bxxxx921ed64c04f79622bebcfxxxxxx",
"Content-Type" : "application/x-www-form-urlencoded"}
input_data = '''{
"request_maintenance": {
"subject": "Request Maintenance Subject Here - Edited",
"impact_details": "Impacts Business in many aspects- edited"
}
}'''
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"
},
"request_maintenance": {
"template": {
"id": "4291000000006655",
"name": "Default Request"
},
"attachments": [],
"request_type": null,
"subject": "Request Maintenance Subject Here - Edited",
"description": "Description goes here",
"next_schedule": {
"display_value": "Mar 18, 2025 12:00 PM",
"value": "1742279400000"
},
"title": "Request Maintenance Subject Here - Edited",
"resolution": {
"content": "<div class=\"personalize-wrapper\" style=\"font-family:"Zoho Puvi", Roboto, sans-serif; font-size:13px\"><div>Resolution for created Maintenance<br><\/div><\/div>"
},
"repetitive_schedule": {
"is_advanced": true,
"next_execution_time": {
"display_value": "Mar 18, 2025 12:00 PM",
"value": "1742279400000"
},
"ends_on": null,
"days_of_month": null,
"parent_entity": "request_maintenance",
"last_execution_time": null,
"is_first_day_of_month": false,
"frequency": "Weekly",
"days_of_week": [
3,
5
],
"weeks_of_month": null,
"start_time": {
"display_value": "Mar 18, 2025 12:00 PM",
"value": "1742279400000"
},
"last_updated_by": {
"email_id": "testuser@domain.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": {
"deleted": false,
"name": "Base Site",
"id": "4291000001327001",
"is_default": true
},
"phone": null,
"employee_id": null,
"name": "test",
"id": "4291000000145236",
"photo_url": "https://contacts.localdomain.com/file?exp=10&ID=63184126&t=user&height=60&width=60",
"is_vip_user": false,
"department": {
"site": {
"id": "4291000001327001"
},
"name": "Engineering",
"id": "4291000000006625"
},
"first_name": "testuser",
"job_title": null
},
"exclude_weekends": false,
"months_of_year": null,
"day_config_of_month": null,
"last_updated_time": null,
"skip_frequency": "0",
"end_after_occurrences": "7",
"id": "4291000004120008",
"status": "enabled"
},
"mode": {
"internal_name": "E-Mail",
"name": "E-Mail",
"id": "4291000000006665"
},
"is_service": false,
"assets": [
{
"site": {
"id": "4291000001327001"
},
"product": {
"id": "4291000003115016"
},
"product_type": {
"id": "4291000000005925"
},
"name": "a1",
"id": "4291000003115020"
}
],
"configuration_items": [],
"urgency": {
"name": "High",
"id": "4291000000007919"
},
"id": "4291000004120001",
"request_template_task_ids": [
{
"id": "4291000001479001"
}
],
"group": null,
"requester": {
"email_id": "testuser@domain.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": {
"deleted": false,
"name": "Base Site",
"id": "4291000001327001",
"is_default": true
},
"phone": null,
"employee_id": null,
"name": "test",
"id": "4291000000145236",
"photo_url": "https://contacts.localdomain.com/file?exp=10&ID=63184126&t=user&height=60&width=60",
"is_vip_user": false,
"department": {
"site": {
"id": "4291000001327001"
},
"name": "Engineering",
"id": "4291000000006625"
},
"first_name": "testuser",
"job_title": null
},
"created_time": {
"display_value": "Mar 18, 2025 11:12 AM",
"value": "1742276532086"
},
"item": null,
"one_time_schedule": null,
"level": {
"name": "Tier 1",
"id": "4291000000006671"
},
"impact": {
"name": "Affects Business",
"id": "4291000000008033"
},
"module": {
"api_plural_name": "requests",
"name": "request",
"display_name_plural": "sdp.module.pluralname.request",
"id": "4291000000085038",
"display_name": "Request",
"category": "SYSTEM",
"icon_name": null
},
"sla": null,
"technician": {
"email_id": "testuser@domain.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": "4291000001327001"
},
"phone": null,
"employee_id": null,
"name": "test",
"id": "4291000000145236",
"is_vip_user": false,
"photo_url": "https://contacts.localdomain.com/file?exp=10&ID=63184126&t=user&height=60&width=60",
"department": {
"id": "4291000000006625"
},
"first_name": "testuser",
"job_title": null
},
"priority": null,
"created_by": {
"email_id": "testuser@domain.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": {
"deleted": false,
"name": "Base Site",
"id": "4291000001327001",
"is_default": true
},
"phone": null,
"employee_id": null,
"name": "test",
"id": "4291000000145236",
"photo_url": "https://contacts.localdomain.com/file?exp=10&ID=63184126&t=user&height=60&width=60",
"is_vip_user": false,
"department": {
"site": {
"id": "4291000001327001"
},
"name": "Engineering",
"id": "4291000000006625"
},
"first_name": "testuser",
"job_title": null
},
"site": {
"deleted": false,
"name": "Base Site",
"id": "4291000001327001",
"is_default": true
},
"udf_fields": {
"udf_ref9": null
},
"maintenancestate": 1,
"impact_details": "Impacts Business in many aspects- edited",
"category": {
"deleted": false,
"name": "Centenary Court Building Maintenance",
"id": "4291000002997019"
},
"subcategory": {
"name": "Hard FM",
"id": "4291000002997021"
},
"status": {
"in_progress": true,
"internal_name": "Open",
"stop_timer": false,
"color": "#0066ff",
"name": "Open",
"id": "4291000000006657"
}
}
}
获取请求维护
此操作帮助获取单个请求维护
Url
<service domain|custom domain>/app/<portal>/api/v3/request_maintenances/{request_maintenance_id}
属性
subject (字符串)
此维护的主题[最大长度:250]
created_time (日期时间)
指示此维护创建的时间
one_time_schedule (one_time_schedule)
指示维护的一次性计划
更多属性 展开全部
$ curl -G <service domain|custom domain>/app/<portal>/api/v3/request_maintenances/{request_maintenance_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/request_maintenances/{request_maintenance_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/request_maintenances/{request_maintenance_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/request_maintenances/{request_maintenance_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"
},
"request_maintenance": {
"template": {
"id": "4291000000006655",
"name": "Default Request"
},
"attachments": [],
"request_type": null,
"subject": "Request Maintenance Subject Here",
"description": "Description goes here",
"next_schedule": {
"display_value": "Mar 18, 2025 12:00 PM",
"value": "1742279400000"
},
"title": "Request Maintenance Subject Here",
"resolution": {
"content": "<div class=\"personalize-wrapper\" style=\"font-family:"Zoho Puvi", Roboto, sans-serif; font-size:13px\"><div>Resolution for created Maintenance<br><\/div><\/div>"
},
"repetitive_schedule": {
"is_advanced": true,
"next_execution_time": {
"display_value": "Mar 18, 2025 12:00 PM",
"value": "1742279400000"
},
"ends_on": null,
"days_of_month": null,
"parent_entity": "request_maintenance",
"last_execution_time": null,
"is_first_day_of_month": false,
"frequency": "Weekly",
"days_of_week": [
3,
5
],
"weeks_of_month": null,
"start_time": {
"display_value": "Mar 18, 2025 12:00 PM",
"value": "1742279400000"
},
"last_updated_by": {
"email_id": "testuser@domain.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": {
"deleted": false,
"name": "Base Site",
"id": "4291000001327001",
"is_default": true
},
"phone": null,
"employee_id": null,
"name": "test",
"id": "4291000000145236",
"photo_url": "https://contacts.domain.com/file?exp=10&ID=63184126&t=user&height=60&width=60",
"is_vip_user": false,
"department": {
"site": {
"id": "4291000001327001"
},
"name": "Engineering",
"id": "4291000000006625"
},
"first_name": "testuser",
"job_title": null
},
"exclude_weekends": false,
"months_of_year": null,
"day_config_of_month": null,
"last_updated_time": null,
"skip_frequency": "0",
"end_after_occurrences": "7",
"id": "4291000004120008",
"status": "enabled"
},
"mode": {
"internal_name": "E-Mail",
"name": "E-Mail",
"id": "4291000000006665"
},
"is_service": false,
"assets": [
{
"site": {
"id": "4291000001327001"
},
"product": {
"id": "4291000003115016"
},
"product_type": {
"id": "4291000000005925"
},
"name": "a1",
"id": "4291000003115020"
}
],
"configuration_items": [],
"urgency": {
"name": "High",
"id": "4291000000007919"
},
"maintenance_end": "After 7 Occurrences",
"id": "4291000004120001",
"request_template_task_ids": [
{
"id": "4291000001479001"
}
],
"events": [
{
"end_date": "2025-04-09 12:00",
"event_length": "1",
"rec_type": "week_1___2,4#7",
"module": "request_maintenance",
"is_created": false,
"start_longvalue": "1742279400000",
"maintenance": "4291000004120001",
"start_date": "2025-03-18 12:00"
}
],
"group": null,
"requester": {
"email_id": "testuser@domain.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": {
"deleted": false,
"name": "Base Site",
"id": "4291000001327001",
"is_default": true
},
"phone": null,
"employee_id": null,
"name": "test",
"id": "4291000000145236",
"photo_url": "https://contacts.domain.com/file?exp=10&ID=63184126&t=user&height=60&width=60",
"is_vip_user": false,
"department": {
"site": {
"id": "4291000001327001"
},
"name": "Engineering",
"id": "4291000000006625"
},
"first_name": "testuser",
"job_title": null
},
"created_time": {
"display_value": "Mar 18, 2025 11:12 AM",
"value": "1742276532086"
},
"item": null,
"one_time_schedule": null,
"level": {
"name": "Tier 1",
"id": "4291000000006671"
},
"schedule_frequency": "Weekly",
"impact": {
"name": "Affects Business",
"id": "4291000000008033"
},
"module": {
"api_plural_name": "requests",
"name": "request",
"display_name_plural": "sdp.module.pluralname.request",
"id": "4291000000085038",
"display_name": "Request",
"category": "SYSTEM",
"icon_name": null
},
"sla": null,
"technician": {
"email_id": "testuser@domain.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": "4291000001327001"
},
"phone": null,
"employee_id": null,
"name": "test",
"id": "4291000000145236",
"is_vip_user": false,
"photo_url": "https://contacts.domain.com/file?exp=10&ID=63184126&t=user&height=60&width=60",
"department": {
"id": "4291000000006625"
},
"first_name": "testuser",
"job_title": null
},
"priority": {
"color": "#ff0000",
"name": "High",
"id": "4291000000006805"
},
"created_by": {
"email_id": "testuser@domain.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": {
"deleted": false,
"name": "Base Site",
"id": "4291000001327001",
"is_default": true
},
"phone": null,
"employee_id": null,
"name": "test",
"id": "4291000000145236",
"photo_url": "https://contacts.domain.com/file?exp=10&ID=63184126&t=user&height=60&width=60",
"is_vip_user": false,
"department": {
"site": {
"id": "4291000001327001"
},
"name": "Engineering",
"id": "4291000000006625"
},
"first_name": "testuser",
"job_title": null
},
"site": {
"deleted": false,
"name": "Base Site",
"id": "4291000001327001",
"is_default": true
},
"udf_fields": {
"udf_ref9": null
},
"repeat_details": "Every 1 week on Tue, Thu ",
"maintenancestate": 1,
"impact_details": "Impacts Business in many aspects",
"category": {
"deleted": false,
"name": "Centenary Court Building Maintenance",
"id": "4291000002997019"
},
"subcategory": {
"name": "Hard FM",
"id": "4291000002997021"
},
"generated_events": [],
"status": {
"in_progress": true,
"internal_name": "Open",
"stop_timer": false,
"color": "#0066ff",
"name": "Open",
"id": "4291000000006657"
}
}
}
获取请求维护列表
此操作帮助获取所有请求维护的列表
Url
<service domain|custom domain>/app/<portal>/api/v3/request_maintenances
属性
subject (字符串)
此维护的主题[最大长度:250]
created_time (日期时间)
指示此维护创建的时间
one_time_schedule (one_time_schedule)
指示维护的一次性计划
更多属性 展开全部
$ curl -G <service domain|custom domain>/app/<portal>/api/v3/request_maintenances\
-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/request_maintenances";
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/request_maintenances"
$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/request_maintenances"
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"
}
],
"request_maintenances": [
{
"created_time": {
"display_value": "Mar 18, 2025 11:12 AM",
"value": "1742276532086"
},
"one_time_schedule": null,
"subject": "Request Maintenance Subject Here",
"schedule_frequency": "Weekly",
"description": "Description goes here",
"next_schedule": {
"display_value": "Mar 18, 2025 12:00 PM",
"value": "1742279400000"
},
"repetitive_schedule": {
"is_advanced": true,
"ends_on": null,
"days_of_month": null,
"last_execution_time": null,
"is_first_day_of_month": false,
"frequency": "Weekly",
"days_of_week": [
3,
5
],
"weeks_of_month": null,
"start_time": {
"display_value": "Mar 18, 2025 12:00 PM",
"value": "1742279400000"
},
"exclude_weekends": false,
"months_of_year": null,
"day_config_of_month": null,
"skip_frequency": 0,
"end_after_occurrences": 7,
"id": "4291000004120008"
},
"is_service": false,
"repeat_details": "Every 1 week on Tue, Thu ",
"maintenancestate": 1,
"maintenance_end": "After 7 Occurrences",
"id": "4291000004120001",
"category": {
"deleted": false,
"name": "Centenary Court Building Maintenance",
"id": "4291000002997019"
}
},
{
"created_time": {
"display_value": "Feb 21, 2025 04:45 PM",
"value": "1740136517341"
},
"one_time_schedule": null,
"subject": "Please provide me an account in our CRM system",
"schedule_frequency": "Daily",
"description": "Please provide me an account in our CRM system",
"next_schedule": {
"display_value": "Mar 18, 2025 05:00 PM",
"value": "1742297400000"
},
"repetitive_schedule": {
"is_advanced": true,
"ends_on": null,
"days_of_month": null,
"last_execution_time": {
"display_value": "Mar 17, 2025 05:00 PM",
"value": "1742211020435"
},
"is_first_day_of_month": false,
"frequency": "Daily",
"days_of_week": null,
"weeks_of_month": null,
"start_time": {
"display_value": "Feb 21, 2025 05:00 PM",
"value": "1740137400000"
},
"exclude_weekends": false,
"months_of_year": null,
"day_config_of_month": null,
"skip_frequency": 0,
"end_after_occurrences": null,
"id": "4291000003927029"
},
"is_service": true,
"repeat_details": "Every 1 day",
"maintenancestate": 1,
"maintenance_end": "Never",
"id": "4291000003927025",
"category": null
}
],
"list_info": {
"has_more_rows": false,
"sort_field": "id",
"row_count": 4
}
}
暂停
此操作允许暂停请求维护
Url
<service domain|custom domain>/app/<portal>/api/v3/request_maintenances/{request_maintenance_id}/_suspend
$ curl <service domain|custom domain>/app/<portal>/api/v3/request_maintenances/{request_maintenance_id}/_suspend\
-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='{
"comments": "Comments here"
}'
// Deluge Sample script
url = "<service domain|custom domain>/app/<portal>/api/v3/request_maintenances/{request_maintenance_id}/_suspend";
headers = {"Accept":"application/vnd.manageengine.sdp.v3+json",
"Content-Type": "application/x-www-form-urlencoded",
"Authorization": "Zoho-oauthtoken 1000.7xxx98976ab0xxxxxx19901e7551be57.bxxxx921ed64c04f79622bebcfxxxxxx"};
input_data = {
"comments": "Comments here"
};
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/request_maintenances/{request_maintenance_id}/_suspend"
$headers = @{ "Accept" = "application/vnd.manageengine.sdp.v3+json"
"Authorization" = "Zoho-oauthtoken 1000.7xxx98976ab0xxxxxx19901e7551be57.bxxxx921ed64c04f79622bebcfxxxxxx"
"Content-Type" = "application/x-www-form-urlencoded"}
$input_data = @'
{
"comments": "Comments here"
}
'@
$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/request_maintenances/{request_maintenance_id}/_suspend"
headers ={"Accept": "application/vnd.manageengine.sdp.v3+json",
"Authorization" : "Zoho-oauthtoken 1000.7xxx98976ab0xxxxxx19901e7551be57.bxxxx921ed64c04f79622bebcfxxxxxx",
"Content-Type" : "application/x-www-form-urlencoded"}
input_data = '''{
"comments": "Comments here"
}'''
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())
{
"suspend": {
"id": "4291000004120001",
"message": "Maintenance suspended successfully"
},
"response_status": {
"status_code": 2000,
"status": "success"
}
}
启用
此操作允许启用请求维护
Url
<service domain|custom domain>/app/<portal>/api/v3/request_maintenances/{request_maintenance_id}/_enable
$ curl <service domain|custom domain>/app/<portal>/api/v3/request_maintenances/{request_maintenance_id}/_enable\
-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='{
"comments": "Comments while enabling"
}'
// Deluge Sample script
url = "<service domain|custom domain>/app/<portal>/api/v3/request_maintenances/{request_maintenance_id}/_enable";
headers = {"Accept":"application/vnd.manageengine.sdp.v3+json",
"Content-Type": "application/x-www-form-urlencoded",
"Authorization": "Zoho-oauthtoken 1000.7xxx98976ab0xxxxxx19901e7551be57.bxxxx921ed64c04f79622bebcfxxxxxx"};
input_data = {
"comments": "Comments while enabling"
};
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/request_maintenances/{request_maintenance_id}/_enable"
$headers = @{ "Accept" = "application/vnd.manageengine.sdp.v3+json"
"Authorization" = "Zoho-oauthtoken 1000.7xxx98976ab0xxxxxx19901e7551be57.bxxxx921ed64c04f79622bebcfxxxxxx"
"Content-Type" = "application/x-www-form-urlencoded"}
$input_data = @'
{
"comments": "Comments while enabling"
}
'@
$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/request_maintenances/{request_maintenance_id}/_enable"
headers ={"Accept": "application/vnd.manageengine.sdp.v3+json",
"Authorization" : "Zoho-oauthtoken 1000.7xxx98976ab0xxxxxx19901e7551be57.bxxxx921ed64c04f79622bebcfxxxxxx",
"Content-Type" : "application/x-www-form-urlencoded"}
input_data = '''{
"comments": "Comments while enabling"
}'''
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"
},
"enable": {
"id": "4291000004120001",
"message": "Maintenance enabled successfully"
}
}
立即执行
此操作允许立即从维护创建请求
Url
<service domain|custom domain>/app/<portal>/api/v3/request_maintenances/{request_maintenance_id}/_execute_now
$ curl -G <service domain|custom domain>/app/<portal>/api/v3/request_maintenances/{request_maintenance_id}/_execute_now\
-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/request_maintenances/{request_maintenance_id}/_execute_now";
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/request_maintenances/{request_maintenance_id}/_execute_now"
$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/request_maintenances/{request_maintenance_id}/_execute_now"
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"
},
"maintenance": {
"display_id": "1",
"message": "New request created"
}
}
删除请求维护
此操作允许删除请求维护
Url
<service domain|custom domain>/app/<portal>/api/v3/request_maintenances/{request_maintenance_id}
$ curl <service domain|custom domain>/app/<portal>/api/v3/request_maintenances/{request_maintenance_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/request_maintenances/{request_maintenance_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/request_maintenances/{request_maintenance_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/request_maintenances/{request_maintenance_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"
}
}