Updated UpdateUser to UpdateItemUser and added a parameter to set itemType
Some checks failed
Build python package / Build (push) Has been cancelled
Some checks failed
Build python package / Build (push) Has been cancelled
This commit is contained in:
@@ -207,15 +207,15 @@ class GLPIAPI:
|
||||
uri = f"{self.Server}/apirest.php/Computer/"
|
||||
return requests.put(uri, headers=self.Headers, json=body)
|
||||
|
||||
def UpdateUser(self, deviceid, username):
|
||||
def UpdateItemUser(self, itemID, itemType, username):
|
||||
|
||||
body = {
|
||||
"input" : {
|
||||
"id" : deviceid,
|
||||
"id" : itemID,
|
||||
"users_id" : username
|
||||
}
|
||||
}
|
||||
uri = f"{self.Server}/apirest.php/Computer/"
|
||||
uri = f"{self.Server}/apirest.php/itemType/"
|
||||
return requests.put(uri, headers=self.Headers, json=body)
|
||||
|
||||
def SetCustomField(self, itemType, containerName, containerID, itemId, fieldName, data):
|
||||
|
||||
Reference in New Issue
Block a user