<service domain|custom domain>/app/<portal>/api/v3/changes/{change_id}/approval_levels/{approval_level_id}/approvals
Change Approval
Change requests must be approved by the stakeholders who are impacted when the change is implemented. Change requests go through a series of approval states, and approvers and update its approval status based on the approval rule set by the administrators.
Attributes
comments (string)
Comments given on the approval by the approver [Max-length : 250]
approver (user)
Approver of the approval
original_approver (user)
The back approver, to whom the approval has been sent when the approver is on leave/not available
xpath (JSONObject)
Organisational Roles configured for the approval
show attribute
path (string)
The path of the organisational role to be configured for the approval
display_name (string)read only
The display name of the organisational role. For Example: CEO, CFO.
approval_level (approval_level)read only
Approval level to which the approval is associated
More Attributes Expand all
Add Change Approval
This operation helps you Add change approval.
Url
Attributes
comments (string)
Comments given on the approval by the approver [Max-length : 250]
approver (user)
Approver of the approval
original_approver (user)
The back approver, to whom the approval has been sent when the approver is on leave/not available
xpath (JSONObject)
Organisational Roles configured for the approval
show attribute
path (string)
The path of the organisational role to be configured for the approval
display_name (string)read only
The display name of the organisational role. For Example: CEO, CFO.
approval_level (approval_level)read only
Approval level to which the approval is associated
More Attributes Expand all
$ curl <service domain|custom domain>/app/<portal>/api/v3/changes/{change_id}/approval_levels/{approval_level_id}/approvals\
-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='{
"approval": {
"xpath": {
"path": "orgroles.udf_ref6",
"display_name": "General Manager"
},
"comments": "Comments for why this entity is approved/rejected",
"original_approver": {
"name": "Lincoln",
"id": "2246399527435800"
}
}
}'
// Deluge Sample script
url = "<service domain|custom domain>/app/<portal>/api/v3/changes/{change_id}/approval_levels/{approval_level_id}/approvals";
headers = {"Accept":"application/vnd.manageengine.sdp.v3+json",
"Content-Type": "application/x-www-form-urlencoded",
"Authorization": "Zoho-oauthtoken 1000.7xxx98976ab0xxxxxx19901e7551be57.bxxxx921ed64c04f79622bebcfxxxxxx"};
input_data = {
"approval": {
"xpath": {
"path": "orgroles.udf_ref6",
"display_name": "General Manager"
},
"comments": "Comments for why this entity is approved/rejected",
"original_approver": {
"name": "Lincoln",
"id": "2246399527435800"
}
}
};
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/{change_id}/approval_levels/{approval_level_id}/approvals"
$headers = @{ "Accept" = "application/vnd.manageengine.sdp.v3+json"
"Authorization" = "Zoho-oauthtoken 1000.7xxx98976ab0xxxxxx19901e7551be57.bxxxx921ed64c04f79622bebcfxxxxxx"
"Content-Type" = "application/x-www-form-urlencoded"}
$input_data = @'
{
"approval": {
"xpath": {
"path": "orgroles.udf_ref6",
"display_name": "General Manager"
},
"comments": "Comments for why this entity is approved/rejected",
"original_approver": {
"name": "Lincoln",
"id": "2246399527435800"
}
}
}
'@
$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/{change_id}/approval_levels/{approval_level_id}/approvals"
headers ={"Accept": "application/vnd.manageengine.sdp.v3+json",
"Authorization" : "Zoho-oauthtoken 1000.7xxx98976ab0xxxxxx19901e7551be57.bxxxx921ed64c04f79622bebcfxxxxxx",
"Content-Type" : "application/x-www-form-urlencoded"}
input_data = '''{
"approval": {
"xpath": {
"path": "orgroles.udf_ref6",
"display_name": "General Manager"
},
"comments": "Comments for why this entity is approved/rejected",
"original_approver": {
"name": "Lincoln",
"id": "2246399527435800"
}
}
}'''
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"
},
"approval": {
"approver": {
"email_id": "lincoln@zmail.com",
"is_technician": false,
"sms_mail": "linc123@xys_sms.co",
"phone": "test-phone",
"name": "Lincoln",
"mobile": "test-mobile",
"id": "1687616429503192",
"photo_url": "test-photo_url",
"is_vip_user": false
},
"xpath": {
"path": null
},
"comments": "Comments for why this entity is approved/rejected",
"original_approver": {
"email_id": "lincoln@zmail.com",
"is_technician": false,
"sms_mail": "linc123@xys_sms.co",
"phone": "test-phone",
"name": "Lincoln",
"mobile": "test-mobile",
"id": "2246399527435800",
"photo_url": "test-photo_url",
"is_vip_user": false
},
"approval_level": {
"created_time": {
"display_value": "Nov 10, 2016 11:44 AM",
"value": "1478758440000"
},
"level": 6,
"associated_entity": "change",
"change": {
"id": "573363737610000"
},
"id": "2464447227215416",
"created_by": {
"id": "163363737611449"
},
"status": {
"id": "573363737611449"
}
},
"id": "1777935282983700",
"sent_on": null,
"action_taken_on": null,
"status": {
"name": "To be Sent",
"id": "1586004938752875"
}
}
}
Get Change Approval
This operation helps you Get change approval.
Url
<service domain|custom domain>/app/<portal>/api/v3/changes/{change_id}/approval_levels/{approval_level_id}/approvals/{approval_id}
Attributes
comments (string)
Comments given on the approval by the approver [Max-length : 250]
approver (user)
Approver of the approval
original_approver (user)
The back approver, to whom the approval has been sent when the approver is on leave/not available
xpath (JSONObject)
Organisational Roles configured for the approval
show attribute
path (string)
The path of the organisational role to be configured for the approval
display_name (string)read only
The display name of the organisational role. For Example: CEO, CFO.
approval_level (approval_level)read only
Approval level to which the approval is associated
More Attributes Expand all
$ curl -G <service domain|custom domain>/app/<portal>/api/v3/changes/{change_id}/approval_levels/{approval_level_id}/approvals/{approval_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}/approval_levels/{approval_level_id}/approvals/{approval_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}/approval_levels/{approval_level_id}/approvals/{approval_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}/approval_levels/{approval_level_id}/approvals/{approval_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"
},
"approval": {
"approver": {
"email_id": "lincoln@zmail.com",
"is_technician": false,
"sms_mail": "linc123@xys_sms.co",
"phone": "test-phone",
"name": "Lincoln",
"mobile": "test-mobile",
"id": "1807795817979319",
"photo_url": "test-photo_url",
"is_vip_user": false
},
"xpath": {
"path": null
},
"comments": "Comments for why this entity is approved/rejected",
"original_approver": {
"email_id": "lincoln@zmail.com",
"is_technician": false,
"sms_mail": "linc123@xys_sms.co",
"phone": "test-phone",
"name": "Lincoln",
"mobile": "test-mobile",
"id": "2014205042604256",
"photo_url": "test-photo_url",
"is_vip_user": false
},
"approval_level": {
"created_time": {
"display_value": "Nov 10, 2016 11:44 AM",
"value": "1478758440000"
},
"level": 19,
"associated_entity": "change",
"change": {
"id": "573363737610000"
},
"id": "1719945134484852",
"created_by": {
"id": "163363737611449"
},
"status": {
"id": "573363737611449"
}
},
"id": "1668157746997366",
"sent_on": null,
"action_taken_on": null,
"status": {
"name": "To be Sent",
"id": "2131832274890872"
}
}
}
Get List Change Approval
This operation helps you Get all change approvals.
Url
<service domain|custom domain>/app/<portal>/api/v3/changes/{change_id}/approval_levels/{approval_level_id}/approvals
Attributes
comments (string)
Comments given on the approval by the approver [Max-length : 250]
approver (user)
Approver of the approval
original_approver (user)
The back approver, to whom the approval has been sent when the approver is on leave/not available
xpath (JSONObject)
Organisational Roles configured for the approval
show attribute
path (string)
The path of the organisational role to be configured for the approval
display_name (string)read only
The display name of the organisational role. For Example: CEO, CFO.
approval_level (approval_level)read only
Approval level to which the approval is associated
More Attributes Expand all
$ curl -G <service domain|custom domain>/app/<portal>/api/v3/changes/{change_id}/approval_levels/{approval_level_id}/approvals\
-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/{change_id}/approval_levels/{approval_level_id}/approvals";
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/{change_id}/approval_levels/{approval_level_id}/approvals"
$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/{change_id}/approval_levels/{approval_level_id}/approvals"
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"
}
],
"approvals": [
{
"approver": {
"email_id": "lincoln@zmail.com",
"is_technician": false,
"sms_mail": "linc123@xys_sms.co",
"phone": "test-phone",
"name": "Lincoln",
"mobile": "test-mobile",
"id": "2197181355456534",
"photo_url": "test-photo_url",
"is_vip_user": false
},
"xpath": {
"path": null
},
"comments": "Comments for why this entity is approved/rejected",
"original_approver": {
"email_id": "lincoln@zmail.com",
"is_technician": false,
"sms_mail": "linc123@xys_sms.co",
"phone": "test-phone",
"name": "Lincoln",
"mobile": "test-mobile",
"id": "2139303138191423",
"photo_url": "test-photo_url",
"is_vip_user": false
},
"approval_level": {
"created_time": {
"display_value": "Nov 10, 2016 11:44 AM",
"value": "1478758440000"
},
"level": 4,
"associated_entity": "change",
"change": {
"id": "573363737610000"
},
"id": "2466949555586303",
"created_by": {
"id": "163363737611449"
},
"status": {
"id": "573363737611449"
}
},
"id": "1681435988882635",
"sent_on": null,
"action_taken_on": null,
"status": {
"name": "To be Sent",
"id": "1578780480099143"
}
}
],
"list_info": {
"has_more_rows": false,
"row_count": 1
}
}
Delete Change Approval
This operation helps you Delete change approval.
Url
<service domain|custom domain>/app/<portal>/api/v3/changes/{change_id}/approval_levels/{approval_level_id}/approvals/{approval_id}
$ curl <service domain|custom domain>/app/<portal>/api/v3/changes/{change_id}/approval_levels/{approval_level_id}/approvals/{approval_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}/approval_levels/{approval_level_id}/approvals/{approval_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}/approval_levels/{approval_level_id}/approvals/{approval_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}/approval_levels/{approval_level_id}/approvals/{approval_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"
}
}
Approve Change Approval
This operation helps you Approve change approval.
Url
<service domain|custom domain>/app/<portal>/api/v3/changes/{change_id}/approval_levels/{approval_level_id}/approvals/{approval_id}/_approve
$ curl <service domain|custom domain>/app/<portal>/api/v3/changes/{change_id}/approval_levels/{approval_level_id}/approvals/{approval_id}/_approve\
-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='{
"approval": {
"comments": "The comments to approve the approval"
}
}'
// Deluge Sample script
url = "<service domain|custom domain>/app/<portal>/api/v3/changes/{change_id}/approval_levels/{approval_level_id}/approvals/{approval_id}/_approve";
headers = {"Accept":"application/vnd.manageengine.sdp.v3+json",
"Content-Type": "application/x-www-form-urlencoded",
"Authorization": "Zoho-oauthtoken 1000.7xxx98976ab0xxxxxx19901e7551be57.bxxxx921ed64c04f79622bebcfxxxxxx"};
input_data = {
"approval": {
"comments": "The comments to approve the approval"
}
};
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}/approval_levels/{approval_level_id}/approvals/{approval_id}/_approve"
$headers = @{ "Accept" = "application/vnd.manageengine.sdp.v3+json"
"Authorization" = "Zoho-oauthtoken 1000.7xxx98976ab0xxxxxx19901e7551be57.bxxxx921ed64c04f79622bebcfxxxxxx"
"Content-Type" = "application/x-www-form-urlencoded"}
$input_data = @'
{
"approval": {
"comments": "The comments to approve the approval"
}
}
'@
$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}/approval_levels/{approval_level_id}/approvals/{approval_id}/_approve"
headers ={"Accept": "application/vnd.manageengine.sdp.v3+json",
"Authorization" : "Zoho-oauthtoken 1000.7xxx98976ab0xxxxxx19901e7551be57.bxxxx921ed64c04f79622bebcfxxxxxx",
"Content-Type" : "application/x-www-form-urlencoded"}
input_data = '''{
"approval": {
"comments": "The comments to approve the approval"
}
}'''
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,
"messages": [
{
"status_code": 2000,
"type": "success",
"message": "Your decision has been recorded. Thank you for your cooperation!"
}
],
"status": "success"
}
}
Get Notification Content For Change Approval
This operation helps you Get notification content for sending change approval.
Url
<service domain|custom domain>/app/<portal>/api/v3/changes/{change_id}/approval_levels/{approval_level_id}/approvals/{approval_id}/_send_notification
$ curl -G <service domain|custom domain>/app/<portal>/api/v3/changes/{change_id}/approval_levels/{approval_level_id}/approvals/{approval_id}/_send_notification\
-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}/approval_levels/{approval_level_id}/approvals/{approval_id}/_send_notification";
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}/approval_levels/{approval_level_id}/approvals/{approval_id}/_send_notification"
$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}/approval_levels/{approval_level_id}/approvals/{approval_id}/_send_notification"
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())
{
"notification": {
"subject": "Recommendation required for a Change",
"description": "${submitter} has requested your recommendations for this Change - ${title}. Click here to view Change details ${approval_link}"
},
"response_status": {
"status_code": 2000,
"status": "success"
}
}
Send Notification For Change Approval
This operation helps you Send notification for change approval.
Url
<service domain|custom domain>/app/<portal>/api/v3/changes/{change_id}/approval_levels/{approval_level_id}/approvals/{approval_id}/_send_notification
$ curl <service domain|custom domain>/app/<portal>/api/v3/changes/{change_id}/approval_levels/{approval_level_id}/approvals/{approval_id}/_send_notification\
-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='{}'
// Deluge Sample script
url = "<service domain|custom domain>/app/<portal>/api/v3/changes/{change_id}/approval_levels/{approval_level_id}/approvals/{approval_id}/_send_notification";
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: PUT
parameters: params
headers: headers
];
info response;
#Powershell version - 5.1
$url = "<service domain|custom domain>/app/<portal>/api/v3/changes/{change_id}/approval_levels/{approval_level_id}/approvals/{approval_id}/_send_notification"
$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 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}/approval_levels/{approval_level_id}/approvals/{approval_id}/_send_notification"
headers ={"Accept": "application/vnd.manageengine.sdp.v3+json",
"Authorization" : "Zoho-oauthtoken 1000.7xxx98976ab0xxxxxx19901e7551be57.bxxxx921ed64c04f79622bebcfxxxxxx",
"Content-Type" : "application/x-www-form-urlencoded"}
input_data = '''{}'''
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,
"messages": [
{
"status_code": 2000,
"type": "success",
"message": "Approval Mail Sent "
}
],
"status": "success"
}
}
Reject Change Approval
This operation helps you Reject change approval.
Url
<service domain|custom domain>/app/<portal>/api/v3/changes/{change_id}/approval_levels/{approval_level_id}/approvals/{approval_id}/_reject
$ curl <service domain|custom domain>/app/<portal>/api/v3/changes/{change_id}/approval_levels/{approval_level_id}/approvals/{approval_id}/_reject\
-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='{
"approval": {
"comments": "The comments to reject the approval"
}
}'
// Deluge Sample script
url = "<service domain|custom domain>/app/<portal>/api/v3/changes/{change_id}/approval_levels/{approval_level_id}/approvals/{approval_id}/_reject";
headers = {"Accept":"application/vnd.manageengine.sdp.v3+json",
"Content-Type": "application/x-www-form-urlencoded",
"Authorization": "Zoho-oauthtoken 1000.7xxx98976ab0xxxxxx19901e7551be57.bxxxx921ed64c04f79622bebcfxxxxxx"};
input_data = {
"approval": {
"comments": "The comments to reject the approval"
}
};
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}/approval_levels/{approval_level_id}/approvals/{approval_id}/_reject"
$headers = @{ "Accept" = "application/vnd.manageengine.sdp.v3+json"
"Authorization" = "Zoho-oauthtoken 1000.7xxx98976ab0xxxxxx19901e7551be57.bxxxx921ed64c04f79622bebcfxxxxxx"
"Content-Type" = "application/x-www-form-urlencoded"}
$input_data = @'
{
"approval": {
"comments": "The comments to reject the approval"
}
}
'@
$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}/approval_levels/{approval_level_id}/approvals/{approval_id}/_reject"
headers ={"Accept": "application/vnd.manageengine.sdp.v3+json",
"Authorization" : "Zoho-oauthtoken 1000.7xxx98976ab0xxxxxx19901e7551be57.bxxxx921ed64c04f79622bebcfxxxxxx",
"Content-Type" : "application/x-www-form-urlencoded"}
input_data = '''{
"approval": {
"comments": "The comments to reject the approval"
}
}'''
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,
"messages": [
{
"status_code": 2000,
"type": "success",
"message": "Your decision has been recorded. Thank you for your cooperation!"
}
],
"status": "success"
}
}