<?xml version="1.0" encoding="utf-8"?><!DOCTYPE article  PUBLIC '-//OASIS//DTD DocBook XML V4.4//EN'  'http://www.docbook.org/xml/4.4/docbookx.dtd'><article><articleinfo><title>Radiomate/API</title><revhistory><revision><revnumber>1</revnumber><date>2010-05-26 16:13:41</date><authorinitials>ClauzClauz</authorinitials></revision></revhistory></articleinfo><section><title>API</title><section><title>Users and Roles</title><screen><![CDATA[{
        "request": "createrole",
        "username": <role creator's username>,
        "password": <role creator's password>,
        "role" : {
                "roleName": <name>,
                "canManageRoles": (true|false),  #true if the user can create/edit/delete roles
                "canManageUsers": (true|false),  #true if the user can create/edit/delete users
                "canManageAllPlaylists": (true|false),  #true if the user can create/edit/delete playlists
                "canManageTimetable": (true|false),  #true if the user can edit/delete the beginning and ending time of scheduled slots
                "fixedSlotTime": (true|false), #true if the fixedSlotTimesList field has to be considered
                "fixedSlotTimesList": <array of fixed slot times, in minutes>, #if fixedSlotTime is true, then this is the list of the allowed length for the timeslots for this user
                "changeTimeBeforeTransmission": <number of minutes before the beginning of the transmission in which the user is permitted to change the beginning time>,
                "canCreateTestMountpoint": (true|false), #true if the user is permitted to create a testing mountpoint
        }
}
]]><![CDATA[
]]><![CDATA[
{
        "response": ("rolecreated" | "notallowed" | "servererror"),
        "responsen": (0, 1, 2),
        "description": <textual description>,
        "role" : { #the role that has been created
                "roleName": <name>,
                "canManageRoles": (true|false),  #true if the user can create/edit/delete roles
                "canManageUsers": (true|false),  #true if the user can create/edit/delete users
                "canManageAllPlaylists": (true|false),  #true if the user can create/edit/delete playlists
                "canManageTimetable": (true|false),  #true if the user can edit/delete the beginning and ending time of scheduled slots
                "fixedSlotTime": (true|false), #true if the fixedSlotTimesList field has to be considered
                "fixedSlotTimesList": <array of fixed slot times, in minutes>, #if fixedSlotTime is true, then this is the list of the allowed length for the timeslots for this user
                "changeTimeBeforeTransmission": <number of minutes before the beginning of the transmission in which the user is permitted to change the beginning time>,
                "canCreateTestMountpoint": (true|false), #true if the user is permitted to create a testing mountpoint
        }
}]]></screen><screen><![CDATA[{
        "request":"createuser",
        "username": <creator's username>,
        "password": <creator's password>,
        "user" : {
                "name": <name>,
                "password": <password>,
                "role": <role>
        }
}]]></screen><screen/></section></section></article>