跳转到内容

主题

主题用于对解决方案进行分组。

属性

id (长整型)
唯一标识主题的标识符

id (长整型)
被认为具有较大值的数字位。

示例

234759602834500

名称 (字符串)
标识主题的名称 

名称 (字符串)
纯文本格式。不允许使用富文本或换行符。

示例

Sample Content

parent_topic (主题)
表示该主题的父主题 

parent_topic (主题)
表示此主题的父主题

示例

{
  "topic": {
    "name": "test-parent-topic-name",
    "id": "100000000000033785"
  }
}

所有者 (技术员)
表示主题的所有者 

所有者 (技术员)
表示主题的所有者

示例

{
  "owner": {
    "email_id": "test_technician@zmail.com",
    "name": "test_technician",
    "id": "100000000000033455"
  }
}

solution_count (长整型)read only
表示该主题下列出的解决方案数量 

solution_count (长整型)
被认为具有较大值的数字位。

示例

234759602834500

添加主题

此操作允许您创建新主题

必填字段:名称

Url

<service domain|custom domain>/app/<portal>/api/v3/topics

属性

id (长整型)
唯一标识主题的标识符

id (长整型)
被认为具有较大值的数字位。

示例

234759602834500

名称 (字符串)
标识主题的名称 

名称 (字符串)
纯文本格式。不允许使用富文本或换行符。

示例

Sample Content

parent_topic (主题)
表示该主题的父主题 

parent_topic (主题)
表示此主题的父主题

示例

{
  "topic": {
    "name": "test-parent-topic-name",
    "id": "100000000000033785"
  }
}

所有者 (技术员)
表示主题的所有者 

所有者 (技术员)
表示主题的所有者

示例

{
  "owner": {
    "email_id": "test_technician@zmail.com",
    "name": "test_technician",
    "id": "100000000000033455"
  }
}

solution_count (长整型)read only
表示该主题下列出的解决方案数量 

solution_count (长整型)
被认为具有较大值的数字位。

示例

234759602834500

$ curl <service domain|custom domain>/app/<portal>/api/v3/topics\
      -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='{
    "topic": {
        "name": "test-topic-name",
        "parent_topic": {
            "id": "100000000000007150"
        }
    }
}'
// Deluge Sample script
url = "<service domain|custom domain>/app/<portal>/api/v3/topics";
headers = {"Accept":"application/vnd.manageengine.sdp.v3+json",
           "Content-Type": "application/x-www-form-urlencoded",
           "Authorization": "Zoho-oauthtoken 1000.7xxx98976ab0xxxxxx19901e7551be57.bxxxx921ed64c04f79622bebcfxxxxxx"};
input_data = {
    "topic": {
        "name": "test-topic-name",
        "parent_topic": {
            "id": "100000000000007150"
        }
    }
};
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/topics"
$headers = @{ "Accept" = "application/vnd.manageengine.sdp.v3+json"
    "Authorization" = "Zoho-oauthtoken 1000.7xxx98976ab0xxxxxx19901e7551be57.bxxxx921ed64c04f79622bebcfxxxxxx"
    "Content-Type" = "application/x-www-form-urlencoded"}
$input_data = @'
{
    "topic": {
        "name": "test-topic-name",
        "parent_topic": {
            "id": "100000000000007150"
        }
    }
}
'@
$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/topics"
headers ={"Accept": "application/vnd.manageengine.sdp.v3+json", 
          "Authorization" : "Zoho-oauthtoken 1000.7xxx98976ab0xxxxxx19901e7551be57.bxxxx921ed64c04f79622bebcfxxxxxx", 
          "Content-Type" : "application/x-www-form-urlencoded"}
input_data = '''{
    "topic": {
        "name": "test-topic-name",
        "parent_topic": {
            "id": "100000000000007150"
        }
    }
}'''
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"
    },
    "topic":{
        "id":"100000000000043005",
        "name":"test-topic-name",
        "parent_topic":{
            "id": "100000000000007150",
            "name":"General",
            "parent_topic":null
        },
  "owner":null,
        "solution_count":0
    }
}

编辑主题

