<service domain|custom domain>/app/<portal>/api/v3/problems/{problem_id}/approval_levels
问题审批级别
Problem 模块的多级审批流程要求问题请求必须经过多个审批级别审批。由应用管理员配置为一级审批人的审批员将首先审核问题请求。在他们签字并批准后,将通知二级审批员对问题请求进行审核。如果任何审批员拒绝问题请求,审批流程结束。
属性
rule (approval_rule)
处理审批级别时需配置的选项。
可用选项包括:
1. 任意人审批 - 如果任意一名审批人批准,则审批通过。如果全员拒绝,则审批不通过。
2. 全员审批 - 只有所有审批人都批准,审批才通过。如果任意一人拒绝,则审批不通过。
3. 首个响应操作 - 如果第一个响应审批的人批准,审批通过。如果拒绝,则审批不通过。
4. 百分比审批 - 当审批人数量超过自定义阈值时,级别通过。输入的阈值应为百分比格式。
status (approval_status)read only
表示审批级别的状态
created_time (日期时间)read only
审批级别的创建时间
created_by (用户)read only
审批级别创建者的用户详情
更多属性 展开全部
添加问题审批级别
此操作帮助您添加问题审批级别。
Url
属性
rule (approval_rule)
处理审批级别时需配置的选项。
可用选项包括:
1. 任意人审批 - 如果任意一名审批人批准,则审批通过。如果全员拒绝,则审批不通过。
2. 全员审批 - 只有所有审批人都批准,审批才通过。如果任意一人拒绝,则审批不通过。
3. 首个响应操作 - 如果第一个响应审批的人批准,审批通过。如果拒绝,则审批不通过。
4. 百分比审批 - 当审批人数量超过自定义阈值时,级别通过。输入的阈值应为百分比格式。
status (approval_status)read only
表示审批级别的状态
created_time (日期时间)read only
审批级别的创建时间
created_by (用户)read only
审批级别创建者的用户详情
更多属性 展开全部
$ 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"
}
}
}
获取问题审批级别
此操作帮助您获取问题审批级别。
Url
<service domain|custom domain>/app/<portal>/api/v3/problems/{problem_id}/approval_levels/{approval_level_id}
属性
rule (approval_rule)
处理审批级别时需配置的选项。
可用选项包括:
1. 任意人审批 - 如果任意一名审批人批准,则审批通过。如果全员拒绝,则审批不通过。
2. 全员审批 - 只有所有审批人都批准,审批才通过。如果任意一人拒绝,则审批不通过。
3. 首个响应操作 - 如果第一个响应审批的人批准,审批通过。如果拒绝,则审批不通过。
4. 百分比审批 - 当审批人数量超过自定义阈值时,级别通过。输入的阈值应为百分比格式。
status (approval_status)read only
表示审批级别的状态
created_time (日期时间)read only
审批级别的创建时间
created_by (用户)read only
审批级别创建者的用户详情
更多属性 展开全部
$ 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"
}
}
}
获取问题审批级别列表
此操作帮助您获取所有问题审批级别。
Url
<service domain|custom domain>/app/<portal>/api/v3/problems/{problem_id}/approval_levels
属性
rule (approval_rule)
处理审批级别时需配置的选项。
可用选项包括:
1. 任意人审批 - 如果任意一名审批人批准,则审批通过。如果全员拒绝,则审批不通过。
2. 全员审批 - 只有所有审批人都批准,审批才通过。如果任意一人拒绝,则审批不通过。
3. 首个响应操作 - 如果第一个响应审批的人批准,审批通过。如果拒绝,则审批不通过。
4. 百分比审批 - 当审批人数量超过自定义阈值时,级别通过。输入的阈值应为百分比格式。
status (approval_status)read only
表示审批级别的状态
created_time (日期时间)read only
审批级别的创建时间
created_by (用户)read only
审批级别创建者的用户详情
更多属性 展开全部
$ 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
}
}
删除问题审批级别
此操作帮助您删除问题审批级别。
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"
}
}