Namespace cmdb.category Zum lesen oder editieren einer Kategorie.
cmdb.category.create This method is deprecated and will be removed in a feature release. Use cmdb.category.save instead.
Create a new category entry
Request parameters Response parameters JSON key result contains a JSON object.
Example 1
2
3
4
5
6
7
8
9
10
11
12
13
14
15 {
"version" : "2.0" ,
"method" : "cmdb.category.create" ,
"params" : {
"objID" : 42 ,
"data" : {
"manufacturer" : "Name of manufacturer" ,
"title" : "Name of model"
},
"category" : "C__CATG__MODEL" ,
"apikey" : "xxx" ,
"language" : "en"
},
"id" : 1
}
{
"id" : 1 ,
"jsonrpc" : "2.0" ,
"result" : {
"id" : "123" ,
"message" : "Category entry successfully created. [This method is deprecated and will be removed in a feature release. Use 'cmdb.category.save' instead.]" ,
"success" : true
}
}
cmdb.category.read Read one or more category entries for an object
Request parameters Response parameters JSON key result contains an array of JSON objects. Each object contains all available attributes for the requested category.
Example {
"version" : "2.0" ,
"method" : "cmdb.category.read" ,
"params" : {
"objID" : 1000 ,
"category" : "C__CATG__MODEL" ,
"apikey" : "xxx" ,
"language" : "en"
},
"id" : 1
}
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27 {
"id" : 1 ,
"jsonrpc" : "2.0" ,
"result" : [
{
"id" : "74" ,
"objID" : "1000" ,
"manufacturer" : {
"id" : "19" ,
"title" : "Lenovo" ,
"const" : null ,
"title_lang" : "Lenovo"
},
"title" : {
"id" : "38" ,
"title" : "ThinkPad R61" ,
"const" : null ,
"title_lang" : "ThinkPad R61"
},
"productid" : "" ,
"service_tag" : "WRT231" ,
"serial" : "123000999888" ,
"firmware" : "" ,
"description" : ""
}
]
}
cmdb.category.update This method is deprecated and will be removed in a feature release. Use cmdb.category.save instead.
Request parameters Response parameters JSON key result contains a JSON object.
Example 1
2
3
4
5
6
7
8
9
10
11
12
13
14 {
"version" : "2.0" ,
"method" : "cmdb.category.update" ,
"params" : {
"objID" : 42 ,
"category" : "C__CATG__MODEL" ,
"data" : {
"serial" : "123abc"
},
"apikey" : "xxx" ,
"language" : "en"
},
"id" : 1
}
{
"id" : 1 ,
"jsonrpc" : "2.0" ,
"result" : {
"success" : true ,
"message" : "Category entry successfuly saved. [This method is deprecated and will be removed in a feature release. Use 'cmdb.category.save' instead.]"
}
}
cmdb.category.delete Archive a category entry for an object, mark it as deleted or purge it from database. See also Dokumentationszyklus
Limitations:
This only works with multi-value categories at the moment. You can only archive category entries which have a normal status. You can only mark category entries as deleted which are archived. You can only purge category entries from the database which are marked as deleted. Request parameters Response JSON key result contains a JSON object.
Example 1
2
3
4
5
6
7
8
9
10
11
12 {
"version" : "2.0" ,
"method" : "cmdb.category.delete" ,
"params" : {
"objID" : 42 ,
"category" : "C__CATG__IP" ,
"cateID" : 3 ,
"apikey" : "xxx" ,
"language" : "en"
},
"id" : 1
}
{
"id" : 1 ,
"jsonrpc" : "2.0" ,
"result" : {
"success" : true ,
"message" : "Category entry '3' successfuly deleted"
}
}
cmdb.category.save Create or Update a category entry of an object. It works for multi-value categories and single-value category.
Request parameters Response body JSON key result contains a JSON object.
Example 1
2
3
4
5
6
7
8
9
10
11
12
13
14
15 {
"version" : "2.0" ,
"method" : "cmdb.category.save" ,
"params" : {
"object" : 456 ,
"data" : {
"title" : "Name of the access" ,
"description" : "description of the access"
},
"category" : "C__CATG__ACCESS" ,
"apikey" : "xxx" ,
"language" : "en"
},
"id" : 1
}
{
"id" : 1 ,
"jsonrpc" : "2.0" ,
"result" : {
"success" : true ,
"message" : "Category entry successfuly saved" ,
"entry" : 35
}
}
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16 {
"version" : "2.0" ,
"method" : "cmdb.category.save" ,
"params" : {
"object" : 456 ,
"data" : {
"manufacturer" : "Name of manufacturer" ,
"title" : "Name of model"
},
"category" : "C__CATG__MODEL" ,
"entry" : 24 ,
"apikey" : "xxx" ,
"language" : "en"
},
"id" : 1
}
cmdb.category.quickpurge If Quickpurge is enabled , purge a category entry of an object directly from the database.
Request parameters Response body JSON key result contains a JSON object.
Example 1
2
3
4
5
6
7
8
9
10
11
12 {
"version" : "2.0" ,
"method" : "cmdb.category.quickpurge" ,
"params" : {
"objID" : 42 ,
"category" : "C__CATG__IP" ,
"cateID" : 3 ,
"apikey" : "xxx" ,
"language" : "en"
},
"id" : 1
}
{
"id" : 1 ,
"jsonrpc" : "2.0" ,
"result" : {
"success" : true ,
"message" : "Category entry '3' successfuly purged"
}
}
cmdb.category.purge Purge a category entry of an object.It works for multi-value categories and single-value category.
Request parameters Response body JSON key result contains a JSON object.
Example 1
2
3
4
5
6
7
8
9
10
11
12 {
"version" : "2.0" ,
"method" : "cmdb.category.purge" ,
"params" : {
"object" : 456 ,
"category" : "C__CATG__ACCESS" ,
"entry" : 33 ,
"apikey" : "xxx" ,
"language" : "en"
},
"id" : 1
}
{
"id" : 1 ,
"jsonrpc" : "2.0" ,
"result" : {
"success" : true ,
"message" : "Entry 33 has been successfuly purged from 2 to 5."
}
}
cmdb.category.recycle Limitations:
This only works with multi-value categories. You can recycle category entries which have archived or deleted status. Request parameters Response body JSON key result contains a JSON object.
Example 1
2
3
4
5
6
7
8
9
10
11
12 {
"version" : "2.0" ,
"method" : "cmdb.category.recycle" ,
"params" : {
"object" : 456 ,
"category" : "C__CATG__ACCESS" ,
"entry" : 32 ,
"apikey" : "xxx" ,
"language" : "en"
},
"id" : 1
}
{
"id" : 1 ,
"jsonrpc" : "2.0" ,
"result" : {
"success" : true ,
"message" : "Entry 32 has been successfuly recycled from 3 to 2."
}
}
cmdb.category.archive Limitations
This only works with multi-value categories at the moment. You can only archive category entries which have a normal status. Request parameters Response body JSON key result contains a JSON object.
Example 1
2
3
4
5
6
7
8
9
10
11
12 {
"version" : "2.0" ,
"method" : "cmdb.category.archive" ,
"params" : {
"object" : 456 ,
"category" : "C__CATG__ACCESS" ,
"entry" : 32 ,
"apikey" : "xxx" ,
"language" : "en"
},
"id" : 1
}
{
"id" : 1 ,
"jsonrpc" : "2.0" ,
"result" : {
"success" : true ,
"message" : "Entry 32 has been successfuly archived from 2 to 3."
}
}
6. Dezember 2024 7. Juni 2023