Changes between Initial Version and Version 1 of DevTestbedAPISpec


Ignore:
Timestamp:
Mar 16, 2015 11:39:39 AM (10 years ago)
Author:
faber
Comment:

--

Legend:

Unmodified
Added
Removed
Modified
  • DevTestbedAPISpec

    v1 v1  
     1[[TOC]]
     2
     3= DETER Testbed API =
     4
     5The DETER testbed API is broken up into services, each covering one of the major abstractions that the testbed exports.  The services are:
     6
     7 * Admin
     8 * ApiInfo
     9 * Users
     10 * Projects
     11 * Resources
     12 * Experiments
     13 * Libraries
     14
     15We discuss each in detail and provide links to the detailed javadoc of the implementation, where applicable and available.
     16
     17The document and API are both works in progress and will be fleshed out and changed as the API is modified.
     18
     19== General Info ==
     20
     21The API is implemented as a SOAP web service over TLS secured connections.  The user's identity is generally provided by a client certificate, but the client certificates are generally transient.  A valid temporary client certificate can be requested from the API by correctly responding to a challenge keyed on the user's password.
     22
     23The API is implemented using the axis web service framework, which means that javadocs are provided for the various calls.
     24
     25Each service and call are accessed by appending servicename/operation to the base URL of the API server.  On DETERlab the base URL will be https://api.isi.deterlabnet:52323/axis2/service.  For example, one can access the getVersion operation below at https://api.isi.deterlabnet:52323/axis2/service/ApiInfo/getVersion
     26
     27Each operation returns useful parameters on success and throws a fault, called a DeterFault, on an error.  Faults are standard SOAP faults with a detail section that includes the following fields:
     28
     29 * ErrorCode - a 32-bit integer encoding the type of error.  Constants are available in the [http://www.isi.edu/~faber/tmp/DeterAPI/doc/constant-values.html the javadocs].  Values are:
     30   * access - access denied
     31   * request - bad request
     32   * internal - internal server error
     33   * password - user has an expired password that must be changed
     34   * login - user is not logged in for a call that requires a valid login.
     35 * ErrorString - a string describing the broad error
     36 * DetailString - a string describing the details that caused the error
     37
     38The {{{ErrorString}}} and {{{ErrorCode}}} are equivalent, but the information in the {{{DetailString}}} is generally more informative about the specifics.  Request or access errors are generally correctable on the client side while internal errors are not.
     39
     40[http://www.isi.edu/~faber/tmp/DeterAPI/doc/net/deterlab/testbed/api/DeterFault.html javadoc for DeterFault]
     41
     42
     43== ApiInfo ==
     44
     45The ApiInfo service provides metadata about the running DETER API.  It also provides a simple check that a user is presenting authentication credentials correctly.
     46
     47[http://www.isi.edu/~faber/tmp/DeterAPI/doc/net/deterlab/testbed/api/ApiInfo.html javadoc for ApiInfo]
     48
     49The primary operation in the ApiInfo service is {{{getVersion}}}.  The call is unauthenticated and can be made driectly from a web browser to confirm that the API is functioning and that the user can see DETERlab.
     50
     51 * '''Service:''' ApiInfo
     52 * '''Operation:''' getVersion
     53 * '''Input Parameters:'''
     54   * None
     55 * '''Return Values:'''
     56   * Version - A string containing the API version number
     57   * PatchLevel - A string containing the patch level
     58   * KeyID - A string.  If the user presented a valid public key and passed the SSL challenge, this is the sha1 hash of that key.  If no key was presented or an invalid one, this field is not returned.
     59
     60There is an addtional simpler service, {{{echo}}}, that takes one parameter and returns it:
     61
     62 * '''Service:''' ApiInfo
     63 * '''Operation:''' echo
     64 * '''Input Parameters:'''
     65   * param - a string to echo
     66 * '''Return Values:'''
     67   * the same string
     68
     69== Users ==
     70
     71The Users API is concerned with managing users and their profiles as well as authenticating to the testbed and receiving a client certificate for later calls.
     72
     73[http://www.isi.edu/~faber/tmp/DeterAPI/doc/net/deterlab/testbed/api/Users.html javadoc for Users]
     74
     75=== Authentication ===
     76
     77A user's identity is tied to an X.509 client certifcate issued by DETER.  A certificate is bound to one user at a time, but a person can logout and log in as a different DETER user using the same certificate by presenting a different password, or logging out, which severs the connection of user to certificate.
     78
     79A user can get a DETER-signed certificate by logging in without presenting an existing DETER-signed certificate.  For example, the first time a user logs in, they will get a DETER-signed certificate.
     80
     81A UI is welcome to keep one certificate for a session, or to reuse the certificates until they expire.  The certificates are issued with several years of valid time.
     82
     83A user can authenticate to the testbed and receive an X.509 certificate by requesting a challenge using the {{{requestChallenge}}} operation and responding to the challenge via the {{{challengeResponse}}} operation.
     84
     85Currently only one challenge is available, type "clear".  The challenge has no data and the user replies with their password in clear text.  Note that the exchange is protected by the SSL encrypted exchange, but implementors should not respond to clear challenges with parameters in the query string.  The "masked" challenge will address this issue shortly.
     86
     87 * '''Service:''' Users
     88 * '''Operation:''' requestChallenge
     89 * '''Input Parameters:'''
     90   * userid - the identity to authenticate
     91   * types - a list of challenges that are acceptable to the user.  May be empty
     92 * '''Return Values:'''
     93   * Type - the kind of challenge
     94   * Data - the data needed for the challenge
     95   * Validity - number of seconds the challenge may be responded to
     96   * ChallengeID - a 64-bit identifier that allows the server to validate the reply
     97
     98Each challenge is valid for 2 minutes and are rate-limited.  Web interfaces should collect the password from the user before requesting a challenge from the API to avoid spurious timeouts.
     99
     100 * '''Service:''' Users
     101 * '''Operation:''' challengeResponse
     102 * '''Input Parameters:'''
     103  * ResponseData - a binary string, the response to the challenge
     104  * ChallengeID - The 64-bit identifier of the challenge being responded to
     105 * '''Return Values''':
     106  * Certificate - an optional  binary string containing a PEM-encoded X.509 certificate and private key. (Passed down the encrypted connection)  If the user presented a certificate on this connection, no credential is returned.
     107
     108Any certificate returned by the challenge is signed by the testbed.
     109
     110The binding between user and certificate lasts 24 hours.  It can be renewed by making another login exchange.  A UI may want to prompt a user to login again before the binding times out.
     111
     112 * '''Service:''' Users
     113 * '''Operation:''' logout
     114 * '''Input Parameters:'''
     115  * None
     116 * '''Return Values:'''
     117  * A boolean, true if the logout succeeded
     118
     119Removes the user-to-certificate binding for this certificate.  The certificate can be reused or discarded, but cannot be used to manipulate the testbed without another successful requestChallenge/challengeResponse exchange.
     120
     121
     122=== Password Changes ===
     123
     124The password is a unique user feature that is not in the profile because of its role in authentication.  When a user needs to change their password there are two API calls that can be used.
     125
     126If the user knows their current (or expired) password, they can authenticate using the standard challenge response protocol and then call
     127
     128* '''Service:''' Users
     129 * '''Operation:''' changePassword
     130 * '''Input Parameters:'''
     131  * uid - the userid to change (note that an admin may change others passwords)
     132  * newPass - the new passowrd
     133 * '''Return Values''':
     134  * a boolean, true if successful, but errors will throw a fault
     135
     136We expect that the web interface will handle issues like confirming user input to a password change page.  The changePassword call just makes the change directly.
     137
     138If a user has forgotten their password, the user can request a password challenge, sent to them at their profile e-mail address.  The challenge is a 64-bit number that can be used to call changePasswordChallenge without logging in.  To request a challenge, the web interface calls:
     139
     140* '''Service:''' Users
     141 * '''Operation:''' requestPasswordReset
     142 * '''Input Parameters:'''
     143  * uid - the userid to change
     144  * urlPrefix - a string prefixed to the challenge ID in the mail sent to the user
     145 * '''Return Values''':
     146  * a boolean, true if successful, but most errors will throw a fault
     147
     148Again, we expect this call to generally be made from a web interface that will then want to present an input form to the in order to reset their password.  The urlPrefix field provides that hook.  A web interface running on !https://niftydeter.com might call requestPasswordReset with parameters 'forgetfuluser' and '!https://niftydeter.com/reset.html?challenge='.  After that call forgetfuluser will get e-mail asking him or her to access the web page at !https://niftydeter.com/reset.html?challenge=1283548127541824, allowing {{{niftydeter.com}}} to present their password change interface, and do error checking, etc. on the new password.
     149
     150Each challenge is valid for 2 hours, and they are rate-limited so only a few can be outstanding.
     151
     152With a valid challenge in hand, the web interface can call
     153
     154* '''Service:''' Users
     155 * '''Operation:''' changePasswordChallenge
     156 * '''Input Parameters:'''
     157  * challengeID - the 64-bit number from the e-mail
     158  * newPass - the new passowrd
     159 * '''Return Values''':
     160  * a boolean, true if successful, but most errors will throw a fault
     161
     162
     163=== Profile Manipulation ===
     164
     165DETER keeps metadata about each user called a profile.  The API provides an authenticated user with several interfaces to query and modify their profile information.
     166
     167In the API each element of profile data is represented as a structure with the following data in it:
     168
     169 * name of the element
     170 * type of the element
     171  * string
     172  * integer
     173  * double
     174  * binary/opaque
     175 * value(s) of the element
     176 * a flag set if the element is optional
     177 * A flag set if the field can be removed from the profile
     178 * a modification type: elements may be read/write, read-only (e.g., username) or write-only (e.g., some shared secret) (valid strings are at [http://www.isi.edu/~faber/tmp/DeterAPI/doc/constant-values.html the constants documentation.]
     179 * a brief description of the field, intended to be presented by a web interface or other third party program
     180 * an ordering hint for web interfaces presenting the data to users, an integer
     181 * an optional length hint to give a web interface a hint as to how big an input field to present.  0 indicates no hint.
     182
     183To get a profile schema, for example to create an empty web page,
     184
     185 * '''Service:''' Users
     186 * '''Operation:''' getProfileDescription
     187 * '''Input Parameters:'''
     188 * '''Return Values:'''
     189   * Uid - always empty
     190   * A list of profile elements each containing
     191     * Name - a string, the element's name
     192     * DataType - a string giving the element's
     193       * string
     194       * integer
     195       * double
     196       * binary/opaque
     197     * Value - a string containing the element's value
     198     * Access - a string describing the access values (values at [http://www.isi.edu/~faber/tmp/DeterAPI/doc/constant-values.html javadoc as described above])
     199     * Optional - a flag true if the field is optional (must be present but may be empty)
     200     * Removable - a flag true if the field can be removed
     201     * Description - a string explaining the field
     202     * Format - a regular expression that can be used to validate the field entry (may be null, and generally is for optional fields)
     203     * FormatDescription - A brief, natural language description of the field input constraints, e.g. "A valid e-mail address" or "only numbers and spaces".
     204     * OrderingHint - an integer suggesting where to present the attribute. Lower numbers come first
     205     * LengthHint - an integer suggesting how long an input firld should be presented
     206
     207To read a user's profile (generally only users can read their own profile).
     208
     209 * '''Service:''' Users
     210 * '''Operation:''' getUserProfile
     211 * '''Input Parameters:'''
     212  * userid - a string naming the user to be retrieved
     213 * '''Return Values:'''
     214   * Userid - the user whose profile is returned
     215   * A list of profile elements each containing
     216     * Name - a string, the element's name
     217     * DataType - a string giving the element's
     218       * string
     219       * integer
     220       * double
     221       * binary/opaque
     222     * Value - a string containing the element's value
     223     * Access - a string describing the access values (values at [http://www.isi.edu/~faber/tmp/DeterAPI/doc/constant-values.html javadoc as described above])
     224     * Optional - a flag true if the field is optional (must be present but may be empty)
     225     * Removable - a flag true if the field can be removed
     226     * Description - a string explaining the field
     227     * Format - a regular expression that can be used to validate the field entry (may be null, and generally is for optional fields)
     228     * FormatDescription - A brief, natural language description of the field input constraints, e.g. "A valid e-mail address" or "only numbers and spaces".
     229     * OrderingHint - an integer suggesting where to present the attribute. Lower numbers come first
     230     * LengthHint - an integer suggesting how long an input field should be presented
     231
     232Finally a user can modify a profile:
     233 
     234 * '''Service:''' Users
     235 * '''Operation:''' changeUserProfile
     236 * '''Input Parameters:'''
     237   * Userid - the user's profile to modify
     238   * A list of change requests. Each request contains
     239     * Name - the name of the field to change
     240     * Value - the new value of the field
     241     * Delete - a flag, if true delete the field rather than modify it
     242 * '''Return Values:'''
     243   * A list of responses each containing
     244    * Name - astring with the name of the field
     245    * Success - a flag indicating if the request succeeded
     246    * Reason - a string indicating the reason if Success is false
     247
     248=== Notifications ===
     249
     250A 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.
     251
     252Each notification has a set of flags that define its state.  Currently there are 2
     253
     254 * '''READ''' true if the user has read the notification
     255 * '''URGENT'''true if the testbed considers this urgent information
     256
     257The user is free to change this state using the markNotifications call.  Note that notifications are per-user.  A user who clears the READ or URGENT flag does not clear the flag for other recipients of the notification.
     258
     259 
     260 * '''Service:''' Users
     261 * '''Operation:''' getNotifications
     262 * '''Input Parameters:'''
     263   * Userid - the user's identity to gather notifications
     264   * FirstDate - an optional date.  If present only show notifications after that date
     265   * LastDate - an optional date.  If present only show notifications before that date
     266   * Flags - A potentially empty list of flags to check.  If a flag's name appears in this list, only notifications with their flag in the given state are returned.
     267     * Tag - a string, the name of the flag
     268     * isSet - a boolean, true if the flag should be set
     269 * '''Return Values:'''
     270   * A list of responses each containing
     271     * ID - a 64-bit integer identifying the notification
     272     * Flags - the notification state in the format
     273       * Tag - a string, the name of the flag
     274       * isSet - a boolean, true if notifications with the flag set should be returned, false if notifications with the flag unset should be returned
     275     * Sent - the date the notification was issued
     276     * Text - the text of the notification
     277
     278The filtering variables are all applied if given.
     279
     280The mask and flags variable define the state a user is searching for.  If a bit is set in both mask and flags, only messages with that bit set are returned.  Similarly if a bit is clear in flags and set in mask, only messages with that bit clear will be returned.
     281
     282To be concrete: a user who wants to retrieve all unread messages (urgent or not) should send a flags field with the READ bit clear and a mask with the READ bit set.  To retrieve only unread urgent messages, the flags should have READ clear and URGENT set, and both READ and URGENT set in the mask.
     283
     284
     285 * '''Service:''' Users
     286 * '''Operation:''' markNotifications
     287 * '''Input Parameters:'''
     288   * Userid - the user's identity to gather notifications
     289   * Ids - an array of 64-bit integers, the identifiers of the notifications to mark
     290   * Flags - A list of flags to modify.  If a flag's name appears in this list, notifications will have their flag set to the given value.
     291     * Tag - a string, the name of the flag
     292     * isSet - a boolean, true if the flag should be set, false if it should be unset
     293 * '''Return Values:'''
     294   * None
     295
     296Administrators can send notifications, for example to announce testbed events.  The call to do so is:
     297
     298 * '''Service:''' Users
     299 * '''Operation:''' sendNotification
     300 * '''Input Parameters:'''
     301   * Users - a list of uids to receive the notification
     302   * Projects - a list of projects to receive the notification.  All users in the project will receive it
     303   * Flags - A list of initial flag values.  If a flag's name appears in this list, notifications will have their flag set to the given value.  Flags that do not appear will be unset.
     304     * Tag - a string, the name of the flag
     305     * isSet - a boolean, true if the flag should be set, false if it should be unset
     306   * Text - the content of the notification
     307 * '''Return Values:'''
     308   * None
     309
     310=== Creation and Deletion ===
     311
     312Finally a user can request access to the testbed by creating a profile.  The user has no privileges and consumes minimal resources until they join a vetted project.  This is an unauthenticated call, but the user profile is not created until an automated e-mail exchange is made between the testbed and the proto-user.
     313
     314 * '''Service:''' Users
     315 * '''Operation:''' createUser
     316 * '''Input Parameters:'''
     317   * Userid - the requested userid (optional)
     318   * A list of profile elements each containing
     319     * Name - a string, the element's name
     320     * StringValue - a string containing the element's value
     321 * '''Return Values:'''
     322  * The userid actually created
     323
     324Note that all non-optional fields must be provided, so this is best preceeded by a call to getProfileDescription to learn the fields.
     325
     326A base userid is constructed, either from the userid presented or from a required field in the profile.  If that base userid is available, that a user with that userid is created.  Otherwise the userid is disambiguated until there are no collisions.  The userid actually created is returned.
     327
     328The user is created without membership in any projects and without a password.  A password reset challenge (equivalent to one issued by requestPasswordReset) is issued and the challenge e-mailed to the user at the address in the profile.
     329
     330Administrators can create users without the confirmation step:
     331
     332 * '''Service:''' Users
     333 * '''Operation:''' createUserNoConfirm
     334 * '''Input Parameters:'''
     335   * Userid - the requested userid (optional)
     336   * A list of profile elements each containing
     337     * Name - a string, the element's name
     338     * StringValue - a string containing the element's value, unless it is binary/opaque
     339   * clearpassword - an optional string given the cleartext password
     340   * hash - an optional string containing a hashed password
     341   * hashtype - an optional string giving the type of hash
     342 * '''Return Values:'''
     343  * The userid actually created
     344
     345Note that either the cleartext password or the hash and type must be passed.  This interface is under for initializing the testbed or creating users in batch for something like a class.
     346
     347
     348Removing a user is accomplished using
     349 * '''Service:''' Users
     350 * '''Operation:''' removeUser
     351 * '''Input Parameters:'''
     352   * Userid - the requested userid
     353 * '''Return Values:'''
     354  * a boolean, true if the user was removed
     355
     356Most users are unlikely to use this service, and policy may allow only administrators to remove users.
     357
     358=== Manipulating Profile Attributes ===
     359
     360Administrators may add attributes to user profiles or remove them.  That is to say, add a schema (including format constraints and descriptions), not set a value for a user.
     361
     362Creating an attribute:
     363
     364* '''Service:''' Users
     365 * '''Operation:''' createUserAttribute
     366 * '''Input Parameters:'''
     367   * Name - the attribute name
     368   * Type - the type (STRING, INT, FLOAT, OPAQUE)
     369   * Optional - a boolean, true if this attribute is optional
     370   * Access - a string: the user's ability to modify (READ_WRITE, READ_ONLY, WRITE_ONLY, NO_ACCESS)
     371   * Description - natural language description of the field (optional)
     372   * Format - a regular expression describing the format (optional)
     373   * Formatdescription - a natural language explanation of the format (optional)
     374   * OrderingHint - an integer suggesting where to present the attribute. Lower numbers come first
     375   * LengthHint - an integer suggesting how long an input
     376   * Def - default value of the attribute (will be set for all users)
     377 * '''Return Values:'''
     378  * a boolean, true if the attribute was created
     379
     380And removing an attribute:
     381
     382* '''Service:''' Users
     383 * '''Operation:''' removeUserAttribute
     384 * '''Input Parameters:'''
     385   * Name - the attribute name
     386 * '''Return Values:'''
     387  * a boolean, true if the attribute was removed
     388
     389Finally administrators can modify profile attributes:
     390
     391* '''Service:''' Users
     392 * '''Operation:''' modifyUserAttribute
     393 * '''Input Parameters:'''
     394   * Name - the attribute name
     395   * Type - the type (STRING, INT, FLOAT, OPAQUE)
     396   * Optional - a boolean, true if this attribute is optional
     397   * Access - a string: the user's ability to modify (READ_WRITE, READ_ONLY, WRITE_ONLY, NO_ACCESS)
     398   * Description - natural language description of the field (optional)
     399   * Format - a regular expression describing the format (optional)
     400   * Formatdescription - a natural language explanation of the format (optional)
     401   * OrderingHint - an integer suggesting where to present the attribute. Lower numbers come first
     402   * LengthHint - an integer suggesting how long an input
     403 * '''Return Values:'''
     404  * a boolean, true if the attribute was created
     405
     406
     407
     408
     409== Projects ==
     410
     411The profile API lets users manage their project memberships as well as manipulate projects.
     412
     413[http://www.isi.edu/~faber/tmp/DeterAPI/doc/net/deterlab/testbed/api/Projects.html Projects javadocs]
     414
     415=== Listing Projects ===
     416
     417Authenticated users can look at the various projects they are members of, and may scope such searcher by project names.
     418
     419 * '''Service:''' Projects
     420 * '''Operation:''' viewProjects
     421 * '''Input Parameters:'''
     422   * Userid - the requester's userid
     423   * Owner - a userid - only find projects owned by this user
     424   * NameRE - a string containing a regular expression to match against project names
     425 * '''Return Values:'''
     426   * A list of project descriptors containing
     427     * Name - a string contaiing the project name
     428     * Owner - the uid of the project owner
     429     * Members - an array of structures containing
     430       * Userid - a member's userid
     431       * Permissions - a list of strings encoding the user's rights (each a flag, if present the user has the right)
     432         * ADD_USER - right to add a user to this project
     433         * REMOVE_USER - right to remove a user from this project
     434         * CREATE_CIRCLE - the right to create a circle under this project's name space
     435     * Approved - a flag indicating this project has been approved
     436
     437Filters are cumulative: specifying a regular expression and an owner will match on both.
     438
     439=== Changing Project Membership ===
     440
     441Each of these changes propagates to the linked circle that controls resource permissions for the project. In particular, the permissions fields should include the union of the project and circle rights to set
     442
     443With appropriate rights a user can add another user to a project they are in.
     444The user being added must confirm this addition (below).  As a result of this call, users being added will be sent a notification including a challenge id to respond to, similar to a password change URL.  The prefix for that URL can be passed in here.
     445
     446 * '''Service:''' Projects
     447 * '''Operation:''' addUsers
     448 * '''Input Parameters:'''
     449   * ProjectID - the project
     450   * Uids - the userids to add
     451   * Perms - a list of strings giving the permissions to grant the user in this project.  The values are the same as in viewProjects.
     452   * urlPrefix - a prefix to direct the user to a specific web interface to respond to the challenge.
     453 * '''Return Values:'''
     454   * A list of results of the form
     455     * Name - the uid being added
     456     * Success - a flag indicating success or failure
     457     * Reason - the reason for a failure
     458
     459For each user successfully added, a notification is sent.  To respond to that notification the UI must call:
     460
     461* '''Service:''' Projects
     462 * '''Operation:''' addUserConfirm
     463 * '''Input Parameters:'''
     464   * ChallengeID - the challenge being responded to
     465 * '''Return Values:'''
     466   * true if the user was added.  A fault is thrown on errors.
     467
     468Once the confirmation is received, the user is actually a member of the project.  If challenges are not responded to in 48 hours, they are no longer valid.
     469
     470Administrators can add users without going through the confirmation process:
     471
     472* '''Service:''' Projects
     473 * '''Operation:''' addUsersNoConfirm
     474 * '''Input Parameters:'''
     475   * ProjectID - the project
     476   * Uids - the userids to add
     477   * Perms - a list of strings that define the user's rights.  They are the same strings as in viewProjects.
     478 * '''Return Values:'''
     479   * A list of results of the form
     480     * Name - the uid being added
     481     * Success - a flag indicating success or failure
     482     * Reason - the reason for a failure
     483
     484Users can also request to join a project.  This requires some member of the project with ADD_USER rights to agree, so a notification is sent to all such users.
     485
     486 * '''Service:''' Projects
     487 * '''Operation:''' joinProject
     488 * '''Input Parameters:'''
     489   * Uid - the uid to add
     490   * ProjectID - the project to join
     491   * urlPrefix - a prefix to direct the user to a specific web interface to respond to the challenge.
     492 * '''Return Values:'''
     493   * A boolean, true if the join request was sent
     494
     495The join succeeds when a user with appropriate permissions calls joinProjectConfirm.
     496Note that the user calling joinProjectConfirm sets the new user's project permissions.
     497
     498* '''Service:''' Projects
     499 * '''Operation:''' joinProjectConfirm
     500 * '''Input Parameters:'''
     501   * ChallengeID - the challenge being responded to
     502   * Perms - a list of strings defining the permissions to grant the user in this project.  The values are as in viewProjects.
     503 * '''Return Values:'''
     504   * true if the user was successfully added.  A fault is thrown on errors.
     505
     506
     507Users can be removed from projects:
     508
     509 * '''Service:''' Projects
     510 * '''Operation:''' removeUsers
     511 * '''Input Parameters:'''
     512   * ProjectName - the project to change
     513   * Uids - uids to remove
     514 * '''Return Values:'''
     515   * A list of results of the form
     516     * Name - the uid being added
     517     * Success - a flag indicating success or failure
     518     * Reason - the reason for a failure
     519
     520If a user has the right to both add and remove a user, that user can change a user's permissions:
     521
     522 * '''Service:''' Projects
     523 * '''Operation:''' changePermissions
     524 * '''Input Parameters:'''
     525   * ProjectName - the project to change
     526   * Uids - the uids to manipulate
     527   * Permissions - a list of strings encoding the user's rights (each a flag - the user is assigned the right/permission if the string is present).  The values are as in viewProjects.
     528 * '''Return Values:'''
     529   * A list of results of the form
     530     * Name - the uid being added
     531     * Success - a flag indicating success or failure
     532     * Reason - the reason for a failure
     533
     534=== Manipulating Projects ===
     535
     536The owner of a group (and only the owner of that group) can give that privilege away:
     537
     538 * '''Service:''' Projects
     539 * '''Operation:''' setOwner
     540 * '''Input Parameters:'''
     541   * Userid - the requester's userid
     542   * ProjectName - the project to change
     543   * NewOwner - the uid of the new owner
     544 * '''Return Values:'''
     545   * None
     546
     547=== Project Profiles ===
     548
     549The calls for manipulating a project profile are very similar to user profiles:
     550
     551To get a profile schema, for example to create an empty web page,
     552
     553 * '''Service:''' Projects
     554 * '''Operation:''' getProfileDescription
     555 * '''Input Parameters:'''
     556 * '''Return Values:'''
     557   * Projectid - always empty
     558   * A list of profile elements each containing
     559     * Name - a string, the element's name
     560     * DataType - a string giving the element's
     561       * string
     562       * integer
     563       * double
     564       * binary/opaque
     565     * Value - a string containing the element's value
     566     * Access - a string describing the access values (values [http://www.isi.edu/~faber/tmp/DeterAPI/doc/constant-values.html here])
     567     * Optional - a flag true if the field is optional (must be present but may be empty)
     568     * Removable - a flag true if the field can be removed
     569     * Description - a string explaining the field
     570     * Format - a regular expression that can be used to validate the field entry (may be null, and generally is for optional fields)
     571     * FormatDescription - A brief, natural language description of the field input constraints, e.g. "A valid e-mail address" or "only numbers and spaces".
     572     * OrderingHint - an integer suggesting where to present the attribute. Lower numbers come first
     573     * LengthHint - an integer suggesting how long an input firld should be presented
     574
     575To read a project's profile.
     576
     577 * '''Service:''' Projects
     578 * '''Operation:''' getProjectProfile
     579 * '''Input Parameters:'''
     580  * Projectid - a string naming the project to be retrieved
     581 * '''Return Values:'''
     582   * Projectid - the project whose profile is returned
     583   * A list of profile elements each containing
     584     * Name - a string, the element's name
     585     * DataType - a string giving the element's
     586       * string
     587       * integer
     588       * double
     589       * binary/opaque
     590     * Value - a string containing the element's value
     591     * Access - a string describing the access values (Defined [http://www.isi.edu/~faber/tmp/DeterAPI/doc/constant-values.html here])
     592     * Optional - a flag true if the field is optional (must be present but may be empty)
     593     * Removable - a flag true if the field can be removed
     594     * Description - a string explaining the field
     595     * Format - a regular expression that can be used to validate the field entry (may be null, and generally is for optional fields)
     596     * FormatDescription - A brief, natural language description of the field input constraints, e.g. "A valid e-mail address" or "only numbers and spaces".
     597     * OrderingHint - an integer suggesting where to present the attribute. Lower numbers come first
     598     * LengthHint - an integer suggesting how long an input field should be presented
     599
     600Finally a user can modify a project profile:
     601 
     602 * '''Service:''' Projects
     603 * '''Operation:''' changeProjectProfile
     604 * '''Input Parameters:'''
     605   * ProjectId - the project's profile to modify
     606   * A list of change requests. Each request contains
     607     * Name - the name of the field to change
     608     * Value - the new value of the field
     609     * Delete - a flag, if true delete the field rather than modify it
     610 * '''Return Values:'''
     611   * A list of responses each containing
     612    * Name - astring with the name of the field
     613    * Success - a flag indicating if the request succeeded
     614    * Reason - a string indicating the reason if Success is false
     615
     616
     617=== Manipulating Profile Attributes ===
     618
     619Administrators may add attributes to project profiles or remove them.  That is to say, add a schema (including format constraints and descriptions), not set a value for a project.
     620
     621Creating an attribute:
     622
     623* '''Service:''' Projects
     624 * '''Operation:''' createProjectAttribute
     625 * '''Input Parameters:'''
     626   * Name - the attribute name
     627   * Type - the type (STRING, INT, FLOAT, OPAQUE)
     628   * Optional - a boolean, true if this attribute is optional
     629   * Access - a string: the user's ability to modify (READ_WRITE, READ_ONLY, WRITE_ONLY, NO_ACCESS)
     630   * Description - natural language description of the field (optional)
     631   * Format - a regular expression describing the format (optional)
     632   * Formatdescription - a natural language explanation of the format (optional)
     633   * OrderingHint - an integer suggesting where to present the attribute. Lower numbers come first
     634   * LengthHint - an integer suggesting how long an input
     635   * Def - default value of the attribute (will be set for all users)
     636 * '''Return Values:'''
     637  * a boolean, true if the attribute was created
     638
     639And removing an attribute:
     640
     641* '''Service:''' Projects
     642 * '''Operation:''' removeProjectAttribute
     643 * '''Input Parameters:'''
     644   * Name - the attribute name
     645 * '''Return Values:'''
     646  * a boolean, true if the attribute was removed
     647
     648Finally administrators can modify profile attributes:
     649
     650* '''Service:''' Projects
     651 * '''Operation:''' modifyProjectAttribute
     652 * '''Input Parameters:'''
     653   * Name - the attribute name
     654   * Type - the type (STRING, INT, FLOAT, OPAQUE)
     655   * Optional - a boolean, true if this attribute is optional
     656   * Access - a string: the user's ability to modify (READ_WRITE, READ_ONLY, WRITE_ONLY, NO_ACCESS)
     657   * Description - natural language description of the field (optional)
     658   * Format - a regular expression describing the format (optional)
     659   * Formatdescription - a natural language explanation of the format (optional)
     660   * OrderingHint - an integer suggesting where to present the attribute. Lower numbers come first
     661   * LengthHint - an integer suggesting how long an input
     662 * '''Return Values:'''
     663  * a boolean, true if the attribute was created
     664
     665
     666=== Creating and Deleting Projects ===
     667
     668Creating and removing projects are also similar to creating and removing users:
     669
     670 * '''Service:''' Projects
     671 * '''Operation:''' createProject
     672 * '''Input Parameters:'''
     673   * ProjectId - the new project's name
     674   * Owner - the new owner's uid (usually the caller)
     675   * profile - a list of attributes that will make up the project's profile
     676   * A list of profile elements each containing
     677     * Name - a string, the element's name
     678     * StringValue - a string containing the element's value
     679 * '''Return Values:'''
     680   * None
     681
     682As with users, all required (non-optional) fields in the profile must be provided.  The project will be created, but have no rights until approved.
     683
     684On success the new project is created with the calling user as owner and sole member.  The user has all rights.
     685
     686
     687Approval is a result of the testbed's vetting process.  The user will be sent a notification when their project is approved.  When approved this call is made by an admin.
     688
     689 * '''Service:''' Projects
     690 * '''Operation:''' approveProject
     691 * '''Input Parameters:'''
     692   * ProjectID - the project's name
     693   * approved - a boolean, the new approval state
     694 * '''Return Values:'''
     695   * None
     696
     697Note that this call can be used to un-approve a previously approved project.
     698
     699Removing a project is straightforward
     700
     701 * '''Service:''' Projects
     702 * '''Operation:''' removeProject
     703 * '''Input Parameters:'''
     704   * ProjectId - the requester's userid
     705 * '''Return Values:'''
     706   * A boolean, true if the approval succeeded
     707
     708Generally an removing a project requires a testbed administrator.
     709
     710== Circles ==
     711
     712The circle API lets users manage their circle memberships as well as manipulate circles.  The circles API is similar to the Projects API.  The primary exceptions are that there is no approval process for circles (though there is for joining or adding a user) and that the permissions are different.
     713
     714These calls work on all circles '''except''' those linked to a project.  Those circles must have their membership, ownership, and permissions manipulated through the project to ensure that the contents remain synchronized.
     715
     716[http://www.isi.edu/~faber/tmp/DeterAPI/doc/net/deterlab/testbed/api/Circles.html circles javadoc]
     717
     718=== Listing Circles ===
     719
     720Authenticated users can look at the various circles they are members of, and may scope such searcher by circle names.
     721
     722 * '''Service:''' Circles
     723 * '''Operation:''' viewCircles
     724 * '''Input Parameters:'''
     725   * Userid - the requester's userid
     726   * Owner - a userid - only find circles owned by this user
     727   * NameRE - a string containing a regular expression to match against circle names
     728 * '''Return Values:'''
     729   * A list of circle descriptors containing
     730     * Name - a string contaiing the circle name
     731     * Owner - the uid of the circle owner
     732     * Members - an array of structures containing
     733       * Userid - a member's userid
     734       * permissions - a list of strings encoding the user's rights (each a flag - the user has the permission if the string is present)
     735         * ADD_USER - right to add a user to this circle
     736         * REMOVE_USER - right to remove a user from this circle
     737         * REALIZE_EXPERIMENT - the right to realize an experiment under this circle
     738
     739Filters are cumulative: specifying a regular expression and an owner will match on both.
     740
     741=== Changing Circle Membership ===
     742
     743With appropriate rights a user can add another user to a circle they are in.
     744The user being added must confirm this addition (below).  As a result of this call, users being added will be sent a notification including a challenge id to respond to, similar to a password change URL.  The prefix for that URL can be passed in here.
     745
     746 * '''Service:''' Circles
     747 * '''Operation:''' addUsers
     748 * '''Input Parameters:'''
     749   * CircleID - the circle
     750   * Uids - the userids to add
     751   * Perms - a list of strings that give the permissions to grant the user in this circle.  The values are the same as described in viewCircles.
     752   * urlPrefix - a prefix to direct the user to a specific web interface to respond to the challenge.
     753 * '''Return Values:'''
     754   * A list of results of the form
     755     * Name - the uid being added
     756     * Success - a flag indicating success or failure
     757     * Reason - the reason for a failure
     758
     759For each user successfully added, a notification is sent.  To respond to that notification the UI must call:
     760
     761* '''Service:''' Circles
     762 * '''Operation:''' addUserConfirm
     763 * '''Input Parameters:'''
     764   * ChallengeID - the challenge being responded to
     765 * '''Return Values:'''
     766   * true if the user was added.  A fault is thrown on errors.
     767
     768Administrators can add users without going through the confirmation process:
     769
     770* '''Service:''' Circles
     771 * '''Operation:''' addUsersNoConfirm
     772 * '''Input Parameters:'''
     773   * CircleID - the circle
     774   * Uids - the userids to add
     775   * Perms - a list of strings giving the permissions to grant the user in this circle.  The values are given the same as described in viewCircles.
     776 * '''Return Values:'''
     777   * A list of results of the form
     778     * Name - the uid being added
     779     * Success - a flag indicating success or failure
     780     * Reason - the reason for a failure
     781
     782Users can also request to join a circle.  This requires some member of the circle with ADD_USER rights to agree, so a notification is sent to all such users.
     783
     784 * '''Service:''' Circles
     785 * '''Operation:''' joinCircle
     786 * '''Input Parameters:'''
     787   * Uid - the uid to add
     788   * CircleID - the circle to join
     789   * urlPrefix - a prefix to direct the user to a specific web interface to respond to the challenge.
     790 * '''Return Values:'''
     791   * A boolean, true if the join notification was sent
     792
     793The join succeeds when a user with appropriate permissions calls joinCircleConfirm.
     794Note that the user calling joinCircleConfirm sets the new user's circle permissions.
     795
     796* '''Service:''' Circles
     797 * '''Operation:''' joinCircleConfirm
     798 * '''Input Parameters:'''
     799   * ChallengeID - the challenge being responded to
     800   * Perms - a list of strings giving the permissions to grant the user in this circle.  The values are as described in viewCircles.
     801 * '''Return Values:'''
     802   * true if the user was subsequently added.  A fault is thrown on errors.
     803
     804
     805Users can be removed from circles:
     806
     807 * '''Service:''' Circles
     808 * '''Operation:''' removeUsers
     809 * '''Input Parameters:'''
     810   * CircleName - the circle to change
     811   * Uids - uids to remove
     812 * '''Return Values:'''
     813   * A list of results of the form
     814     * Name - the uid being added
     815     * Success - a flag indicating success or failure
     816     * Reason - the reason for a failure
     817
     818If a user has the right to both add and remove a user, that user can change a user's permissions:
     819
     820 * '''Service:''' Circles
     821 * '''Operation:''' changePermissions
     822 * '''Input Parameters:'''
     823   * CircleName - the circle to change
     824   * Uids - the uids to manipulate
     825   * Rights - a list of strings encoding the user's rights (each a flag).  Values are as given in viewCircles.  If the string is present, the user is granted the permission.
     826 * '''Return Values:'''
     827   * A list of results of the form
     828     * Name - the uid being added
     829     * Success - a flag indicating success or failure
     830     * Reason - the reason for a failure
     831
     832=== Manipulating Circles ===
     833
     834The owner of a group (and only the owner of that group) can give that privilege away to another member:
     835
     836 * '''Service:''' Circles
     837 * '''Operation:''' setOwner
     838 * '''Input Parameters:'''
     839   * Userid - the requester's userid
     840   * CircleName - the circle to change
     841   * NewOwner - the uid of the new owner
     842 * '''Return Values:'''
     843   * None
     844
     845=== Circle Profiles ===
     846
     847The calls for manipulating a circle profile are very similar to user profiles:
     848
     849To get a profile schema, for example to create an empty web page,
     850
     851 * '''Service:''' Circles
     852 * '''Operation:''' getProfileDescription
     853 * '''Input Parameters:'''
     854 * '''Return Values:'''
     855   * Circleid - always empty
     856   * A list of profile elements each containing
     857     * Name - a string, the element's name
     858     * DataType - a string giving the element's
     859       * string
     860       * integer
     861       * double
     862       * binary/opaque
     863     * Value - a string containing the element's value
     864     * Access - a string describing the access values (values [http://www.isi.edu/~faber/tmp/DeterAPI/doc/constant-values.html here])
     865     * Optional - a flag true if the field is optional (must be present but may be empty)
     866     * Removable - a flag true if the field can be removed
     867     * Description - a string explaining the field
     868     * Format - a regular expression that can be used to validate the field entry (may be null, and generally is for optional fields)
     869     * FormatDescription - A brief, natural language description of the field input constraints, e.g. "A valid e-mail address" or "only numbers and spaces".
     870     * OrderingHint - an integer suggesting where to present the attribute. Lower numbers come first
     871     * LengthHint - an integer suggesting how long an input firld should be presented
     872
     873To read a circle's profile.
     874
     875 * '''Service:''' Circles
     876 * '''Operation:''' getCircleProfile
     877 * '''Input Parameters:'''
     878  * userid - a string naming the user to be retrieved
     879 * '''Return Values:'''
     880   * Circleid - the user whose profile is returned
     881   * A list of profile elements each containing
     882     * Name - a string, the element's name
     883     * DataType - a string giving the element's
     884       * string
     885       * integer
     886       * double
     887       * binary/opaque
     888     * Value - a string containing the element's value
     889     * Access - a string  describing the access values (values [http://www.isi.edu/~faber/tmp/DeterAPI/doc/constant-values.html here])
     890       * READ_WRITE
     891       * READ_ONLY
     892       * WRITE_ONLY (e.g., password)
     893     * Optional - a flag true if the field is optional (must be present but may be empty)
     894     * Removable - a flag true if the field can be removed
     895     * Description - a string explaining the field
     896     * Format - a regular expression that can be used to validate the field entry (may be null, and generally is for optional fields)
     897     * FormatDescription - A brief, natural language description of the field input constraints, e.g. "A valid e-mail address" or "only numbers and spaces".
     898     * OrderingHint - an integer suggesting where to present the attribute. Lower numbers come first
     899     * LengthHint - an integer suggesting how long an input field should be presented
     900
     901Finally a user can modify a circle profile:
     902
     903 * '''Service:''' Circles
     904 * '''Operation:''' changeCircleProfile
     905 * '''Input Parameters:'''
     906   * CircleId - the circle's profile to modify
     907   * A list of change requests. Each request contains
     908     * Name - the name of the field to change
     909     * Value - the new value of the field
     910     * Delete - a flag, if true delete the field rather than modify it
     911 * '''Return Values:'''
     912   * A list of responses each containing
     913    * Name - astring with the name of the field
     914    * Success - a flag indicating if the request succeeded
     915    * Reason - a string indicating the reason if Success is false
     916
     917
     918=== Manipulating Profile Attributes ===
     919
     920Administrators may add attributes to circle profiles or remove them.  That is to say, add a schema (including format constraints and descriptions), not set a value for a circle.
     921Creating an attribute:
     922
     923* '''Service:''' Circles
     924 * '''Operation:''' createCircleAttribute
     925 * '''Input Parameters:'''
     926   * Name - the attribute name
     927   * Type - the type (STRING, INT, FLOAT, OPAQUE)
     928   * Optional - a boolean, true if this attribute is optional
     929   * Access - a string: the user's ability to modify (READ_WRITE, READ_ONLY, WRITE_ONLY, NO_ACCESS)
     930   * Description - natural language description of the field (optional)
     931   * Format - a regular expression describing the format (optional)
     932   * Formatdescription - a natural language explanation of the format (optional)
     933   * OrderingHint - an integer suggesting where to present the attribute. Lower numbers come first
     934   * LengthHint - an integer suggesting how long an input
     935   * Def - default value of the attribute (will be set for all users)
     936 * '''Return Values:'''
     937  * a boolean, true if the attribute was created
     938
     939And removing an attribute:
     940
     941* '''Service:''' Circles
     942 * '''Operation:''' removeCircleAttribute
     943 * '''Input Parameters:'''
     944   * Name - the attribute name
     945 * '''Return Values:'''
     946  * a boolean, true if the attribute was removed
     947
     948Finally administrators can modify profile attributes:
     949
     950* '''Service:''' Circles
     951 * '''Operation:''' modifyCircleAttribute
     952 * '''Input Parameters:'''
     953   * Name - the attribute name
     954   * Type - the type (STRING, INT, FLOAT, OPAQUE)
     955   * Optional - a boolean, true if this attribute is optional
     956   * Access - a string: the user's ability to modify (READ_WRITE, READ_ONLY, WRITE_ONLY, NO_ACCESS)
     957   * Description - natural language description of the field (optional)
     958   * Format - a regular expression describing the format (optional)
     959   * Formatdescription - a natural language explanation of the format (optional)
     960   * OrderingHint - an integer suggesting where to present the attribute. Lower numbers come first
     961   * LengthHint - an integer suggesting how long an input
     962 * '''Return Values:'''
     963  * a boolean, true if the attribute was created
     964
     965
     966=== Creating and Deleting Circles ===
     967
     968Creating and removing circles are also similar to creating and removing users:
     969
     970 * '''Service:''' Circles
     971 * '''Operation:''' createCircle
     972 * '''Input Parameters:'''
     973   * CircleId - the new circle's name
     974   * Uid - the new owner's uid (usually the caller)
     975   * profile - a list of attributes that will make up the circle's profile
     976   * A list of profile elements each containing
     977     * Name - a string, the element's name
     978     * StringValue - a string containing the element's value
     979 * '''Return Values:'''
     980   * None
     981
     982As with users, all required (non-optional) fields in the profile must be provided.  The circle will be created, and can be used immediately.
     983
     984Removing a circle is straightforward.
     985
     986 * '''Service:''' Circles
     987 * '''Operation:''' removeCircle
     988 * '''Input Parameters:'''
     989   * Userid - the requester's userid
     990   * Name - the new circle's name
     991 * '''Return Values:'''
     992   * None
     993
     994== Experiments ==
     995
     996The experiment interface controls managing experiment definitions and realizing experiments (allocating and initializing resources). The experiment definition is in some flux, which is reflected in this section.
     997
     998An experiment is a collection of aspects, each of which controls part of the experiment's environment and operation.  Some aspects are understood directly by the testbed, while others are interpreted and accessed by tolls inside the experiment.  Such tools may be written by DETER administrators or by experimenters themselves.
     999
     1000An [http://www.isi.edu/~faber/tmp/DeterAPI/doc/net/deterlab/testbed/api/ExperimentAspect.html aspect] is a named and typed object associated with the the experiment.  Specifically, an aspect has the following attributes:
     1001
     1002 name::
     1003   A unique string scoped by aspect type used to identify the aspect instance
     1004 type::
     1005   A string that tells the testbed or tool how to interpret the aspect.  The current interface interprets '''topology''' aspects as an experiment layout, and treats the rest as opaque.
     1006 subtype::
     1007   A string characterizing the aspect further. Subtypes may be created by the testbed or tools.
     1008 data::
     1009   The contents of the aspect.  This will be empty if datareference has a value
     1010 datareference::
     1011   A URI that points to the contents of this aspect
     1012 readOnly::
     1013   A boolean, true if the aspect can be modified.
     1014
     1015Each experiment also includes an access control list (ACL) that lists the permissions that members of a given circle are granted to this experiment.
     1016
     1017[http://www.isi.edu/~faber/tmp/DeterAPI/doc/net/deterlab/testbed/api/Experiments.html experiments javadoc]
     1018
     1019=== Viewing Experiments ===
     1020
     1021One or more experiments can be viewed by an authorized user assuming that user has the proper permissions.  The search can be scoped by library and a regular expression matched against the experiment name.  In addition, the aspects returned and their contents can also be controlled.  To view experiments, call:
     1022
     1023 * '''Service:''' Experiments
     1024 * '''Operation:''' viewExperiments
     1025 * '''Input Parameters:'''
     1026   * Userid - a string, if given return all experiments this user can see
     1027   * Lib - a string, the name of a library.  Only experiments in that library will be returned
     1028   * Regex - a string containing a regular expression matched against experiment names
     1029   * QueryAspects - an array of aspects used to scope the aspect search  Each aspect has the fields described above.  The readOnly, data, and dataReference fields are all ignored.   If the name is present, it much match. If the type is given it must also match. If a type is given the subtype field further scopes the search. A missing type field selects aspects without any subtype. A specific subtype selects only aspects that match both type and subtype, and the distinguished value "*" matches any subtype. A subtype with a null type is invalid.
     1030   * listOnly - a boolean, true if the aspects returned should not contain data.  This avoids unnecessary large data transfers
     1031 * '''Return Values:'''
     1032   * One or more structures with the following fields
     1033     * Name - a string containing the experiment name
     1034     * Owner - a string containing the owner's userid
     1035     * Aspects - a list of aspect structures as defined above
     1036     * ACL - a list of structures of the form
     1037       * Name - a string the circle name
     1038       * Permissions - a list of strings containing this circle's permissions.  Permissions are from [http://www.isi.edu/~faber/tmp/DeterAPI/doc/constant-values.html#net.deterlab.testbed.api.Permissions this table]
     1039
     1040
     1041=== Creating and Deleting Experiments ===
     1042
     1043An experiment is created using:
     1044
     1045 * '''Service:''' Experiments
     1046 * '''Operation:''' createExperiment
     1047 * '''Input Parameters:'''
     1048   * Name - a string containing a new experiment's name
     1049   * Userid - the user making the request (the owner on success)
     1050   * Aspects - a list of aspects as defined above
     1051   * AccessLists - a list of access list entries - a list of structures of the form
     1052       * Name - a string the circle name
     1053       * Permissions - a list of strings containing this circle's permissions.Permissions are from [http://www.isi.edu/~faber/tmp/DeterAPI/doc/constant-values.html#net.deterlab.testbed.api.Permissions this table]
     1054   * Profile - a list of profile attribute value pairs
     1055 * '''Return Values:'''
     1056   * a boolean, true if the creation succeeded
     1057
     1058Creating an experiment with one aspect may result in additional sub-aspects appearing, as well as modifications to other aspects.
     1059
     1060An experiment is deleted using:
     1061 
     1062 * '''Service:''' Experiments
     1063 * '''Operation:''' removeExperiment
     1064 * '''Input Parameters:'''
     1065   * Name - a string containing the experiment to delete
     1066 * '''Return Values:'''
     1067   * a boolean, true on success
     1068
     1069After {{{removeExperiment}}} succeeds, experiment state is removed from the testbed completely.
     1070
     1071=== Modifying Experiments ===
     1072
     1073Because aspects are somewhat free-form and can be interrelated, the interface for manipulating them is simple.  Aspects can be added and removed.
     1074
     1075* '''Service:''' Experiments
     1076 * '''Operation:''' addExperimentAspects
     1077 * '''Input Parameters:'''
     1078   * Name - a string containing the experiment's name
     1079   * Aspects - a list of aspects as defined above
     1080 * '''Return Values:'''
     1081   * a boolean, true if the addition succeeded
     1082
     1083As with creation, adding an aspect may result in additional sub-aspects appearing, as well as modifications to other aspects.
     1084
     1085* '''Service:''' Experiments
     1086 * '''Operation:''' removeExperimentAspects
     1087 * '''Input Parameters:'''
     1088   * Name - a string containing the experiment's name
     1089   * Aspects - a list of aspects as defined above
     1090 * '''Return Values:'''
     1091   * a boolean, true if the removal succeeded
     1092
     1093As with creation, adding an aspect may result in additional sub-aspects appearing, as well as modifications to other aspects.
     1094
     1095* '''Service:''' Experiments
     1096 * '''Operation:''' addExperimentACL
     1097 * '''Input Parameters:'''
     1098   * Name - a string containing the experiment's name
     1099   * AccessLists - a list of access list entries - a list of structures of the form
     1100       * Name - a string the circle name
     1101       * Permissions - a list of strings containing this circle's permissions.Permissions are from [http://www.isi.edu/~faber/tmp/DeterAPI/doc/constant-values.html#net.deterlab.testbed.api.Permissions this table]
     1102 * '''Return Values:'''
     1103   * a boolean, true if the removal succeeded
     1104
     1105* '''Service:''' Experiments
     1106 * '''Operation:''' removeExperimentACL
     1107 * '''Input Parameters:'''
     1108   * Name - a string containing the experiment's name
     1109   * AccessLists - a list circles to remove from the ACL
     1110 * '''Return Values:'''
     1111   * a boolean, true if the removal succeeded
     1112
     1113The owner can give ownership to another user.
     1114
     1115* '''Service:''' Experiments
     1116 * '''Operation:''' setOwner
     1117 * '''Input Parameters:'''
     1118   * Name - a string containing the experiment's name
     1119   * newOwner - a string, the new owner's UID
     1120 * '''Return Values:'''
     1121   * a boolean, true if the removal succeeded
     1122
     1123
     1124We expect to add filter-based interfaces in the future as well.
     1125
     1126=== Realizing and Releasing Experiments ===
     1127
     1128To realize an experiment use:
     1129 
     1130 * '''Service:''' Experiments
     1131 * '''Operation:''' realizeExperiment
     1132 * '''Input Parameters:'''
     1133   * Userid - the user making the request (the owner on success)
     1134   * Owner - the experiment owner
     1135   * Name - a string containing the experiment to realize
     1136   * Notify - a flag, if true send the user a notification when realization is complete
     1137 * '''Return Values:'''
     1138   * None
     1139
     1140The user can either poll the experiment using {{{viewExperiments}}} and examining the {{{StateDetail}}} field or poll for a notification that the realization is complete.
     1141
     1142If the realization fails - as indicated by the {{{State}}} variable in a {{{viewExperiments}}} response, the {{{Log}}} and {{{FaultInfo}}} fields characterize the error.
     1143
     1144To release an experiment's resources:
     1145
     1146 * '''Service:''' Experiments
     1147 * '''Operation:''' releaseExperiment
     1148 * '''Input Parameters:'''
     1149   * Userid - the user making the request (the owner on success)
     1150   * Owner - the experiment owner
     1151   * Name - a string containing the experiment to release
     1152   * Notify - a flag, if true send the user a notification when realization is complete
     1153 * '''Return Values:'''
     1154   * None
     1155
     1156After {{{releaseExperiment}}} succeeds, experiment state remains in the testbed, but containers are stopped and resources are returned to the testbed.
     1157
     1158=== Experiment Profiles ===
     1159
     1160Experiments have profiles attached to them, as users, circles, and projects do.  Information in a profile is metadata about the experiment, intended for human consumption.  This is in opposition to an aspect which is intended for the testbed or experiment infrastructure to interpret.
     1161
     1162The calls for manipulating an experiment profile are very similar to other profiles:
     1163
     1164To get a profile schema, for example to create an empty web page,
     1165
     1166 * '''Service:''' Experiments
     1167 * '''Operation:''' getProfileDescription
     1168 * '''Input Parameters:'''
     1169 * '''Return Values:'''
     1170   * ExperimentId - always empty
     1171   * A list of profile elements each containing
     1172     * Name - a string, the element's name
     1173     * DataType - a string giving the element's
     1174       * string
     1175       * integer
     1176       * double
     1177       * binary/opaque
     1178     * Value - a string containing the element's value
     1179     * Access - a string describing the access values (values [http://www.isi.edu/~faber/tmp/DeterAPI/doc/constant-values.html here])
     1180     * Optional - a flag true if the field is optional (must be present but may be empty)
     1181     * Removable - a flag true if the field can be removed
     1182     * Description - a string explaining the field
     1183     * Format - a regular expression that can be used to validate the field entry (may be null, and generally is for optional fields)
     1184     * FormatDescription - A brief, natural language description of the field input constraints, e.g. "A valid e-mail address" or "only numbers and spaces".
     1185     * OrderingHint - an integer suggesting where to present the attribute. Lower numbers come first
     1186     * LengthHint - an integer suggesting how long an input firld should be presented
     1187
     1188To read an experiment's profile.
     1189
     1190 * '''Service:''' Experiments
     1191 * '''Operation:''' getExperimentProfile
     1192 * '''Input Parameters:'''
     1193  * eid - a string naming the experiment to be retrieved
     1194 * '''Return Values:'''
     1195   * ExperimentId - the experiment whose profile is returned
     1196   * A list of profile elements each containing
     1197     * Name - a string, the element's name
     1198     * DataType - a string giving the element's
     1199       * string
     1200       * integer
     1201       * double
     1202       * binary/opaque
     1203     * Value - a string containing the element's value
     1204     * Access - a string describing the access values (Defined [http://www.isi.edu/~faber/tmp/DeterAPI/doc/constant-values.html here])
     1205     * Optional - a flag true if the field is optional (must be present but may be empty)
     1206     * Removable - a flag true if the field can be removed
     1207     * Description - a string explaining the field
     1208     * Format - a regular expression that can be used to validate the field entry (may be null, and generally is for optional fields)
     1209     * FormatDescription - A brief, natural language description of the field input constraints, e.g. "A valid e-mail address" or "only numbers and spaces".
     1210     * OrderingHint - an integer suggesting where to present the attribute. Lower numbers come first
     1211     * LengthHint - an integer suggesting how long an input field should be presented
     1212
     1213Finally a user can modify an experiment profile:
     1214 
     1215 * '''Service:''' Experiments
     1216 * '''Operation:''' changeExperimentProfile
     1217 * '''Input Parameters:'''
     1218   * Eid - the experiment's profile to modify
     1219   * A list of change requests. Each request contains
     1220     * Name - the name of the field to change
     1221     * Value - the new value of the field
     1222     * Delete - a flag, if true delete the field rather than modify it
     1223 * '''Return Values:'''
     1224   * A list of responses each containing
     1225    * Name - astring with the name of the field
     1226    * Success - a flag indicating if the request succeeded
     1227    * Reason - a string indicating the reason if Success is false
     1228
     1229
     1230=== Manipulating Profile Attributes ===
     1231
     1232Administrators may add attributes to experiment profiles or remove them.  That is to say, add a schema (including format constraints and descriptions), not set a value for an experiment.
     1233
     1234Creating an attribute:
     1235
     1236* '''Service:''' Experiments
     1237 * '''Operation:''' createExperimentAttribute
     1238 * '''Input Parameters:'''
     1239   * Name - the attribute name
     1240   * Type - the type (STRING, INT, FLOAT, OPAQUE)
     1241   * Optional - a boolean, true if this attribute is optional
     1242   * Access - a string: the user's ability to modify (READ_WRITE, READ_ONLY, WRITE_ONLY, NO_ACCESS)
     1243   * Description - natural language description of the field (optional)
     1244   * Format - a regular expression describing the format (optional)
     1245   * Formatdescription - a natural language explanation of the format (optional)
     1246   * OrderingHint - an integer suggesting where to present the attribute. Lower numbers come first
     1247   * LengthHint - an integer suggesting how long an input
     1248   * Def - default value of the attribute (will be set for all users)
     1249 * '''Return Values:'''
     1250  * a boolean, true if the attribute was created
     1251
     1252And removing an attribute:
     1253
     1254* '''Service:''' Experiments
     1255 * '''Operation:''' removeExperimentAttribute
     1256 * '''Input Parameters:'''
     1257   * Name - the attribute name
     1258 * '''Return Values:'''
     1259  * a boolean, true if the attribute was removed
     1260
     1261Finally administrators can modify profile attributes:
     1262
     1263* '''Service:''' Experiments
     1264 * '''Operation:''' modifyExperimentAttribute
     1265 * '''Input Parameters:'''
     1266   * Name - the attribute name
     1267   * Type - the type (STRING, INT, FLOAT, OPAQUE)
     1268   * Optional - a boolean, true if this attribute is optional
     1269   * Access - a string: the user's ability to modify (READ_WRITE, READ_ONLY, WRITE_ONLY, NO_ACCESS)
     1270   * Description - natural language description of the field (optional)
     1271   * Format - a regular expression describing the format (optional)
     1272   * Formatdescription - a natural language explanation of the format (optional)
     1273   * OrderingHint - an integer suggesting where to present the attribute. Lower numbers come first
     1274   * LengthHint - an integer suggesting how long an input
     1275 * '''Return Values:'''
     1276  * a boolean, true if the attribute was created
     1277
     1278
     1279== Libraries ==
     1280
     1281The library interface controls managing library contents. The experiment definition is in some flux, which is reflected in this section.
     1282
     1283An library is a collection of experiments, each of which can be manipulated by users with the proper permissions.  By grouping experiments it is easier to collaborate on the experiments as well as providing pools of experiments to use as starting points for new users.
     1284
     1285Each library includes an access control list (ACL) that lists the permissions that mebmers of a given circle are granted to the library.
     1286
     1287
     1288=== Viewing Libraries ===
     1289
     1290One or more libraried can be viewed by an authorized user assuming that user has the proper permissions.  The search can be a regular expression matched against the library name.  To view libraries, call:
     1291
     1292 * '''Service:''' Libraries
     1293 * '''Operation:''' viewLibraries
     1294 * '''Input Parameters:'''
     1295   * Userid - a string, if given return all experiments this user can see
     1296   * Regex - a string containing a regular expression matched against experiment names
     1297 * '''Return Values:'''
     1298   * One or more structures with the following fields
     1299     * Name - a string containing the experiment name
     1300     * Owner - a string containing the owner's userid
     1301     * Experiments - a list of experiment names
     1302     * ACL - a list of structures of the form
     1303       * Name - a string the circle name
     1304       * Permissions - a list of strings containing this circle's permissions.  Permissions are from [http://www.isi.edu/~faber/tmp/DeterAPI/doc/constant-values.html#net.deterlab.testbed.api.Permissions this table]
     1305
     1306
     1307=== Creating and Deleting Libraries ===
     1308
     1309A library is created using:
     1310
     1311 * '''Service:''' Libraries
     1312 * '''Operation:''' createLibrary
     1313 * '''Input Parameters:'''
     1314   * Name - a string containing a new experiment's name
     1315   * Userid - the user making the request (the owner on success)
     1316   * Experiments - a list of experiments in the library
     1317   * AccessLists - a list of access list entries - a list of structures of the form
     1318       * Name - a string the circle name
     1319       * Permissions - a list of strings containing this circle's permissions.Permissions are from [http://www.isi.edu/~faber/tmp/DeterAPI/doc/constant-values.html#net.deterlab.testbed.api.Permissions this table]
     1320   * Profile - a list of profile attribute value pairs
     1321 * '''Return Values:'''
     1322   * a boolean, true if the creation succeeded
     1323
     1324A library is deleted using:
     1325 
     1326 * '''Service:''' Library
     1327 * '''Operation:''' removeLibrary
     1328 * '''Input Parameters:'''
     1329   * Name - a string containing the library to delete
     1330 * '''Return Values:'''
     1331   * a boolean, true on success
     1332
     1333After {{{removeLibrary}}} succeeds, library is removed from the testbed completely.
     1334
     1335=== Modifying Libraries ===
     1336
     1337Experiments can be added and removed from libraries
     1338
     1339* '''Service:''' Libraries
     1340 * '''Operation:''' addLibraryExperiment
     1341 * '''Input Parameters:'''
     1342   * Name - a string containing the library's name
     1343   * Experiments - a list of experiment names
     1344 * '''Return Values:'''
     1345   * a boolean, true if the addition succeeded
     1346
     1347As with creation, adding an aspect may result in additional sub-aspects appearing, as well as modifications to other aspects.
     1348
     1349* '''Service:''' Libraries
     1350 * '''Operation:''' removeLibraryExperiments
     1351 * '''Input Parameters:'''
     1352   * Name - a string containing the experiment's name
     1353   * Experiments - a list of experiments to remove
     1354 * '''Return Values:'''
     1355   * a boolean, true if the removal succeeded
     1356
     1357
     1358* '''Service:''' Libraires
     1359 * '''Operation:''' addLibraryACL
     1360 * '''Input Parameters:'''
     1361   * Name - a string containing the library's name
     1362   * AccessLists - a list of access list entries - a list of structures of the form
     1363       * Name - a string the circle name
     1364       * Permissions - a list of strings containing this circle's permissions.Permissions are from [http://www.isi.edu/~faber/tmp/DeterAPI/doc/constant-values.html#net.deterlab.testbed.api.Permissions this table]
     1365 * '''Return Values:'''
     1366   * a boolean, true if the removal succeeded
     1367
     1368* '''Service:''' Libraries
     1369 * '''Operation:''' removeLibraryACL
     1370 * '''Input Parameters:'''
     1371   * Name - a string containing the library's name
     1372   * AccessLists - a list circles to remove from the ACL
     1373 * '''Return Values:'''
     1374   * a boolean, true if the removal succeeded
     1375
     1376The owner can give ownership to another user.
     1377
     1378* '''Service:''' Library
     1379 * '''Operation:''' setOwner
     1380 * '''Input Parameters:'''
     1381   * Name - a string containing the experiment's name
     1382   * newOwner - a string, the new owner's UID
     1383 * '''Return Values:'''
     1384   * a boolean, true if the removal succeeded
     1385
     1386=== Library Profiles ===
     1387
     1388Libraries have profiles attached to them, as users, circles, and projects do.  Information in a profile is metadata about the library, intended for human consumption.
     1389
     1390The calls for manipulating a library profile are very similar to other profiles:
     1391
     1392To get a profile schema, for example to create an empty web page,
     1393
     1394 * '''Service:''' Libraries
     1395 * '''Operation:''' getProfileDescription
     1396 * '''Input Parameters:'''
     1397 * '''Return Values:'''
     1398   * LibraryId - always empty
     1399   * A list of profile elements each containing
     1400     * Name - a string, the element's name
     1401     * DataType - a string giving the element's
     1402       * string
     1403       * integer
     1404       * double
     1405       * binary/opaque
     1406     * Value - a string containing the element's value
     1407     * Access - a string describing the access values (values [http://www.isi.edu/~faber/tmp/DeterAPI/doc/constant-values.html here])
     1408     * Optional - a flag true if the field is optional (must be present but may be empty)
     1409     * Removable - a flag true if the field can be removed
     1410     * Description - a string explaining the field
     1411     * Format - a regular expression that can be used to validate the field entry (may be null, and generally is for optional fields)
     1412     * FormatDescription - A brief, natural language description of the field input constraints, e.g. "A valid e-mail address" or "only numbers and spaces".
     1413     * OrderingHint - an integer suggesting where to present the attribute. Lower numbers come first
     1414     * LengthHint - an integer suggesting how long an input firld should be presented
     1415
     1416To read a library's profile.
     1417
     1418 * '''Service:''' Libraries
     1419 * '''Operation:''' getLibraryProfile
     1420 * '''Input Parameters:'''
     1421  * libid - a string naming the library to be retrieved
     1422 * '''Return Values:'''
     1423   * LibraryId - the experiment whose profile is returned
     1424   * A list of profile elements each containing
     1425     * Name - a string, the element's name
     1426     * DataType - a string giving the element's
     1427       * string
     1428       * integer
     1429       * double
     1430       * binary/opaque
     1431     * Value - a string containing the element's value
     1432     * Access - a string describing the access values (Defined [http://www.isi.edu/~faber/tmp/DeterAPI/doc/constant-values.html here])
     1433     * Optional - a flag true if the field is optional (must be present but may be empty)
     1434     * Removable - a flag true if the field can be removed
     1435     * Description - a string explaining the field
     1436     * Format - a regular expression that can be used to validate the field entry (may be null, and generally is for optional fields)
     1437     * FormatDescription - A brief, natural language description of the field input constraints, e.g. "A valid e-mail address" or "only numbers and spaces".
     1438     * OrderingHint - an integer suggesting where to present the attribute. Lower numbers come first
     1439     * LengthHint - an integer suggesting how long an input field should be presented
     1440
     1441Finally a user can modify a library profile:
     1442 
     1443 * '''Service:''' Libraries
     1444 * '''Operation:''' changeLibraryProfile
     1445 * '''Input Parameters:'''
     1446   * Libid - the library's profile to modify
     1447   * A list of change requests. Each request contains
     1448     * Name - the name of the field to change
     1449     * Value - the new value of the field
     1450     * Delete - a flag, if true delete the field rather than modify it
     1451 * '''Return Values:'''
     1452   * A list of responses each containing
     1453    * Name - astring with the name of the field
     1454    * Success - a flag indicating if the request succeeded
     1455    * Reason - a string indicating the reason if Success is false
     1456
     1457
     1458=== Manipulating Profile Attributes ===
     1459
     1460Administrators may add attributes to library profiles or remove them.  That is to say, add a schema (including format constraints and descriptions), not set a value for a library.
     1461
     1462Creating an attribute:
     1463
     1464* '''Service:''' Libraries
     1465 * '''Operation:''' createLibraryAttribute
     1466 * '''Input Parameters:'''
     1467   * Name - the attribute name
     1468   * Type - the type (STRING, INT, FLOAT, OPAQUE)
     1469   * Optional - a boolean, true if this attribute is optional
     1470   * Access - a string: the user's ability to modify (READ_WRITE, READ_ONLY, WRITE_ONLY, NO_ACCESS)
     1471   * Description - natural language description of the field (optional)
     1472   * Format - a regular expression describing the format (optional)
     1473   * Formatdescription - a natural language explanation of the format (optional)
     1474   * OrderingHint - an integer suggesting where to present the attribute. Lower numbers come first
     1475   * LengthHint - an integer suggesting how long an input
     1476   * Def - default value of the attribute (will be set for all users)
     1477 * '''Return Values:'''
     1478  * a boolean, true if the attribute was created
     1479
     1480And removing an attribute:
     1481
     1482* '''Service:''' Libraries
     1483 * '''Operation:''' removeLibraryAttribute
     1484 * '''Input Parameters:'''
     1485   * Name - the attribute name
     1486 * '''Return Values:'''
     1487  * a boolean, true if the attribute was removed
     1488
     1489Finally administrators can modify profile attributes:
     1490
     1491* '''Service:''' Libraries
     1492 * '''Operation:''' modifyLibraryAttribute
     1493 * '''Input Parameters:'''
     1494   * Name - the attribute name
     1495   * Type - the type (STRING, INT, FLOAT, OPAQUE)
     1496   * Optional - a boolean, true if this attribute is optional
     1497   * Access - a string: the user's ability to modify (READ_WRITE, READ_ONLY, WRITE_ONLY, NO_ACCESS)
     1498   * Description - natural language description of the field (optional)
     1499   * Format - a regular expression describing the format (optional)
     1500   * Formatdescription - a natural language explanation of the format (optional)
     1501   * OrderingHint - an integer suggesting where to present the attribute. Lower numbers come first
     1502   * LengthHint - an integer suggesting how long an input
     1503 * '''Return Values:'''
     1504  * a boolean, true if the attribute was modified
     1505
     1506
     1507== Admin ==
     1508
     1509The Admin service allows testbed administrators to manipulate the implementation internals and to initialize the testbed.  Most users will use this interface.  This section is provided out of order for completeness.
     1510
     1511[http://www.isi.edu/~faber/tmp/DeterAPI/doc/net/deterlab/testbed/api/Admin.html javadocs for Admin]
     1512
     1513The various permissions described in this document are also installed in the implementation's database.  It is possible to add new permissions while the system is running using the addPermission call.  The name of a permission is a string (scoped by the object).  Objects include circle, library, experiment, and project.
     1514
     1515 * '''Service:''' Admin
     1516 * '''Operation:''' addPermission
     1517 * '''Input Parameters:'''
     1518   * name - the name of the permission to add (string)
     1519   * object - the object type for which it is valid (string)
     1520 * '''Return Values:'''
     1521   * a boolean, true if successful
     1522
     1523
     1524The bootstrap call initializes an empty system and adds a user with full administrative power.  This only works if no admin project exists and no '''deterboss''' user exists.  It also creates a regression project for testing.  It returns the userid and password of the new admin user (always deterboss).
     1525
     1526 * '''Service:''' Admin
     1527 * '''Operation:''' bootstrap
     1528 * '''Input Parameters:'''
     1529   * none
     1530 * '''Return Values:'''
     1531   * bootstrap user (string)
     1532   * bootstrap password (string)
     1533
     1534The clearCredentialCache() call removes any cached credentials from the system.
     1535
     1536 * '''Service:''' Admin
     1537 * '''Operation:''' clearCredentialCache
     1538 * '''Input Parameters:'''
     1539   * none
     1540 * '''Return Values:'''
     1541   * true on success
     1542
     1543There are simple timers inserted in the code at times.  One can access their values and reset them using:
     1544
     1545 * '''Service:''' Admin
     1546 * '''Operation:''' getTimerValues
     1547 * '''Input Parameters:'''
     1548   * a list of timer names (may be empty)
     1549 * '''Return Values:'''
     1550   * A list of pairs of
     1551    * timer name (string)
     1552    * timer total (64-bit integer) elapsed time since started
     1553
     1554 * '''Service:''' Admin
     1555 * '''Operation:''' removeTimers
     1556 * '''Input Parameters:'''
     1557   * a list of timer names (may be empty)
     1558 * '''Return Values:'''
     1559   * true on success
     1560
     1561If the policy databases have changed, administrators can reset the underlying policy and credential database using
     1562
     1563 * '''Service:''' Admin
     1564 * '''Operation:''' resetAccessControl
     1565 * '''Input Parameters:'''
     1566   * none
     1567 * '''Return Values:'''
     1568   * true on success
     1569
     1570This can be a time-consuming operation.
     1571
     1572
     1573== Resources ==
     1574
     1575Resources are things that make up experiments.  There are several specialized resources used in experimentation that have their own suite of operations, and there is a general set of operations for future expansion.
     1576
     1577=== Computers ===
     1578
     1579Computers are the physical computing resources of the testbed.  A user may be interested in specific instances of a computer - {{{pc23}}} - or in information about types or classes of computers.  Both are possible to view with these calls.
     1580
     1581A user can view computers or classes by:
     1582
     1583 * '''Service:''' Resources
     1584 * '''Operation:''' viewComputers
     1585 * '''Input Parameters:'''
     1586   * Userid - the user making the request (the owner on success)
     1587   * Owner - an optional string the computer owner
     1588   * NameRE - an optional string containing a regular expression matched against the name
     1589   * Type - an optional string containing the computer types to look for
     1590 * '''Return Values:'''
     1591   * Zero or more structures with the following fields:
     1592     * Name - a string, the name of this computer, if absent this is a class
     1593     * Owner - a string, the owner of the computer or class
     1594     * Type - a string containing the type of computer
     1595     * Description - a string describing this computer or class
     1596     * Allocated - an optional flag indicating whether this computer is allocated.  The field is absent all together if this structure describes a class
     1597     * AllocatedExperiment - an optional string containing the experiment name if the computer is allocated and the user has the right to read the experiment
     1598     * AllocatedProject - an optional string containing the project name in which the experiment is realized if the computer is allocated and the user has the right to read the project
     1599     * ProjectDelete - an optional list of project names that can delete this resource
     1600     * ProjectModify - an optional list of project names that can modify this resource
     1601     * ProjectUse - an optional list of project names that can use this resource
     1602     * ProjectRead - an optional list of projects names that can read this resource
     1603
     1604If any of the permission fields are not present, the class permissions apply.  If they are present for a specific computer, they specific computer's permissions override the class permissions.
     1605
     1606Administrators can add new computers or classes using
     1607
     1608 * '''Service:''' Resources
     1609 * '''Operation:''' createComputer
     1610 * '''Input Parameters:'''
     1611   * Userid - the user making the request (the owner on success)
     1612   * Name - an optional string, the name of this computer, if absent this is a class
     1613   * Type - a string containing the type of computer
     1614   * Description - an optional string describing this computer or class (If omitted for a computer, the type description is used)
     1615   * ProjectDelete - an optional list of project names that can delete this resource
     1616   * ProjectModify - an optional list of project names that can modify this resource
     1617   * ProjectUse - an optional list of project names that can use this resource
     1618   * ProjectRead - an optional list of projects names that can read this resource
     1619 * '''Return Values:'''
     1620   None
     1621
     1622Note that missing fields in a computer creation are generally filled in from the type.  Creating a computer or class without any projects that can use it is of questionable value.
     1623
     1624Similarly, they can modify an existing computer using (assuming they are in a project that allows modification of the class or computer):
     1625
     1626 * '''Service:''' Resources
     1627 * '''Operation:''' modifyComputer
     1628 * '''Input Parameters:'''
     1629   * Userid - the user making the request
     1630   * Name - an optional string, the name of this computer, if absent this is a class
     1631   * Type - an optional string containing the type of computer
     1632   * Description - an optional string describing this computer or class (If omitted for a computer, the type description is used)
     1633   * ProjectDelete - an optional list of project names that can delete this resource
     1634   * ProjectModify - an optional list of project names that can modify this resource
     1635   * ProjectUse - an optional list of project names that can use this resource
     1636   * ProjectRead - an optional list of projects names that can read this resource
     1637 * '''Return Values:'''
     1638   None
     1639
     1640Values passed in overwrite the current values if the user had modify rights.  One of Name or Type must be present.
     1641
     1642Finally an administrator can delete a computer:
     1643
     1644 * '''Service:''' Resources
     1645 * '''Operation:''' removeComputer
     1646 * '''Input Parameters:'''
     1647   * Userid - the user making the request
     1648   * Name - an optional string, the name of this computer, if absent this is a class
     1649   * Type - an optional string, the type of computer.  May be omitted for specific computers
     1650 * '''Return Values:'''
     1651   None
     1652
     1653=== Images ===
     1654
     1655Images are saved container state - including saved physical container state.  These are selected in the experiment definition, but users may need to manipulate them directly.
     1656
     1657To read image information:
     1658
     1659 * '''Service:''' Resources
     1660 * '''Operation:''' viewImages
     1661 * '''Input Parameters:'''
     1662   * Userid - the user making the request (the owner on success)
     1663   * Owner - an optional string the computer owner
     1664   * NameRE - an optional string containing a regular expression matched against the name
     1665 * '''Return Values:'''
     1666   * Zero or more structures with the following fields:
     1667     * Name - a string, the name of this image
     1668     * Owner - a string, the owner of the image
     1669     * Description - a string describing this image
     1670     * ValidIn - a list of container types that can use this image
     1671     * ProjectDelete - a list of project names that can delete this resource
     1672     * ProjectModify - a list of project names that can modify this resource
     1673     * ProjectUse - a list of project names that can use this resource
     1674     * ProjectRead - a list of projects names that can read this resource
     1675
     1676Images are created by operations on a container, but users can modify or delete their metadata:
     1677
     1678 * '''Service:''' Resources
     1679 * '''Operation:''' modifyImage
     1680 * '''Input Parameters:'''
     1681   * Userid - the user making the request
     1682   * Name - a string, the name of this image
     1683   * Description - an optional string describing this computer or class
     1684   * ValidIn - an optional list of container types that can use this image
     1685   * ProjectDelete - an optional list of project names that can delete this resource
     1686   * ProjectModify - an optional list of project names that can modify this resource
     1687   * ProjectUse - an optional list of project names that can use this resource
     1688   * ProjectRead - an optional list of projects names that can read this resource
     1689 * '''Return Values:'''
     1690   None
     1691
     1692
     1693As with other resources, these values overwrite the existing parameters (except for name which is a selector).
     1694
     1695A user can delete an image:
     1696
     1697 * '''Service:''' Resources
     1698 * '''Operation:''' removeImage
     1699 * '''Input Parameters:'''
     1700   * Userid - the user making the request (the owner on success)
     1701   * Name - a string, the image to remove
     1702 * '''Return Values:'''
     1703   None
     1704
     1705
     1706=== Pubkey ===
     1707
     1708Public/Private keypairs are used several places in the testbed for authentication and access.  For example, access to containers that present a computer interface is done using the ssh protocol.  These interfaces allow users to manipulate their keys.
     1709
     1710Viewing keys:
     1711
     1712* '''Service:''' Resources
     1713 * '''Operation:''' viewKeys
     1714 * '''Input Parameters:'''
     1715   * Userid - the user making the request
     1716   * Owner - an optional string the computer owner
     1717   * type - an optional string containing the kind of keys to report
     1718 * '''Return Values:'''
     1719   * Zero or more structures with the following fields:
     1720     * Name - a string, the name of this key
     1721     * Owner - a string, the owner of the key
     1722     * Description - a string describing this key
     1723     * KeyData - an opaque data value - the key data
     1724     * ProjectDelete - a list of project names that can delete this resource
     1725     * ProjectModify - a list of project names that can modify this resource
     1726     * ProjectUse - a list of project names that can use this resource
     1727     * ProjectRead - a list of projects names that can read this resource
     1728
     1729
     1730Users can add and delete keys:
     1731
     1732* '''Service:''' Resources
     1733 * '''Operation:''' addKey
     1734 * '''Input Parameters:'''
     1735   * Userid - the user making the request (the owner on success)
     1736   * Owner - an optional string the computer owner
     1737   * Name - an optional string, the name of this key (system will assign if omitted)
     1738   * Description - an optional string describing this key
     1739   * KeyData - an opaque data value - the key data
     1740   * ProjectDelete - a list of project names that can delete this resource
     1741   * ProjectModify - a list of project names that can modify this resource
     1742   * ProjectUse - a list of project names that can use this resource
     1743   * ProjectRead - a list of projects names that can read this resource
     1744 * '''Return Values:'''
     1745   * None
     1746
     1747 * '''Service:''' Resources
     1748 * '''Operation:''' removeKey
     1749 * '''Input Parameters:'''
     1750   * Userid - the user making the request
     1751   * Name - a string, the name of this key