User and permission management

etcdctl user list
etcdctl user add username
etcdctl user get username
etcdctl role add myrolename
etcdctl user grant-role username myrolename
etcdctl user revoke-role username old_role
etcdctl role list
etcdctl role grant-permission myrolename read --prefix=true myprefix
etcdctl role grant-permission myrolename write bar
etcdctl role get myrolename
etcdctl role revoke-permission myrolename bar
etcdctl role remove myrolename

For more details see Role-based access control

Current revision number

etcdctl get non-existing-key -w json | jq
{
  "header": {
    "cluster_id": 6634254315728197000,
    "member_id": 4218402821677001000,
    "revision": 427,
    "raft_term": 21
  }
}