User Management
users/config
The user configuration. Can be updated with users/add, users/modify, users/remove and users/http_auth_update.
{
"users": [
{
"next_user_id": 5,
"http_auth_enabled": true,
// Not returned
"http_auth_username": null,
// Not returned
"digest_hash": null,
"users": [
// Example data
{
"id": 1,
"roles": 15,
"current": 32000,
"display_name": "Anonymous User",
"username": "anonymous",
"digest_hash": ""
}
]
}
],
// Nutzer 2 und 4 wurden gelöscht.
"next_user_id": 5,
"http_auth_enabled": true
}
| Name | Description | ||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
usersobject[17] | The users
| ||||||||||||||
next_user_idint | ID of the next user to be created. | ||||||||||||||
http_auth_enabledbool | Indicates whether credentials are required to use the web interface and HTTP API.
|
users/add
Adds a new user.
# $HOST e.g. warp-AbCd
Write
curl http://$HOST/users/add -d '{
"id": 5,
"roles": 65535,
"current": 32000,
"display_name": "Neuer Benutzer",
"username": "testuser",
"digest_hash": "926011006c2686471698e86690b7e500"
}'
id muss der next_user_id aus users/config entsprechen, damit der Nutzer angelegt wird.
digest_hash = MD5("testuser:esp32-lib:testpass")
# $BROKER e.g. my_mosquitto.localdomain
# $PREFIX e.g. warp/AbCd
Write
mosquitto_pub -h $BROKER -t $PREFIX/users/add -m '{
"id": 5,
"roles": 65535,
"current": 32000,
"display_name": "Neuer Benutzer",
"username": "testuser",
"digest_hash": "926011006c2686471698e86690b7e500"
}'
id muss der next_user_id aus users/config entsprechen, damit der Nutzer angelegt wird.
digest_hash = MD5("testuser:esp32-lib:testpass")
| Name | Description |
|---|---|
idint | ID of the user to be created. Must match the current value of next_user_id from |
rolesint | Permissions of the user. Not yet used. |
currentint (mA) | Charging current allowed for this user 6000 (=6 Ampere) to 32000 (=32 Ampere) or 0 to prohibit charging for this user |
display_namestring | Display name of the user. Also used in the charge tracker. |
usernamestring | Username for logging into the web interface and HTTP API. |
digest_hashstring | HTTP Digest hash of the user to be created. An empty string prohibits login to the web interface. |
users/remove
Deletes a user.
# $HOST e.g. warp-AbCd
Write
curl http://$HOST/users/remove -d '{ "id": 4 }'
or abbreviated:
curl http://$HOST/users/remove -d '4'
# $BROKER e.g. my_mosquitto.localdomain
# $PREFIX e.g. warp/AbCd
Write
mosquitto_pub -h $BROKER -t $PREFIX/users/remove -m '{ "id": 4 }'
or abbreviated:
mosquitto_pub -h $BROKER -t $PREFIX/users/remove -m '4'
| Name | Description |
|---|---|
idint | ID of the user to be deleted |
users/modify
Modifies a user.
# $HOST e.g. warp-AbCd
Write
curl http://$HOST/users/modify -d '{
"id": 5,
"roles": null,
"current": null,
"display_name": "Neuer Benutzer (ohne Login)",
"username": null,
"digest_hash": ""
}'
Ändert beispielsweise nur den Anzeigenamen vom Benutzer mit der ID 5 und löscht dessen Passwort. Dieser Nutzer kann sich dann nicht mehr im Webinterface einloggen oder die HTTP-API verwenden.
# $BROKER e.g. my_mosquitto.localdomain
# $PREFIX e.g. warp/AbCd
Write
mosquitto_pub -h $BROKER -t $PREFIX/users/modify -m '{
"id": 5,
"roles": null,
"current": null,
"display_name": "Neuer Benutzer (ohne Login)",
"username": null,
"digest_hash": ""
}'
Ändert beispielsweise nur den Anzeigenamen vom Benutzer mit der ID 5 und löscht dessen Passwort. Dieser Nutzer kann sich dann nicht mehr im Webinterface einloggen oder die HTTP-API verwenden.
| Name | Description |
|---|---|
idint | ID of the user to be modified. |
rolesint | Permissions of the user. Not yet used. |
currentint (mA) | Charging current allowed for this user 6000 (=6 Ampere) to 32000 (=32 Ampere) or 0 to prohibit charging for this user |
display_namestring | Display name of the user. Also used in the charge tracker. |
usernamestring | Username for logging into the web interface and HTTP API. |
digest_hashstring | HTTP Digest hash of the user. An empty string prohibits login to the web interface. |
users/http_auth_update
Writes http_auth_enabled from users/config.
# $HOST e.g. warp-AbCd
Write
curl http://$HOST/users/http_auth_update -d '{ "enabled": false }'
or abbreviated:
curl http://$HOST/users/http_auth_update -d 'false'
# $BROKER e.g. my_mosquitto.localdomain
# $PREFIX e.g. warp/AbCd
Write
mosquitto_pub -h $BROKER -t $PREFIX/users/http_auth_update -m '{ "enabled": false }'
or abbreviated:
mosquitto_pub -h $BROKER -t $PREFIX/users/http_auth_update -m 'false'
| Name | Description |
|---|---|
enabledbool | Specifies whether credentials are required to use the web interface and HTTP API.
|
users/all_usernames
For charge tracking, the display names of deleted users are stored separately in flash. This function returns all display names that may appear in tracked charging sessions in a binary format.
users/config
The user configuration. Can be updated with users/add, users/modify, users/remove and users/http_auth_update.
{
"users": [
{
"next_user_id": 5,
"http_auth_enabled": true,
// Not returned
"http_auth_username": null,
// Not returned
"digest_hash": null,
"users": [
// Example data
{
"id": 1,
"roles": 15,
"current": 32000,
"display_name": "Anonymous User",
"username": "anonymous",
"digest_hash": ""
}
]
}
],
// Nutzer 2 und 4 wurden gelöscht.
"next_user_id": 5,
"http_auth_enabled": true
}
| Name | Description | ||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
usersobject[33] | The users
| ||||||||||||||
next_user_idint | ID of the next user to be created. | ||||||||||||||
http_auth_enabledbool | Indicates whether credentials are required to use the web interface and HTTP API.
|
users/add
Adds a new user.
# $HOST e.g. warp2-AbCd
Write
curl http://$HOST/users/add -d '{
"id": 5,
"roles": 65535,
"current": 32000,
"display_name": "Neuer Benutzer",
"username": "testuser",
"digest_hash": "926011006c2686471698e86690b7e500"
}'
id muss der next_user_id aus users/config entsprechen, damit der Nutzer angelegt wird.
digest_hash = MD5("testuser:esp32-lib:testpass")
# $BROKER e.g. my_mosquitto.localdomain
# $PREFIX e.g. warp2/AbCd
Write
mosquitto_pub -h $BROKER -t $PREFIX/users/add -m '{
"id": 5,
"roles": 65535,
"current": 32000,
"display_name": "Neuer Benutzer",
"username": "testuser",
"digest_hash": "926011006c2686471698e86690b7e500"
}'
id muss der next_user_id aus users/config entsprechen, damit der Nutzer angelegt wird.
digest_hash = MD5("testuser:esp32-lib:testpass")
| Name | Description |
|---|---|
idint | ID of the user to be created. Must match the current value of next_user_id from |
rolesint | Permissions of the user. Not yet used. |
currentint (mA) | Charging current allowed for this user 6000 (=6 Ampere) to 32000 (=32 Ampere) or 0 to prohibit charging for this user |
display_namestring | Display name of the user. Also used in the charge tracker. |
usernamestring | Username for logging into the web interface and HTTP API. |
digest_hashstring | HTTP Digest hash of the user to be created. An empty string prohibits login to the web interface. |
users/remove
Deletes a user.
# $HOST e.g. warp2-AbCd
Write
curl http://$HOST/users/remove -d '{ "id": 4 }'
or abbreviated:
curl http://$HOST/users/remove -d '4'
# $BROKER e.g. my_mosquitto.localdomain
# $PREFIX e.g. warp2/AbCd
Write
mosquitto_pub -h $BROKER -t $PREFIX/users/remove -m '{ "id": 4 }'
or abbreviated:
mosquitto_pub -h $BROKER -t $PREFIX/users/remove -m '4'
| Name | Description |
|---|---|
idint | ID of the user to be deleted |
users/modify
Modifies a user.
# $HOST e.g. warp2-AbCd
Write
curl http://$HOST/users/modify -d '{
"id": 5,
"roles": null,
"current": null,
"display_name": "Neuer Benutzer (ohne Login)",
"username": null,
"digest_hash": ""
}'
Ändert beispielsweise nur den Anzeigenamen vom Benutzer mit der ID 5 und löscht dessen Passwort. Dieser Nutzer kann sich dann nicht mehr im Webinterface einloggen oder die HTTP-API verwenden.
# $BROKER e.g. my_mosquitto.localdomain
# $PREFIX e.g. warp2/AbCd
Write
mosquitto_pub -h $BROKER -t $PREFIX/users/modify -m '{
"id": 5,
"roles": null,
"current": null,
"display_name": "Neuer Benutzer (ohne Login)",
"username": null,
"digest_hash": ""
}'
Ändert beispielsweise nur den Anzeigenamen vom Benutzer mit der ID 5 und löscht dessen Passwort. Dieser Nutzer kann sich dann nicht mehr im Webinterface einloggen oder die HTTP-API verwenden.
| Name | Description |
|---|---|
idint | ID of the user to be modified. |
rolesint | Permissions of the user. Not yet used. |
currentint (mA) | Charging current allowed for this user 6000 (=6 Ampere) to 32000 (=32 Ampere) or 0 to prohibit charging for this user |
display_namestring | Display name of the user. Also used in the charge tracker. |
usernamestring | Username for logging into the web interface and HTTP API. |
digest_hashstring | HTTP Digest hash of the user. An empty string prohibits login to the web interface. |
users/http_auth_update
Writes http_auth_enabled from users/config.
# $HOST e.g. warp2-AbCd
Write
curl http://$HOST/users/http_auth_update -d '{ "enabled": false }'
or abbreviated:
curl http://$HOST/users/http_auth_update -d 'false'
# $BROKER e.g. my_mosquitto.localdomain
# $PREFIX e.g. warp2/AbCd
Write
mosquitto_pub -h $BROKER -t $PREFIX/users/http_auth_update -m '{ "enabled": false }'
or abbreviated:
mosquitto_pub -h $BROKER -t $PREFIX/users/http_auth_update -m 'false'
| Name | Description |
|---|---|
enabledbool | Specifies whether credentials are required to use the web interface and HTTP API.
|
users/all_usernames
For charge tracking, the display names of deleted users are stored separately in flash. This function returns all display names that may appear in tracked charging sessions in a binary format.
users/config
The user configuration. Can be updated with users/add, users/modify, users/remove and users/http_auth_update.
{
"users": [
{
"next_user_id": 5,
"http_auth_enabled": true,
// Not returned
"http_auth_username": null,
// Not returned
"digest_hash": null,
"users": [
// Example data
{
"id": 1,
"roles": 15,
"current": 32000,
"display_name": "Anonymous User",
"username": "anonymous",
"digest_hash": ""
}
]
}
],
// Nutzer 2 und 4 wurden gelöscht.
"next_user_id": 5,
"http_auth_enabled": true
}
| Name | Description | ||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
usersobject[33] | The users
| ||||||||||||||
next_user_idint | ID of the next user to be created. | ||||||||||||||
http_auth_enabledbool | Indicates whether credentials are required to use the web interface and HTTP API.
|
users/add
Adds a new user.
# $HOST e.g. warp3-AbCd
Write
curl http://$HOST/users/add -d '{
"id": 5,
"roles": 65535,
"current": 32000,
"display_name": "Neuer Benutzer",
"username": "testuser",
"digest_hash": "926011006c2686471698e86690b7e500"
}'
id muss der next_user_id aus users/config entsprechen, damit der Nutzer angelegt wird.
digest_hash = MD5("testuser:esp32-lib:testpass")
# $BROKER e.g. my_mosquitto.localdomain
# $PREFIX e.g. warp3/AbCd
Write
mosquitto_pub -h $BROKER -t $PREFIX/users/add -m '{
"id": 5,
"roles": 65535,
"current": 32000,
"display_name": "Neuer Benutzer",
"username": "testuser",
"digest_hash": "926011006c2686471698e86690b7e500"
}'
id muss der next_user_id aus users/config entsprechen, damit der Nutzer angelegt wird.
digest_hash = MD5("testuser:esp32-lib:testpass")
| Name | Description |
|---|---|
idint | ID of the user to be created. Must match the current value of next_user_id from |
rolesint | Permissions of the user. Not yet used. |
currentint (mA) | Charging current allowed for this user 6000 (=6 Ampere) to 32000 (=32 Ampere) or 0 to prohibit charging for this user |
display_namestring | Display name of the user. Also used in the charge tracker. |
usernamestring | Username for logging into the web interface and HTTP API. |
digest_hashstring | HTTP Digest hash of the user to be created. An empty string prohibits login to the web interface. |
users/remove
Deletes a user.
# $HOST e.g. warp3-AbCd
Write
curl http://$HOST/users/remove -d '{ "id": 4 }'
or abbreviated:
curl http://$HOST/users/remove -d '4'
# $BROKER e.g. my_mosquitto.localdomain
# $PREFIX e.g. warp3/AbCd
Write
mosquitto_pub -h $BROKER -t $PREFIX/users/remove -m '{ "id": 4 }'
or abbreviated:
mosquitto_pub -h $BROKER -t $PREFIX/users/remove -m '4'
| Name | Description |
|---|---|
idint | ID of the user to be deleted |
users/modify
Modifies a user.
# $HOST e.g. warp3-AbCd
Write
curl http://$HOST/users/modify -d '{
"id": 5,
"roles": null,
"current": null,
"display_name": "Neuer Benutzer (ohne Login)",
"username": null,
"digest_hash": ""
}'
Ändert beispielsweise nur den Anzeigenamen vom Benutzer mit der ID 5 und löscht dessen Passwort. Dieser Nutzer kann sich dann nicht mehr im Webinterface einloggen oder die HTTP-API verwenden.
# $BROKER e.g. my_mosquitto.localdomain
# $PREFIX e.g. warp3/AbCd
Write
mosquitto_pub -h $BROKER -t $PREFIX/users/modify -m '{
"id": 5,
"roles": null,
"current": null,
"display_name": "Neuer Benutzer (ohne Login)",
"username": null,
"digest_hash": ""
}'
Ändert beispielsweise nur den Anzeigenamen vom Benutzer mit der ID 5 und löscht dessen Passwort. Dieser Nutzer kann sich dann nicht mehr im Webinterface einloggen oder die HTTP-API verwenden.
| Name | Description |
|---|---|
idint | ID of the user to be modified. |
rolesint | Permissions of the user. Not yet used. |
currentint (mA) | Charging current allowed for this user 6000 (=6 Ampere) to 32000 (=32 Ampere) or 0 to prohibit charging for this user |
display_namestring | Display name of the user. Also used in the charge tracker. |
usernamestring | Username for logging into the web interface and HTTP API. |
digest_hashstring | HTTP Digest hash of the user. An empty string prohibits login to the web interface. |
users/http_auth_update
Writes http_auth_enabled from users/config.
# $HOST e.g. warp3-AbCd
Write
curl http://$HOST/users/http_auth_update -d '{ "enabled": false }'
or abbreviated:
curl http://$HOST/users/http_auth_update -d 'false'
# $BROKER e.g. my_mosquitto.localdomain
# $PREFIX e.g. warp3/AbCd
Write
mosquitto_pub -h $BROKER -t $PREFIX/users/http_auth_update -m '{ "enabled": false }'
or abbreviated:
mosquitto_pub -h $BROKER -t $PREFIX/users/http_auth_update -m 'false'
| Name | Description |
|---|---|
enabledbool | Specifies whether credentials are required to use the web interface and HTTP API.
|
users/all_usernames
For charge tracking, the display names of deleted users are stored separately in flash. This function returns all display names that may appear in tracked charging sessions in a binary format.
Not supported on this hardware!
Not supported on this hardware!
users/config
The user configuration. Can be updated with users/add, users/modify, users/remove and users/http_auth_update.
{
"users": [
{
"next_user_id": 5,
"http_auth_enabled": true,
// Not returned
"http_auth_username": null,
// Not returned
"digest_hash": null,
"users": [
// Example data
{
"id": 1,
"roles": 15,
"current": 32000,
"display_name": "Anonymous User",
"username": "anonymous",
"digest_hash": ""
}
]
}
],
// Nutzer 2 und 4 wurden gelöscht.
"next_user_id": 5,
"http_auth_enabled": true
}
| Name | Description | ||||||||||||||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
usersobject[..] | The users (Only WARP 1)
| ||||||||||||||||||||||||||||
next_user_idint | ID of the next user to be created. | ||||||||||||||||||||||||||||
http_auth_enabledbool | Indicates whether credentials are required to use the web interface and HTTP API.
|
users/add
Adds a new user.
# $HOST e.g. warp-AbCd
Write
curl http://$HOST/users/add -d '{
"id": 5,
"roles": 65535,
"current": 32000,
"display_name": "Neuer Benutzer",
"username": "testuser",
"digest_hash": "926011006c2686471698e86690b7e500"
}'
id muss der next_user_id aus users/config entsprechen, damit der Nutzer angelegt wird.
digest_hash = MD5("testuser:esp32-lib:testpass")
# $BROKER e.g. my_mosquitto.localdomain
# $PREFIX e.g. warp/AbCd
Write
mosquitto_pub -h $BROKER -t $PREFIX/users/add -m '{
"id": 5,
"roles": 65535,
"current": 32000,
"display_name": "Neuer Benutzer",
"username": "testuser",
"digest_hash": "926011006c2686471698e86690b7e500"
}'
id muss der next_user_id aus users/config entsprechen, damit der Nutzer angelegt wird.
digest_hash = MD5("testuser:esp32-lib:testpass")
| Name | Description |
|---|---|
idint | ID of the user to be created. Must match the current value of next_user_id from |
rolesint | Permissions of the user. Not yet used. |
currentint (mA) | Charging current allowed for this user 6000 (=6 Ampere) to 32000 (=32 Ampere) or 0 to prohibit charging for this user |
display_namestring | Display name of the user. Also used in the charge tracker. |
usernamestring | Username for logging into the web interface and HTTP API. |
digest_hashstring | HTTP Digest hash of the user to be created. An empty string prohibits login to the web interface. |
users/remove
Deletes a user.
# $HOST e.g. warp-AbCd
Write
curl http://$HOST/users/remove -d '{ "id": 4 }'
or abbreviated:
curl http://$HOST/users/remove -d '4'
# $BROKER e.g. my_mosquitto.localdomain
# $PREFIX e.g. warp/AbCd
Write
mosquitto_pub -h $BROKER -t $PREFIX/users/remove -m '{ "id": 4 }'
or abbreviated:
mosquitto_pub -h $BROKER -t $PREFIX/users/remove -m '4'
| Name | Description |
|---|---|
idint | ID of the user to be deleted |
users/modify
Modifies a user.
# $HOST e.g. warp-AbCd
Write
curl http://$HOST/users/modify -d '{
"id": 5,
"roles": null,
"current": null,
"display_name": "Neuer Benutzer (ohne Login)",
"username": null,
"digest_hash": ""
}'
Ändert beispielsweise nur den Anzeigenamen vom Benutzer mit der ID 5 und löscht dessen Passwort. Dieser Nutzer kann sich dann nicht mehr im Webinterface einloggen oder die HTTP-API verwenden.
# $BROKER e.g. my_mosquitto.localdomain
# $PREFIX e.g. warp/AbCd
Write
mosquitto_pub -h $BROKER -t $PREFIX/users/modify -m '{
"id": 5,
"roles": null,
"current": null,
"display_name": "Neuer Benutzer (ohne Login)",
"username": null,
"digest_hash": ""
}'
Ändert beispielsweise nur den Anzeigenamen vom Benutzer mit der ID 5 und löscht dessen Passwort. Dieser Nutzer kann sich dann nicht mehr im Webinterface einloggen oder die HTTP-API verwenden.
| Name | Description |
|---|---|
idint | ID of the user to be modified. |
rolesint | Permissions of the user. Not yet used. |
currentint (mA) | Charging current allowed for this user 6000 (=6 Ampere) to 32000 (=32 Ampere) or 0 to prohibit charging for this user |
display_namestring | Display name of the user. Also used in the charge tracker. |
usernamestring | Username for logging into the web interface and HTTP API. |
digest_hashstring | HTTP Digest hash of the user. An empty string prohibits login to the web interface. |
users/http_auth_update
Writes http_auth_enabled from users/config.
# $HOST e.g. warp-AbCd
Write
curl http://$HOST/users/http_auth_update -d '{ "enabled": false }'
or abbreviated:
curl http://$HOST/users/http_auth_update -d 'false'
# $BROKER e.g. my_mosquitto.localdomain
# $PREFIX e.g. warp/AbCd
Write
mosquitto_pub -h $BROKER -t $PREFIX/users/http_auth_update -m '{ "enabled": false }'
or abbreviated:
mosquitto_pub -h $BROKER -t $PREFIX/users/http_auth_update -m 'false'
| Name | Description |
|---|---|
enabledbool | Specifies whether credentials are required to use the web interface and HTTP API.
|
users/all_usernames
For charge tracking, the display names of deleted users are stored separately in flash. This function returns all display names that may appear in tracked charging sessions in a binary format.