| 1 | Developers interested in testing the Uniform Clearinghouse APIs at the GPO Clearinghouse can do so using [http://curl.haxx.se/ curl], a command line tool that acts as an HTTP client. The Clearinghouse APIs use [http://xmlrpc.scripting.com/default.html XML-RPC] over HTTPS. It is straightforward to make XML-RPC calls using your GPO Clearinghouse experimenter certificate. |
| 2 | |
| 3 | 1. Use the [https://portal.geni.net GPO Portal] to access your experimenter certificate. If you don't already have an account on the GPO Clearinghouse, follow the instructions to access the portal or request an account. |
| 4 | 1. Go to the [https://portal.geni.net/secure/profile.php profile page], select the "SSL" tab, and either create or download your certificate. |
| 5 | a. The downloaded file will contain a private key and a certificate |
| 6 | 1. Create a file called `get_version.xml` that contains an XML-RPC invocation of the `get_version` API method which takes no parameters: |
| 7 | {{{ |
| 8 | #!xml |
| 9 | <?xml version="1.0"?> |
| 10 | <methodCall> |
| 11 | <methodName>get_version</methodName> |
| 12 | <params></params> |
| 13 | </methodCall> |
| 14 | }}} |
| 15 | 1. Use curl to call get_version at the GPO Clearinghouse Slice Authority: |
| 16 | {{{ |
| 17 | curl -H "Content-type: text/xml" --cert geni-username.pem --data @get_version.xml https://ch.geni.net/SA |
| 18 | }}} |
| 19 | 1. Other authorities also respond to `get_version` so the same call can be made to the Member Authority by changing the URL: |
| 20 | {{{ |
| 21 | curl -H "Content-type: text/xml" --cert geni-username.pem --data @get_version.xml https://ch.geni.net/SA |
| 22 | }}} |
| 23 | 1. The Service Registry does not require client authentication so it can be called without an experimenter certificate: |
| 24 | {{{ |
| 25 | curl -H "Content-type: text/xml" --data @get_version.xml https://ch.geni.net:8444/SR |
| 26 | }}} |
| 27 | ----- |
| 28 | Here is the response from the Service Registry to the get_version call after [http://xmlprettyprint.com/ pretty printing]: |
| 29 | {{{ |
| 30 | #!xml |
| 31 | <?xml version="1.0"?> |
| 32 | <methodResponse> |
| 33 | <params> |
| 34 | <param> |
| 35 | <value> |
| 36 | <struct> |
| 37 | <member> |
| 38 | <name>output</name> |
| 39 | <value> |
| 40 | <nil/> |
| 41 | </value> |
| 42 | </member> |
| 43 | <member> |
| 44 | <name>code</name> |
| 45 | <value> |
| 46 | <int>0</int> |
| 47 | </value> |
| 48 | </member> |
| 49 | <member> |
| 50 | <name>value</name> |
| 51 | <value> |
| 52 | <struct> |
| 53 | <member> |
| 54 | <name>API_VERSIONS</name> |
| 55 | <value> |
| 56 | <struct> |
| 57 | <member> |
| 58 | <name>2.0</name> |
| 59 | <value> |
| 60 | <string>https://ch.geni.net:8444/SR/</string> |
| 61 | </value> |
| 62 | </member> |
| 63 | </struct> |
| 64 | </value> |
| 65 | </member> |
| 66 | <member> |
| 67 | <name>SERVICE_TYPES</name> |
| 68 | <value> |
| 69 | <array> |
| 70 | <data> |
| 71 | <value> |
| 72 | <string>IRODS</string> |
| 73 | </value> |
| 74 | <value> |
| 75 | <string>PROJECT_AUTHORITY</string> |
| 76 | </value> |
| 77 | <value> |
| 78 | <string>AUTHORIZATION_SERVICE</string> |
| 79 | </value> |
| 80 | <value> |
| 81 | <string>CERTIFICATE_AUTHORITY</string> |
| 82 | </value> |
| 83 | <value> |
| 84 | <string>KEY_MANAGER</string> |
| 85 | </value> |
| 86 | <value> |
| 87 | <string>CREDENTIAL_STORE</string> |
| 88 | </value> |
| 89 | <value> |
| 90 | <string>MEMBER_AUTHORITY</string> |
| 91 | </value> |
| 92 | <value> |
| 93 | <string>SLICE_AUTHORITY</string> |
| 94 | </value> |
| 95 | <value> |
| 96 | <string>PGCH</string> |
| 97 | </value> |
| 98 | <value> |
| 99 | <string>AGGREGATE_MANAGER</string> |
| 100 | </value> |
| 101 | <value> |
| 102 | <string>LOGGING_SERVICE</string> |
| 103 | </value> |
| 104 | <value> |
| 105 | <string>WIMAX_SITE</string> |
| 106 | </value> |
| 107 | </data> |
| 108 | </array> |
| 109 | </value> |
| 110 | </member> |
| 111 | <member> |
| 112 | <name>IMPLEMENTATION</name> |
| 113 | <value> |
| 114 | <struct> |
| 115 | <member> |
| 116 | <name>code_version</name> |
| 117 | <value> |
| 118 | <string>360c1c8c63cefac33aed5237bb422e4d9de14ed4</string> |
| 119 | </value> |
| 120 | </member> |
| 121 | <member> |
| 122 | <name>code_url</name> |
| 123 | <value> |
| 124 | <string>http://trac.gpolab.bbn.com/chapi</string> |
| 125 | </value> |
| 126 | </member> |
| 127 | <member> |
| 128 | <name>site_update_date</name> |
| 129 | <value> |
| 130 | <string>2014-02-13 12:02:35.590788</string> |
| 131 | </value> |
| 132 | </member> |
| 133 | <member> |
| 134 | <name>code_release_date</name> |
| 135 | <value> |
| 136 | <string>2014-02-13 12:02:35.590788</string> |
| 137 | </value> |
| 138 | </member> |
| 139 | </struct> |
| 140 | </value> |
| 141 | </member> |
| 142 | <member> |
| 143 | <name>FIELDS</name> |
| 144 | <value> |
| 145 | <struct> |
| 146 | <member> |
| 147 | <name>_GENI_SERVICE_CERT_FILENAME</name> |
| 148 | <value> |
| 149 | <struct> |
| 150 | <member> |
| 151 | <name>OBJECT</name> |
| 152 | <value> |
| 153 | <string>SERVICE</string> |
| 154 | </value> |
| 155 | </member> |
| 156 | <member> |
| 157 | <name>TYPE</name> |
| 158 | <value> |
| 159 | <string>STRING</string> |
| 160 | </value> |
| 161 | </member> |
| 162 | </struct> |
| 163 | </value> |
| 164 | </member> |
| 165 | <member> |
| 166 | <name>_GENI_SERVICE_ID</name> |
| 167 | <value> |
| 168 | <struct> |
| 169 | <member> |
| 170 | <name>OBJECT</name> |
| 171 | <value> |
| 172 | <string>SERVICE</string> |
| 173 | </value> |
| 174 | </member> |
| 175 | <member> |
| 176 | <name>TYPE</name> |
| 177 | <value> |
| 178 | <string>INTEGER</string> |
| 179 | </value> |
| 180 | </member> |
| 181 | </struct> |
| 182 | </value> |
| 183 | </member> |
| 184 | </struct> |
| 185 | </value> |
| 186 | </member> |
| 187 | <member> |
| 188 | <name>VERSION</name> |
| 189 | <value> |
| 190 | <string>2.0</string> |
| 191 | </value> |
| 192 | </member> |
| 193 | <member> |
| 194 | <name>SERVICES</name> |
| 195 | <value> |
| 196 | <array> |
| 197 | <data> |
| 198 | <value> |
| 199 | <string>SERVICE</string> |
| 200 | </value> |
| 201 | </data> |
| 202 | </array> |
| 203 | </value> |
| 204 | </member> |
| 205 | </struct> |
| 206 | </value> |
| 207 | </member> |
| 208 | </struct> |
| 209 | </value> |
| 210 | </param> |
| 211 | </params> |
| 212 | </methodResponse> |
| 213 | }}} |