<service domain|custom domain>/app/<portal>/api/v3/problems/{problem_id}/approval_levels
Problem Approval Level
The multi-level approval process of the Problem module requires that the problem request be approved by levels of approvers. Approvers whom the application administrator has configured as Level 1 approvers will review the problem request first. After they have provided their signatures and thereby given approval, the approvers on Level 2 are notified and must review the problem request. If an approver rejects a problem request, the approval process is finished.
Attributes
id (long)
Denotes the unique ID of the approval
level (int)
Indicates level number of the approval
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
created_by (user)read only
User details of the approval level creator
More Attributes Expand all
associated_entity (string)read only
Holds the value of this approval belongs to which entity[request , purchase_order, problem ,change]
workflow_instance (workflow_instance)read only
Indicates the workflow instance of the problem, to which the approval level belongs to. This will be shown in response only when the workflow is associated to problem.
Add Problem Approval Level
This operation helps you Add problem approval level.
Url
Attributes
id (long)
Denotes the unique ID of the approval
level (int)
Indicates level number of the approval
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
created_by (user)read only
User details of the approval level creator
More Attributes Expand all
associated_entity (string)read only
Holds the value of this approval belongs to which entity[request , purchase_order, problem ,change]
workflow_instance (workflow_instance)read only
Indicates the workflow instance of the problem, to which the approval level belongs to. This will be shown in response only when the workflow is associated to problem.
$ curl <service domain|custom domain>/app/<portal>/api/v3/problems/{problem_id}/approval_levels\
-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_level": {
"rule": {
"id": "100000000000032407"
},
"name": "Level 1",
"approvers": {
"xpaths": [],
"users": [
{
"id": "100000000000041991",
"name": "Tech+1"
}
]
}
}
}
'
// Deluge Sample script
url = "<service domain|custom domain>/app/<portal>/api/v3/problems/{problem_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 = {
"approval_level": {
"rule": {
"id": "100000000000032407"
},
"name": "Level 1",
"approvers": {
"xpaths": [],
"users": [
{
"id": "100000000000041991",
"name": "Tech+1"
}
]
}
}
}
;
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/problems/{problem_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 = @'
{
"approval_level": {
"rule": {
"id": "100000000000032407"
},
"name": "Level 1",
"approvers": {
"xpaths": [],
"users": [
{
"id": "100000000000041991",
"name": "Tech+1"
}
]
}
}
}
'@
$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/problems/{problem_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 = '''{
"approval_level": {
"rule": {
"id": "100000000000032407"
},
"name": "Level 1",
"approvers": {
"xpaths": [],
"users": [
{
"id": "100000000000041991",
"name": "Tech+1"
}
]
}
}
}
'''
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_level": {
"created_time": {
"display_value": "Dec 5, 2024 05:55 PM",
"value": "1733401559120"
},
"level": 1,
"associated_entity": "problem",
"rule": {
"name": "sdp.approval.anyone_approves",
"id": "100000000000032407",
"type": "anyone_approves",
"value": null
},
"comments_required": false,
"created_by": {
"email_id": "test@zohotest.com",
"is_technician": true,
"sms_mail": null,
"mobile": "",
"last_name": "",
"user_scope": "internal_user",
"sms_mail_id": null,
"cost_per_hour": "0",
"site": {
"deleted": false,
"name": "Base Site",
"id": "100000000000006792",
"is_default": true
},
"phone": "",
"employee_id": null,
"name": "Tech+1",
"id": "100000000000041991",
"photo_url": "https://contacts.zoho.com/file?sample",
"is_vip_user": false,
"department": null,
"first_name": "Tech+1",
"job_title": null
},
"problem": {
"display_id": {
"display_value": "PB-5",
"value": "5"
},
"id": "100000000000049402",
"title": "PB-5"
},
"completed_time": null,
"name": "Level 1",
"action": null,
"id": "100000000000050502",
"status": {
"name": "To Be Sent",
"id": "100000000000029398"
}
}
}
Get Problem Approval Level
This operation helps you Get problem approval level.
Url
<service domain|custom domain>/app/<portal>/api/v3/problems/{problem_id}/approval_levels/{approval_level_id}
Attributes
id (long)
Denotes the unique ID of the approval
level (int)
Indicates level number of the approval
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
created_by (user)read only
User details of the approval level creator
More Attributes Expand all
associated_entity (string)read only
Holds the value of this approval belongs to which entity[request , purchase_order, problem ,change]
workflow_instance (workflow_instance)read only
Indicates the workflow instance of the problem, to which the approval level belongs to. This will be shown in response only when the workflow is associated to problem.
$ curl -G <service domain|custom domain>/app/<portal>/api/v3/problems/{problem_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/problems/{problem_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/problems/{problem_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/problems/{problem_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 5, 2024 05:55 PM",
"value": "1733401559120"
},
"level": 1,
"associated_entity": "problem",
"rule": {
"name": "sdp.approval.anyone_approves",
"id": "100000000000032407",
"type": "anyone_approves",
"value": null
},
"comments_required": false,
"created_by": {
"email_id": "test@zohotest.com",
"is_technician": true,
"sms_mail": null,
"mobile": "",
"last_name": "",
"user_scope": "internal_user",
"sms_mail_id": null,
"cost_per_hour": "0",
"site": {
"deleted": false,
"name": "Base Site",
"id": "100000000000006792",
"is_default": true
},
"phone": "",
"employee_id": null,
"name": "Tech+1",
"id": "100000000000040165",
"photo_url": "https://contacts.zoho.com/file?sample",
"is_vip_user": false,
"department": null,
"first_name": "Tech+1",
"job_title": null
},
"problem": {
"display_id": {
"display_value": "PB-5",
"value": "5"
},
"id": "100000000000049402",
"title": "Vulnerabilities in Apache Flink"
},
"completed_time": null,
"name": "Level 1",
"action": null,
"id": "100000000000050502",
"status": {
"name": "Pending Approval",
"id": "100000000000009792"
}
}
}
Get List Problem Approval Level
This operation helps you Get all problem approval levels.
Url
<service domain|custom domain>/app/<portal>/api/v3/problems/{problem_id}/approval_levels
Attributes
id (long)
Denotes the unique ID of the approval
level (int)
Indicates level number of the approval
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
created_by (user)read only
User details of the approval level creator
More Attributes Expand all
associated_entity (string)read only
Holds the value of this approval belongs to which entity[request , purchase_order, problem ,change]
workflow_instance (workflow_instance)read only
Indicates the workflow instance of the problem, to which the approval level belongs to. This will be shown in response only when the workflow is associated to problem.
$ curl -G <service domain|custom domain>/app/<portal>/api/v3/problems/{problem_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/problems/{problem_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/problems/{problem_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/problems/{problem_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 5, 2024 05:55 PM",
"value": "1733401559120"
},
"level": 1,
"associated_entity": "problem",
"rule": {
"name": "sdp.approval.anyone_approves",
"id": "100000000000032407",
"type": "anyone_approves",
"value": null
},
"comments_required": false,
"created_by": {
"email_id": "test@zohotest.com",
"is_technician": true,
"sms_mail": null,
"mobile": "",
"last_name": "",
"user_scope": "internal_user",
"sms_mail_id": null,
"cost_per_hour": "0",
"site": {
"deleted": false,
"name": "Base Site",
"id": "100000000000006792",
"is_default": true
},
"phone": "",
"employee_id": null,
"name": "Tech+1",
"id": "100000000000040165",
"photo_url": "https://contacts.zoho.com/file?sample",
"is_vip_user": false,
"department": null,
"first_name": "Tech+1",
"job_title": null
},
"problem": {
"display_id": {
"display_value": "PB-5",
"value": "5"
},
"id": "100000000000049402",
"title": "Vulnerabilities in Apache Flink"
},
"completed_time": null,
"name": "Level 1",
"action": null,
"id": "100000000000050502",
"status": {
"name": "Pending Approval",
"id": "100000000000009792"
}
}
],
"list_info": {
"has_more_rows": false,
"sort_field": "id",
"row_count": 1
}
}
Delete Problem Approval Level
This operation helps you Delete problem approval level.
Url
<service domain|custom domain>/app/<portal>/api/v3/problems/{problem_id}/approval_levels/{approval_level_id}
$ curl <service domain|custom domain>/app/<portal>/api/v3/problems/{problem_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/problems/{problem_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/problems/{problem_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/problems/{problem_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"
}
}