跳转到内容

问题备注

此 API 帮助您根据观察为特定问题添加包括技术信息在内的附加信息。

属性

id (长整型)
表示备注的唯一 ID

id (长整型)
数字,通常表示较大的数值。

示例

234759602834500

描述 (html)
包含备注的描述信息

描述 (html)
HTML 是一个文本区域,可以使用 html 元素。

示例

<b>The content to be displayed</b>

notify_to (notify_to)
包含要在备注添加/编辑操作时通知的用户或角色信息

notify_to (notify_to)
包含要在备注添加/编辑操作时通知的用户或角色信息

示例

{
  "notify_to": {
    "xpaths": [
      {
        "xpath": "problem.technician"
      }
    ],
    "users": [
      {
        "name": "John",
        "id": "100000000000036077"
      }
    ]
  }
}

附件 (attachment)
无描述

附件 (attachment)

performed_by (user)read only
表示创建备注的用户

performed_by (user)

performed_time (datetime)read only
表示备注的创建时间

performed_time (datetime)
作为 JSON 对象表示日期/时间。包含 value 和 display_value 属性。

value :时间的长整型格式(从 1970 年 1 月 1 日起的毫秒数)。

display_value :可读时间格式,按用户个性化设置显示。如未个性化,则使用默认格式。

添加问题备注

此操作帮助您为问题添加备注。

必填字段:- [“description”]

Url

<service domain|custom domain>/app/<portal>/api/v3/problems/{problem_id}/notes

属性

id (长整型)
表示备注的唯一 ID

id (长整型)
数字,通常表示较大的数值。

示例

234759602834500

描述 (html)
包含备注的描述信息

描述 (html)
HTML 是一个文本区域,可以使用 html 元素。

示例

<b>The content to be displayed</b>

notify_to (notify_to)
包含要在备注添加/编辑操作时通知的用户或角色信息

notify_to (notify_to)
包含要在备注添加/编辑操作时通知的用户或角色信息

示例

{
  "notify_to": {
    "xpaths": [
      {
        "xpath": "problem.technician"
      }
    ],
    "users": [
      {
        "name": "John",
        "id": "100000000000036077"
      }
    ]
  }
}

附件 (attachment)
无描述

附件 (attachment)

performed_by (user)read only
表示创建备注的用户

performed_by (user)

performed_time (datetime)read only
表示备注的创建时间

performed_time (datetime)
作为 JSON 对象表示日期/时间。包含 value 和 display_value 属性。

value :时间的长整型格式(从 1970 年 1 月 1 日起的毫秒数)。

display_value :可读时间格式,按用户个性化设置显示。如未个性化,则使用默认格式。

$ curl <service domain|custom domain>/app/<portal>/api/v3/problems/{problem_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='{
    "note": {
        "description": "<div>Test Add Notes</div>",
        "notify_to": {
            "users": [
                {
                    "id": "100000000000036077",
                    "name": "John"
                }
            ],
            "xpaths": [
                {
                    "xpath": "problem.technician"
                }
            ]
        }
    }
}'
// Deluge Sample script
url = "<service domain|custom domain>/app/<portal>/api/v3/problems/{problem_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 = {
    "note": {
        "description": "<div>Test Add Notes</div>",
        "notify_to": {
            "users": [
                {
                    "id": "100000000000036077",
                    "name": "John"
                }
            ],
            "xpaths": [
                {
                    "xpath": "problem.technician"
                }
            ]
        }
    }
};
params = {"input_data": input_data};
response = invokeurl
[
    url: url
    type: POST
    parameters: params
    headers: headers
];
info response;
#Powershell version - 5.1
$url = "<service domain|custom domain>/app/<portal>/api/v3/problems/{problem_id}/notes"
$headers = @{ "Accept" = "application/vnd.manageengine.sdp.v3+json"
    "Authorization" = "Zoho-oauthtoken 1000.7xxx98976ab0xxxxxx19901e7551be57.bxxxx921ed64c04f79622bebcfxxxxxx"
    "Content-Type" = "application/x-www-form-urlencoded"}
