Functions | |
XMLRPCaffiliations () | |
gets all of the affilations for which users can log in to VCL NOTE: This is the only function available for which the X-User and X-Pass HTTP headers do not need to be passed | |
XMLRPCgetImages () | |
gets the images to which the user has acces | |
XMLRPCaddRequest ($imageid, $start, $length, $foruser='') | |
tries to make a request | |
XMLRPCgetRequestStatus ($requestid) | |
determines and returns the status of the request | |
XMLRPCgetRequestConnectData ($requestid, $remoteIP) | |
if request is ready, adds the connecting user's computer to the request and returns info about how to connect to the computer | |
XMLRPCendRequest ($requestid) | |
ends/deletes a request | |
XMLRPCgetRequestIds () | |
gets information about all of user's requests | |
XMLRPCblockAllocation ($imageid, $start, $end, $requestcount, $usergroupid, $ignoreprivileges=0) | |
creates and processes a block reservation according to the passed in criteria | |
XMLRPCprocessBlockTime ($blockTimesid, $ignoreprivileges=0) | |
processes a block reservation for the blockTimes entry associated with blockTimesid | |
XMLRPCaddUserGroup ($name, $affiliation, $owner, $managingGroup, $initialMaxTime, $totalMaxTime, $maxExtendTime) | |
creates a new user group with the specified parameters | |
XMLRPCgetUserGroupAttributes ($name, $affiliation) | |
gets information about a user group | |
XMLRPCdeleteUserGroup ($name, $affiliation) | |
deletes a user group along with all of its privileges | |
XMLRPCeditUserGroup ($name, $affiliation, $newName, $newAffiliation, $newOwner='', $newManagingGroup='', $newInitialMaxTime='', $newTotalMaxTime='', $newMaxExtendTime='') | |
modifies attributes of a user group NOTE: an empty string may be passed for any of the new* fields to leave that item unchanged | |
XMLRPCgetUserGroupMembers ($name, $affiliation) | |
gets members of a user group Note: it is possible to have a group with no members in which case success will be returned with an empty array for members | |
XMLRPCaddUsersToGroup ($name, $affiliation, $users) | |
adds users to a group | |
XMLRPCremoveUsersFromGroup ($name, $affiliation, $users) | |
removes users from a group | |
XMLRPCtest ($string) | |
this is a test function that call be called when getting XML RPC calls to this site to work |
This is the current version of the API. It should be used for any new code development. Any older code needs to be migrated to this version.
Authentication is handled by 2 additional HTTP headers you will need to send:
X-User - the userid you would use to log in to the VCL site, followed by the at sign (@), followed by your affiliation
example: myuserid@NCSU
You can obtain a list of the affiliations by using the XMLRPCaffiliations() call
X-Pass - the password you would use to log in to the VCL site
There is one other additional HTTP header you must send:
X-APIVERSION - set this to 2
The X-User and X-Pass HTTP headers do not need to be passed to call the XMLRPCaffiliations() function.
NOTICE: API version 1 will probably be removed in VCL 2.2. If you are still using API version 1, you need to update your code to use version 2.
This version is being phased out in favor of version 2. Documentation is provided for those currently using version 1 who are not ready to switch to using version 2.
Authentication is handled by 2 additional HTTP headers you will need to send:
X-User - use the same id you would use to log in to the VCL site
X-Pass - the key mentioned above
There is one other additional HTTP header you must send:
X-APIVERSION - set this to 1
XMLRPCaddRequest | ( | $ | imageid, | |
$ | start, | |||
$ | length, | |||
$ | foruser = '' | |||
) |
tries to make a request
$imageid | - id of an image | |
$start | - "now" or unix timestamp for start of reservation; will use a floor function to round down to the nearest 15 minute increment for actual reservation | |
$length | - length of reservation in minutes (must be in 15 minute increments) | |
$foruser | - (optional) login to be used when setting up the account on the reserved machine - CURRENTLY, THIS IS UNSUPPORTED |
XMLRPCaddUserGroup | ( | $ | name, | |
$ | affiliation, | |||
$ | owner, | |||
$ | managingGroup, | |||
$ | initialMaxTime, | |||
$ | totalMaxTime, | |||
$ | maxExtendTime | |||
) |
creates a new user group with the specified parameters
$name | - name of user group | |
$affiliation | - affiliation of user group | |
$owner | - user that will be the owner of the group in username@affiliation form | |
$managingGroup | - user group that can manage membership of this one | |
$initialMaxTime | - (minutes) max initial time users in this group can select for length of reservations | |
$totalMaxTime | - (minutes) total length users in the group can have for a reservation (including all extensions) | |
$maxExtendTime | - (minutes) max length of time users can request as an extension to a reservation at a time |
XMLRPCaddUsersToGroup | ( | $ | name, | |
$ | affiliation, | |||
$ | users | |||
) |
adds users to a group
$name | - name of user group | |
$affiliation | - affiliation of user group | |
$users | - array of users in username@affiliation form to be added to the group |
XMLRPCaffiliations | ( | ) |
gets all of the affilations for which users can log in to VCL
NOTE: This is the only function available for which the X-User and X-Pass HTTP headers do not need to be passed
XMLRPCblockAllocation | ( | $ | imageid, | |
$ | start, | |||
$ | end, | |||
$ | requestcount, | |||
$ | usergroupid, | |||
$ | ignoreprivileges = 0 | |||
) |
creates and processes a block reservation according to the passed in criteria
$imageid | - id of the image to be used | |
$start | - mysql datetime for the start time (i.e. requests should be prep'd and ready by this time) | |
$end | - mysql datetime for the end time | |
$requestcount | - number of computers to allocate | |
$usergroupid | - id of user group for checking user access to machines | |
$ignoreprivileges | (optional, default=0) - 0 (false) or 1 (true) - set to 1 to select computers from any that are mapped to be able to run the image; set to 0 to only select computers from ones that are both mapped and that users in the usergroup assigned to this block request have been granted access to through the privilege tree |
XMLRPCdeleteUserGroup | ( | $ | name, | |
$ | affiliation | |||
) |
deletes a user group along with all of its privileges
$name | - name of user group | |
$affiliation | - affiliation of user group |
XMLRPCeditUserGroup | ( | $ | name, | |
$ | affiliation, | |||
$ | newName, | |||
$ | newAffiliation, | |||
$ | newOwner = '' , |
|||
$ | newManagingGroup = '' , |
|||
$ | newInitialMaxTime = '' , |
|||
$ | newTotalMaxTime = '' , |
|||
$ | newMaxExtendTime = '' | |||
) |
modifies attributes of a user group
NOTE: an empty string may be passed for any of the new* fields to leave that item unchanged
$name | - name of user group | |
$affiliation | - affiliation of user group | |
$newName | - new name for user group | |
$newAffiliation | - new affiliation for user group | |
$newOwner | - (optional, default='') user that will be the owner of the group in username@affiliation form | |
$newManagingGroup | - (optional, default='') user group that can manage membership of this one | |
$newInitialMaxTime | - (optional, default='') (minutes) max initial time users in this group can select for length of reservations | |
$newTotalMaxTime | - (optional, default='') (minutes) total length users in the group can have for a reservation (including all extensions) | |
$newMaxExtendTime | - (optional, default='') (minutes) max length of time users can request as an extension to a reservation at a time |
XMLRPCendRequest | ( | $ | requestid | ) |
ends/deletes a request
$requestid | - id of a request |
XMLRPCgetImages | ( | ) |
gets the images to which the user has acces
XMLRPCgetRequestConnectData | ( | $ | requestid, | |
$ | remoteIP | |||
) |
if request is ready, adds the connecting user's computer to the request and returns info about how to connect to the computer
$requestid | - id of a request | |
$remoteIP | - ip address of connecting user's computer |
XMLRPCgetRequestIds | ( | ) |
gets information about all of user's requests
XMLRPCgetRequestStatus | ( | $ | requestid | ) |
determines and returns the status of the request
$requestid | - id of a request |
XMLRPCgetUserGroupAttributes | ( | $ | name, | |
$ | affiliation | |||
) |
gets information about a user group
$name | - name of user group | |
$affiliation | - affiliation of user group |
XMLRPCgetUserGroupMembers | ( | $ | name, | |
$ | affiliation | |||
) |
gets members of a user group
Note: it is possible to have a group with no members in which case success will be returned with an empty array for members
$name | - name of user group | |
$affiliation | - affiliation of user group |
XMLRPCprocessBlockTime | ( | $ | blockTimesid, | |
$ | ignoreprivileges = 0 | |||
) |
processes a block reservation for the blockTimes entry associated with blockTimesid
$blockTimesid | - id from the blockTimes table | |
$ignoreprivileges | (optional, default=0) - 0 (false) or 1 (true) - set to 1 to select computers from any that are mapped to be able to run the image; set to 0 to only select computers from ones that are both mapped and that users in the usergroup assigned to this block request have been granted access to through the privilege tree |
XMLRPCremoveUsersFromGroup | ( | $ | name, | |
$ | affiliation, | |||
$ | users | |||
) |
removes users from a group
$name | - name of user group | |
$affiliation | - affiliation of user group | |
$users | - array of users in username@affiliation form to be removed from the group |
XMLRPCtest | ( | $ | string | ) |
this is a test function that call be called when getting XML RPC calls to this site to work
$string | - a string |