此操作允许编辑解决方案主题。必填字段:主题 id

Url

<service domain|custom domain>/app/<portal>/api/v3/topics/{topic_id}

属性

id (长整型)
唯一标识主题的标识符

id (长整型)
被认为具有较大值的数字位。

示例

234759602834500

名称 (字符串)
标识主题的名称 

名称 (字符串)
纯文本格式。不允许使用富文本或换行符。

示例

Sample Content

parent_topic (主题)
表示该主题的父主题 

parent_topic (主题)
表示此主题的父主题

示例

{
  "topic": {
    "name": "test-parent-topic-name",
    "id": "100000000000033785"
  }
}

所有者 (技术员)
表示主题的所有者 

所有者 (技术员)
表示主题的所有者

示例

{
  "owner": {
    "email_id": "test_technician@zmail.com",
    "name": "test_technician",
    "id": "100000000000033455"
  }
}

solution_count (长整型)read only
表示该主题下列出的解决方案数量 

solution_count (长整型)
被认为具有较大值的数字位。

示例

234759602834500

$ curl <service domain|custom domain>/app/<portal>/api/v3/topics/{topic_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='{
 "topic": {
  "name": "test-topic-name-edited",
  "parent_topic": {
            "id": "100000000000007129"
        },
        "owner": {
            "id": "100000000000033455"
        }
 }
}'
// Deluge Sample script
url = "<service domain|custom domain>/app/<portal>/api/v3/topics/{topic_id}";
headers = {"Accept":"application/vnd.manageengine.sdp.v3+json",
           "Content-Type": "application/x-www-form-urlencoded",
           "Authorization": "Zoho-oauthtoken 1000.7xxx98976ab0xxxxxx19901e7551be57.bxxxx921ed64c04f79622bebcfxxxxxx"};
input_data = {
 "topic": {
  "name": "test-topic-name-edited",
  "parent_topic": {
            "id": "100000000000007129"
        },
        "owner": {
            "id": "100000000000033455"
        }
 }
};
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/topics/{topic_id}"
$headers = @{"Accept": "application/vnd.manageengine.sdp.v3+json", 
          "Authorization" : "Zoho-oauthtoken 1000.7xxx98976ab0xxxxxx19901e7551be57.bxxxx921ed64c04f79622bebcfxxxxxx", 
          "Content-Type" : "application/x-www-form-urlencoded"}
$input_data = @'
{
 "topic": {
  "name": "test-topic-name-edited",
  "parent_topic": {
            "id": "100000000000007129"
        },
        "owner": {
            "id": "100000000000033455"
        }
 }
}
'@
$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/topics/{topic_id}"
headers ={"Accept": "application/vnd.manageengine.sdp.v3+json", 
          "Authorization" : "Zoho-oauthtoken 1000.7xxx98976ab0xxxxxx19901e7551be57.bxxxx921ed64c04f79622bebcfxxxxxx", 
          "Content-Type" : "application/x-www-form-urlencoded"}
input_data = '''{
 "topic": {
  "name": "test-topic-name-edited",
  "parent_topic": {
            "id": "100000000000007129"
        },
        "owner": {
            "id": "100000000000033455"
        }
 }
}'''
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"
    },
    "topic":{
        "id":"100000000000043005",
        "name":"test-topic-name-edited",
        "parent_topic":{
            "id": "100000000000007129",
            "name":"Hardware",
            "parent_topic":null
        },
        "owner": {      
        "email_id": "test_technician@zmail.com",
        "name": "test_technician",
        "id": "100000000000033455"
        },
        "solution_count":0
    }
}

获取主题

此操作用于获取单个主题。必填字段:主题 id

Url

<service domain|custom domain>/app/<portal>/api/v3/topics/{topic_id}

属性

id (长整型)
唯一标识主题的标识符

id (长整型)
被认为具有较大值的数字位。

示例

234759602834500

名称 (字符串)
标识主题的名称 

名称 (字符串)
纯文本格式。不允许使用富文本或换行符。

示例

Sample Content

parent_topic (主题)
表示该主题的父主题 

parent_topic (主题)
表示此主题的父主题

