Servers


Click here for a complete list of operations.

GetServers

Returns an array of CJServer objects representing all servers that match the criteria in conditions.
Conditions is a formatted string of the same format of that used in Jobs.FindJobs() (in the jobs.asmx web service).
Please see Jobs.FindJobs() for further documentation on the conditions string.
The wsid of the user calling this method must have the admin priv.

The following are valid conditions keys:
string name : unique identifier of dbmachine/cjqueue assignment
int timeout : maximum query execution time
string context : the context this server belongs to
string dbuser : database user with which to login
string dbmachine : machine name of the database server
string dbcatalog : name of the database
int execcap : maximum number of concurrent executions
string gpriv : server is only available to users who are a member of a group with this priv
string dbpw : password with of dbuser

Parameters:
long admin_wsid : WebServicesID of admin account.
string admin_pw : Password of that account
string conditions : A formatted string describing the conditions for the search. See above for details on this.

Output:
CJServer[] : Contains objects matching conditions

A CJServer object contains:
Fields in CJServer are the same as GetServers() conditions

Test

To test the operation using the HTTP POST protocol, click the 'Invoke' button.
Parameter Value
admin_wsid:
admin_pw:
conditions:

SOAP 1.1

The following is a sample SOAP 1.1 request and response. The placeholders shown need to be replaced with actual values.

POST /casjobs/services/servers.asmx HTTP/1.1
Host: nadc.china-vo.org
Content-Type: text/xml; charset=utf-8
Content-Length: length
SOAPAction: "http://Services.Cas.jhu.edu/GetServers"

<?xml version="1.0" encoding="utf-8"?>
<soap:Envelope xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/">
  <soap:Body>
    <GetServers xmlns="http://Services.Cas.jhu.edu">
      <admin_wsid>long</admin_wsid>
      <admin_pw>string</admin_pw>
      <conditions>string</conditions>
    </GetServers>
  </soap:Body>
</soap:Envelope>
HTTP/1.1 200 OK
Content-Type: text/xml; charset=utf-8
Content-Length: length

<?xml version="1.0" encoding="utf-8"?>
<soap:Envelope xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/">
  <soap:Body>
    <GetServersResponse xmlns="http://Services.Cas.jhu.edu">
      <GetServersResult>
        <CJServer>
          <Name>string</Name>
          <Context>string</Context>
          <DBUser>string</DBUser>
          <DBMachine>string</DBMachine>
          <DBCatalog>string</DBCatalog>
          <DBPw>string</DBPw>
          <GPriv>string</GPriv>
          <ExecCap>int</ExecCap>
          <TimeOut>int</TimeOut>
        </CJServer>
        <CJServer>
          <Name>string</Name>
          <Context>string</Context>
          <DBUser>string</DBUser>
          <DBMachine>string</DBMachine>
          <DBCatalog>string</DBCatalog>
          <DBPw>string</DBPw>
          <GPriv>string</GPriv>
          <ExecCap>int</ExecCap>
          <TimeOut>int</TimeOut>
        </CJServer>
      </GetServersResult>
    </GetServersResponse>
  </soap:Body>
</soap:Envelope>

SOAP 1.2

The following is a sample SOAP 1.2 request and response. The placeholders shown need to be replaced with actual values.

POST /casjobs/services/servers.asmx HTTP/1.1
Host: nadc.china-vo.org
Content-Type: application/soap+xml; charset=utf-8
Content-Length: length

<?xml version="1.0" encoding="utf-8"?>
<soap12:Envelope xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:soap12="http://www.w3.org/2003/05/soap-envelope">
  <soap12:Body>
    <GetServers xmlns="http://Services.Cas.jhu.edu">
      <admin_wsid>long</admin_wsid>
      <admin_pw>string</admin_pw>
      <conditions>string</conditions>
    </GetServers>
  </soap12:Body>
</soap12:Envelope>
HTTP/1.1 200 OK
Content-Type: application/soap+xml; charset=utf-8
Content-Length: length

