<service domain|custom domain>/app/<portal>/api/v3/requests/{request_id}/notes
请求备注
当您需要根据观察结果添加包含技术信息的额外信息到特定请求时,可以使用备注。您还可以使用备注来更新请求的状态。
属性
添加请求备注
此操作帮助您添加备注。
必填字段:- 描述
URL
属性
$ curl <service domain|custom domain>/app/<portal>/api/v3/requests/{request_id}/notes\
-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='{
"request_note": {
"mark_first_response": false,
"add_to_linked_requests": false,
"notify_technician": false,
"show_to_requester": false,
"description": "The following is the note for the associated request"
}
}'
// Deluge Sample script
url = "<service domain|custom domain>/app/<portal>/api/v3/requests/{request_id}/notes";
headers = {"Accept":"application/vnd.manageengine.sdp.v3+json",
"Content-Type": "application/x-www-form-urlencoded",
"Authorization": "Zoho-oauthtoken 1000.7xxx98976ab0xxxxxx19901e7551be57.bxxxx921ed64c04f79622bebcfxxxxxx"};
input_data = {
"request_note": {
"mark_first_response": false,
"add_to_linked_requests": false,
"notify_technician": false,
"show_to_requester": false,
"description": "The following is the note for the associated request"
}
};
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/requests/{request_id}/notes"
$headers = @{ "Accept" = "application/vnd.manageengine.sdp.v3+json"
"Authorization" = "Zoho-oauthtoken 1000.7xxx98976ab0xxxxxx19901e7551be57.bxxxx921ed64c04f79622bebcfxxxxxx"
"Content-Type" = "application/x-www-form-urlencoded"}
$input_data = @'
{
"request_note": {
"mark_first_response": false,
"add_to_linked_requests": false,
"notify_technician": false,
"show_to_requester": false,
"description": "The following is the note for the associated request"
}
}
'@
$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/requests/{request_id}/notes"
headers ={"Accept": "application/vnd.manageengine.sdp.v3+json",
"Authorization" : "Zoho-oauthtoken 1000.7xxx98976ab0xxxxxx19901e7551be57.bxxxx921ed64c04f79622bebcfxxxxxx",
"Content-Type" : "application/x-www-form-urlencoded"}
input_data = '''{
"request_note": {
"mark_first_response": false,
"add_to_linked_requests": false,
"notify_technician": false,
"show_to_requester": false,
"description": "The following is the note for the associated request"
}
}'''
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"
},
"request_note": {
"mark_first_response": false,
"created_time": {
"display_value": "Nov 10, 2016 11:44 AM",
"value": "1478758440000"
},
"add_to_linked_requests": false,
"request": {
"display_id": "39",
"subject": "Need an External Monitor",
"id": "2021296185003668"
},
"notify_technician": false,
"show_to_requester": false,
"description": "The following is the note for the associated request",
"id": "1997129173325228",
"created_by": {
"email_id": "lincoln@zmail.com",
"is_technician": false,
"sms_mail": "linc123@xys_sms.co",
"phone": "test-phone",
"name": "Lincoln",
"mobile": "test-mobile",
"id": "1994035670863379",
"photo_url": "test-photo_url",
"is_vip_user": false
}
}
}
编辑请求备注
此操作帮助您更新备注。
URL
<service domain|custom domain>/app/<portal>/api/v3/requests/{request_id}/notes/{request_note_id}
属性
$ curl <service domain|custom domain>/app/<portal>/api/v3/requests/{request_id}/notes/{request_note_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='{
"request_note": {
"mark_first_response": false,
"add_to_linked_requests": false,
"notify_technician": false,
"show_to_requester": false,
"description": "The following is the note for the associated request"
}
}'
// Deluge Sample script
url = "<service domain|custom domain>/app/<portal>/api/v3/requests/{request_id}/notes/{request_note_id}";
headers = {"Accept":"application/vnd.manageengine.sdp.v3+json",
"Content-Type": "application/x-www-form-urlencoded",
"Authorization": "Zoho-oauthtoken 1000.7xxx98976ab0xxxxxx19901e7551be57.bxxxx921ed64c04f79622bebcfxxxxxx"};
input_data = {
"request_note": {
"mark_first_response": false,
"add_to_linked_requests": false,
"notify_technician": false,
"show_to_requester": false,
"description": "The following is the note for the associated request"
}
};
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/requests/{request_id}/notes/{request_note_id}"
$headers = @{"Accept": "application/vnd.manageengine.sdp.v3+json",
"Authorization" : "Zoho-oauthtoken 1000.7xxx98976ab0xxxxxx19901e7551be57.bxxxx921ed64c04f79622bebcfxxxxxx",
"Content-Type" : "application/x-www-form-urlencoded"}
$input_data = @'
{
"request_note": {
"mark_first_response": false,
"add_to_linked_requests": false,
"notify_technician": false,
"show_to_requester": false,
"description": "The following is the note for the associated request"
}
}
'@
$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/requests/{request_id}/notes/{request_note_id}"
headers ={"Accept": "application/vnd.manageengine.sdp.v3+json",
"Authorization" : "Zoho-oauthtoken 1000.7xxx98976ab0xxxxxx19901e7551be57.bxxxx921ed64c04f79622bebcfxxxxxx",
"Content-Type" : "application/x-www-form-urlencoded"}
input_data = '''{
"request_note": {
"mark_first_response": false,
"add_to_linked_requests": false,
"notify_technician": false,
"show_to_requester": false,
"description": "The following is the note for the associated request"
}
}'''
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"
},
"request_note": {
"mark_first_response": false,
"created_time": {
"display_value": "Nov 10, 2016 11:44 AM",
"value": "1478758440000"
},
"add_to_linked_requests": false,
"request": {
"display_id": "39",
"subject": "Need an External Monitor",
"id": "2333009464569502"
},
"notify_technician": false,
"show_to_requester": false,
"description": "The following is the note for the associated request",
"id": "2156096055331149",
"created_by": {
"email_id": "lincoln@zmail.com",
"is_technician": false,
"sms_mail": "linc123@xys_sms.co",
"phone": "test-phone",
"name": "Lincoln",
"mobile": "test-mobile",
"id": "2180189997185287",
"photo_url": "test-photo_url",
"is_vip_user": false
}
}
}
获取请求备注
此操作帮助您获取备注。
URL
<service domain|custom domain>/app/<portal>/api/v3/requests/{request_id}/notes/{request_note_id}
属性
$ curl -G <service domain|custom domain>/app/<portal>/api/v3/requests/{request_id}/notes/{request_note_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/requests/{request_id}/notes/{request_note_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/requests/{request_id}/notes/{request_note_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/requests/{request_id}/notes/{request_note_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"
},
"request_note": {
"mark_first_response": false,
"created_time": {
"display_value": "Nov 10, 2016 11:44 AM",
"value": "1478758440000"
},
"add_to_linked_requests": false,
"request": {
"display_id": "39",
"subject": "Need an External Monitor",
"id": "2284230482380411"
},
"notify_technician": false,
"show_to_requester": false,
"description": "The following is the note for the associated request",
"id": "2399537119347635",
"created_by": {
"email_id": "lincoln@zmail.com",
"is_technician": false,
"sms_mail": "linc123@xys_sms.co",
"phone": "test-phone",
"name": "Lincoln",
"mobile": "test-mobile",
"id": "1784474898266484",
"photo_url": "test-photo_url",
"is_vip_user": false
}
}
}
获取请求备注列表
此操作帮助您获取所有备注。
URL
<service domain|custom domain>/app/<portal>/api/v3/requests/{request_id}/notes
属性
$ curl -G <service domain|custom domain>/app/<portal>/api/v3/requests/{request_id}/notes\
-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='{"list_info":{"row_count":"100","start_index":"1","sort_field":"created_time","sort_order":"desc"}}'
// Deluge Sample script
url = "<service domain|custom domain>/app/<portal>/api/v3/requests/{request_id}/notes";
headers = {"Accept":"application/vnd.manageengine.sdp.v3+json",
"Content-Type": "application/x-www-form-urlencoded",
"Authorization": "Zoho-oauthtoken 1000.7xxx98976ab0xxxxxx19901e7551be57.bxxxx921ed64c04f79622bebcfxxxxxx"};
input_data = {"list_info":{"row_count":"100","start_index":"1","sort_field":"created_time","sort_order":"desc"}};
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/requests/{request_id}/notes"
$headers = @{ "Accept" = "application/vnd.manageengine.sdp.v3+json"
"Authorization" = "Zoho-oauthtoken 1000.7xxx98976ab0xxxxxx19901e7551be57.bxxxx921ed64c04f79622bebcfxxxxxx"
"Content-Type" = "application/x-www-form-urlencoded"}
$input_data = @'{"list_info":{"row_count":"100","start_index":"1","sort_field":"created_time","sort_order":"desc"}}'@
$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/requests/{request_id}/notes"
headers ={"Accept": "application/vnd.manageengine.sdp.v3+json",
"Authorization" : "Zoho-oauthtoken 1000.7xxx98976ab0xxxxxx19901e7551be57.bxxxx921ed64c04f79622bebcfxxxxxx",
"Content-Type" : "application/x-www-form-urlencoded"}
input_data = '''{"list_info":{"row_count":"100","start_index":"1","sort_field":"created_time","sort_order":"desc"}}'''
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())
{
"notes": [
{
"mark_first_response": false,
"created_time": {
"display_value": "Nov 10, 2016 11:44 AM",
"value": "1478758440000"
},
"add_to_linked_requests": false,
"request": {
"display_id": "39",
"subject": "Need an External Monitor",
"id": "1980403496417894"
},
"notify_technician": false,
"show_to_requester": false,
"description": "The following is the note for the associated request",
"id": "1526876193354857",
"created_by": {
"email_id": "lincoln@zmail.com",
"is_technician": false,
"sms_mail": "linc123@xys_sms.co",
"phone": "test-phone",
"name": "Lincoln",
"mobile": "test-mobile",
"id": "2109015861343785",
"photo_url": "test-photo_url",
"is_vip_user": false
}
}
],
"response_status": [
{
"status_code": 2000,
"status": "success"
}
],
"list_info": {
"has_more_rows": false,
"row_count": 1
}
}
删除请求备注
此操作帮助您删除备注。
URL
<service domain|custom domain>/app/<portal>/api/v3/requests/{request_id}/notes/{request_note_id}
$ curl <service domain|custom domain>/app/<portal>/api/v3/requests/{request_id}/notes/{request_note_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/requests/{request_id}/notes/{request_note_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/requests/{request_id}/notes/{request_note_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/requests/{request_id}/notes/{request_note_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"
}
}