Changes between Version 3 and Version 4 of NewTestbedAPISpec


Ignore:
Timestamp:
Jun 27, 2013 12:00:25 PM (11 years ago)
Author:
faber
Comment:

--

Legend:

Unmodified
Added
Removed
Modified
  • NewTestbedAPISpec

    v3 v4  
     1[[TOC]]
     2
    13= DETER Testbed API =
    24
     
    165167    * Reason - a string indicating the reason if Success is false
    166168
     169=== Notifications ===
     170
     171A notification is a short message from another user or the testbed asking a user to take an action (add someone to a project, update a password before expiration) or communicating other information to the user (testbed downtime, etc).  A web interface will want to present these to a user.
     172
     173 
     174 * '''Service:''' Users
     175 * '''Operation:''' getNotifications
     176 * '''Input Parameters:'''
     177   * Userid - the user's identity to gather notifications
     178   * FirstDate - an optional date.  If present only show notifications after that date
     179   * LastDate - an optional date.  If present only show notifications before that date
     180   * OnlyUnread - a flag. If true, show only unread notifications
     181 * '''Return Values:'''
     182   * A list of responses each containing
     183     * ID - a 64-bit integer identifying the notification
     184     * IsRead - a flag indicating that the message has been read by this user
     185     * Sent - the date the notification was issued
     186     * Text - the text of the notification
     187
     188The filtering variables are all applied if given.  If OnlyUnread is true and FirstDate and LastDate are both given, only unread notifications between those dates are returned.
     189
     190 * '''Service:''' Users
     191 * '''Operation:''' markNotificationsRead
     192 * '''Input Parameters:'''
     193   * Userid - the user's identity to gather notifications
     194   * Notifications - an array of 64-bit integers, the notifications to mark read
     195 * '''Return Values:'''
     196   * None
     197
    167198=== Creation ===
    168199
     
    180211
    181212Note that all non-optional fields must be provided, so this is best preceeded by a call to getProfileDescription to learn the fields.
     213
     214== Projects ==
     215
     216The profile API lets users manage their project memberships as well as manipulate projects.
     217
     218=== Listing Projects ===
     219
     220Authenticated users can look at the various projects they are members of, and may scope such searcher by project names.
     221
     222 * '''Service:''' Projects
     223 * '''Operation:''' viewProjects
     224 * '''Input Parameters:'''
     225   * Userid - the requester's userid
     226   * Owner - a userid - only find projects owned by this user
     227   * NameRE - a string containing a regular expression to match against project names
     228 * '''Return Values:'''
     229   * A list of project descriptors containing
     230     * Name - a string contaiing the project name
     231     * Members - an array of structures containing
     232       * Userid - a member's userid
     233       * rights - a 32-bit integer encoding the user's rights (each a flag)
     234         * ADD_USER - right to add a user to this group
     235         * REMOVE_USER - right to remove a user from this group
     236         * REALIZE_EXPERIMENT - the right to realize an experiment under this group
     237     * Vetting - a flag indicating this is a vetting project
     238
     239Filters are cumulative: specifying a regular expression and an owner will match on both.
     240
     241== Manipulating Projects ==
     242
     243With appropriate rights a user can add another user to a project they are in:
     244
     245 * '''Service:''' Projects
     246 * '''Operation:''' addUser
     247 * '''Input Parameters:'''
     248   * Userid - the requester's userid
     249   * ProjectName - the project to change
     250   * NewUser - the uid to add to the group
     251 * '''Return Values:'''
     252   * None
     253
     254If this fails, a fault is sent.  A call to {{{viewProjects}}} will confirm the change.
     255
     256Similarly, a user can be removed:
     257
     258 * '''Service:''' Projects
     259 * '''Operation:''' removeUser
     260 * '''Input Parameters:'''
     261   * Userid - the requester's userid
     262   * ProjectName - the project to change
     263   * RemoveUser - the uid to remove from the group
     264 * '''Return Values:'''
     265   * None
     266
     267If a user has the right to both add and remove a user, that user can change a user's permissions:
     268
     269 * '''Service:''' Projects
     270 * '''Operation:''' changePermissions
     271 * '''Input Parameters:'''
     272   * Userid - the requester's userid
     273   * ProjectName - the project to change
     274   * TargetUser - the uid to manipulate
     275   * Rights - a 32-bit integer encoding the user's rights (each a flag)
     276     * ADD_USER - right to add a user to this group
     277     * REMOVE_USER - right to remove a user from this group
     278     * REALIZE_EXPERIMENT - the right to realize an experiment under this group
     279 * '''Return Values:'''
     280   * None
     281
     282The owner of a group (and only the owner of that group) can give that privilege away:
     283
     284 * '''Service:''' Projects
     285 * '''Operation:''' setOwner
     286 * '''Input Parameters:'''
     287   * Userid - the requester's userid
     288   * ProjectName - the project to change
     289   * NewOwner - the uid of the new owner
     290 * '''Return Values:'''
     291   * None
     292
     293A user may request to join an existing project.  Note that the user need not be able to view or manipulate the project to make a request. The request will send a notification to users in the target group that can add users.
     294
     295 * '''Service:''' Projects
     296 * '''Operation:''' requestJoin
     297 * '''Input Parameters:'''
     298   * Userid - the requester's userid
     299   * ProjectName - the project to join
     300 * '''Return Values:'''
     301   * None
     302
     303=== Manipulating Projects ===
     304
     305Non-vetting projects can be created and deleted with little overhead:
     306
     307 * '''Service:''' Projects
     308 * '''Operation:''' createProject
     309 * '''Input Parameters:'''
     310   * Userid - the requester's userid
     311   * Name - the new project's name
     312 * '''Return Values:'''
     313   * None
     314
     315On success the new project is created with the calling user as owner and sole member.  The user has all rights.
     316
     317 * '''Service:''' Projects
     318 * '''Operation:''' removeProject
     319 * '''Input Parameters:'''
     320   * Userid - the requester's userid
     321   * Name - the new project's name
     322 * '''Return Values:'''
     323   * None
     324
     325Generally an owner can remove a project, but removing a vetting project requires a testbed administrator.
     326
     327Because creating a vetting project may require review, it is more involved.  First the user retrieves the testbed's schema for information to supply:
     328
     329 * '''Service:''' Projects
     330 * '''Operation:''' getVettingRequirements
     331 * '''Input Parameters:'''
     332 * '''Return Values:'''
     333   * A list of requirements elements each containing
     334     * Name - a string, the element's name
     335     * DataType - a string giving the element's
     336       * string
     337       * integer
     338       * double
     339       * binary/opaque
     340     * StringValue - a string containing the element's value, unless it is binary/opaque
     341     * BinaryValue - a byte string containing the element's value if it is binary/opaque
     342     * Optional - a flag true if the field is optional (must be present but may be empty)
     343     * Description - a string explaining the field
     344
     345A web interface will gather this interface and call:
     346
     347 * '''Service:''' Projects
     348 * '''Operation:''' createVettingProject
     349 * '''Input Parameters:'''
     350   * Userid - the requester's userid
     351   * Name - a string containing the project name
     352   * A (possibly empty) list of vetting info fields requests. Each request contains
     353     * Name - the name of the field supplied
     354     * StringValue - the value of the field if this is not an opaque/binary field
     355     * BinaryValue - the value of the field if this is an opaque/binary field
     356 * '''Return Values:'''
     357   * None
     358
     359When this succeeds the data will be passed into the testbed's vetting process.  The user will be notified out of band if the project was created.  Behind the scenes the project is created by an admin using {{{createProject}}} and this call is made on it by the admin:
     360
     361 * '''Service:''' Projects
     362 * '''Operation:''' makeProjectVetting
     363 * '''Input Parameters:'''
     364   * Userid - the requester's userid
     365   * Name - the project's name
     366 * '''Return Values:'''
     367   * None
     368
     369And then the admin adds the requesting user to the project makes them owner and removes themselves.