...
Seitenverzeichnis:
Inhalt | ||||||
---|---|---|---|---|---|---|
|
...
shd.objects.create
Beschreibung
Funktion für das massenhafte Anlegen von Objekten.
Beispielaufruf
Codeblock | ||||
---|---|---|---|---|
| ||||
{
"method": "shd.objects.create",
"params": {
"apikey": "1ialbgclm9",
"obj_type_id": "C__OBJTYPE__SERVER",
"objects": [
{
"C__CATG__GLOBAL-id": "?1",
"C__CATG__GLOBAL-title": "DEMO Dingens 12",
"C__CATG__GLOBAL-status": "2",
"C__CATG__GLOBAL-cmdb_status": "4",
"C__CATG__GLOBAL-description": "Ein Beschreibungstext",
"C__CATG__GLOBAL-purpose": "3",
"C__CATG__GLOBAL-category": "7",
"C__CATG__FORMFACTOR-width": "75",
"C__CATG__FORMFACTOR-height": "90",
"C__CATG__FORMFACTOR-depth": "190",
"C__CATG__CPU-cores": "9",
"C__CATG__CPU-frequency": "4"
},
{
"C__CATG__GLOBAL-title": "DEMO Dingens 16",
"C__CATG__GLOBAL-cmdb_status": "7",
"C__CATG__GLOBAL-description": "Ein Beschreibungstext",
"C__CATG__GLOBAL-purpose": "3",
"C__CATG__GLOBAL-category": "7",
"C__CATG__FORMFACTOR-width": "75",
"C__CATG__FORMFACTOR-height": "90",
"C__CATG__FORMFACTOR-depth": "190",
"C__CATG__CPU-cores": "9",
"C__CATG__GLOBAL-status": "2",
"C__CATG__CPU-frequency": "4"
}
],
"debug": true,
"language": "en"
},
"id": 1,
"version": "2.0"
} |
Beispielantwort
Codeblock | ||||
---|---|---|---|---|
| ||||
{
"jsonrpc":"2.0",
"result":{
"?1":"10999"
},
{
"11000":"11000"
},
"id":1
} |
Parameter
Parameter | Typ | Version |
---|---|---|
obj_type_id | int | ab Version 1.0 |
objects | array | ab Version 1.0 |
Rückgabewert
Wert | Typ | Version |
---|---|---|
old_key | string | ab Version 1.0 |
new_key | string | ab Version 1.0 |
...
shd.objects.update
Beschreibung
Funktion für das massenhafte Editieren von Objekten.
Beispielaufruf
Codeblock | ||||
---|---|---|---|---|
| ||||
{
"method": "shd.objects.update",
"id": "1",
"params": {
"apikey": "1ialbgclm9",
"objects": [
{
"C__CATG__GLOBAL-title": "Test-Server 015",
"C__CATG__GLOBAL-cmdb_status": "Geliefert",
"C__CATG__GLOBAL-id": "69"
},
{
"C__CATG__GLOBAL-title": "Test-Server 016",
"C__CATG__GLOBAL-id": "70"
}
],
"language": "de"
},
"jsonrpc": "2.0"
} |
Beispielantwort
Codeblock | ||||
---|---|---|---|---|
| ||||
{
"id": "1",
"jsonrpc": "2.0",
"result": {
"message": "objects.update.success",
"response": true,
"current_date": "2020-02-14"
}
} |
Parameter
Parameter | Typ | Beschreibung | Version |
---|---|---|---|
objects | array | Array von Objekten, welche aktualisiert werden sollen | ab Version 1.0 |
Rückgabewert
Wert | Typ | Beschreibung | Version |
---|---|---|---|
response | bool | Update erfolgreich true/false | ab Version 1.0 |