| <!-- |
| Licensed to the Apache Software Foundation (ASF) under one or more |
| contributor license agreements. See the NOTICE file distributed with |
| this work for additional information regarding copyright ownership. |
| The ASF licenses this file to You under the Apache License, Version 2.0 |
| (the "License"); you may not use this file except in compliance with |
| the License. You may obtain a copy of the License at |
| |
| http://www.apache.org/licenses/LICENSE-2.0 |
| |
| Unless required by applicable law or agreed to in writing, software |
| distributed under the License is distributed on an "AS IS" BASIS, |
| WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. |
| See the License for the specific language governing permissions and |
| limitations under the License. |
| --> |
| <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"> |
| <html><head><meta http-equiv="Content-Type" content="text/html;charset=UTF-8"> |
| <title>VCL XML RPC: /afs/eos.ncsu.edu/engrwww/vcl.ncsu/scheduling/.ht-inc/xmlrpcWrappers.php File Reference</title> |
| <link href="doxygen.css" rel="stylesheet" type="text/css"> |
| <link href="tabs.css" rel="stylesheet" type="text/css"> |
| </head><body> |
| <!-- Generated by Doxygen 1.5.3 --> |
| <h1>/afs/eos.ncsu.edu/engrwww/vcl.ncsu/scheduling/.ht-inc/xmlrpcWrappers.php File Reference</h1><table border="0" cellpadding="0" cellspacing="0"> |
| <tr><td></td></tr> |
| <tr><td colspan="2"><br><h2>Functions</h2></td></tr> |
| <tr><td class="memItemLeft" nowrap align="right" valign="top"> </td><td class="memItemRight" valign="bottom"><a class="el" href="xmlrpcWrappers_8php.html#e2c01a27349e7a7788a42cfb5fe0d5ab">XMLRPCgetImages</a> ()</td></tr> |
| |
| <tr><td class="mdescLeft"> </td><td class="mdescRight">gets the images to which the user has acces <a href="#e2c01a27349e7a7788a42cfb5fe0d5ab"></a><br></td></tr> |
| <tr><td class="memItemLeft" nowrap align="right" valign="top"> </td><td class="memItemRight" valign="bottom"><a class="el" href="xmlrpcWrappers_8php.html#e6f9d40f20e08994fa3d82c8dd12bdf5">XMLRPCaddRequest</a> ($imageid, $start, $length, $foruser='')</td></tr> |
| |
| <tr><td class="mdescLeft"> </td><td class="mdescRight">tries to make a request <a href="#e6f9d40f20e08994fa3d82c8dd12bdf5"></a><br></td></tr> |
| <tr><td class="memItemLeft" nowrap align="right" valign="top"> </td><td class="memItemRight" valign="bottom"><a class="el" href="xmlrpcWrappers_8php.html#131560f1aa7577bd1da62d5b7e228e4c">XMLRPCgetRequestStatus</a> ($requestid)</td></tr> |
| |
| <tr><td class="mdescLeft"> </td><td class="mdescRight">determines and returns the status of the request <a href="#131560f1aa7577bd1da62d5b7e228e4c"></a><br></td></tr> |
| <tr><td class="memItemLeft" nowrap align="right" valign="top"> </td><td class="memItemRight" valign="bottom"><a class="el" href="xmlrpcWrappers_8php.html#f8b8c718ea7ea9cc973602a2fe9ae20e">XMLRPCgetRequestConnectData</a> ($requestid, $remoteIP)</td></tr> |
| |
| <tr><td class="mdescLeft"> </td><td class="mdescRight">if request is ready, adds the connecting user's computer to the request and returns info about how to connect to the computer <a href="#f8b8c718ea7ea9cc973602a2fe9ae20e"></a><br></td></tr> |
| <tr><td class="memItemLeft" nowrap align="right" valign="top"> </td><td class="memItemRight" valign="bottom"><a class="el" href="xmlrpcWrappers_8php.html#dfdaad6201dbcaaf5c2249a2c38437cc">XMLRPCendRequest</a> ($requestid)</td></tr> |
| |
| <tr><td class="mdescLeft"> </td><td class="mdescRight">ends/deletes a request <a href="#dfdaad6201dbcaaf5c2249a2c38437cc"></a><br></td></tr> |
| <tr><td class="memItemLeft" nowrap align="right" valign="top"> </td><td class="memItemRight" valign="bottom"><a class="el" href="xmlrpcWrappers_8php.html#815cd48d7d8c85754b2091313c02ccec">XMLRPCgetRequestIds</a> ()</td></tr> |
| |
| <tr><td class="mdescLeft"> </td><td class="mdescRight">gets information about all of user's requests <a href="#815cd48d7d8c85754b2091313c02ccec"></a><br></td></tr> |
| <tr><td class="memItemLeft" nowrap align="right" valign="top"> </td><td class="memItemRight" valign="bottom"><a class="el" href="xmlrpcWrappers_8php.html#c3e09831835663a8bd79aab3f0ea3e69">XMLRPCtest</a> ($string)</td></tr> |
| |
| <tr><td class="mdescLeft"> </td><td class="mdescRight">this is a test function that call be called when getting XML RPC calls to this site to work <a href="#c3e09831835663a8bd79aab3f0ea3e69"></a><br></td></tr> |
| </table> |
| <hr><a name="_details"></a><h2>Detailed Description</h2> |
| The functions listed here are for making VCL requests from other applications. They are implemented according to the XML RPC spec defined at <a href="http://www.xmlrpc.com/">http://www.xmlrpc.com/</a> <br> |
| There is one function called <b><a class="el" href="xmlrpcWrappers_8php.html#c3e09831835663a8bd79aab3f0ea3e69" title="this is a test function that call be called when getting XML RPC calls to this site...">XMLRPCtest()</a></b> that can be used during initial development to get started without actually making a request.<br> |
| <br> |
| The URL you will use to submit RPC calls is<br> |
| <br> |
| <a href="https://vcl.ncsu.edu/scheduling/index.php?mode=xmlrpccall">https://vcl.ncsu.edu/scheduling/index.php?mode=xmlrpccall</a><br> |
| <br> |
| Your application must connect using HTTPS.<br> |
| <br> |
| Internal to the VCL code, "Reservations" are called "Requests"; therefore, "request" is used instead of "reservation" in this documentation and in the RPC functions. <br> |
| <h2>API Version 2</h2> |
| <p> |
| 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.<br> |
| <br> |
| Authentication is handled by 2 additional HTTP headers you will need to send:<br> |
| <b>X-User</b> - the userid you would use to log in to the VCL site, followed by the at sign (@), followed by your affiliation<br> |
| example: myuserid@NCSU - currently, you need to contact <a href="mailto:vcl_help@ncsu.edu">vcl_help@ncsu.edu</a> to find out your affiliation, but in the future there will be an API method of obtaining this<br> |
| <b>X-Pass</b> - the password you would use to log in to the VCL site<br> |
| <br> |
| There is one other additional HTTP header you must send:<br> |
| <b>X-APIVERSION</b> - set this to 2<br> |
| <br> |
| <p> |
| <h2>API Version 1</h2> |
| <p> |
| 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.<br> |
| <br> |
| To connect to VCL with XML RPC, you will need to obtain a key. Contact <a href="mailto:vcl_help@ncsu.edu">vcl_help@ncsu.edu</a> to get one.<br> |
| <p> |
| Authentication is handled by 2 additional HTTP headers you will need to send:<br> |
| <b>X-User</b> - use the same id you would use to log in to the VCL site<br> |
| <b>X-Pass</b> - the key mentioned above<br> |
| <br> |
| There is one other additional HTTP header you must send:<br> |
| <b>X-APIVERSION</b> - set this to 1<br> |
| <hr><h2>Function Documentation</h2> |
| <a class="anchor" name="e6f9d40f20e08994fa3d82c8dd12bdf5"></a><!-- doxytag: member="xmlrpcWrappers.php::XMLRPCaddRequest" ref="e6f9d40f20e08994fa3d82c8dd12bdf5" args="($imageid, $start, $length, $foruser='')" --> |
| <div class="memitem"> |
| <div class="memproto"> |
| <table class="memname"> |
| <tr> |
| <td class="memname">function XMLRPCaddRequest </td> |
| <td>(</td> |
| <td class="paramtype">$ </td> |
| <td class="paramname"> <em>imageid</em>, </td> |
| </tr> |
| <tr> |
| <td class="paramkey"></td> |
| <td></td> |
| <td class="paramtype">$ </td> |
| <td class="paramname"> <em>start</em>, </td> |
| </tr> |
| <tr> |
| <td class="paramkey"></td> |
| <td></td> |
| <td class="paramtype">$ </td> |
| <td class="paramname"> <em>length</em>, </td> |
| </tr> |
| <tr> |
| <td class="paramkey"></td> |
| <td></td> |
| <td class="paramtype">$ </td> |
| <td class="paramname"> <em>foruser</em> = <code>''</code></td><td> </td> |
| </tr> |
| <tr> |
| <td></td> |
| <td>)</td> |
| <td></td><td></td><td width="100%"></td> |
| </tr> |
| </table> |
| </div> |
| <div class="memdoc"> |
| |
| <p> |
| tries to make a request |
| <p> |
| <dl compact><dt><b>Parameters:</b></dt><dd> |
| <table border="0" cellspacing="2" cellpadding="0"> |
| <tr><td valign="top"></td><td valign="top"><em>$imageid</em> </td><td>- id of an image </td></tr> |
| <tr><td valign="top"></td><td valign="top"><em>$start</em> </td><td>- "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 </td></tr> |
| <tr><td valign="top"></td><td valign="top"><em>$length</em> </td><td>- length of reservation in minutes (must be in 15 minute increments) </td></tr> |
| <tr><td valign="top"></td><td valign="top"><em>$foruser</em> </td><td>- (optional) login to be used when setting up the account on the reserved machine - CURRENTLY, THIS IS UNSUPPORTED</td></tr> |
| </table> |
| </dl> |
| <dl class="return" compact><dt><b>Returns:</b></dt><dd>an array with at least one index named '<b>status'</b> which will have one of these values:<br> |
| <b>error</b> - error occurred; there will be 2 additional elements in the array: <ul> |
| <li><b>errorcode</b> - error number<br> |
| </li> |
| <li><b>errormsg</b> - error string<br> |
| </li> |
| </ul> |
| <b>notavailable</b> - no computers were available for the request<br> |
| <b>success</b> - there will be an additional element in the array: <ul> |
| <li><b>requestid</b> - identifier that should be passed to later calls when acting on the request </li> |
| </ul> |
| </dd></dl> |
| <dl compact><dt><b>Examples: </b></dt><dd> |
| <a class="el" href="xmlrpc__example_8php-example.html#a2">xmlrpc_example.php</a>.</dl> |
| </div> |
| </div><p> |
| <a class="anchor" name="dfdaad6201dbcaaf5c2249a2c38437cc"></a><!-- doxytag: member="xmlrpcWrappers.php::XMLRPCendRequest" ref="dfdaad6201dbcaaf5c2249a2c38437cc" args="($requestid)" --> |
| <div class="memitem"> |
| <div class="memproto"> |
| <table class="memname"> |
| <tr> |
| <td class="memname">function XMLRPCendRequest </td> |
| <td>(</td> |
| <td class="paramtype">$ </td> |
| <td class="paramname"> <em>requestid</em> </td> |
| <td> ) </td> |
| <td width="100%"></td> |
| </tr> |
| </table> |
| </div> |
| <div class="memdoc"> |
| |
| <p> |
| ends/deletes a request |
| <p> |
| <dl compact><dt><b>Parameters:</b></dt><dd> |
| <table border="0" cellspacing="2" cellpadding="0"> |
| <tr><td valign="top"></td><td valign="top"><em>$requestid</em> </td><td>- id of a request</td></tr> |
| </table> |
| </dl> |
| <dl class="return" compact><dt><b>Returns:</b></dt><dd>an array with at least one index named 'status' which will have one of these values<br> |
| <b>error</b> - error occurred; there will be 2 additional elements in the array: <ul> |
| <li><b>errorcode</b> - error number<br> |
| </li> |
| <li><b>errormsg</b> - error string<br> |
| </li> |
| </ul> |
| <b>success</b> - request was successfully ended<br> |
| </dd></dl> |
| <dl compact><dt><b>Examples: </b></dt><dd> |
| <a class="el" href="xmlrpc__example_8php-example.html#a5">xmlrpc_example.php</a>.</dl> |
| </div> |
| </div><p> |
| <a class="anchor" name="e2c01a27349e7a7788a42cfb5fe0d5ab"></a><!-- doxytag: member="xmlrpcWrappers.php::XMLRPCgetImages" ref="e2c01a27349e7a7788a42cfb5fe0d5ab" args="()" --> |
| <div class="memitem"> |
| <div class="memproto"> |
| <table class="memname"> |
| <tr> |
| <td class="memname">function XMLRPCgetImages </td> |
| <td>(</td> |
| <td class="paramname"> </td> |
| <td> ) </td> |
| <td width="100%"></td> |
| </tr> |
| </table> |
| </div> |
| <div class="memdoc"> |
| |
| <p> |
| gets the images to which the user has acces |
| <p> |
| <dl class="return" compact><dt><b>Returns:</b></dt><dd>an array of image arrays, each with 2 indices:<br> |
| <b>id</b> - id of the image<br> |
| <b>name</b> - name of the image </dd></dl> |
| <dl compact><dt><b>Examples: </b></dt><dd> |
| <a class="el" href="xmlrpc__example_8php-example.html#a1">xmlrpc_example.php</a>.</dl> |
| </div> |
| </div><p> |
| <a class="anchor" name="f8b8c718ea7ea9cc973602a2fe9ae20e"></a><!-- doxytag: member="xmlrpcWrappers.php::XMLRPCgetRequestConnectData" ref="f8b8c718ea7ea9cc973602a2fe9ae20e" args="($requestid, $remoteIP)" --> |
| <div class="memitem"> |
| <div class="memproto"> |
| <table class="memname"> |
| <tr> |
| <td class="memname">function XMLRPCgetRequestConnectData </td> |
| <td>(</td> |
| <td class="paramtype">$ </td> |
| <td class="paramname"> <em>requestid</em>, </td> |
| </tr> |
| <tr> |
| <td class="paramkey"></td> |
| <td></td> |
| <td class="paramtype">$ </td> |
| <td class="paramname"> <em>remoteIP</em></td><td> </td> |
| </tr> |
| <tr> |
| <td></td> |
| <td>)</td> |
| <td></td><td></td><td width="100%"></td> |
| </tr> |
| </table> |
| </div> |
| <div class="memdoc"> |
| |
| <p> |
| if request is ready, adds the connecting user's computer to the request and returns info about how to connect to the computer |
| <p> |
| <dl compact><dt><b>Parameters:</b></dt><dd> |
| <table border="0" cellspacing="2" cellpadding="0"> |
| <tr><td valign="top"></td><td valign="top"><em>$requestid</em> </td><td>- id of a request </td></tr> |
| <tr><td valign="top"></td><td valign="top"><em>$remoteIP</em> </td><td>- ip address of connecting user's computer</td></tr> |
| </table> |
| </dl> |
| <dl class="return" compact><dt><b>Returns:</b></dt><dd>an array with at least one index named '<b>status'</b> which will have one of these values<br> |
| <b>error</b> - error occurred; there will be 2 additional elements in the array: <ul> |
| <li><b>errorcode</b> - error number<br> |
| </li> |
| <li><b>errormsg</b> - error string<br> |
| </li> |
| </ul> |
| <b>ready</b> - request is ready; there will be 3 additional elements in the array: <ul> |
| <li><b>serverIP</b> - address of the reserved machine </li> |
| <li><b>user</b> - user to use when connecting to the machine </li> |
| <li><b>password</b> - password to use when connecting to the machine</li> |
| </ul> |
| <b>notready</b> - request is not ready for connection </dd></dl> |
| <dl compact><dt><b>Examples: </b></dt><dd> |
| <a class="el" href="xmlrpc__example_8php-example.html#a4">xmlrpc_example.php</a>.</dl> |
| </div> |
| </div><p> |
| <a class="anchor" name="815cd48d7d8c85754b2091313c02ccec"></a><!-- doxytag: member="xmlrpcWrappers.php::XMLRPCgetRequestIds" ref="815cd48d7d8c85754b2091313c02ccec" args="()" --> |
| <div class="memitem"> |
| <div class="memproto"> |
| <table class="memname"> |
| <tr> |
| <td class="memname">function XMLRPCgetRequestIds </td> |
| <td>(</td> |
| <td class="paramname"> </td> |
| <td> ) </td> |
| <td width="100%"></td> |
| </tr> |
| </table> |
| </div> |
| <div class="memdoc"> |
| |
| <p> |
| gets information about all of user's requests |
| <p> |
| <dl class="return" compact><dt><b>Returns:</b></dt><dd>an array with at least one index named 'status' which will have one of these values<br> |
| <b>error</b> - error occurred; there will be 2 additional elements in the array: <ul> |
| <li><b>errorcode</b> - error number<br> |
| </li> |
| <li><b>errormsg</b> - error string<br> |
| </li> |
| </ul> |
| <b>success</b> - request was successfully ended; there will be an additional element whose index is 'requests' which is an array of arrays, each having these elements (or empty if no existing requests):<br> |
| <ul> |
| <li><b>requestid</b> - id of the request<br> |
| </li> |
| <li><b>imageid</b> - id of the image<br> |
| </li> |
| <li><b>imagename</b> - name of the image<br> |
| </li> |
| <li><b>start</b> - unix timestamp of start time<br> |
| </li> |
| <li><b>end</b> - unix timestamp of end time </li> |
| </ul> |
| </dd></dl> |
| |
| </div> |
| </div><p> |
| <a class="anchor" name="131560f1aa7577bd1da62d5b7e228e4c"></a><!-- doxytag: member="xmlrpcWrappers.php::XMLRPCgetRequestStatus" ref="131560f1aa7577bd1da62d5b7e228e4c" args="($requestid)" --> |
| <div class="memitem"> |
| <div class="memproto"> |
| <table class="memname"> |
| <tr> |
| <td class="memname">function XMLRPCgetRequestStatus </td> |
| <td>(</td> |
| <td class="paramtype">$ </td> |
| <td class="paramname"> <em>requestid</em> </td> |
| <td> ) </td> |
| <td width="100%"></td> |
| </tr> |
| </table> |
| </div> |
| <div class="memdoc"> |
| |
| <p> |
| determines and returns the status of the request |
| <p> |
| <dl compact><dt><b>Parameters:</b></dt><dd> |
| <table border="0" cellspacing="2" cellpadding="0"> |
| <tr><td valign="top"></td><td valign="top"><em>$requestid</em> </td><td>- id of a request</td></tr> |
| </table> |
| </dl> |
| <dl class="return" compact><dt><b>Returns:</b></dt><dd>an array with at least one index named '<b>status'</b> which will have one of these values:<br> |
| <b>error</b> - error occurred; there will be 2 additional elements in the array: <ul> |
| <li><b>errorcode</b> - error number<br> |
| </li> |
| <li><b>errormsg</b> - error string<br> |
| </li> |
| </ul> |
| <b>ready</b> - request is ready<br> |
| <b>failed</b> - request failed to load properly<br> |
| <b>timedout</b> - request timed out (user didn't connect before timeout expired)<br> |
| <b>loading</b> - request is still loading; there will be an additional element in the array: <ul> |
| <li><b>time</b> - the estimated wait time (in minutes) for loading to complete<br> |
| </li> |
| </ul> |
| <b>future</b> - start time of request is in the future </dd></dl> |
| <dl compact><dt><b>Examples: </b></dt><dd> |
| <a class="el" href="xmlrpc__example_8php-example.html#a3">xmlrpc_example.php</a>.</dl> |
| </div> |
| </div><p> |
| <a class="anchor" name="c3e09831835663a8bd79aab3f0ea3e69"></a><!-- doxytag: member="xmlrpcWrappers.php::XMLRPCtest" ref="c3e09831835663a8bd79aab3f0ea3e69" args="($string)" --> |
| <div class="memitem"> |
| <div class="memproto"> |
| <table class="memname"> |
| <tr> |
| <td class="memname">function XMLRPCtest </td> |
| <td>(</td> |
| <td class="paramtype">$ </td> |
| <td class="paramname"> <em>string</em> </td> |
| <td> ) </td> |
| <td width="100%"></td> |
| </tr> |
| </table> |
| </div> |
| <div class="memdoc"> |
| |
| <p> |
| this is a test function that call be called when getting XML RPC calls to this site to work |
| <p> |
| <dl compact><dt><b>Parameters:</b></dt><dd> |
| <table border="0" cellspacing="2" cellpadding="0"> |
| <tr><td valign="top"></td><td valign="top"><em>$string</em> </td><td>- a string</td></tr> |
| </table> |
| </dl> |
| <dl class="return" compact><dt><b>Returns:</b></dt><dd>an array with 3 indices:<br> |
| <b>status</b> - will be 'success'<br> |
| <b>message</b> - will be 'RPC call worked successfully'<br> |
| <b>string</b> - contents of $string (after being sanatized) </dd></dl> |
| <dl compact><dt><b>Examples: </b></dt><dd> |
| <a class="el" href="xmlrpc__example_8php-example.html#a0">xmlrpc_example.php</a>.</dl> |
| </div> |
| </div><p> |
| <hr size="1"><address style="text-align: right;"><small>Generated on Wed Dec 19 11:28:46 2007 for VCL XML RPC by |
| <a href="http://www.doxygen.org/index.html"> |
| <img src="doxygen.png" alt="doxygen" align="middle" border="0"></a> 1.5.3 </small></address> |
| </body> |
| </html> |