Skip to content

Commit c7ad7b6

Browse files
committed
Update api field 'username' to 'name'
1 parent d82cbec commit c7ad7b6

File tree

1 file changed

+5
-5
lines changed

1 file changed

+5
-5
lines changed

influxdb/client.py

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -248,7 +248,7 @@ def delete_database(self, database):
248248

249249
# add cluster admin
250250
# curl -X POST http://localhost:8086/cluster_admins?u=root&p=root \
251-
# -d '{"username": "paul", "password": "i write teh docz"}'
251+
# -d '{"name": "paul", "password": "i write teh docz"}'
252252

253253
# update cluster admin password
254254
# curl -X POST http://localhost:8086/cluster_admins/paul?u=root&p=root \
@@ -263,7 +263,7 @@ def delete_database(self, database):
263263

264264
# add database admin
265265
# curl -X POST http://localhost:8086/db/site_dev/admins?u=root&p=root \
266-
# -d '{"username": "paul", "password": "i write teh docz"}'
266+
# -d '{"name": "paul", "password": "i write teh docz"}'
267267

268268
# update database admin password
269269
# curl -X POST http://localhost:8086/db/site_dev/admins/paul?u=root&p=root\
@@ -299,7 +299,7 @@ def add_cluster_admin(self, new_username, new_password):
299299
self._username,
300300
self._password),
301301
data=json.dumps({
302-
'username': new_username,
302+
'name': new_username,
303303
'password': new_password}),
304304
headers=self._headers)
305305

@@ -428,7 +428,7 @@ def delete_database_admin(self, username):
428428

429429
# add database user
430430
# curl -X POST http://localhost:8086/db/site_dev/users?u=root&p=root \
431-
# -d '{"username": "paul", "password": "i write teh docz"}'
431+
# -d '{"name": "paul", "password": "i write teh docz"}'
432432

433433
# update database user password
434434
# curl -X POST http://localhost:8086/db/site_dev/users/paul?u=root&p=root \
@@ -465,7 +465,7 @@ def add_database_user(self, new_username, new_password):
465465
self._username,
466466
self._password),
467467
data=json.dumps({
468-
'username': new_username,
468+
'name': new_username,
469469
'password': new_password}),
470470
headers=self._headers)
471471

0 commit comments

Comments
 (0)