How to Retrieve User Group Members for a Future POST Request Using M-Files API

I am currently trying to retrieve the list of members in a specific user group, with the goal of using this information later for a POST request to add or update members.

Here is my current Python code:

mfile = MFilesClient(MFILES_SERVER, MFILES_USER, MFILES_PASSWORD, MFILES_VAULT)
user_group_id = 16
endpoint = f"valuelists/{user_group_id}/items/112"
response = mfile.get(endpoint)
print(response)

When I try to retrieve the user group, the response does not seem to include the members of the group.

I would like to know:

  1. How can I retrieve the list of members for a user group?
  2. What is the correct endpoint or approach to achieve this using the M-Files REST API?

Any help or guidance would be greatly appreciated. I want to make sure I can get the list of members correctly to later perform POST operations to update the group.

Thank you in advance!

  • The M-Files REST API does not support all functionality that the COM API exposes.  From recollection you cannot get the members of a group, as an example.

    If you need this then the best approach is to use a Vault Extension Method on the server to gather the information you need via the COM API and return it as a JSON structure.  You can then call the Vault Extension Method via the REST API.  This is the general pattern for extending the REST API functionality.