Skip to main content
Version: Management Center 2.5

User Groups REST API ⭐

2.5
Premium


This page describes how to use the User Groups REST API that is provided by the Management Center for the Pro Edition of Eclipse Mosquitto (MMC).

info

Before sending a command request, make sure that you have been authenticated.

info

Application Tokens REST API can be accessed by a user with an admin role.

User Profile REST API

User Profile can be accessed via an HTTP request:

  • GET /api/user-management/groups - get information about the profile of the current user

    Response: List of all currently existing user groups (list of user groups objects)

    Example of the response:

    {
    "Monitoring": {
    "name": "Monitoring",
    "description": "",
    "role": "monitoringViewer",
    "users": [
    "ViewerUser"
    ],
    "connections": [
    "local",
    "mosquitto"
    ]
    },
    ...
    }
  • GET /api/user-management/groups/:groupId

    Path parameters:

    • groupId - the name of the group that you want to get

      Response: User group object

  • POST /api/user-management/groups

Request body must be a user group object.

Example of the request body:

{
"Monitoring": {
"name": "Monitoring",
"description": "",
"role": "monitoringViewer",
"users": [
"ViewerUser"
],
"connections": [
"local",
"mosquitto"
]
}
}

Response: List of all currently existing user groups (list of user groups objects)

users and connections fields are optional. They can be added afterward, with PUT requests

  • PUT /api/user-management/groups/:groupId

    The request body must be a user group object. But all of the fields are optional

    Response: List of all currently existing user groups (list of user groups objects)

  • DELETE /api/user-management/groups/:groupId

    Path parameters:

    • groupId - the name of the group that you want to delete

      Response: List of all remaining user groups

Error Responses

HTTP status codes and a body of type text/plain will be returned in case of an error. Error status codes:

  • 404 - API not enabled
  • 400 - input validation error
  • 403 - Forbidden, not enough rights to access the endpoint
  • 500 - Internal server error