GET userID using adminInterface


#1

How do I GET the user id using adminInterface?
I know I can GET a particular user using http://localhost:4985/{$db}/_user/patient

but it only returns:

{
	"name": "patient",
	"admin_channels": [
		"user-patient"
	],
	"all_channels": [
		"user-patient"
	],
	"email": "patient@gmail.com",
	"admin_roles": [
		"patient"
	],
	"roles": [
		"patient"
	]
}

Thanks.


#2

The user ID is the name you put in the URL after /_user/. So you already know it. What other type of ID are you looking for?


#3

Right, I just learned it recently. But this doesn’t allow the user to change its username. Is there any work around for changing the username?


#4

You can’t change it; the user ID is the fixed unique ID of that user, the “primary key” in relational terms. It’s not intended as something visible or changeable.


#5

So what’s the best way to implement user management?