<?xml version="1.0" encoding="utf-8"?>
<soap12:Envelope xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:soap12="http://www.w3.org/2003/05/soap-envelope">
  <soap12:Body>
    <GetServersResponse xmlns="http://Services.Cas.jhu.edu">
      <GetServersResult>
        <CJServer>
          <Name>string</Name>
          <Context>string</Context>
          <DBUser>string</DBUser>
          <DBMachine>string</DBMachine>
          <DBCatalog>string</DBCatalog>
          <DBPw>string</DBPw>
          <GPriv>string</GPriv>
          <ExecCap>int</ExecCap>
          <TimeOut>int</TimeOut>
        </CJServer>
        <CJServer>
          <Name>string</Name>
          <Context>string</Context>
          <DBUser>string</DBUser>
          <DBMachine>string</DBMachine>
          <DBCatalog>string</DBCatalog>
          <DBPw>string</DBPw>
          <GPriv>string</GPriv>
          <ExecCap>int</ExecCap>
          <TimeOut>int</TimeOut>
        </CJServer>
      </GetServersResult>
    </GetServersResponse>
  </soap12:Body>
</soap12:Envelope>

HTTP GET

The following is a sample HTTP GET request and response. The placeholders shown need to be replaced with actual values.

GET /casjobs/services/servers.asmx/GetServers?admin_wsid=string&admin_pw=string&conditions=string HTTP/1.1
Host: nadc.china-vo.org
HTTP/1.1 200 OK
Content-Type: text/xml; charset=utf-8
Content-Length: length

<?xml version="1.0" encoding="utf-8"?>
<ArrayOfCJServer xmlns="http://Services.Cas.jhu.edu">
  <CJServer>
    <Name>string</Name>
    <Context>string</Context>
    <DBUser>string</DBUser>
    <DBMachine>string</DBMachine>
    <DBCatalog>string</DBCatalog>
    <DBPw>string</DBPw>
    <GPriv>string</GPriv>
    <ExecCap>int</ExecCap>
    <TimeOut>int</TimeOut>
  </CJServer>
  <CJServer>
    <Name>string</Name>
    <Context>string</Context>
    <DBUser>string</DBUser>
    <DBMachine>string</DBMachine>
    <DBCatalog>string</DBCatalog>
    <DBPw>string</DBPw>
    <GPriv>string</GPriv>
    <ExecCap>int</ExecCap>
    <TimeOut>int</TimeOut>
  </CJServer>
</ArrayOfCJServer>

HTTP POST

The following is a sample HTTP POST request and response. The placeholders shown need to be replaced with actual values.

POST /casjobs/services/servers.asmx/GetServers HTTP/1.1
Host: nadc.china-vo.org
Content-Type: application/x-www-form-urlencoded
Content-Length: length

admin_wsid=string&admin_pw=string&conditions=string
HTTP/1.1 200 OK
Content-Type: text/xml; charset=utf-8
Content-Length: length

<?xml version="1.0" encoding="utf-8"?>
<ArrayOfCJServer xmlns="http://Services.Cas.jhu.edu">
  <CJServer>
    <Name>string</Name>
    <Context>string</Context>
    <DBUser>string</DBUser>
    <DBMachine>string</DBMachine>
    <DBCatalog>string</DBCatalog>
    <DBPw>string</DBPw>
    <GPriv>string</GPriv>
    <ExecCap>int</ExecCap>
    <TimeOut>int</TimeOut>
  </CJServer>
  <CJServer>
    <Name>string</Name>
    <Context>string</Context>
    <DBUser>string</DBUser>
    <DBMachine>string</DBMachine>
    <DBCatalog>string</DBCatalog>
    <DBPw>string</DBPw>
    <GPriv>string</GPriv>
    <ExecCap>int</ExecCap>
    <TimeOut>int</TimeOut>
  </CJServer>
</ArrayOfCJServer>