| 213 | |
| 214 | == Projects == |
| 215 | |
| 216 | The profile API lets users manage their project memberships as well as manipulate projects. |
| 217 | |
| 218 | === Listing Projects === |
| 219 | |
| 220 | Authenticated 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 | |
| 239 | Filters are cumulative: specifying a regular expression and an owner will match on both. |
| 240 | |
| 241 | == Manipulating Projects == |
| 242 | |
| 243 | With 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 | |
| 254 | If this fails, a fault is sent. A call to {{{viewProjects}}} will confirm the change. |
| 255 | |
| 256 | Similarly, 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 | |
| 267 | If 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 | |
| 282 | The 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 | |
| 293 | A 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 | |
| 305 | Non-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 | |
| 315 | On 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 | |
| 325 | Generally an owner can remove a project, but removing a vetting project requires a testbed administrator. |
| 326 | |
| 327 | Because 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 | |
| 345 | A 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 | |
| 359 | When 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 | |
| 369 | And then the admin adds the requesting user to the project makes them owner and removes themselves. |