Version 1.1

/Mobile/roles/get

Inputs

Input Input Definition Required Detailed Description
rid The role id Yes
type used to determine JSON or XML No If parameter is not passed than it will assume JSON.
sid The user's session id Yes If you do not pass a user session then no action can be taken. See the session debug section for disabling the session for debuging.


While you can pass sid as GET parameter you are also welcome and recommended to pass it via POST for more security.

Ouputs


Response Response Definition Detailed Description
statusCode The status code for the returned result. (In this case should always be Success
statusMessage The message that describes the associated status code.
name The name of the role
projects The permissions of projects
add Does this role allow the ability to add projects
edit Does this role allow the ability to edit projects
delete Does this role allow the ability to delete projects
close Does this role allow the ability to close projects
read Does this role allow the ability to read proejcts
tasks Permissions of tasks, and tasklists
add Does this role allow the ability to add tasks/tasklists
edit Does this role allow the ability to edit tasks/tasklists
delete Does this role allow the ability to delete tasks/tasklists
close Does this role allow the ability to close tasks/tasklists
read Does this role allow the ability to read tasks/tasklists
milestones Permissions for milestones
add Does this role allow the ability to add milestones
edit Does this role allow the ability to edit milestones
delete Does this role allow the ability to delete milestones
close Does this role allow the ability to close milestones
read Does this role allow the abiltiy to read milestones read is for messages, so you can ignore it for everything else
messages permissions for messages I am surfacing this role permission, although version 1.1 doesn't support messages, the api will in the future.
add Does this role allow the ability to add messages
edit Does this role allow the ability to edit messages
delete Does this role allow the ability to delete messages
close Does this role allow the abiltiy to close messages
read Does this role allow the ability to read messages
files Permissions for files
add Does this role allow the ability to add files
edit Does this role allow the ability to edit files
delete Does this role allow the ability to delete files
close Does this role allow the abiltiy to close files
read Does this role allow the ability to read files
timetracker Permissions for timetracker
add Does this role allow the ability to add timetracker
edit Does this role allow the ability to edit timetracker
delete Does this role allow the ability to delete timetracker
close Does this role allow the abiltiy to close timetracker
read Does this role allow the ability to read timetracker
chat Permissions for chat
add Does this role allow the ability to add chat
edit Does this role allow the ability to edit chat
delete Does this role allow the ability to delete chat
close Does this role allow the abiltiy to close chat
read Does this role allow the ability to read chat
admin Permissions for admin
add Does this role allow the ability to add admin
edit Does this role allow the ability to edit admin
delete Does this role allow the ability to delete admin
close Does this role allow the abiltiy to close admin
read Does this role allow the ability to read admin

Sample Outputs

JSON

{"response":
  {"status":{"statusCode":1,
   "statusMessage":"Success"},
  "name":"User",
  "projects":
   {"add":1,
    "edit":1,
    "delete":0,
    "close":0,
    "read":0},
  "tasks":
   {"add":1,
    "edit":1,
    "delete":0,
    "close":1,
    "read":0},
  "milestones":
   {"add":1,
    "edit":1,
    "delete":1,
    "close":1,
    "read":0},
  "messages":
   {"add":1,
    "edit":1,
    "delete":1,
    "close":1,
    "read":0},
   "files":
    {"add":1,
     "edit":1,
     "delete":1,
     "close":0,
     "read":0},
  "timetracker":
   {"add":1,
    "edit":1,
    "delete":1,
    "close":0, 
    "read":0},
   "chat":
    {"add":1,
     "edit":0,
     "delete":0,
     "close":0,
     "read":0},
   "admin":
    {"add":0,
     "edit":0,
     "delete":0,
     "close":0,
     "read":0}
  }
}

XML

<?xml version="1.0" encoding="UTF-8"?>
<response>
  <status>
    <statusCode>1</statusCode>
    <statusMessage>Success</statusMessage>
  </status>
  <name>User</name>
  <projects>
    <add>1</add>
    <edit>1</edit>
    <delete>0</delete>
    <close>0</close>
    <read>0</read>
  </projects>
  <tasks>
    <add>1</add>
    <edit>1</edit>
    <delete>0</delete>
    <close>1</close>
    <read>0</read>
  </tasks>
  <milestones>
    <add>1</add>
    <edit>1</edit>
    <delete>1</delete>
    <close>1</close>
    <read>0</read>
  </milestones>
  <messages>
    <add>1</add>
    <edit>1</edit>
    <delete>1</delete>
    <close>1</close>
    <read>0</read>
  </messages>
  <files>
    <add>1</add>
    <edit>1</edit>
    <delete>1</delete>
    <close>0</close>
    <read>0</read>
  </files>
  <timetracker>
    <add>1</add>
    <edit>1</edit>
    <delete>1</delete>
    <close>0</close>
    <read>0</read>
  </timetracker>
  <chat>
    <add>1</add>
    <edit>0</edit>
    <delete>0</delete>
    <close>0</close>
    <read>0</read>
  </chat>
  <admin>
    <add>0</add>
    <edit>0</edit>
    <delete>0</delete>
    <close>0</close>
    <read>0</read>
  </admin>
</response>

Last edited Feb 22, 2012 at 8:22 PM by darxval, version 1

Comments

No comments yet.