LiquidFiles Documentation
LiquidFiles Documentation

Add/Update Share Access Rights Admin API

Request

Request Info
Info Value
Request URL /admin/shares/_share_id/add_access
Request VERB POST
Request Parameters
Parameter Type Description
user/group String The unique User or Group ID.
write Boolean True if the user or group should have write access, false if the user or group should have read-only access. If not specified, it will default to false.
view_log Boolean True if the user or group should be able to view the share log. If not specified, it will default to false.

The Request is an array of requests.

Request Parameters
Parameter Type Description
user/group String The unique User or Group ID.
result String success or error, depending on the result.
message String The success or error message.
write Boolean The resulting write result if success.
view_log Boolean The resulting view_log result if success.
Example Request Using Curl
cat <<EOF | curl -X POST -H "Accept: application/json" -H "Content-Type: application/json" --user nkpIxMK9ucUUE7FvfNpdAf:x https://test.host/admin/shares/project-alpha/add_access

{"accesses":
  [
    {
      "group": "admins",
      "write": true,
      "view_log": true
    },
    {
      "user": "user-company-com",
      "write": false
    }
  ]
}
EOF

or shorter

curl -X POST -H "Accept: application/json" -H "Content-Type: application/json" --user nkpIxMK9ucUUE7FvfNpdAf:x -d '{"accesses":[{"group":"admins", "write":true, "view_log":true},{"user":"user-company-com", "write":false}]}' https://test.host/admin/shares/project-alpha/add_access

Example Response

[
  {
    "group":"admins",
    "result":"success",
    "message":"Updated Group",
    "write":true,
    "view_log":true
  },{
    "user":"johan-allard-nu",
    "result":"success",
    "message":"Updated User",
    "write":false,
    "view_log":true
  }
]