<service domain|custom domain>/app/<portal>/api/v3/solutions
解决方案
解决方案模块是您可以查找问题与故障解决方案的地方。
属性
last_updated_time (日期时间)read only
指示解决方案最后更新时间
attachments (附件)
附加到解决方案的文件。最多可附加50个文件。
udf_fields (自定义字段)
保存与解决方案关联的用户自定义字段值
approval_status (solution_status)
指示解决方案的状态 1. 未批准 2. 已批准 3. 待批准 4. 被拒绝 5. 已过期
display_id (sequence_number)read only
用于唯一识别解决方案的序列号
last_updated_by (technician)read only
指示最后更新解决方案的用户
更多属性 全部展开
添加解决方案
此操作允许您创建新解决方案
必填字段:title, description, topic
Url
属性
attachments (附件)
附加到解决方案的文件。最多可附加50个文件。
approval_status (solution_status)
指示解决方案的状态 1. 未批准 2. 已批准 3. 待批准 4. 被拒绝 5. 已过期
expiry_date (date)
指示解决方案的过期日期
display_id (sequence_number)read only
用于唯一识别解决方案的序列号
created_time (日期时间)read only
指示解决方案创建的时间
更多属性 全部展开
$ curl <service domain|custom domain>/app/<portal>/api/v3/solutions\
-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='{
"solution": {
"title":"Solution Title",
"description":"<div class=\"personalize-wrapper\" style=\"font-family: "PT Sans", Arial, Helvetica, sans-serif, sans-serif; font-size: 13px\"><div>Solution Content<br /><\/div><\/div>",
"topic":{
"id":"2504000000007971"
},
"approval_status": {
"id": "2504000000006827"
},
"keywords":"keyword1,keyword2",
"is_public": true,
"review_date": {
"value": 1635445800000
},
"expiry_date": {
"value": 1635532200000
},
"operation_comment": "test comment",
"has_user_group":true,
"user_group_mapping": [
{
"id": "2504000000117111"
}, {
"id": "2504000000752081"
}
],
"udf_fields":{
"udf_long1": "1225",
"udf_long2": "1459402730964",
"udf_date1": {
"value": "1456464639051"
},
"udf_char1": "abc@test.com",
"udf_char2": "test char"
}
}
}'
// Deluge Sample script
url = "<service domain|custom domain>/app/<portal>/api/v3/solutions";
headers = {"Accept":"application/vnd.manageengine.sdp.v3+json",
"Content-Type": "application/x-www-form-urlencoded",
"Authorization": "Zoho-oauthtoken 1000.7xxx98976ab0xxxxxx19901e7551be57.bxxxx921ed64c04f79622bebcfxxxxxx"};
input_data = {
"solution": {
"title":"Solution Title",
"description":"<div class=\"personalize-wrapper\" style=\"font-family: "PT Sans", Arial, Helvetica, sans-serif, sans-serif; font-size: 13px\"><div>Solution Content<br /><\/div><\/div>",
"topic":{
"id":"2504000000007971"
},
"approval_status": {
"id": "2504000000006827"
},
"keywords":"keyword1,keyword2",
"is_public": true,
"review_date": {
"value": 1635445800000
},
"expiry_date": {
"value": 1635532200000
},
"operation_comment": "test comment",
"has_user_group":true,
"user_group_mapping": [
{
"id": "2504000000117111"
}, {
"id": "2504000000752081"
}
],
"udf_fields":{
"udf_long1": "1225",
"udf_long2": "1459402730964",
"udf_date1": {
"value": "1456464639051"
},
"udf_char1": "abc@test.com",
"udf_char2": "test char"
}
}
};
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/solutions"
$headers = @{ "Accept" = "application/vnd.manageengine.sdp.v3+json"
"Authorization" = "Zoho-oauthtoken 1000.7xxx98976ab0xxxxxx19901e7551be57.bxxxx921ed64c04f79622bebcfxxxxxx"
"Content-Type" = "application/x-www-form-urlencoded"}
$input_data = @'
{
"solution": {
"title":"Solution Title",
"description":"<div class=\"personalize-wrapper\" style=\"font-family: "PT Sans", Arial, Helvetica, sans-serif, sans-serif; font-size: 13px\"><div>Solution Content<br /><\/div><\/div>",
"topic":{
"id":"2504000000007971"
},
"approval_status": {
"id": "2504000000006827"
},
"keywords":"keyword1,keyword2",
"is_public": true,
"review_date": {
"value": 1635445800000
},
"expiry_date": {
"value": 1635532200000
},
"operation_comment": "test comment",
"has_user_group":true,
"user_group_mapping": [
{
"id": "2504000000117111"
}, {
"id": "2504000000752081"
}
],
"udf_fields":{
"udf_long1": "1225",
"udf_long2": "1459402730964",
"udf_date1": {
"value": "1456464639051"
},
"udf_char1": "abc@test.com",
"udf_char2": "test char"
}
}
}
'@
$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/solutions"
headers ={"Accept": "application/vnd.manageengine.sdp.v3+json",
"Authorization" : "Zoho-oauthtoken 1000.7xxx98976ab0xxxxxx19901e7551be57.bxxxx921ed64c04f79622bebcfxxxxxx",
"Content-Type" : "application/x-www-form-urlencoded"}
input_data = '''{
"solution": {
"title":"Solution Title",
"description":"<div class=\"personalize-wrapper\" style=\"font-family: "PT Sans", Arial, Helvetica, sans-serif, sans-serif; font-size: 13px\"><div>Solution Content<br /><\/div><\/div>",
"topic":{
"id":"2504000000007971"
},
"approval_status": {
"id": "2504000000006827"
},
"keywords":"keyword1,keyword2",
"is_public": true,
"review_date": {
"value": 1635445800000
},
"expiry_date": {
"value": 1635532200000
},
"operation_comment": "test comment",
"has_user_group":true,
"user_group_mapping": [
{
"id": "2504000000117111"
}, {
"id": "2504000000752081"
}
],
"udf_fields":{
"udf_long1": "1225",
"udf_long2": "1459402730964",
"udf_date1": {
"value": "1456464639051"
},
"udf_char1": "abc@test.com",
"udf_char2": "test char"
}
}
}'''
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"
},
"solution":{
"id":"2504000000966021",
"display_id": {
"display_value": "SOL-1",
"value": "1"
},
"title":"Solution Title",
"description":"<div class=\"personalize-wrapper\" style=\"font-family: "PT Sans", Arial, Helvetica, sans-serif, sans-serif; font-size: 13px\"><div>Solution Content<br /><\/div><\/div>",
"topic":{
"parent_topic":null,
"name":"General",
"id":"2504000000007971"
},
"approval_status":{
"name":"Approved",
"id":"2504000000006827"
},
"likes":0,
"dislikes":0,
"keywords":"keyword1,keyword2",
"is_public":true,
"review_date":{
"display_value":"Oct 28, 2022",
"value":"1666895400000"
},
"expiry_date":{
"display_value":"Nov 25, 2022",
"value":"1669314600000"
},
"attachments":[],
"created_time":{
"display_value":"Oct 22, 2021 02:39PM",
"value":"1634893774413"
},
"last_updated_time":{
"display_value":"Oct 22, 2021 02:39PM",
"value":"1634893774413"
},
"created_by":{
"email_id":"test_mail@zmail.com",
"is_technician":true,
"sms_mail":"test_sms_mail@smsmail.com",
"mobile":null,
"user_scope":"0",
"phone":null,
"name":"Test User",
"id":"2504000000098174",
"photo_url": "https://contacts.zoho.com/file?exp=10&ID=56631260&t=user&height=60&width=60",
"is_vip_user":false,
"department":null,
"first_name":"Test",
"last_name":"User",
"job_title":null
},
"last_updated_by":{
"email_id":"test_mail@zmail.com",
"is_technician":true,
"sms_mail":"test_sms_mail@smsmail.com",
"mobile":null,
"user_scope":"0",
"phone":null,
"name":"Test User",
"id":"2504000000098174",
"photo_url": "https://contacts.zoho.com/file?exp=10&ID=56631260&t=user&height=60&width=60",
"is_vip_user":false,
"department":null,
"first_name":"Test",
"last_name":"User",
"job_title":null
},
"no_of_hits":15,
"has_user_group":true,
"user_group_mapping":[
{
"name":"User group 1",
"id":"2504000000117111"
},{
"name":"user group 2",
"id":"2504000000752081"
}
],
"private_comment_count":0,
"public_comment_count":0,
"udf_fields":{
"udf_long1": "1225",
"udf_long2": "1459402730964",
"udf_date1": {
"display_value": "Feb 26, 2016 11:00 AM",
"value": "1456464639051"
},
"udf_char1": "abc@test.com",
"udf_char2": "test char"
},
"problem_workaround":null,
"problem_resolution":null
}
}
编辑解决方案
此操作允许编辑解决方案 必填字段:Solution ID
Url
<service domain|custom domain>/app/<portal>/api/v3/solutions/{solution_id}
属性
attachments (附件)
附加到解决方案的文件。最多可附加50个文件。
approval_status (solution_status)
指示解决方案的状态 1. 未批准 2. 已批准 3. 待批准 4. 被拒绝 5. 已过期
expiry_date (date)
指示解决方案的过期日期
created_time (日期时间)read only
指示解决方案创建的时间
last_updated_time (日期时间)read only
指示解决方案最后更新时间
更多属性 全部展开
$ curl <service domain|custom domain>/app/<portal>/api/v3/solutions/{solution_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='{
"solution": {
"name": "Solution Title Edited",
"description": "Solution Content Edited",
"topic":{
"id":"2504000000771301"
},
"approval_status": {
"id": "2504000000006827"
},
"keywords":"keyword1 Edited,keyword2 Edited",
"is_public": true,
"review_date": {
"value": 1666981800000
},
"expiry_date": {
"value": 1669401000000
},
"operation_comment": "test edit comment",
"has_user_group":true,
"user_group_mapping": [
{
"id": "2504000000752087"}
],
"udf_fields":{
"udf_long1": "1234",
"udf_long2": "9876543210",
"udf_date1": {
"value": "1456464639051"
},
"udf_char1": "def@test.com",
"udf_char2": "test char1"
}
}
}'
// Deluge Sample script
url = "<service domain|custom domain>/app/<portal>/api/v3/solutions/{solution_id}";
headers = {"Accept":"application/vnd.manageengine.sdp.v3+json",
"Content-Type": "application/x-www-form-urlencoded",
"Authorization": "Zoho-oauthtoken 1000.7xxx98976ab0xxxxxx19901e7551be57.bxxxx921ed64c04f79622bebcfxxxxxx"};
input_data = {
"solution": {
"name": "Solution Title Edited",
"description": "Solution Content Edited",
"topic":{
"id":"2504000000771301"
},
"approval_status": {
"id": "2504000000006827"
},
"keywords":"keyword1 Edited,keyword2 Edited",
"is_public": true,
"review_date": {
"value": 1666981800000
},
"expiry_date": {
"value": 1669401000000
},
"operation_comment": "test edit comment",
"has_user_group":true,
"user_group_mapping": [
{
"id": "2504000000752087"}
],
"udf_fields":{
"udf_long1": "1234",
"udf_long2": "9876543210",
"udf_date1": {
"value": "1456464639051"
},
"udf_char1": "def@test.com",
"udf_char2": "test char1"
}
}
};
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/solutions/{solution_id}"
$headers = @{"Accept": "application/vnd.manageengine.sdp.v3+json",
"Authorization" : "Zoho-oauthtoken 1000.7xxx98976ab0xxxxxx19901e7551be57.bxxxx921ed64c04f79622bebcfxxxxxx",
"Content-Type" : "application/x-www-form-urlencoded"}
$input_data = @'
{
"solution": {
"name": "Solution Title Edited",
"description": "Solution Content Edited",
"topic":{
"id":"2504000000771301"
},
"approval_status": {
"id": "2504000000006827"
},
"keywords":"keyword1 Edited,keyword2 Edited",
"is_public": true,
"review_date": {
"value": 1666981800000
},
"expiry_date": {
"value": 1669401000000
},
"operation_comment": "test edit comment",
"has_user_group":true,
"user_group_mapping": [
{
"id": "2504000000752087"}
],
"udf_fields":{
"udf_long1": "1234",
"udf_long2": "9876543210",
"udf_date1": {
"value": "1456464639051"
},
"udf_char1": "def@test.com",
"udf_char2": "test char1"
}
}
}
'@
$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/solutions/{solution_id}"
headers ={"Accept": "application/vnd.manageengine.sdp.v3+json",
"Authorization" : "Zoho-oauthtoken 1000.7xxx98976ab0xxxxxx19901e7551be57.bxxxx921ed64c04f79622bebcfxxxxxx",
"Content-Type" : "application/x-www-form-urlencoded"}
input_data = '''{
"solution": {
"name": "Solution Title Edited",
"description": "Solution Content Edited",
"topic":{
"id":"2504000000771301"
},
"approval_status": {
"id": "2504000000006827"
},
"keywords":"keyword1 Edited,keyword2 Edited",
"is_public": true,
"review_date": {
"value": 1666981800000
},
"expiry_date": {
"value": 1669401000000
},
"operation_comment": "test edit comment",
"has_user_group":true,
"user_group_mapping": [
{
"id": "2504000000752087"}
],
"udf_fields":{
"udf_long1": "1234",
"udf_long2": "9876543210",
"udf_date1": {
"value": "1456464639051"
},
"udf_char1": "def@test.com",
"udf_char2": "test char1"
}
}
}'''
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,
"status": "success"
},
"solution":{
"id":"2504000000966021",
"display_id": {
display_value: "SOL-1",
value: "1"
},
"title":"Solution Title Edited",
"description":"Solution Content Edited",
"topic":{
"parent_topic":null,
"name":"Hardware",
"id":"2504000000771301"
},
"approval_status":{
"name":"Approved",
"id":"2504000000006827"
},
"likes":8,
"dislikes":2,
"keywords":"keyword1 Edited,keyword2 Edited",
"is_public":true,
"review_date":{
"display_value": "Oct 29, 2022",
"value": "1666981800000"
},
"expiry_date":{
"display_value":"Nov 26, 2022",
"value":"1669401000000"
},
"attachments":[],
"created_time":{
"display_value":"Oct 22, 2021 02:39PM",
"value":"1634893774413"
},
"last_updated_time":{
"display_value":"Oct 25, 2021 02:12 PM",
"value": "1635151345360"
},
"created_by":{
"email_id":"test_mail@zmail.com",
"is_technician":true,
"sms_mail":"test_sms_mail@smsmail.com",
"mobile":null,
"user_scope":"0",
"phone":null,
"name":"Test User",
"id":"2504000000098174",
"photo_url": "https://contacts.zoho.com/file?exp=10&ID=56631260&t=user&height=60&width=60",
"is_vip_user":false,
"department":null,
"first_name":"Test",
"last_name":"User",
"job_title":null
},
"last_updated_by":{
"email_id":"test_mail@zmail.com",
"is_technician":true,
"sms_mail":"test_sms_mail@smsmail.com",
"mobile":null,
"user_scope":"0",
"phone":null,
"name":"Test User",
"id":"2504000000098174",
"photo_url": "https://contacts.zoho.com/file?exp=10&ID=56631260&t=user&height=60&width=60",
"is_vip_user":false,
"department":null,
"first_name":"Test",
"last_name":"User",
"job_title":null
},
"no_of_hits":15,
"has_user_group":true,
"user_group_mapping":[{
"name":"User group 3",
"id":"2504000000752087"
}],
"private_comment_count":2,
"public_comment_count":3,
"udf_fields":{
"udf_long1": "1234",
"udf_long2": "9876543210",
"udf_date1": {
"display_value": "Feb 26, 2016 11:00 AM",
"value": "1456464639051"
},
"udf_char1": "def@test.com",
"udf_char2": "test char1"
},
"problem_workaround":null,
"problem_resolution":{
"display_id":{
"display_value":"PB-1",
"value":"1"
},
"id":"2504000000117001",
"title":"problem title."
}
}
}
获取解决方案
此操作帮助获取单个解决方案 必填字段:Solution ID
Url
<service domain|custom domain>/app/<portal>/api/v3/solutions/{solution_id}
属性
attachments (附件)
附加到解决方案的文件。最多可附加50个文件。
approval_status (solution_status)
指示解决方案的状态 1. 未批准 2. 已批准 3. 待批准 4. 被拒绝 5. 已过期
expiry_date (date)
指示解决方案的过期日期
created_time (日期时间)read only
指示解决方案创建的时间
last_updated_time (日期时间)read only
指示解决方案最后更新时间
更多属性 全部展开
$ curl -G <service domain|custom domain>/app/<portal>/api/v3/solutions/{solution_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/solutions/{solution_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/solutions/{solution_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/solutions/{solution_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"
},
"solution":{
"id":"2504000000966021",
"display_id": {
"display_value": "SOL-1",
"value": "1"
},
"title":"Solution Title",
"description":"<div class=\"personalize-wrapper\" style=\"font-family: "PT Sans", Arial, Helvetica, sans-serif, sans-serif; font-size: 13px\"><div>Solution Content<br /><\/div><\/div>",
"topic":{
"parent_topic":null,
"name":"General",
"id":"2504000000007971"
},
"approval_status":{
"name":"Approved",
"id":"2504000000006827"
},
"likes":8,
"dislikes":2,
"keywords":"keyword1,keyword2",
"is_public":true,
"review_date":{
"display_value":"Oct 28, 2022",
"value":"1666895400000"
},
"expiry_date":{
"display_value":"Nov 25, 2022",
"value":"1669314600000"
},
"attachments":[],
"created_time":{
"display_value":"Oct 22, 2021 02:39PM",
"value":"1634893774413"
},
"last_updated_time":{
"display_value":"Oct 22, 2021 04:18 PM",
"value":"1634899733610"
},
"created_by":{
"email_id":"test_mail@zmail.com",
"is_technician":true,
"sms_mail":"test_sms_mail@smsmail.com",
"mobile":null,
"user_scope":"0",
"phone":null,
"name":"Test User",
"id":"2504000000098174",
"photo_url": "https://contacts.zoho.com/file?exp=10&ID=56631260&t=user&height=60&width=60",
"is_vip_user":false,
"department":null,
"first_name":"Test",
"last_name":"User",
"job_title":null
},
"last_updated_by":{
"email_id":"test_mail@zmail.com",
"is_technician":true,
"sms_mail":"test_sms_mail@smsmail.com",
"mobile":null,
"user_scope":"0",
"phone":null,
"name":"Test User",
"id":"2504000000098174",
"photo_url": "https://contacts.zoho.com/file?exp=10&ID=56631260&t=user&height=60&width=60",
"is_vip_user":false,
"department":null,
"first_name":"Test",
"last_name":"User",
"job_title":null
},
"no_of_hits":15,
"has_user_group":true,
"user_group_mapping":[
{
"name":"User group 1",
"id":"2504000000117111"
},{
"name":"user group 2",
"id":"2504000000752081"
}
],
"private_comment_count":2,
"public_comment_count":3,
"udf_fields":{
"udf_long1": "1225",
"udf_long2": "1459402730964",
"udf_date1": {
"display_value": "Feb 26, 2016 11:00 AM",
"value": "1456464639051"
},
"udf_char1": "abc@test.com",
"udf_char2": "test char"
},
"problem_workaround":null,
"problem_resolution":{
"display_id":{
"display_value":"PB-1",
"value":"1"
},
"id":"2504000000117001",
"title":"problem title."
}
}
}
获取解决方案列表
此操作帮助获取所有解决方案列表
Url
<service domain|custom domain>/app/<portal>/api/v3/solutions
属性
expiry_date (date)
指示解决方案的过期日期
attachments (附件)
附加到解决方案的文件。最多可附加50个文件。
display_id (sequence_number)read only
用于唯一识别解决方案的序列号
approval_status (solution_status)
指示解决方案的状态 1. 未批准 2. 已批准 3. 待批准 4. 被拒绝 5. 已过期
udf_fields (自定义字段)
保存与解决方案关联的用户自定义字段值
更多属性 全部展开
$ curl -G <service domain|custom domain>/app/<portal>/api/v3/solutions\
-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/solutions";
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/solutions"
$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/solutions"
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"
}
],
"list_info": {
"has_more_rows": true,
"row_count": 3
},
"solutions": [
{
"id": "2504000000966021",
"display_id": {
"display_value": "SOL-1",
"value": "1"
},
"title": "Solution Title",
"description": "<div class=\"personalize-wrapper\" style=\"font-family: "PT Sans", Arial, Helvetica, sans-serif, sans-serif; font-size: 13px\"><div>Solution Content<br /></div></div>",
"topic": {
"parent_topic": null,
"name": "General",
"id": "2504000000007971"
},
"approval_status": {
"name": "Approved",
"id": "2504000000006827"
},
"likes": 8,
"dislikes": 2,
"keywords": "keyword1,keyword2",
"is_public": true,
"review_date": {
"display_value": "Oct 28, 2022",
"value": "1666895400000"
},
"expiry_date": {
"display_value": "Nov 25, 2022",
"value": "1669314600000"
},
"created_time": {
"display_value": "Oct 22, 2021 02:39PM",
"value": "1634893774413"
},
"last_updated_time": {
"display_value": "Oct 22, 2021 04:18 PM",
"value": "1634899733610"
},
"created_by": {
"email_id": "test_mail@zmail.com",
"is_technician": true,
"sms_mail": "test_sms_mail@smsmail.com",
"mobile": null,
"user_scope": "0",
"phone": null,
"name": "Test User",
"id": "2504000000098174",
"photo_url": "https://contacts.zoho.com/file?exp=10&ID=56631260&t=user&height=60&width=60",
"is_vip_user": false,
"department": null,
"first_name": "Test",
"last_name": "User",
"job_title": null
},
"last_updated_by": {
"email_id": "test_mail@zmail.com",
"is_technician": true,
"sms_mail": "test_sms_mail@smsmail.com",
"mobile": null,
"user_scope": "0",
"phone": null,
"name": "Test User",
"id": "2504000000098174",
"photo_url": "https://contacts.zoho.com/file?exp=10&ID=56631260&t=user&height=60&width=60",
"is_vip_user": false,
"department": null,
"first_name": "Test",
"last_name": "User",
"job_title": null
},
"no_of_hits": 15,
"has_user_group": true,
"private_comment_count": 2,
"public_comment_count": 3,
"udf_fields": {
"udf_long1": "1225",
"udf_long2": "1459402730964",
"udf_date1": {
"display_value": "Feb 26, 2016 11:00 AM",
"value": "1456464639051"
},
"udf_char1": "abc@test.com",
"udf_char2": "test char"
}
},
{
"id": "2504000000134047",
"display_id": {
"display_value": "SOL-2",
"value": "2"
},
"title": "Solution Title2",
"description": "<div class=\"personalize-wrapper\" style=\"font-family: "PT Sans", Arial, Helvetica, sans-serif, sans-serif; font-size: 13px\"><div>Solution Content 2<br /></div></div>",
"topic": {
"parent_topic": null,
"name": "General",
"id": "2504000000007971"
},
"approval_status": {
"name": "Approved",
"id": "2504000000006827"
},
"likes": 8,
"dislikes": 2,
"keywords": "keyword3,keyword4",
"is_public": true,
"review_date": {
"display_value": "Oct 28, 2022",
"value": "1666895400000"
},
"expiry_date": {
"display_value": "Nov 25, 2022",
"value": "1669314600000"
},
"created_time": {
"display_value": "Aug 8, 2019 07:27 PM",
"value": "1565272629702"
},
"last_updated_time": {
"display_value": "Oct 22, 2021 04:18 PM",
"value": "1634899733610"
},
"created_by": {
"email_id": "test_mail@zmail.com",
"is_technician": true,
"sms_mail": "test_sms_mail@smsmail.com",
"mobile": null,
"user_scope": "0",
"phone": null,
"name": "Test User",
"id": "2504000000098174",
"photo_url": "https://contacts.zoho.com/file?exp=10&ID=56631260&t=user&height=60&width=60",
"is_vip_user": false,
"department": null,
"first_name": "Test",
"last_name": "User",
"job_title": null
},
"last_updated_by": {
"email_id": "test_mail@zmail.com",
"is_technician": true,
"sms_mail": "test_sms_mail@smsmail.com",
"mobile": null,
"user_scope": "0",
"phone": null,
"name": "Test User",
"id": "2504000000098174",
"photo_url": "https://contacts.zoho.com/file?exp=10&ID=56631260&t=user&height=60&width=60",
"is_vip_user": false,
"department": null,
"first_name": "Test",
"last_name": "User",
"job_title": null
},
"no_of_hits": 20,
"has_user_group": true,
"private_comment_count": 2,
"public_comment_count": 3,
"udf_fields": {
"udf_long1": "9876",
"udf_long2": "1459402730964",
"udf_date1": {
"display_value": "Feb 26, 2016 11:00 AM",
"value": "1456464639051"
},
"udf_char1": "abc@test.com",
"udf_char2": "test char"
}
},
{
"id": "2504000000134047",
"display_id": {
"display_value": "SOL-3",
"value": "3"
},
"title": "Solution Title3",
"description": "<div class=\"personalize-wrapper\" style=\"font-family: "PT Sans", Arial, Helvetica, sans-serif, sans-serif; font-size: 13px\"><div>Solution Content 3<br /></div></div>",
"topic": {
"parent_topic": null,
"name": "General",
"id": "2504000000007971"
},
"approval_status": {
"name": "UnApproved",
"id": "2504000000006827"
},
"likes": 5,
"dislikes": 1,
"keywords": "keyword5,keyword6",
"is_public": false,
"review_date": {
"display_value": "Oct 28, 2022",
"value": "1666895400000"
},
"expiry_date": {
"display_value": "Nov 25, 2022",
"value": "1669314600000"
},
"created_time": {
"display_value": "Apr 16, 2021 06:33 PM",
"value": "1618578183981"
},
"last_updated_time": {
"display_value": "Oct 22, 2021 04:18 PM",
"value": "1634899733610"
},
"created_by": {
"email_id": "test_mail@zmail.com",
"is_technician": true,
"sms_mail": "test_sms_mail@smsmail.com",
"mobile": null,
"user_scope": "0",
"phone": null,
"name": "Test User",
"id": "2504000000098174",
"photo_url": "https://contacts.zoho.com/file?exp=10&ID=56631260&t=user&height=60&width=60",
"is_vip_user": false,
"department": null,
"first_name": "Test",
"last_name": "User",
"job_title": null
},
"last_updated_by": {
"email_id": "test_mail@zmail.com",
"is_technician": true,
"sms_mail": "test_sms_mail@smsmail.com",
"mobile": null,
"user_scope": "0",
"phone": null,
"name": "Test User",
"id": "2504000000098174",
"photo_url": "https://contacts.zoho.com/file?exp=10&ID=56631260&t=user&height=60&width=60",
"is_vip_user": false,
"department": null,
"first_name": "Test",
"last_name": "User",
"job_title": null
},
"no_of_hits": 20,
"has_user_group": false,
"private_comment_count": 0,
"public_comment_count": 0,
"udf_fields": {
"udf_long1": "9876",
"udf_long2": "1459402730964",
"udf_date1": {
"display_value": "Feb 26, 2016 11:00 AM",
"value": "1456464639051"
},
"udf_char1": "abc@test.com",
"udf_char2": "test char"
}
}
]
}
删除解决方案
此操作允许您删除解决方案。必填字段:Solution ID
Url
api/v3/solutions/{solution_id}
$ curl api/v3/solutions/{solution_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/solutions/{solution_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/solutions/{solution_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/solutions/{solution_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"
}
}
拒绝解决方案
此操作帮助您拒绝解决方案。必填字段:1.Solution ID
Url
<service domain|custom domain>/app/<portal>/api/v3/solutions/{solution_id}/_reject
$ curl <service domain|custom domain>/app/<portal>/api/v3/solutions/{solution_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='{
"solution": {
"operation_comment": "Reject test comment",
"reset_ratings": true
}
}'
// Deluge Sample script
url = "<service domain|custom domain>/app/<portal>/api/v3/solutions/{solution_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 = {
"solution": {
"operation_comment": "Reject test comment",
"reset_ratings": true
}
};
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/solutions/{solution_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 = @'
{
"solution": {
"operation_comment": "Reject test comment",
"reset_ratings": true
}
}
'@
$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/solutions/{solution_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 = '''{
"solution": {
"operation_comment": "Reject test comment",
"reset_ratings": true
}
}'''
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,
"status": "success"
},
"solution":{
"id":"2504000000966021",
"display_id": {
"display_value": "SOL-1",
"value": "1"
},
"title":"Solution Title",
"description":"<div class=\"personalize-wrapper\" style=\"font-family: "PT Sans", Arial, Helvetica, sans-serif, sans-serif; font-size: 13px\"><div>Solution Content<br /><\/div><\/div>",
"topic":{
"parent_topic":null,
"name":"General",
"id":"2504000000007971"
},
"approval_status":{
"name":"Rejected",
"id": "2504000000006831"
},
"likes":0,
"dislikes":0,
"keywords":"keyword1,keyword2",
"is_public":true,
"review_date":{
"display_value":"Oct 28, 2022",
"value":"1666895400000"
},
"expiry_date":{
"display_value":"Nov 25, 2022",
"value":"1669314600000"
},
"attachments":[],
"created_time":{
"display_value":"Oct 22, 2021 02:39PM",
"value":"1634893774413"
},
"last_updated_time":{
"display_value":"Oct 22, 2021 04:18 PM",
"value":"1634899733610"
},
"created_by":{
"email_id":"test_mail@zmail.com",
"is_technician":true,
"sms_mail":"test_sms_mail@smsmail.com",
"mobile":null,
"user_scope":"0",
"phone":null,
"name":"Test User",
"id":"2504000000098174",
"photo_url": "https://contacts.zoho.com/file?exp=10&ID=56631260&t=user&height=60&width=60",
"is_vip_user":false,
"department":null,
"first_name":"Test",
"last_name":"User",
"job_title":null
},
"last_updated_by":{
"email_id":"test_mail@zmail.com",
"is_technician":true,
"sms_mail":"test_sms_mail@smsmail.com",
"mobile":null,
"user_scope":"0",
"phone":null,
"name":"Test User",
"id":"2504000000098174",
"photo_url": "https://contacts.zoho.com/file?exp=10&ID=56631260&t=user&height=60&width=60",
"is_vip_user":false,
"department":null,
"first_name":"Test",
"last_name":"User",
"job_title":null
},
"no_of_hits":15,
"has_user_group":true,
"user_group_mapping":[
{
"name":"User group 1",
"id":"2504000000117111"
},{
"name":"user group 2",
"id":"2504000000752081"
}
],
"private_comment_count":2,
"public_comment_count":3,
"udf_fields":{
"udf_long1": "1225",
"udf_long2": "1459402730964",
"udf_date1": {
"display_value": "Feb 26, 2016 11:00 AM",
"value": "1456464639051"
},
"udf_char1": "abc@test.com",
"udf_char2": "test char"
},
"problem_workaround":null,
"problem_resolution":{
"display_id":{
"display_value":"PB-1",
"value":"1"
},
"id":"2504000000117001",
"title":"problem title."
}
}
}
赞同解决方案
此操作帮助您点赞解决方案 必填字段:Solution ID
Url
<service domain|custom domain>/app/<portal>/api/v3/solutions/{solution_id}/_like
$ curl <service domain|custom domain>/app/<portal>/api/v3/solutions/{solution_id}/_like\
-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/solutions/{solution_id}/_like";
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/solutions/{solution_id}/_like"
$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/solutions/{solution_id}/_like"
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,
"status": "success"
},
"solution":{
"id":"2504000000966021",
"display_id": {
"display_value": "SOL-1",
"value": "1"
},
"title":"Solution Title",
"description":"<div class=\"personalize-wrapper\" style=\"font-family: "PT Sans", Arial, Helvetica, sans-serif, sans-serif; font-size: 13px\"><div>Solution Content<br /><\/div><\/div>",
"topic":{
"parent_topic":null,
"name":"General",
"id":"2504000000007971"
},
"approval_status":{
"name":"Approved",
"id":"2504000000006827"
},
"likes":1,
"dislikes":0,
"keywords":"keyword1,keyword2",
"is_public":true,
"review_date":{
"display_value":"Oct 28, 2022",
"value":"1666895400000"
},
"expiry_date":{
"display_value":"Nov 25, 2022",
"value":"1669314600000"
},
"attachments":[],
"created_time":{
"display_value":"Oct 22, 2021 02:39PM",
"value":"1634893774413"
},
"last_updated_time":{
"display_value":"Oct 22, 2021 04:18 PM",
"value":"1634899733610"
},
"created_by":{
"email_id":"test_mail@zmail.com",
"is_technician":true,
"sms_mail":"test_sms_mail@smsmail.com",
"mobile":null,
"user_scope":"0",
"phone":null,
"name":"Test User",
"id":"2504000000098174",
"photo_url": "https://contacts.zoho.com/file?exp=10&ID=56631260&t=user&height=60&width=60",
"is_vip_user":false,
"department":null,
"first_name":"Test",
"last_name":"User",
"job_title":null
},
"last_updated_by":{
"email_id":"test_mail@zmail.com",
"is_technician":true,
"sms_mail":"test_sms_mail@smsmail.com",
"mobile":null,
"user_scope":"0",
"phone":null,
"name":"Test User",
"id":"2504000000098174",
"photo_url": "https://contacts.zoho.com/file?exp=10&ID=56631260&t=user&height=60&width=60",
"is_vip_user":false,
"department":null,
"first_name":"Test",
"last_name":"User",
"job_title":null
},
"no_of_hits":15,
"has_user_group":true,
"user_group_mapping":[
{
"name":"User group 1",
"id":"2504000000117111"
},{
"name":"user group 2",
"id":"2504000000752081"
}
],
"private_comment_count":2,
"public_comment_count":3,
"udf_fields":{
"udf_long1": "1225",
"udf_long2": "1459402730964",
"udf_date1": {
"display_value": "Feb 26, 2016 11:00 AM",
"value": "1456464639051"
},
"udf_char1": "abc@test.com",
"udf_char2": "test char"
},
"problem_workaround":null,
"problem_resolution":{
"display_id":{
"display_value":"PB-1",
"value":"1"
},
"id":"2504000000117001",
"title":"problem title."
}
}
}
将解决方案与另一解决方案关联
此操作帮助您将一个解决方案与另一个解决方案关联 必填字段:Solution ID
Url
<service domain|custom domain>/app/<portal>/api/v3/solutions/{solution_id}/relations
$ curl <service domain|custom domain>/app/<portal>/api/v3/solutions/{solution_id}/relations\
-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='{
"relations": [
{
"child_solution": {"id": "2504000000269005"}
},
{
"child_solution": {"id": "2504000000635003"}
}
]
}'
// Deluge Sample script
url = "<service domain|custom domain>/app/<portal>/api/v3/solutions/{solution_id}/relations";
headers = {"Accept":"application/vnd.manageengine.sdp.v3+json",
"Content-Type": "application/x-www-form-urlencoded",
"Authorization": "Zoho-oauthtoken 1000.7xxx98976ab0xxxxxx19901e7551be57.bxxxx921ed64c04f79622bebcfxxxxxx"};
input_data = {
"relations": [
{
"child_solution": {"id": "2504000000269005"}
},
{
"child_solution": {"id": "2504000000635003"}
}
]
};
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/solutions/{solution_id}/relations"
$headers = @{"Accept": "application/vnd.manageengine.sdp.v3+json",
"Authorization" : "Zoho-oauthtoken 1000.7xxx98976ab0xxxxxx19901e7551be57.bxxxx921ed64c04f79622bebcfxxxxxx",
"Content-Type" : "application/x-www-form-urlencoded"}
$input_data = @'
{
"relations": [
{
"child_solution": {"id": "2504000000269005"}
},
{
"child_solution": {"id": "2504000000635003"}
}
]
}
'@
$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/solutions/{solution_id}/relations"
headers ={"Accept": "application/vnd.manageengine.sdp.v3+json",
"Authorization" : "Zoho-oauthtoken 1000.7xxx98976ab0xxxxxx19901e7551be57.bxxxx921ed64c04f79622bebcfxxxxxx",
"Content-Type" : "application/x-www-form-urlencoded"}
input_data = '''{
"relations": [
{
"child_solution": {"id": "2504000000269005"}
},
{
"child_solution": {"id": "2504000000635003"}
}
]
}'''
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,
"id":"2504000000966071",
"status":"success"
},{
"status_code":2000,
"id":"2504000000966073",
"status":"success"
}
],
"relations":[
{
"child_solution":{
"display_id": {
"display_value": "SOL-2", "value": "2"
},
"approval_status":{"id":"2504000000006827"},
"id":"2504000000269005",
"title":"Solution title 2."
},
"id":"2504000000966071",
"parent_solution":{
"display_id": {
"display_value": "SOL-1", "value": "1"
},
"approval_status":{"id":"2504000000006827"},
"id":"2504000000966021",
"title":"Solution Title"
}
},{
"child_solution":{
"display_id": {
"display_value": "SOL-3", "value": "3"
},
"approval_status":{"id":"2504000000006825"},
"id":"2504000000635003",
"title":"Solution title 3"
},
"id":"2504000000966073",
"parent_solution":{
"display_id": {
"display_value": "SOL-1", "value": "1"
},
"approval_status":{"id":"2504000000006827"},
"id":"2504000000966021",
"title":"Solution Title"
}
}
]
}
获取与解决方案关联的所有解决方案列表
此操作帮助您获取与某解决方案关联的所有解决方案列表 必填字段:1.Solution id
Url
<service domain|custom domain>/app/<portal>/api/v3/solutions/{solution_id}/relations
$ curl -G <service domain|custom domain>/app/<portal>/api/v3/solutions/{solution_id}/relations\
-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/solutions/{solution_id}/relations";
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/solutions/{solution_id}/relations"
$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/solutions/{solution_id}/relations"
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"
}],
"list_info":{
"has_more_rows":false,
"row_count":2
},
"relations":[
{
"child_solution":{
"display_id": {
"display_value": "SOL-2", "value": "2"
},
"approval_status":{"id":"2504000000006827"},
"id":"2504000000269005",
"title":"Solution title 2."
},
"id":"2504000000966071",
"parent_solution":{
"display_id": {
"display_value": "SOL-1", "value": "1"
},
"approval_status":{"id":"2504000000006827"},
"id":"2504000000966021",
"title":"Solution Title"
}
},{
"child_solution":{
"display_id": {
"display_value": "SOL-3", "value": "3"
},
"approval_status":{"id":"2504000000006825"},
"id":"2504000000635003",
"title":"Solution title 3"
},
"id":"2504000000966073",
"parent_solution":{
"display_id": {
"display_value": "SOL-1", "value": "1"
},
"approval_status":{"id":"2504000000006827"},
"id":"2504000000966021",
"title":"Solution Title"
}
}
]
}
获取解决方案中的所有评论列表
此操作帮助您获取解决方案中的所有评论列表 必填字段:Solution Id
Url
<service domain|custom domain>/app/<portal>/api/v3/solutions/{solution_id}/comments
$ curl -G <service domain|custom domain>/app/<portal>/api/v3/solutions/{solution_id}/comments\
-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/solutions/{solution_id}/comments";
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/solutions/{solution_id}/comments"
$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/solutions/{solution_id}/comments"
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"
}],
"list_info":{
"has_more_rows":false,
"start_index":1,
"row_count":1
},
"comments":[
{
"id":"2504000000966077",
"comment":"Test comment Edited",
"is_public":true,
"solution":{
"display_id": {
"display_value": "SOL-1", "value": "1"
},
"approval_status":{
"id":"2504000000006827"
},
"id":"2504000000966021",
"title":"Solution Title"
},
"created_time":{
"display_value":"Oct 25, 2021 01:17 PM",
"value":"1635148045041"
},
"updated_time":{
"display_value": "Oct 25, 2021 01:26 PM",
"value": "1635148585334"
},
"user":{
"email_id":"test_mail@zmail.com",
"is_technician":true,
"sms_mail":"test_sms_mail@smsmail.com",
"mobile":null,
"user_scope":"0",
"phone":null,
"name":"Test User",
"id":"2504000000098174",
"photo_url": "https://contacts.zoho.com/file?exp=10&ID=56631260&t=user&height=60&width=60",
"is_vip_user":false,
"department":null,
"first_name":"Test",
"last_name":"User",
"job_title":null
}
}
]
}
编辑解决方案中的评论
此操作帮助您编辑解决方案中的评论 必填字段:Solution Id Solution Comment Id
Url
<service domain|custom domain>/app/<portal>/api/v3/solutions/{solution_id}/comments/{solution_comment_id}
$ curl <service domain|custom domain>/app/<portal>/api/v3/solutions/{solution_id}/comments/{solution_comment_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='{
"solution_comment": {
"comment": "Test comment Edited",
"is_public": true
}
}'
// Deluge Sample script
url = "<service domain|custom domain>/app/<portal>/api/v3/solutions/{solution_id}/comments/{solution_comment_id}";
headers = {"Accept":"application/vnd.manageengine.sdp.v3+json",
"Content-Type": "application/x-www-form-urlencoded",
"Authorization": "Zoho-oauthtoken 1000.7xxx98976ab0xxxxxx19901e7551be57.bxxxx921ed64c04f79622bebcfxxxxxx"};
input_data = {
"solution_comment": {
"comment": "Test comment Edited",
"is_public": true
}
};
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/solutions/{solution_id}/comments/{solution_comment_id}"
$headers = @{ "Accept" = "application/vnd.manageengine.sdp.v3+json"
"Authorization" = "Zoho-oauthtoken 1000.7xxx98976ab0xxxxxx19901e7551be57.bxxxx921ed64c04f79622bebcfxxxxxx"
"Content-Type" = "application/x-www-form-urlencoded"}
$input_data = @'
{
"solution_comment": {
"comment": "Test comment Edited",
"is_public": true
}
}
'@
$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/solutions/{solution_id}/comments/{solution_comment_id}"
headers ={"Accept": "application/vnd.manageengine.sdp.v3+json",
"Authorization" : "Zoho-oauthtoken 1000.7xxx98976ab0xxxxxx19901e7551be57.bxxxx921ed64c04f79622bebcfxxxxxx",
"Content-Type" : "application/x-www-form-urlencoded"}
input_data = '''{
"solution_comment": {
"comment": "Test comment Edited",
"is_public": true
}
}'''
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,
"status":"success"
},
"solution_comment":{
"id":"2504000000966077",
"comment":"Test comment Edited",
"is_public":true,
"solution":{
"display_id": {
"display_value": "SOL-1", "value": "1"
},
"approval_status":{"id":"2504000000006827"},
"id":"2504000000966021",
"title":"Solution Title"
},
"created_time":{
"display_value":"Oct 25, 2021 01:17 PM",
"value":"1635148045041"
},
"updated_time":{
"display_value": "Oct 25, 2021 01:26 PM",
"value": "1635148585334"
},
"user":{
"email_id":"test_mail@zmail.com",
"is_technician":true,
"sms_mail":"test_sms_mail@smsmail.com",
"mobile":null,
"user_scope":"0",
"phone":null,
"name":"Test User",
"id":"2504000000098174",
"photo_url": "https://contacts.zoho.com/file?exp=10&ID=56631260&t=user&height=60&width=60",
"is_vip_user":false,
"department":null,
"first_name":"Test",
"last_name":"User",
"job_title":null
}
}
}
删除解决方案中的评论
此操作帮助您删除解决方案中的评论 必填字段:Solution Id Solution Comment Id
Url
<service domain|custom domain>/app/<portal>/api/v3/solutions/{solution_id}/relations/{solution_comment_id}
$ curl <service domain|custom domain>/app/<portal>/api/v3/solutions/{solution_id}/relations/{solution_comment_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/solutions/{solution_id}/relations/{solution_comment_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/solutions/{solution_id}/relations/{solution_comment_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/solutions/{solution_id}/relations/{solution_comment_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"
}
}
添加评论到解决方案
此操作帮助您向解决方案添加评论 必填字段:1.Solution id
Url
<service domain|custom domain>/app/<portal>/api/v3/solutions/{solution_id}/comments
$ curl <service domain|custom domain>/app/<portal>/api/v3/solutions/{solution_id}/comments\
-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='{
"solution_comment": {
"comment": "Test comment",
"is_public": true
}
}'
// Deluge Sample script
url = "<service domain|custom domain>/app/<portal>/api/v3/solutions/{solution_id}/comments";
headers = {"Accept":"application/vnd.manageengine.sdp.v3+json",
"Content-Type": "application/x-www-form-urlencoded",
"Authorization": "Zoho-oauthtoken 1000.7xxx98976ab0xxxxxx19901e7551be57.bxxxx921ed64c04f79622bebcfxxxxxx"};
input_data = {
"solution_comment": {
"comment": "Test comment",
"is_public": true
}
};
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/solutions/{solution_id}/comments"
$headers = @{"Accept": "application/vnd.manageengine.sdp.v3+json",
"Authorization" : "Zoho-oauthtoken 1000.7xxx98976ab0xxxxxx19901e7551be57.bxxxx921ed64c04f79622bebcfxxxxxx",
"Content-Type" : "application/x-www-form-urlencoded"}
$input_data = @'
{
"solution_comment": {
"comment": "Test comment",
"is_public": true
}
}
'@
$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/solutions/{solution_id}/comments"
headers ={"Accept": "application/vnd.manageengine.sdp.v3+json",
"Authorization" : "Zoho-oauthtoken 1000.7xxx98976ab0xxxxxx19901e7551be57.bxxxx921ed64c04f79622bebcfxxxxxx",
"Content-Type" : "application/x-www-form-urlencoded"}
input_data = '''{
"solution_comment": {
"comment": "Test comment",
"is_public": true
}
}'''
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"
},
"solution_comment":{
"id":"2504000000966077",
"comment":"Test comment",
"is_public":true,
"solution":{
"display_id": {
"display_value": "SOL-1", "value": "1"
},
"approval_status":{"id":"2504000000006827"},
"id":"2504000000966021",
"title":"Solution Title"
},
"created_time":{
"display_value":"Oct 25, 2021 01:17 PM",
"value":"1635148045041"
},
"updated_time":null,
"user":{
"email_id":"test_mail@zmail.com",
"is_technician":true,
"sms_mail":"test_sms_mail@smsmail.com",
"mobile":null,
"user_scope":"0",
"phone":null,
"name":"Test User",
"id":"2504000000098174",
"photo_url": "https://contacts.zoho.com/file?exp=10&ID=56631260&t=user&height=60&width=60",
"is_vip_user":false,
"department":null,
"first_name":"Test",
"last_name":"User",
"job_title":null
}
}
}
解除解决方案与另一解决方案的关联
此操作帮助您解除解决方案之间的关联 必填字段:Solution Id 注意:在表单数据中提供{ids : solution_id(s)}
Url
<service domain|custom domain>/app/<portal>/api/v3/solutions/{solution_id}/relations
$ curl <service domain|custom domain>/app/<portal>/api/v3/solutions/{solution_id}/relations\
-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/solutions/{solution_id}/relations";
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/solutions/{solution_id}/relations"
$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/solutions/{solution_id}/relations"
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"
}
}
不赞同解决方案
此操作帮助您不喜欢解决方案 必填字段:1.Solution id
Url
<service domain|custom domain>/app/<portal>/api/v3/solutions/{solution_id}/_dislike
$ curl <service domain|custom domain>/app/<portal>/api/v3/solutions/{solution_id}/_dislike\
-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/solutions/{solution_id}/_dislike";
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/solutions/{solution_id}/_dislike"
$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/solutions/{solution_id}/_dislike"
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,
"status": "success"
},
"solution":{
"id":"2504000000966021",
"display_id": {
"display_value": "SOL-1",
"value": "1"
},
"title":"Solution Title",
"description":"<div class=\"personalize-wrapper\" style=\"font-family: "PT Sans", Arial, Helvetica, sans-serif, sans-serif; font-size: 13px\"><div>Solution Content<br /><\/div><\/div>",
"topic":{
"parent_topic":null,
"name":"General",
"id":"2504000000007971"
},
"approval_status":{
"name":"Approved",
"id":"2504000000006827"
},
"likes":0,
"dislikes":1,
"keywords":"keyword1,keyword2",
"is_public":true,
"review_date":{
"display_value":"Oct 28, 2022",
"value":"1666895400000"
},
"expiry_date":{
"display_value":"Nov 25, 2022",
"value":"1669314600000"
},
"attachments":[],
"created_time":{
"display_value":"Oct 22, 2021 02:39PM",
"value":"1634893774413"
},
"last_updated_time":{
"display_value":"Oct 22, 2021 04:18 PM",
"value":"1634899733610"
},
"created_by":{
"email_id":"test_mail@zmail.com",
"is_technician":true,
"sms_mail":"test_sms_mail@smsmail.com",
"mobile":null,
"user_scope":"0",
"phone":null,
"name":"Test User",
"id":"2504000000098174",
"photo_url": "https://contacts.zoho.com/file?exp=10&ID=56631260&t=user&height=60&width=60",
"is_vip_user":false,
"department":null,
"first_name":"Test",
"last_name":"User",
"job_title":null
},
"last_updated_by":{
"email_id":"test_mail@zmail.com",
"is_technician":true,
"sms_mail":"test_sms_mail@smsmail.com",
"mobile":null,
"user_scope":"0",
"phone":null,
"name":"Test User",
"id":"2504000000098174",
"photo_url": "https://contacts.zoho.com/file?exp=10&ID=56631260&t=user&height=60&width=60",
"is_vip_user":false,
"department":null,
"first_name":"Test",
"last_name":"User",
"job_title":null
},
"no_of_hits":15,
"has_user_group":true,
"user_group_mapping":[
{
"name":"User group 1",
"id":"2504000000117111"
},{
"name":"user group 2",
"id":"2504000000752081"
}
],
"private_comment_count":2,
"public_comment_count":3,
"udf_fields":{
"udf_long1": "1225",
"udf_long2": "1459402730964",
"udf_date1": {
"display_value": "Feb 26, 2016 11:00 AM",
"value": "1456464639051"
},
"udf_char1": "abc@test.com",
"udf_char2": "test char"
},
"problem_workaround":null,
"problem_resolution":{
"display_id":{
"display_value":"PB-1",
"value":"1"
},
"id":"2504000000117001",
"title":"problem title."
}
}
}
批准解决方案
此操作帮助您批准解决方案 必填字段:Solution ID
Url
<service domain|custom domain>/app/<portal>/api/v3/solutions/{solution_id}/_approve
$ curl <service domain|custom domain>/app/<portal>/api/v3/solutions/{solution_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='{
"solution": {
"operation_comment": "Approve test comment",
"reset_ratings": true
}
}'
// Deluge Sample script
url = "<service domain|custom domain>/app/<portal>/api/v3/solutions/{solution_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 = {
"solution": {
"operation_comment": "Approve test comment",
"reset_ratings": true
}
};
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/solutions/{solution_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 = @'
{
"solution": {
"operation_comment": "Approve test comment",
"reset_ratings": true
}
}
'@
$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/solutions/{solution_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 = '''{
"solution": {
"operation_comment": "Approve test comment",
"reset_ratings": true
}
}'''
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,
"status": "success"
},
"solution":{
"id":"2504000000966021",
"display_id": {
"display_value": "SOL-1",
"value": "1"
},
"title":"Solution Title",
"description":"<div class=\"personalize-wrapper\" style=\"font-family: "PT Sans", Arial, Helvetica, sans-serif, sans-serif; font-size: 13px\"><div>Solution Content<br /><\/div><\/div>",
"topic":{
"parent_topic":null,
"name":"General",
"id":"2504000000007971"
},
"approval_status":{
"name":"Approved",
"id":"2504000000006827"
},
"likes":0,
"dislikes":0,
"keywords":"keyword1,keyword2",
"is_public":true,
"review_date":{
"display_value":"Oct 28, 2022",
"value":"1666895400000"
},
"expiry_date":{
"display_value":"Nov 25, 2022",
"value":"1669314600000"
},
"attachments":[],
"created_time":{
"display_value":"Oct 22, 2021 02:39PM",
"value":"1634893774413"
},
"last_updated_time":{
"display_value":"Oct 22, 2021 04:18 PM",
"value":"1634899733610"
},
"created_by":{
"email_id":"test_mail@zmail.com",
"is_technician":true,
"sms_mail":"test_sms_mail@smsmail.com",
"mobile":null,
"user_scope":"0",
"phone":null,
"name":"Test User",
"id":"2504000000098174",
"photo_url": "https://contacts.zoho.com/file?exp=10&ID=56631260&t=user&height=60&width=60",
"is_vip_user":false,
"department":null,
"first_name":"Test",
"last_name":"User",
"job_title":null
},
"last_updated_by":{
"email_id":"test_mail@zmail.com",
"is_technician":true,
"sms_mail":"test_sms_mail@smsmail.com",
"mobile":null,
"user_scope":"0",
"phone":null,
"name":"Test User",
"id":"2504000000098174",
"photo_url": "https://contacts.zoho.com/file?exp=10&ID=56631260&t=user&height=60&width=60",
"is_vip_user":false,
"department":null,
"first_name":"Test",
"last_name":"User",
"job_title":null
},
"no_of_hits":15,
"has_user_group":true,
"user_group_mapping":[
{
"name":"User group 1",
"id":"2504000000117111"
},{
"name":"user group 2",
"id":"2504000000752081"
}
],
"private_comment_count":2,
"public_comment_count":3,
"udf_fields":{
"udf_long1": "1225",
"udf_long2": "1459402730964",
"udf_date1": {
"display_value": "Feb 26, 2016 11:00 AM",
"value": "1456464639051"
},
"udf_char1": "abc@test.com",
"udf_char2": "test char"
},
"problem_workaround":null,
"problem_resolution":{
"display_id":{
"display_value":"PB-1",
"value":"1"
},
"id":"2504000000117001",
"title":"problem title."
}
}
}
为解决方案上传附件
此操作帮助您为解决方案添加附件。必填字段:1.Solution id 注意:在表单数据中提供{filename : file_name}
必填字段:filename
Url
<service domain|custom domain>/app/<portal>/api/v3/solutions/{solution_id}/_uploads
属性
filename (FILE)
上传文件的路径必须以’@’开头。
addtoattachment (BOOLEAN)
指示是否将文件作为附件添加到关联实体。
files (FILES)
包含文件的详细信息。
show attribute
content_type (STRING)
文件内容的类型。
$ curl <service domain|custom domain>/app/<portal>/api/v3/solutions/{solution_id}/_uploads
-X POST
-H "Accept: application/vnd.manageengine.sdp.v3+json"
-H "Authorization: Zoho-oauthtoken 1000.7xxx98976ab0xxxxxx19901e7551be57.bxxxx921ed64c04f79622bebcfxxxxxx"
-H "Content-Type: multipart/form-data"
-F "filename=@local_file_path" -F "addtoattachment=true"
// Deluge Sample script
url = "<service domain|custom domain>/app/<portal>/api/v3/solutions/{solution_id}/_uploads";
headers = {"Accept":"application/vnd.manageengine.sdp.v3+json",
"Content-Type": "multipart/form-data",
"Authorization": "Zoho-oauthtoken 1000.7xxx98976ab0xxxxxx19901e7551be57.bxxxx921ed64c04f79622bebcfxxxxxx"};
file_list = List();
param1 = {"paramName":"filename", "content":"local_file_path"};
file_list.add(param1);
response = invokeurl
[
url: url
type: POST
headers: headers
files: file_list
];
info response;
#Powershell version - 5.1
$url = "<service domain|custom domain>/app/<portal>/api/v3/solutions/{solution_id}/_uploads"
$filePath = "local_file_path"
$addtoattachment = "true"
$boundary = [System.Guid]::NewGuid().ToString()
$headers = @{
"Accept" = "application/vnd.manageengine.sdp.v3+json"
"Authorization" = "Zoho-oauthtoken 1000.7xxx98976ab0xxxxxx19901e7551be57.bxxxx921ed64c04f79622bebcfxxxxxx"
"Content-Type" = "multipart/form-data; boundary=`"$boundary`""
}
$content = [System.Text.Encoding]::GetEncoding('iso-8859-1').GetString([System.IO.File]::ReadAllBytes($filePath))
$body = (
"--$boundary",
"Content-Disposition: form-data; name=`"addtoattachment`"`r`n",
"$addtoattachment",
"--$boundary",
"Content-Disposition: form-data; name=`"filename`"; filename=`"$(Split-Path $filePath -Leaf)`"",
"Content-Type: $([System.Web.MimeMapping]::GetMimeMapping($filePath))`r`n",
$content,
"--$boundary--`r`n"
) -join "`r`n"
$response = Invoke-RestMethod -Uri $url -Method post -Headers $headers -Body $body
$response
#Python version - 3.10
from urllib.error import HTTPError
from urllib.request import Request,urlopen
import mimetypes
import ntpath
import uuid
url = "<service domain|custom domain>/app/<portal>/api/v3/solutions/{solution_id}/_uploads"
file_path = "local_file_path"
add_to_attachments = "true"
boundary = uuid.uuid4()
headers = {
"Content-Type": f"multipart/form-data; boundary={boundary}",
"Accept": "application/vnd.manageengine.sdp.v3+json",
"Authorization": "Zoho-oauthtoken 1000.7xxx98976ab0xxxxxx19901e7551be57.bxxxx921ed64c04f79622bebcfxxxxxx",
}
with open(file_path, "rb") as f:
content = f.read()
body = (
bytes(f'--{boundary}\r\nContent-Disposition: form-data; name="addtoattachment"\r\n\r\n{add_to_attachments}\r\n', "utf-8")
+ bytes(f'--{boundary}\r\nContent-Disposition: form-data; name="filename"; filename="{ntpath.basename(file_path)}"\r\nContent-Type: {mimetypes.guess_type(file_path)[0] or "application/octet-stream"}\r\n\r\n', "utf-8")
+ content
+ bytes(f"\r\n--{boundary}--", "utf-8")
)
httprequest = Request(url, data=body, headers=headers)
try:
with urlopen(httprequest) as response:
print(response.read().decode("utf-8"))
except HTTPError as e:
print(e.read().decode())
{
"response_status": [
{
"status_code": 2000,
"status": "success"
}
],
"files": [
{
"content_type": "image/jpeg",
"size": "241480",
"file_id": "2002",
"name": "00f13d1f7cd9ca47c8eb4b6fdb89b0ee.jpg",
"content_url": "/solutions/_uploads/2002"
}
]
}
发布解决方案
此操作帮助您发布解决方案 必填字段:Solution ID
Url
<service domain|custom domain>/app/<portal>/api/v3/solutions/{solution_id}/_publish
$ curl <service domain|custom domain>/app/<portal>/api/v3/solutions/{solution_id}/_publish\
-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='{
"solution": {
"has_user_group": true,
"user_group_mapping": [
{
"id": "2504000000117111"
},
{
"id": "2504000000752081"
}
]
}
}'
// Deluge Sample script
url = "<service domain|custom domain>/app/<portal>/api/v3/solutions/{solution_id}/_publish";
headers = {"Accept":"application/vnd.manageengine.sdp.v3+json",
"Content-Type": "application/x-www-form-urlencoded",
"Authorization": "Zoho-oauthtoken 1000.7xxx98976ab0xxxxxx19901e7551be57.bxxxx921ed64c04f79622bebcfxxxxxx"};
input_data = {
"solution": {
"has_user_group": true,
"user_group_mapping": [
{
"id": "2504000000117111"
},
{
"id": "2504000000752081"
}
]
}
};
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/solutions/{solution_id}/_publish"
$headers = @{ "Accept" = "application/vnd.manageengine.sdp.v3+json"
"Authorization" = "Zoho-oauthtoken 1000.7xxx98976ab0xxxxxx19901e7551be57.bxxxx921ed64c04f79622bebcfxxxxxx"
"Content-Type" = "application/x-www-form-urlencoded"}
$input_data = @'
{
"solution": {
"has_user_group": true,
"user_group_mapping": [
{
"id": "2504000000117111"
},
{
"id": "2504000000752081"
}
]
}
}
'@
$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/solutions/{solution_id}/_publish"
headers ={"Accept": "application/vnd.manageengine.sdp.v3+json",
"Authorization" : "Zoho-oauthtoken 1000.7xxx98976ab0xxxxxx19901e7551be57.bxxxx921ed64c04f79622bebcfxxxxxx",
"Content-Type" : "application/x-www-form-urlencoded"}
input_data = '''{
"solution": {
"has_user_group": true,
"user_group_mapping": [
{
"id": "2504000000117111"
},
{
"id": "2504000000752081"
}
]
}
}'''
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,
"status": "success"
},
"solution": {
"id": "2504000000966021",
"display_id": {
"display_value": "SOL-1",
"value": "1"
},
"title": "Solution Title",
"description": "<div class=\"personalize-wrapper\" style=\"font-family: "PT Sans", Arial, Helvetica, sans-serif, sans-serif; font-size: 13px\"><div>Solution Content<br /></div></div>",
"topic": {
"parent_topic": null,
"name": "General",
"id": "2504000000007971"
},
"approval_status": {
"name": "Approved",
"id": "2504000000006827"
},
"likes": 0,
"dislikes": 0,
"keywords": "keyword1,keyword2",
"is_public": true,
"review_date": {
"display_value": "Oct 28, 2022",
"value": "1666895400000"
},
"expiry_date": {
"display_value": "Nov 25, 2022",
"value": "1669314600000"
},
"attachments": [],
"created_time": {
"display_value": "Oct 22, 2021 02:39PM",
"value": "1634893774413"
},
"last_updated_time": {
"display_value": "Oct 22, 2021 04:18 PM",
"value": "1634899733610"
},
"created_by": {
"email_id": "test_mail@zmail.com",
"is_technician": true,
"sms_mail": "test_sms_mail@smsmail.com",
"mobile": null,
"user_scope": "0",
"phone": null,
"name": "Test User",
"id": "2504000000098174",
"photo_url": "https://contacts.zoho.com/file?exp=10&ID=56631260&t=user&height=60&width=60",
"is_vip_user": false,
"department": null,
"first_name": "Test",
"last_name": "User",
"job_title": null
},
"last_updated_by": {
"email_id": "test_mail@zmail.com",
"is_technician": true,
"sms_mail": "test_sms_mail@smsmail.com",
"mobile": null,
"user_scope": "0",
"phone": null,
"name": "Test User",
"id": "2504000000098174",
"photo_url": "https://contacts.zoho.com/file?exp=10&ID=56631260&t=user&height=60&width=60",
"is_vip_user": false,
"department": null,
"first_name": "Test",
"last_name": "User",
"job_title": null
},
"no_of_hits": 15,
"has_user_group": true,
"user_group_mapping": [
{
"name": "User group 1",
"id": "2504000000117111"
},
{
"name": "user group 2",
"id": "2504000000752081"
}
],
"private_comment_count": 2,
"public_comment_count": 3,
"udf_fields": {
"udf_long1": "1225",
"udf_long2": "1459402730964",
"udf_date1": {
"display_value": "Feb 26, 2016 11:00 AM",
"value": "1456464639051"
},
"udf_char1": "abc@test.com",
"udf_char2": "test char"
},
"problem_workaround": null,
"problem_resolution": {
"display_id": {
"display_value": "PB-1",
"value": "1"
},
"id": "2504000000117001",
"title": "problem title."
}
}
}
获取解决方案中所有版本的列表
此操作帮助您获取解决方案中的所有版本列表 必填字段:Solution Id
Url
<service domain|custom domain>/app/<portal>/api/v3/solutions/{solution_id}/versions
$ curl -G <service domain|custom domain>/app/<portal>/api/v3/solutions/{solution_id}/versions\
-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/solutions/{solution_id}/versions";
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/solutions/{solution_id}/versions"
$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/solutions/{solution_id}/versions"
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"
}
],
"versions": [
{
"active_till": null,
"version_number": "2",
"id": "2504000000967059",
"title": "Solution Title",
"active_from": {
"display_value": "Oct 22, 2021 04:18 PM",
"value": "1634899733610"
}
},
{
"active_till": {
"display_value": "Oct 22, 2021 04:18 PM",
"value": "1634899733610"
},
"version_number": "1",
"id": "2504000000967023",
"title": "Solution Title 1",
"active_from": {
"display_value": "Oct 22, 2021 02:39 PM",
"value": "1634893774413"
}
}
],
"list_info": {
"has_more_rows": false,
"start_index": 1,
"row_count": 2
}
}
恢复解决方案的一个版本
此操作帮助您恢复解决方案的某个版本 必填字段:Solution Id Solution Version Id
Url
<service domain|custom domain>/app/<portal>/api/v3/solutions/{solution_id}/versions/{solution_version_id}/_restore
$ curl <service domain|custom domain>/app/<portal>/api/v3/solutions/{solution_id}/versions/{solution_version_id}/_restore\
-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/solutions/{solution_id}/versions/{solution_version_id}/_restore";
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/solutions/{solution_id}/versions/{solution_version_id}/_restore"
$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/solutions/{solution_id}/versions/{solution_version_id}/_restore"
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,
"status": "success"
},
"solution_version": {
"solution": {
"display_id": {
"display_value": "SOL-1",
"value": "1"
},
"approval_status": {
"id": "2504000000006827"
},
"id": "2504000000966021",
"title": "Solution Title 1"
},
"keywords": null,
"active_till": {
"display_value": "Oct 22, 2021 04:18 PM",
"value": "1634899733610"
},
"description": "<div class=\"personalize-wrapper\" style=\"font-family: "PT Sans", Arial, Helvetica, sans-serif, sans-serif; font-size: 13px\"><div>Solution Content 1<br /></div></div>",
"version_number": "1",
"id": "2504000000967023",
"title": "Solution Title 1",
"active_from": {
"display_value": "Oct 22, 2021 02:39 PM",
"value": "1634893774413"
}
}
}
恢复并批准解决方案的一个版本
此操作帮助您恢复解决方案的某个版本并批准它 必填字段:Solution Id Solution Version Id
Url
<service domain|custom domain>/app/<portal>/api/v3/solutions/{solution_id}/versions/{solution_version_id}/_restore_and_approve
$ curl <service domain|custom domain>/app/<portal>/api/v3/solutions/{solution_id}/versions/{solution_version_id}/_restore_and_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='{
"solution_version": {
"reset_ratings": true
}
}'
// Deluge Sample script
url = "<service domain|custom domain>/app/<portal>/api/v3/solutions/{solution_id}/versions/{solution_version_id}/_restore_and_approve";
headers = {"Accept":"application/vnd.manageengine.sdp.v3+json",
"Content-Type": "application/x-www-form-urlencoded",
"Authorization": "Zoho-oauthtoken 1000.7xxx98976ab0xxxxxx19901e7551be57.bxxxx921ed64c04f79622bebcfxxxxxx"};
input_data = {
"solution_version": {
"reset_ratings": true
}
};
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/solutions/{solution_id}/versions/{solution_version_id}/_restore_and_approve"
$headers = @{ "Accept" = "application/vnd.manageengine.sdp.v3+json"
"Authorization" = "Zoho-oauthtoken 1000.7xxx98976ab0xxxxxx19901e7551be57.bxxxx921ed64c04f79622bebcfxxxxxx"
"Content-Type" = "application/x-www-form-urlencoded"}
$input_data = @'
{
"solution_version": {
"reset_ratings": true
}
}
'@
$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/solutions/{solution_id}/versions/{solution_version_id}/_restore_and_approve"
headers ={"Accept": "application/vnd.manageengine.sdp.v3+json",
"Authorization" : "Zoho-oauthtoken 1000.7xxx98976ab0xxxxxx19901e7551be57.bxxxx921ed64c04f79622bebcfxxxxxx",
"Content-Type" : "application/x-www-form-urlencoded"}
input_data = '''{
"solution_version": {
"reset_ratings": true
}
}'''
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,
"status": "success"
},
"solution_version": {
"solution": {
"display_id": {
"display_value": "SOL-1",
"value": "1"
},
"approval_status": {
"id": "2504000000006827"
},
"id": "2504000000966021",
"title": "Solution Title"
},
"keywords": "keyword1,keyword2",
"active_till": {
"display_value": "Oct 23, 2021 20:00 PM",
"value": "1634999400000"
},
"description": "<div class=\"personalize-wrapper\" style=\"font-family: "PT Sans", Arial, Helvetica, sans-serif, sans-serif; font-size: 13px\"><div>Solution Content<br /></div></div>",
"id": "2504000000967059",
"title": "Solution Title",
"active_from": {
"display_value": "Oct 22, 2021 04:18 PM",
"value": "1634899733610"
}
}
}