Release Approval Level
The multi-level approval process of the Release module requires that the release request be approved by levels of approvers. Approvers whom the application administrator has configured as Level 1 approvers will review the release request first. After they have provided their signatures and thereby given approval, the approvers on Level 2 are notified and must review the release request. If an approver rejects a release request, the approval process is finished.
Attributes
id (long)
Denotes the unique ID of the approval
level (int)
Indicates level number of the approval
release_stage (release_stage)
Information about the release stage to which the approval is associated. The information will be provided only if the approval is associated to a release
rule (approval_rule)
Options to be configured while processing the approval level.
The Available options are :
1.Anyone to Approve - If any of the approvers approves, the approval is approved. If all rejects, the approval is rejected.
2.Everyone to approve - If everyone of the approvers approves, the approval is approved. If anybody rejects, the approval is rejected.
3.First response action - If the first one to respond to the approval approves, the approval is approved. If he rejects, the approval is rejected.
4.% to approve - The level gets approved when the number of approvers crosses a custom threshold. The threshold in percentage should be given as an input
status (approval_status)read only
Denotes status of the approval level
created_time (datetime)read only
Created time of the approval level
More Attributes Expand all
associated_entity (string)read only
Holds information on the associated entity [request, purchase_order, change or release] of the approval
release (release)read only
Information about the release to which the approval is associated. The information about the release will be provided only if the approval is associated with that release.
Get Release Approval Level
This operation helps to get approval level for a release
Url
<service domain|custom domain>/app/<portal>/api/v3/releases/{release_id}/approval_levels/{approval_level_id}
Attributes
id (long)
Denotes the unique ID of the approval
level (int)
Indicates level number of the approval
release_stage (release_stage)
Information about the release stage to which the approval is associated. The information will be provided only if the approval is associated to a release
rule (approval_rule)
Options to be configured while processing the approval level.
The Available options are :
1.Anyone to Approve - If any of the approvers approves, the approval is approved. If all rejects, the approval is rejected.
2.Everyone to approve - If everyone of the approvers approves, the approval is approved. If anybody rejects, the approval is rejected.
3.First response action - If the first one to respond to the approval approves, the approval is approved. If he rejects, the approval is rejected.
4.% to approve - The level gets approved when the number of approvers crosses a custom threshold. The threshold in percentage should be given as an input
status (approval_status)read only
Denotes status of the approval level
created_time (datetime)read only
Created time of the approval level
More Attributes Expand all
associated_entity (string)read only
Holds information on the associated entity [request, purchase_order, change or release] of the approval
release (release)read only
Information about the release to which the approval is associated. The information about the release will be provided only if the approval is associated with that release.
$ curl -G <service domain|custom domain>/app/<portal>/api/v3/releases/{release_id}/approval_levels/{approval_level_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/releases/{release_id}/approval_levels/{approval_level_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/releases/{release_id}/approval_levels/{approval_level_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/releases/{release_id}/approval_levels/{approval_level_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_level": {
"created_time": {
"display_value": "Dec 22, 2021 04:34 PM",
"value": "1640171056274"
},
"level": 1,
"associated_entity": "release",
"release": {
"display_id": {
"display_value": "RL-6",
"value": "6"
},
"id": "152000014951317",
"title": "Trial Release"
},
"rule": {
"name": "sdp.approval.everyone_approves",
"id": "152000004567071",
"type": "everyone_approves",
"value": null
},
"created_by": {
"email_id": null,
"is_technician": false,
"sms_mail": null,
"mobile": null,
"last_name": "",
"user_scope": "0",
"phone": null,
"name": "System",
"id": "152000000006619",
"photo_url": "https://contacts.zoho.com/file?sample",
"is_vip_user": false,
"department": null,
"first_name": "System",
"job_title": ""
},
"release_stage": {
"internal_name": "deployment",
"inactive": false,
"stage_index": 6,
"name": "Deployment",
"id": "152000008114455"
},
"rule_value": null,
"workflow_instance": {
"id": "152000014951320",
"status": {
"id": "152000004567975"
}
},
"statement": {
"name": "Verification",
"description": null,
"id": "152000008686190",
"key": "Approval_Verification_1"
},
"id": "152000015270025",
"status": {
"name": "Approved",
"id": "152000000008475"
}
}
}
Get List Release Approval Level
This operation helps to get a List of Approval Levels for a release
Url
<service domain|custom domain>/app/<portal>/api/v3/releases/{release_id}/approval_levels
Attributes
id (long)
Denotes the unique ID of the approval
level (int)
Indicates level number of the approval
release_stage (release_stage)
Information about the release stage to which the approval is associated. The information will be provided only if the approval is associated to a release
rule (approval_rule)
Options to be configured while processing the approval level.
The Available options are :
1.Anyone to Approve - If any of the approvers approves, the approval is approved. If all rejects, the approval is rejected.
2.Everyone to approve - If everyone of the approvers approves, the approval is approved. If anybody rejects, the approval is rejected.
3.First response action - If the first one to respond to the approval approves, the approval is approved. If he rejects, the approval is rejected.
4.% to approve - The level gets approved when the number of approvers crosses a custom threshold. The threshold in percentage should be given as an input
status (approval_status)read only
Denotes status of the approval level
created_time (datetime)read only
Created time of the approval level
More Attributes Expand all
associated_entity (string)read only
Holds information on the associated entity [request, purchase_order, change or release] of the approval
release (release)read only
Information about the release to which the approval is associated. The information about the release will be provided only if the approval is associated with that release.
$ curl -G <service domain|custom domain>/app/<portal>/api/v3/releases/{release_id}/approval_levels\
-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/releases/{release_id}/approval_levels";
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/releases/{release_id}/approval_levels"
$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/releases/{release_id}/approval_levels"
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"
}],
"approval_levels": [{
"created_time": {
"display_value": "Dec 29, 2021 03:47 PM",
"value": "1640773057310"
},
"level": 1,
"associated_entity": "release",
"release": {
"display_id": {
"display_value": "RL-5",
"value": "5"
},
"id": "152000015307587",
"title": "Trial Release"
},
"rule": {
"name": "sdp.approval.anyone_approves",
"id": "152000004567068",
"type": "anyone_approves",
"value": null
},
"created_by": {
"email_id": null,
"is_technician": false,
"sms_mail": null,
"mobile": null,
"last_name": "",
"user_scope": "0",
"phone": null,
"name": "System",
"id": "152000000006619",
"photo_url": "https://contacts.zoho.com/file?sample",
"is_vip_user": false,
"department": null,
"first_name": "System",
"job_title": ""
},
"release_stage": {
"internal_name": "submission",
"inactive": false,
"stage_index": 1,
"name": "Submission",
"id": "152000008114445"
},
"rule_value": null,
"workflow_instance": {
"id": "152000015307590",
"status": {
"id": "152000004567969"
}
},
"statement": {
"name": "QA Manager Approval",
"description": null,
"id": "152000008681workflow_instance058",
"key": "Approval_QA Manager Approval_2"
},
"id": "152000015311082",
"status": {
"name": "Approved",
"id": "152000000008475"
}
}, {
"created_time": {
"display_value": "Jan 6, 2022 11:34 AM",
"value": "1641449098848"
},
"level": 1,
"associated_entity": "release",
"release": {
"display_id": {
"display_value": "RL-5",
"value": "5"
},
"id": "152000015307587",
"title": "Trial Release"
},
"rule": {
"name": "sdp.approval.everyone_approves",
"id": "152000004567070",
"type": "everyone_approves",
"value": null
},
"created_by": {
"email_id": null,
"is_technician": false,
"sms_mail": null,
"mobile": null,
"last_name": "",
"user_scope": "0",
"phone": null,
"name": "System",
"id": "152000000006619",
"photo_url": "https://contacts.zoho.com/file?sample",
"is_vip_user": false,
"department": null,
"first_name": "System",
"job_title": ""
},
"release_stage": {
"internal_name": "planning",
"inactive": false,
"stage_index": 2,
"name": "Planning",
"id": "152000008114447"
},
"rule_value": null,
"workflow_instance": {
"id": "152000015307590",
"status": {
"id": "152000004567969"
}
},
"statement": {
"name": "Validation plan Approval",
"description": null,
"id": "152000008680717",
"key": "Approval_Validation plan Approval_4"
},
"id": "152000015358178",
"status": {
"name": "Pending Approval",
"id": "152000000008473"
}
}],
"list_info": {
"has_more_rows": false,
"row_count": 2
}
}
Delete Release Approval Level
This operation helps to Delete Approval Level for a Release
Url
<service domain|custom domain>/app/<portal>/api/v3/releases/{release_id}/approval_levels/{approval_level_id}
$ curl <service domain|custom domain>/app/<portal>/api/v3/releases/{release_id}/approval_levels/{approval_level_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/releases/{release_id}/approval_levels/{approval_level_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/releases/{release_id}/approval_levels/{approval_level_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/releases/{release_id}/approval_levels/{approval_level_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"
}
}