$input_data = @'
{
    "note": {
        "description": "<div>Test Add Notes</div>",
        "notify_to": {
            "users": [
                {
                    "id": "100000000000036077",
                    "name": "John"
                }
            ],
            "xpaths": [
                {
                    "xpath": "problem.technician"
                }
            ]
        }
    }
}
'@
$data = @{ 'input_data' = $input_data}
$response = Invoke-RestMethod -Uri $url -Method post -Body $data -Headers $headers
$response
#Python version - 3.10
from urllib.error import HTTPError
from urllib.parse import urlencode
from urllib.request import urlopen,Request

url = "<service domain|custom domain>/app/<portal>/api/v3/problems/{problem_id}/notes"
headers ={"Accept": "application/vnd.manageengine.sdp.v3+json", 
          "Authorization" : "Zoho-oauthtoken 1000.7xxx98976ab0xxxxxx19901e7551be57.bxxxx921ed64c04f79622bebcfxxxxxx", 
          "Content-Type" : "application/x-www-form-urlencoded"}
input_data = '''{
    "note": {
        "description": "<div>Test Add Notes</div>",
        "notify_to": {
            "users": [
                {
                    "id": "100000000000036077",
                    "name": "John"
                }
            ],
            "xpaths": [
                {
                    "xpath": "problem.technician"
                }
            ]
        }
    }
}'''
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())
{
    "note": {
        "performed_by": {
            "email_id": "john.je@zylker.com",
            "is_technician": true,
            "sms_mail": null,
            "mobile": null,
            "last_name": "J",
            "user_scope": "internal_user",
            "sms_mail_id": null,
            "site": {
                "deleted": false,
                "name": "Base Site",
                "id": "100000000000006098",
                "is_default": true
            },
            "phone": null,
            "employee_id": null,
            "name": "John",
            "id": "100000000000036077",
            "photo_url": "https://contacts.localzoho.com/file?sample",
            "is_vip_user": false,
            "department": null,
            "first_name": "John",
            "job_title": null
        },
        "description": "<div>Test Add Note<\/div>",
        "id": "100000000000038247",
        "performed_time": {
            "display_value": "Feb 2, 2023 12:53 PM",
            "value": "1675322599582"
        }
    },
    "response_status": {
        "status_code": 2000,
        "status": "success"
    }
}

编辑问题备注

此操作帮助您编辑或更新问题的备注。

Url

<service domain|custom domain>/app/<portal>/api/v3/problems/{problem_id}/notes/{note_id}

属性

id (长整型)
表示备注的唯一 ID

id (长整型)
数字,通常表示较大的数值。

示例

234759602834500

描述 (html)
包含备注的描述信息

描述 (html)
HTML 是一个文本区域,可以使用 html 元素。

示例

<b>The content to be displayed</b>

notify_to (notify_to)
包含要在备注添加/编辑操作时通知的用户或角色信息

notify_to (notify_to)
包含要在备注添加/编辑操作时通知的用户或角色信息

示例

{
  "notify_to": {
    "xpaths": [
      {
        "xpath": "problem.technician"
      }
    ],
    "users": [
      {
        "name": "John",
        "id": "100000000000036077"
      }
    ]
  }
}

附件 (attachment)
无描述

附件 (attachment)

performed_by (user)read only
表示创建备注的用户

performed_by (user)

performed_time (datetime)read only
表示备注的创建时间

performed_time (datetime)
作为 JSON 对象表示日期/时间。包含 value 和 display_value 属性。

value :时间的长整型格式(从 1970 年 1 月 1 日起的毫秒数)。

display_value :可读时间格式,按用户个性化设置显示。如未个性化,则使用默认格式。

