GET
- The GET method displays member-roles for the given office or member.
GET developer.viadesk.com/api/memberrole?office=6880-…
- Parameter office represents the office.
- Parameters user determines the user or the memberlist.
- Either the parameter office or user has to be selected, or both.
Example response body response:
[
{
"id": "893393-7061676f64612e726f6c65732e4d656d626572",
"office": "6880-6f6666696365",
"member": "201-75736572",
"membertype": "user",
"permission": "add"
},{
"id": "975993-7061676f64612e726f6c65732e4d656d626572",
"office": "6880-6f6666696365",
"member": "832813-75736572",
"membertype": "memberlist",
"permission": "read"
}
]
POST
- A successful create or update returns the response code 200.
POST projecten.viadesk.com/api/memberrole.json
form field “user” // id of the user or memberlist you want to create a Member-role for (required)
form field “office” or "folder" or "page" // the id of the office or the folder (required)
form field “permissions” // a string array of the following options: 'read', 'comment', 'write', 'add' or 'all'
DELETE
- The DELETE method allows you to delete the direct Member-role between the user and the office. Only if the user has the required permission.
- A successful DELETE returns response code 200.
DELETE projecten.viadesk.com/api/memberrole.json?user=8…
form field “user” // id of the member
form field “office” // id of the office