Patrick Schurig 4a7a1bddf4
All checks were successful
Build & Deploy docs / build-deploy (push) Successful in 3m52s
api : référence régénérée depuis le banc en 1.15.2+etm71 (droits NymeaEnergy.* séparés, GetOptimizerProtocol)
Le badge PUBLIC de PermissionScopeNone devient AUTH : sur un transport
authentifié, nymea exige un token valide pour toute méthode sauf
JSONRPC.Hello, Authenticate et RequestPushButtonAuth
(jsonrpcserverimplementation.cpp, tag 1.15.2). « Lecture publique, aucun
token requis » était faux, en trois langues.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-20 08:49:15 +02:00

5.9 KiB

Users

Methods

Users.ChangePassword

ADMIN

Change the password for the currently logged in user.

Parameters:

Field Type Notes
newPassword String

Returns:

Field Type Notes
error UserError

Users.ChangeUserPassword

ADMIN

Change the password for the given user. All tokens for this user will be removed in order to force all clients to log in again.

Parameters:

Field Type Notes
newPassword String
username String

Returns:

Field Type Notes
error UserError

Users.CreateUser

ADMIN

Create a new user in the API with the given username and password. Use scopes to define the permissions for the new user. If the user has not the permission "PermissionScopeAccessAllThings", the list of things this user has access to can be defined in the "allowedThingIds" property. If no scopes are given, this user will be an admin user. Call Authenticate after this to obtain a device token for this user.

Parameters:

Field Type Notes
allowedThingIds Uuid[] optional
displayName String optional
email String optional
scopes PermissionScopes optional
password String
username String

Returns:

Field Type Notes
error UserError

Users.GetTokens

ADMIN

Get all the tokens for the current user.

Parameters:

No parameters.

Returns:

Field Type Notes
error UserError
tokenInfoList TokenInfoList optional

Users.GetUserInfo

AUTH

Get info about the current token (the currently logged in user).

Parameters:

No parameters.

Returns:

Field Type Notes
error UserError
userInfo UserInfo optional

Users.GetUserTokens

ADMIN

Get all the tokens for the given username.

Parameters:

Field Type Notes
username String

Returns:

Field Type Notes
error UserError
tokenInfoList TokenInfoList optional

Users.GetUsers

ADMIN

Return a list of all users in the system.

Parameters:

No parameters.

Returns:

Field Type Notes
users UserInfoList

Users.RemoveToken

ADMIN

Revoke access for a given token. Depending on the logged in user only the own tokens can be removed. If you are logged in as admin, any token can be removed.

Parameters:

Field Type Notes
tokenId Uuid

Returns:

Field Type Notes
error UserError

Users.RemoveUser

ADMIN

Remove a user from the system.

Parameters:

Field Type Notes
username String

Returns:

Field Type Notes
error UserError

Users.SetUserInfo

ADMIN

Change user info. If username is given, info for the respective user is changed, otherwise the current user info is edited. Requires admin permissions to edit user info other than the own.

Parameters:

Field Type Notes
displayName String optional
email String optional
username String optional

Returns:

Field Type Notes
error UserError

Users.SetUserScopes

ADMIN

Set the permissions (scopes) for a given user. If the user has not the permission "PermissionScopeAccessAllThings" the list of thing IDs this user has access to can be defined in the "allowedThingIds" property.

Parameters:

Field Type Notes
allowedThingIds Uuid[] optional
scopes PermissionScopes
username String

Returns:

Field Type Notes
error UserError

Notifications

Users.PushButtonAuthFinished

Emitted when a push button authentication reaches final state. NOTE: This notification is special. It will only be emitted to connections that did actively request a push button authentication, but also it will be emitted regardless of the notification settings.

Parameters:

Field Type Notes
token String optional
success Bool
transactionId Int

Users.UserAdded

Emitted when a user is added to the system.

Parameters:

Field Type Notes
userInfo UserInfo

Users.UserChanged

Emitted whenever a user is changed.

Parameters:

Field Type Notes
userInfo UserInfo

Users.UserRemoved

Emitted when a user is removed from the system.

Parameters:

Field Type Notes
username String