示例

{
  "topic": {
    "name": "test-parent-topic-name",
    "id": "100000000000033785"
  }
}

所有者 (技术员)
表示主题的所有者 

所有者 (技术员)
表示主题的所有者

示例

{
  "owner": {
    "email_id": "test_technician@zmail.com",
    "name": "test_technician",
    "id": "100000000000033455"
  }
}

solution_count (长整型)read only
表示该主题下列出的解决方案数量 

solution_count (长整型)
被认为具有较大值的数字位。

示例

234759602834500

$ curl -G <service domain|custom domain>/app/<portal>/api/v3/topics/{topic_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/topics/{topic_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/topics/{topic_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/topics/{topic_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"
    },
    "topic":{
        "id":"100000000000043005",
        "name":"test-topic-name-edited",
        "parent_topic":{
            "id": "100000000000007129",
            "name":"Hardware",
            "parent_topic":null
        },
        "owner": {      
        "email_id": "test_technician@zmail.com",
        "name": "test_technician",
        "id": "100000000000033455"
        },
        "solution_count":0
    }
}

获取主题列表

此操作用于获取所有主题的列表

Url

<service domain|custom domain>/app/<portal>/api/v3/topics

属性

id (长整型)
唯一标识主题的标识符

id (长整型)
被认为具有较大值的数字位。

示例

234759602834500

名称 (字符串)
标识主题的名称 

名称 (字符串)
纯文本格式。不允许使用富文本或换行符。

示例

Sample Content

parent_topic (主题)
表示该主题的父主题 

parent_topic (主题)
表示此主题的父主题

示例

{
  "topic": {
    "name": "test-parent-topic-name",
    "id": "100000000000033785"
  }
}

所有者 (技术员)
表示主题的所有者 

所有者 (技术员)
表示主题的所有者

示例

{
  "owner": {
    "email_id": "test_technician@zmail.com",
    "name": "test_technician",
    "id": "100000000000033455"
  }
}

solution_count (长整型)read only
表示该主题下列出的解决方案数量 

solution_count (长整型)
被认为具有较大值的数字位。

示例

234759602834500

$ curl -G <service domain|custom domain>/app/<portal>/api/v3/topics\
      -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/topics";
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/topics"
$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/topics"
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,
        "sort_field":"name",
        "row_count":10
    },
    "topics":[
        {
            "owner":null,
            "parent_topic":{"id":"100000000000005411"},
            "name":"Customizations",
            "id":"100000000000005415",
            "solution_count":0
        },{
            "owner":null,
            "parent_topic":{"id":"100000000000007129"},
            "name":"Desktop Hardware",
            "id":"100000000000007132",
            "solution_count":0
        },{
            "owner":null,
            "parent_topic":null,
            "name":"General",
            "id":"100000000000007150",
            "solution_count":0
        },{
            "owner":null,
            "parent_topic":null,
            "name":"Hardware",
            "id":"100000000000007129",
            "solution_count":0
        },{
            "owner":null,
            "parent_topic":{"id":"100000000000007144"},
            "name":"Internet",
            "id":"100000000000007147",
            "solution_count":0
        },{
            "owner":null,
            "parent_topic":null,
            "name":"Network",
            "id":"100000000000007144",
            "solution_count":0
        },{
            "owner":null,
            "parent_topic":{"id":"100000000000007129"},
            "name":"Printers",
            "id":"100000000000007135",
            "solution_count":0
        },{
            "owner":null,
            "parent_topic":{"id":"100000000000007129"},
            "name":"Routers","id":"100000000000007138",
            "solution_count":0
        },{
            "owner":null,
            "parent_topic":{"id":"100000000000005409"},
            "name":"ServiceDesk Plus",
            "id":"100000000000005411",
            "solution_count":0
        },{
            "owner":null,
            "parent_topic":{"id":"100000000000005411"},
            "name":"Settings",
            "id":"100000000000005413",
            "solution_count":0
        }
    ]
}

删除主题

此操作允许删除主题。必填字段:主题 id

Url

<service domain|custom domain>/app/<portal>/api/v3/topics/{topic_id}

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