<service domain|custom domain>/app/<portal>/api/v3/topics
Topic
Topics are used to group solutions.
Attributes
Add Topic
This operation allows you to create a new topic
Mandatory Fields :- name
Url
Attributes
id (long)
Unique identifier to identify the topic
name (string)
Name to identify topic
parent_topic (topic)
Indicates the parent topic of the topic
owner (technician)
Indicates the owner of the topic
solution_count (long)read only
Indicates number of solutions are listed under that topic
$ 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
}
}
Edit Topic
This operation allows to edit a solution topic. Mandatory Field(s):Topic id
Url
<service domain|custom domain>/app/<portal>/api/v3/topics/{topic_id}
Attributes
id (long)
Unique identifier to identify the topic
name (string)
Name to identify topic
parent_topic (topic)
Indicates the parent topic of the topic
owner (technician)
Indicates the owner of the topic
solution_count (long)read only
Indicates number of solutions are listed under that topic
$ 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
}
}
Get Topic
This operation helps to get a single Topic Mandatory Field(s):Topic Id
Url
<service domain|custom domain>/app/<portal>/api/v3/topics/{topic_id}
Attributes
id (long)
Unique identifier to identify the topic
name (string)
Name to identify topic
parent_topic (topic)
Indicates the parent topic of the topic
owner (technician)
Indicates the owner of the topic
solution_count (long)read only
Indicates number of solutions are listed under that topic
$ 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
}
}
Get List Topic
This operation helps to get the list of all topics
Url
<service domain|custom domain>/app/<portal>//api/v3/topics
Attributes
id (long)
Unique identifier to identify the topic
name (string)
Name to identify topic
parent_topic (topic)
Indicates the parent topic of the topic
owner (technician)
Indicates the owner of the topic
solution_count (long)read only
Indicates number of solutions are listed under that topic
$ 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
}
]
}
Delete Topic
This operation allows to delete a topic Mandatory Field(s):Topic 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"
}
}