<service domain|custom domain>/app/<portal>/api/v3/unavailability
不可用性
不可用性 API 帮助用户标记其缺席,以便在该期间内不向其分配工作。
属性
id (long)
用于唯一标识用户不可用性(请假信息)的标识符
from_date (datetime)
指示用户不可用性的开始日期和时间
to_date (datetime)
指示用户不可用性的结束日期和时间
comments (string)
用户对添加的不可用性所做的备注
leave_type (leave_type)
用户配置的不可用性类型
更多属性 全部展开
添加不可用性
此操作有助于在组织中添加不可用信息
必填字段 :- user, from_date, to_date
Url
属性
id (long)
用于唯一标识用户不可用性(请假信息)的标识符
from_date (datetime)
指示用户不可用性的开始日期和时间
to_date (datetime)
指示用户不可用性的结束日期和时间
comments (string)
用户对添加的不可用性所做的备注
leave_type (leave_type)
用户配置的不可用性类型
更多属性 全部展开
$ curl <service domain|custom domain>/app/<portal>/api/v3/unavailability\
-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='{
"unavailability": {
"user": {
"id": "2337000000093172"
},
"from_date": {
"value": 1664303400000
},
"to_date": {
"value": 1664389799999
},
"leave_type": {
"id": "2337000000007933"
},
"comments": "availing comp-off ",
"action": {
"for_approval": {
"approval_delegation_option": {
"id": "2337000000131014"
},
"backup_approver": {
"id": "2337000000091155"
}
},
"for_technician": {
"tech_delegation_option": {
"id": "2337000000131011"
},
"backup_technician": {
"id": "2337000000170001"
}
}
}
}
}'
// Deluge Sample script
url = "<service domain|custom domain>/app/<portal>/api/v3/unavailability";
headers = {"Accept":"application/vnd.manageengine.sdp.v3+json",
"Content-Type": "application/x-www-form-urlencoded",
"Authorization": "Zoho-oauthtoken 1000.7xxx98976ab0xxxxxx19901e7551be57.bxxxx921ed64c04f79622bebcfxxxxxx"};
input_data = {
"unavailability": {
"user": {
"id": "2337000000093172"
},
"from_date": {
"value": 1664303400000
},
"to_date": {
"value": 1664389799999
},
"leave_type": {
"id": "2337000000007933"
},
"comments": "availing comp-off ",
"action": {
"for_approval": {
"approval_delegation_option": {
"id": "2337000000131014"
},
"backup_approver": {
"id": "2337000000091155"
}
},
"for_technician": {
"tech_delegation_option": {
"id": "2337000000131011"
},
"backup_technician": {
"id": "2337000000170001"
}
}
}
}
};
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/unavailability"
$headers = @{ "Accept" = "application/vnd.manageengine.sdp.v3+json"
"Authorization" = "Zoho-oauthtoken 1000.7xxx98976ab0xxxxxx19901e7551be57.bxxxx921ed64c04f79622bebcfxxxxxx"
"Content-Type" = "application/x-www-form-urlencoded"}
$input_data = @'
{
"unavailability": {
"user": {
"id": "2337000000093172"
},
"from_date": {
"value": 1664303400000
},
"to_date": {
"value": 1664389799999
},
"leave_type": {
"id": "2337000000007933"
},
"comments": "availing comp-off ",
"action": {
"for_approval": {
"approval_delegation_option": {
"id": "2337000000131014"
},
"backup_approver": {
"id": "2337000000091155"
}
},
"for_technician": {
"tech_delegation_option": {
"id": "2337000000131011"
},
"backup_technician": {
"id": "2337000000170001"
}
}
}
}
}
'@
$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/unavailability"
headers ={"Accept": "application/vnd.manageengine.sdp.v3+json",
"Authorization" : "Zoho-oauthtoken 1000.7xxx98976ab0xxxxxx19901e7551be57.bxxxx921ed64c04f79622bebcfxxxxxx",
"Content-Type" : "application/x-www-form-urlencoded"}
input_data = '''{
"unavailability": {
"user": {
"id": "2337000000093172"
},
"from_date": {
"value": 1664303400000
},
"to_date": {
"value": 1664389799999
},
"leave_type": {
"id": "2337000000007933"
},
"comments": "availing comp-off ",
"action": {
"for_approval": {
"approval_delegation_option": {
"id": "2337000000131014"
},
"backup_approver": {
"id": "2337000000091155"
}
},
"for_technician": {
"tech_delegation_option": {
"id": "2337000000131011"
},
"backup_technician": {
"id": "2337000000170001"
}
}
}
}
}'''
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())
{
"unavailability": {
"is_technician": true,
"comments": "availing comp-off",
"from_date": {
"display_value": "Sep 27, 2022",
"value": "1664218800000"
},
"to_date": {
"display_value": "Sep 28, 2022",
"value": "1664391599999"
},
"leave_type": {
"name": "Comp Off",
"id": "2337000000007933"
},
"added_by": {
"email_id": "sample_user_1@test.com",
"is_technician": true,
"name": "user_1",
"id": "2337000000093172",
"first_name": "user_1"
},
"created_on": {
"display_value": "Sep 15, 2022 12:06 PM",
"value": "1663225565175"
},
"action": {
"updated_on": null,
"created_on": {
"display_value": "Sep 15, 2022 12:06 PM",
"value": "1663225565202"
},
"updated_by": null,
"for_approval": {
"backup_approver": {
"name": "Reporting To",
"id": "2337000000091155"
},
"approval_delegation_option": {
"name": "ASSIGNED_TO_ROLE",
"id": "2337000000131014"
}
},
"for_technician": {
"backup_technician": {
"email_id": "sample_user_2@test.com",
"is_technician": true,
"name": "user_2",
"id": "2337000000170001",
"first_name": "user_2"
},
"tech_delegation_option": {
"name": "ASSIGNED_TO_USER",
"id": "2337000000131011"
}
},
"created_by": {
"email_id": "sample_user_1@test.com",
"is_technician": true,
"name": "user_1",
"id": "2337000000093172",
"first_name": "user_1"
}
},
"id": "2337000001646025",
"user": {
"email_id": "sample_user_1@test.com",
"is_technician": true,
"name": "user_1",
"id": "2337000000093172",
"first_name": "user_1"
}
}
}
编辑不可用性
此操作帮助您修改用户的不可用详细信息,以添加/更新用户休假期间分配的工单和审批的备份
Url
<service domain|custom domain>/app/<portal>/api/v3/unavailability/{unavailability_id}
属性
id (long)
用于唯一标识用户不可用性(请假信息)的标识符
from_date (datetime)
指示用户不可用性的开始日期和时间
to_date (datetime)
指示用户不可用性的结束日期和时间
comments (string)
用户对添加的不可用性所做的备注
leave_type (leave_type)
用户配置的不可用性类型
更多属性 全部展开
$ curl <service domain|custom domain>/app/<portal>/api/v3/unavailability/{unavailability_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='{
"unavailability": {
"user": {
"id": "2337000000093172"
},
"from_date": {
"value": "1664130600000"
},
"to_date": {
"value": "1664217000000"
},
"leave_type": {
"id": "2337000000007935"
},
"comments": "On duty"
}
}'
// Deluge Sample script
url = "<service domain|custom domain>/app/<portal>/api/v3/unavailability/{unavailability_id}";
headers = {"Accept":"application/vnd.manageengine.sdp.v3+json",
"Content-Type": "application/x-www-form-urlencoded",
"Authorization": "Zoho-oauthtoken 1000.7xxx98976ab0xxxxxx19901e7551be57.bxxxx921ed64c04f79622bebcfxxxxxx"};
input_data = {
"unavailability": {
"user": {
"id": "2337000000093172"
},
"from_date": {
"value": "1664130600000"
},
"to_date": {
"value": "1664217000000"
},
"leave_type": {
"id": "2337000000007935"
},
"comments": "On duty"
}
};
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/unavailability/{unavailability_id}"
$headers = @{"Accept": "application/vnd.manageengine.sdp.v3+json",
"Authorization" : "Zoho-oauthtoken 1000.7xxx98976ab0xxxxxx19901e7551be57.bxxxx921ed64c04f79622bebcfxxxxxx",
"Content-Type" : "application/x-www-form-urlencoded"}
$input_data = @'
{
"unavailability": {
"user": {
"id": "2337000000093172"
},
"from_date": {
"value": "1664130600000"
},
"to_date": {
"value": "1664217000000"
},
"leave_type": {
"id": "2337000000007935"
},
"comments": "On duty"
}
}
'@
$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/unavailability/{unavailability_id}"
headers ={"Accept": "application/vnd.manageengine.sdp.v3+json",
"Authorization" : "Zoho-oauthtoken 1000.7xxx98976ab0xxxxxx19901e7551be57.bxxxx921ed64c04f79622bebcfxxxxxx",
"Content-Type" : "application/x-www-form-urlencoded"}
input_data = '''{
"unavailability": {
"user": {
"id": "2337000000093172"
},
"from_date": {
"value": "1664130600000"
},
"to_date": {
"value": "1664217000000"
},
"leave_type": {
"id": "2337000000007935"
},
"comments": "On duty"
}
}'''
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())
{
"unavailability": {
"is_technician": true,
"comments": "On duty",
"from_date": {
"display_value": "Sep 25, 2022",
"value": "1664046000000"
},
"to_date": {
"display_value": "Sep 26, 2022",
"value": "1664218799999"
},
"leave_type": {
"name": "On Duty",
"id": "2337000000007935"
},
"added_by": {
"email_id": "sample_user_1@test.com",
"is_technician": true,
"name": "user_1",
"id": "2337000000093172",
"first_name": "user_1"
},
"created_on": {
"display_value": "Sep 15, 2022 12:06 PM",
"value": "1663225565175"
},
"action": {
"updated_on": null,
"created_on": {
"display_value": "Sep 15, 2022 12:06 PM",
"value": "1663225565202"
},
"updated_by": null,
"for_approval": {
"backup_approver": {
"name": "Reporting To",
"id": "2337000000091155"
},
"approval_delegation_option": {
"name": "ASSIGNED_TO_ROLE",
"id": "2337000000131014"
}
},
"for_technician": {
"backup_technician": {
"email_id": "sample_user_2@test.com",
"is_technician": true,
"name": "user_2",
"id": "2337000000170001",
"first_name": "user_2"
},
"tech_delegation_option": {
"name": "ASSIGNED_TO_USER",
"id": "2337000000131011"
}
},
"created_by": {
"email_id": "sample_user_1@test.com",
"is_technician": true,
"name": "user_1",
"id": "2337000000093172",
"first_name": "user_1"
}
},
"id": "2337000001646025",
"user": {
"email_id": "sample_user_1@test.com",
"is_technician": true,
"name": "user_1",
"id": "2337000000093172",
"first_name": "user_1"
}
}
}
获取不可用性
此操作帮助检索组织中提出的特定不可用信息
Url
<service domain|custom domain>/app/<portal>/api/v3/unavailability/{unavailability_id}
属性
id (long)
用于唯一标识用户不可用性(请假信息)的标识符
from_date (datetime)
指示用户不可用性的开始日期和时间
to_date (datetime)
指示用户不可用性的结束日期和时间
comments (string)
用户对添加的不可用性所做的备注
leave_type (leave_type)
用户配置的不可用性类型
更多属性 全部展开
$ curl -G <service domain|custom domain>/app/<portal>/api/v3/unavailability/{unavailability_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/unavailability/{unavailability_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/unavailability/{unavailability_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/unavailability/{unavailability_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())
{
"unavailability": {
"is_technician": true,
"comments": null,
"from_date": {
"display_value": "Jun 26, 2020",
"value": "1593196200000"
},
"to_date": {
"display_value": "Jun 27, 2020",
"value": "1593282599999"
},
"leave_type": {
"name": "Comp Off",
"id": "2337000000007933"
},
"added_by": {
"email_id": "sample_user_1@test.com",
"is_technician": true,
"name": "user_1",
"id": "2337000000093172",
"first_name": "user_1"
},
"created_on": {
"display_value": "Jun 19, 2020 11:38 AM",
"value": "1592548735068"
},
"action": {
"updated_on": null,
"created_on": {
"display_value": "Jun 19, 2020 11:38 AM",
"value": "1592548735105"
},
"updated_by": null,
"for_approval": {
"backup_approver": null,
"approval_delegation_option": {
"name": "APPLY_GLOBAL",
"id": "2337000000131017"
}
},
"id": "2337000000360025",
"for_technician": {
"backup_technician": null,
"tech_delegation_option": {
"name": "APPLY_GLOBAL",
"id": "2337000000131017"
}
},
"created_by": {
"email_id": "sample_user_1@test.com",
"is_technician": true,
"name": "user_1",
"id": "2337000000093172",
"first_name": "user_1"
}
},
"id": "2337000000360023",
"user": {
"email_id": "sample_user_3@test.com",
"is_technician": true,
"name": "user_3",
"id": "2337000000233049",
"department": {
"site": null,
"name": "Finance",
"id": "2337000000006629"
},
"first_name": "user_3"
}
}
}
获取不可用性列表
此操作帮助检索组织中提出的所有不可用信息
Url
<service domain|custom domain>/app/<portal>/api/v3/unavailability
属性
id (long)
用于唯一标识用户不可用性(请假信息)的标识符
from_date (datetime)
指示用户不可用性的开始日期和时间
to_date (datetime)
指示用户不可用性的结束日期和时间
comments (string)
用户对添加的不可用性所做的备注
leave_type (leave_type)
用户配置的不可用性类型
更多属性 全部展开
$ curl -G <service domain|custom domain>/app/<portal>/api/v3/unavailability\
-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/unavailability";
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/unavailability"
$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/unavailability"
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())
{
"unavailability": [
{
"is_technician": true,
"comments": null,
"from_date": {
"display_value": "Jun 26, 2020",
"value": "1593196200000"
},
"to_date": {
"display_value": "Jun 27, 2020",
"value": "1593282599999"
},
"leave_type": {
"name": "Comp Off",
"id": "2337000000007933"
},
"added_by": {
"email_id": "sample_user_1@test.com",
"is_technician": true,
"name": "user_1",
"id": "2337000000093172",
"first_name": "user_1"
},
"created_on": {
"display_value": "Jun 19, 2020 11:38 AM",
"value": "1592548735068"
},
"action": {
"updated_on": null,
"created_on": {
"display_value": "Jun 19, 2020 11:38 AM",
"value": "1592548735105"
},
"updated_by": null,
"for_approval": {
"backup_approver": null,
"approval_delegation_option": {
"name": "APPLY_GLOBAL",
"id": "2337000000131017"
}
},
"id": "2337000000360025",
"for_technician": {
"backup_technician": null,
"tech_delegation_option": {
"name": "APPLY_GLOBAL",
"id": "2337000000131017"
}
},
"created_by": {
"email_id": "sample_user_1@test.com",
"is_technician": true,
"name": "user_1",
"id": "2337000000093172",
"first_name": "user_1"
}
},
"id": "2337000000360023",
"user": {
"email_id": "sample_user_3@test.com",
"is_technician": true,
"name": "user_3",
"id": "2337000000233049",
"department": {
"site": null,
"name": "Finance",
"id": "2337000000006629"
},
"first_name": "user_3"
}
},
{
"is_technician": true,
"comments": null,
"from_date": {
"display_value": "Jul 6, 2021",
"value": "1625596200000"
},
"to_date": {
"display_value": "Jul 7, 2021",
"value": "1625682599999"
},
"leave_type": {
"name": "Casual Leave",
"id": "2337000000007929"
},
"added_by": {
"email_id": "sample_user_1@test.com",
"is_technician": true,
"name": "user_1",
"id": "2337000000093172",
"first_name": "user_1"
},
"created_on": {
"display_value": "Jul 7, 2021 05:05 PM",
"value": "1625659544315"
},
"action": {
"updated_on": null,
"created_on": {
"display_value": "Jul 7, 2021 05:13 PM",
"value": "1625660032256"
},
"updated_by": null,
"for_approval": {
"backup_approver": null,
"approval_delegation_option": {
"name": "APPLY_GLOBAL",
"id": "2337000000131017"
}
},
"id": "2337000000715055",
"for_technician": {
"backup_technician": null,
"tech_delegation_option": {
"name": "APPLY_GLOBAL",
"id": "2337000000131017"
}
},
"created_by": {
"email_id": "sample_user_1@test.com",
"is_technician": true,
"name": "user_1",
"id": "2337000000093172",
"first_name": "user_1"
}
}
}
]
}
删除不可用性
此操作帮助取消提出的不可用信息
Url
<service domain|custom domain>/app/<portal>/api/v3/unavailability?ids={unavailability_ids}
$ curl <service domain|custom domain>/app/<portal>/api/v3/unavailability?ids={unavailability_ids}\
-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/unavailability?ids={unavailability_ids}";
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/unavailability?ids={unavailability_ids}"
$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/unavailability?ids={unavailability_ids}"
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"
}
}