$ curl <service domain|custom domain>/app/<portal>/api/v3/problems/{problem_id}/notes/{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='{
    "note": {
        "description": "<div>Test Edit Note</div>",
        "notify_to": {
            "users": [],
            "xpaths": []
        }
    }
}'
// Deluge Sample script
url = "<service domain|custom domain>/app/<portal>/api/v3/problems/{problem_id}/notes/{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 = {
    "note": {
        "description": "<div>Test Edit Note</div>",
        "notify_to": {
            "users": [],
            "xpaths": []
        }
    }
};
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/problems/{problem_id}/notes/{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 = @'
{
    "note": {
        "description": "<div>Test Edit Note</div>",
        "notify_to": {
            "users": [],
            "xpaths": []
        }
    }
}
'@
$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/problems/{problem_id}/notes/{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 = '''{
    "note": {
        "description": "<div>Test Edit Note</div>",
        "notify_to": {
            "users": [],
            "xpaths": []
        }
    }
}'''
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())
{
    "note": {
        "performed_by": {
            "email_id": "john@zylker.com",
            "is_technician": true,
            "sms_mail": null,
            "mobile": null,
            "last_name": null,
            "user_scope": "internal_user",
            "sms_mail_id": null,
            "site": {
                "deleted": false,
                "name": "Base Site",
                "id": "4149000001242001",
                "is_default": true
            },
            "phone": null,
            "employee_id": null,
            "name": "John",
            "id": "4149000000871029",
            "photo_url": "https://contacts.zoho.com/file?sample",
            "is_vip_user": false,
            "department": null,
            "first_name": "John",
            "job_title": null
        },
        "description": "<div>Test Edit Note<\/div>",
        "id": "4149000001305003",
        "performed_time": {
            "display_value": "Feb 2, 2023 12:47 PM",
            "value": "1675322245246"
        }
    },
    "response_status": {
        "status_code": 2000,
        "status": "success"
    }
}

获取问题备注

此操作帮助您获取问题的备注。

Url

<service domain|custom domain>/app/<portal>/api/v3/problems/{problem_id}/notes/{note_id}

属性

id (长整型)
表示备注的唯一 ID

id (长整型)
数字,通常表示较大的数值。

示例

234759602834500

描述 (html)
包含备注的描述信息

描述 (html)
HTML 是一个文本区域,可以使用 html 元素。

示例

<b>The content to be displayed</b>

notify_to (notify_to)
包含要在备注添加/编辑操作时通知的用户或角色信息

notify_to (notify_to)
包含要在备注添加/编辑操作时通知的用户或角色信息

示例

{
  "notify_to": {
    "xpaths": [
      {
        "xpath": "problem.technician"
      }
    ],
    "users": [
      {
        "name": "John",
        "id": "100000000000036077"
      }
    ]
  }
}

附件 (attachment)
无描述

附件 (attachment)

performed_by (user)read only
表示创建备注的用户

performed_by (user)

performed_time (datetime)read only
表示备注的创建时间

performed_time (datetime)
作为 JSON 对象表示日期/时间。包含 value 和 display_value 属性。

value :时间的长整型格式(从 1970 年 1 月 1 日起的毫秒数)。

display_value :可读时间格式,按用户个性化设置显示。如未个性化,则使用默认格式。

$ curl -G <service domain|custom domain>/app/<portal>/api/v3/problems/{problem_id}/notes/{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/problems/{problem_id}/notes/{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/problems/{problem_id}/notes/{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/problems/{problem_id}/notes/{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())
{
    "note": {
        "performed_by": {
            "email_id": "john@zylker.com",
            "is_technician": true,
            "sms_mail": null,
            "mobile": null,
            "last_name": null,
            "user_scope": "internal_user",
            "sms_mail_id": null,
            "site": {
                "deleted": false,
                "name": "Base Site",
                "id": "4149000001242001",
                "is_default": true
            },
            "phone": null,
            "employee_id": null,
            "name": "John",
            "id": "4149000000871029",
            "photo_url": "https://contacts.localzoho.com/file?sample",
            "is_vip_user": false,
            "department": null,
            "first_name": "John",
            "job_title": null
        },
        "description": "<div>Test Add Note<\/div>",
        "id": "4149000001305031",
        "performed_time": {
            "display_value": "Feb 2, 2023 01:20 PM",
            "value": "1675324206499"
        }
    },
    "response_status": {
        "status_code": 2000,
        "status": "success"
    }
}

获取问题备注列表

此操作帮助您获取问题的所有备注。

Url

<service domain|custom domain>/app/<portal>/api/v3/problems/{problem_id}/notes/

属性

id (长整型)
表示备注的唯一 ID

id (长整型)
数字,通常表示较大的数值。

示例

234759602834500

描述 (html)
包含备注的描述信息

描述 (html)
HTML 是一个文本区域,可以使用 html 元素。

示例

<b>The content to be displayed</b>

notify_to (notify_to)
包含要在备注添加/编辑操作时通知的用户或角色信息

notify_to (notify_to)
包含要在备注添加/编辑操作时通知的用户或角色信息

示例

{
  "notify_to": {
    "xpaths": [
      {
        "xpath": "problem.technician"
      }
    ],
    "users": [
      {
        "name": "John",
        "id": "100000000000036077"
      }
    ]
  }
}

附件 (attachment)
无描述

附件 (attachment)

performed_by (user)read only
表示创建备注的用户

performed_by (user)

performed_time (datetime)read only
表示备注的创建时间

performed_time (datetime)
作为 JSON 对象表示日期/时间。包含 value 和 display_value 属性。

value :时间的长整型格式(从 1970 年 1 月 1 日起的毫秒数)。

display_value :可读时间格式,按用户个性化设置显示。如未个性化,则使用默认格式。

$ curl -G <service domain|custom domain>/app/<portal>/api/v3/problems/{problem_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='{}'
// Deluge Sample script
url = "<service domain|custom domain>/app/<portal>/api/v3/problems/{problem_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 = {};
params = {"input_data":input_data};           
response = invokeurl
[
    url: url
    type: GET
    parameters:params
    headers: headers
];
info response;
#Powershell version - 5.1
$url = "<service domain|custom domain>/app/<portal>/api/v3/problems/{problem_id}/notes/"
$headers = @{ "Accept" = "application/vnd.manageengine.sdp.v3+json"
    "Authorization" = "Zoho-oauthtoken 1000.7xxx98976ab0xxxxxx19901e7551be57.bxxxx921ed64c04f79622bebcfxxxxxx"
    "Content-Type" = "application/x-www-form-urlencoded"}
$input_data = @'{}'@
$data = @{ 'input_data' = $input_data}    
$response = Invoke-RestMethod -Uri $url -Method get -Body $data -Headers $headers 
$response
#Python version - 3.8
#This script requires requests module installed in python.
from urllib.error import HTTPError
from urllib.parse import urlencode
from urllib.request import urlopen,Request

url = "<service domain|custom domain>/app/<portal>/api/v3/problems/{problem_id}/notes/"
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())
{
    "notes": [
      {
        "performed_by": {
          "email_id": "john@zylker.com",
          "is_technician": true,
          "sms_mail": null,
          "mobile": null,
          "last_name": null,
          "user_scope": "internal_user",
          "sms_mail_id": null,
          "site": {
            "deleted": false,
            "name": "Base Site",
            "id": "4149000001242001",
            "is_default": true
          },
          "phone": null,
          "employee_id": null,
          "name": "John",
          "id": "4149000000871029",
          "photo_url": "https://contacts.localzoho.com/file?sample",
          "is_vip_user": false,
          "department": null,
          "first_name": "John",
          "job_title": null
        },
        "description": "Test Add Note",
        "id": "4149000001300019",
        "performed_time": {
          "display_value": "Jan 31, 2023 12:48 PM",
          "value": "1675149512922"
        }
      }
    ],
    "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/problems/{problem_id}/notes/{note_id}

$ curl <service domain|custom domain>/app/<portal>/api/v3/problems/{problem_id}/notes/{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/problems/{problem_id}/notes/{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/problems/{problem_id}/notes/{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/problems/{problem_id}/notes/{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"
  }
}