Skip to content

Commit b08ca64

Browse files
author
Naor Livne
committed
moved the device_group to use the PUT endpoint to allow partial updates
1 parent 5fad3bb commit b08ca64

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

NebulaPythonSDK/sdk.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -165,12 +165,12 @@ def delete_device_group(self, device_group):
165165
filtered_response = {"status_code": response.status_code, "reply": response.json()}
166166
return filtered_response
167167

168-
# update apps in a device group
168+
# update a device group
169169
def update_device_group(self, device_group, config):
170170
url = self.host + "/api/" + self.API_VERSION + "/device_groups/" + device_group + "/update"
171171
payload = json.dumps(config)
172172
headers = self.headers
173-
response = requests.request("POST", url, data=payload, headers=headers, timeout=self.request_timeout)
173+
response = requests.request("PUT", url, data=payload, headers=headers, timeout=self.request_timeout)
174174
filtered_response = {"status_code": response.status_code, "reply": response.json()}
175175
return filtered_response
176176

setup.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22

33
__author__ = 'Naor Livne'
44
__author_email__ = 'naorlivne@gmail.com'
5-
__version__ = '2.4.0'
5+
__version__ = '2.4.1'
66

77
with open('README.md') as f:
88
long_description = f.read()

0 commit comments

Comments
 (0)