Automatically create a workspace according to table.field


I am using Custom DB authentication from a table that was already in my database, and i would like to use the same system…
In this table I have: username, password and group_id

I was wondering if it is possible to automatically create a workspace for each group_id, so that all usernames with the same group_id will have automatically access to their workspace.
User1 – group_id=1
user2 – group_id=2
user3 – group_id=1

user 1 and user 3 will automatically see a workspace (because they have both group_id = 1)
user 2 will see another workspace because of group_id=2

is this possible?


Yes and No:

Creating automatically workspace, it’s possible by using api/cli with a list of workspace ID (group id)

But matching user and role id (group_id) in Pydio is not possible. It requires an extra works to map groups_id attribute to roleid in PYdio.


so, can you explain me how to have one workspace created for each different value of a certain column of the users table?

Please visit:

I did see that… but it was really hard for me to understand :frowning:
don’t you have any example of codes? that would help

even because If i can implement this features… I will use your service, otherwise I will have to look for something else :frowning:


Try this command:
curl -u username:password -d "@data.json" -H "Content-Type: application/x-www-form-urlencoded" -X POST {{url}}/api/v2/admin/workspaces?format=json

This command create new workspace newWSP in Pydio

data.json file content:

  "securityScope": "USER",
  "slug": "newWSP",
  "display": "newWSP_LABEL",
  "displayStringId": 432,
  "accessType": "fs",
  "writeable": true,
  "isTemplate": false,
  "parameters": {
    "CREATION_TIME": 1468593800,
    "CREATE": true,
    "RECYCLE_BIN": "recycle_bin",
    "CHMOD_VALUE": "0600",
    "DEFAULT_RIGHTS": "rw",
  "features": {
    "metastore.serial": {
      "METADATA_FILE": ".ajxp_meta",
      "METADATA_FILE_LOCATION": "infolders"
    "meta.user": {
      "meta_fields": "tags",
      "meta_labels": "Tags",
      "meta_visibility": "hidden"
    "meta.filehasher": [],
    "": [],
    "meta.syncable": {
      "REPO_SYNCABLE": true
    "meta.exif": {
      "meta_fields": "COMPUTED_GPS.GPS_Latitude,COMPUTED_GPS.GPS_Longitude",
      "meta_labels": "Latitude,Longitude"
    "index.lucene": {
      "index_meta_fields": "tags",
      "repository_specific_keywords": "AJXP_USER"
  "INFO": {
    "users": 12,
    "shares": 74


sadly under my web hosting service I can’t use CURL :frowning:

i would like to find a way to create it from php… so that when i create a new user on the DB, a workspace is created too


You do not need to get inside the server to execute curl. You can use just one linux (mac) machine to execute curl to interact with api of pydio {{url}}/api/v2/admin/workspaces?format=json