API Notizen
This commit is contained in:
9
Api_Notizen.md
Normal file
9
Api_Notizen.md
Normal file
@@ -0,0 +1,9 @@
|
|||||||
|
# Anlegen eines Servers
|
||||||
|
|
||||||
|
curl -H 'Content-Type: application/json' -H 'X-RPC-Auth-Username: <User>' -H 'X-RPC-Auth-Password: <Userpasswd>' --data '{"jsonrpc":"2.0","method":"cmdb.object.create","params":{"type":"C__OBJTYPE__SERVER","title":"SRServer","apikey":"<api_key>"},"id":1}' --header "Content-Type: application/json" https://cmdb.cp.telekom.net/src/jsonrpc.php
|
||||||
|
|
||||||
|
# Abrufen von Software (ist noch ein leeres Ergenis, da wohl noch Angaben fehlen)
|
||||||
|
url -H 'Content-Type: application/json' -H 'X-RPC-Auth-Username: <User>' -H 'X-RPC-Auth-Password: <Userpasswd>' --data '{"jsonrpc":"2.0","method":"cmdb.object.read","params":{"type":"C__CATG__APPLICATION","apikey":"<api_key>"},"id":1}' --header "Content-Type: application/json" https://cmdb.cp.telekom.net/src/jsonrpc.php
|
||||||
|
|
||||||
|
- Es wäre ratsam einen schreibenden User noch anzulegen, damit nicht mit dem admin gearbeitet werden muss
|
||||||
|
- API per Python "https://github.com/scaleup-technologies/i-doit-python"
|
||||||
Reference in New Issue
Block a user