Python API - Create server object with relations?
-
Hi,
I am new to the product and trying to test it out and pull down some of my data via Salt.
Is there a way to combine the two requests below? So I can create the object and give it a version in the same request:
test2 = api.request("cmdb.object.create",{
"type": "C__OBJTYPE__APPLICATION",
"title": software,"apikey": "xxxxx" })test3 = api.request("cmdb.category.create", {
"category": "C__CATG__VERSION",
"objID": test2[id],
"data": {
"title": version
},
"apikey": "xxxxxx"
})#######################
test2 = api.request("cmdb.object.create",{
"type": "C__OBJTYPE__APPLICATION",
"title": software,"apikey": "xxxxx", "categories":{ "version": {.....} "Other stuff": {.....} } })Thank you!!!
-
Hey @Aaron-Ruddick
unfortunately nobody answered yet...
Do you still facing this issue or did you already solve this?Best
Phil
Hello! It looks like you're interested in this conversation, but you don't have an account yet.
Getting fed up of having to scroll through the same posts each visit? When you register for an account, you'll always come back to exactly where you were before, and choose to be notified of new replies (either via email, or push notification). You'll also be able to save bookmarks and upvote posts to show your appreciation to other community members.
With your input, this post could be even better 💗
Register Login