Users


Click here for a complete list of operations.

GetUsers

Returns an array of CJUser objects representing all users 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 userid : unique string identifier of user
string name : user's full name
string email : user's email
string privileges : user's privileges
short gvisible : Determines whether a user is visible for group membership. 1 for yes, 0 for no.
long wsid : unique numeric identifier of user
int emaillevel : Describes when to send automatic email to this user. See CreateAccount for appropriate values
DateTime timecreated: account creation date of user

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:
CJUser[] : Contains objects matching conditions

A CJUser object contains:
string userid : unique string identifier of user
string name : user's full name
string email : user's email
string privileges : user's privileges
bool gvisible : Determines whether a user is visible for group membership.
long webservicesid : unique numeric identifier of user
int emaillevel : Describes when to send automatic email to this user. See CreateAccount for appropriate values
DateTime timecreated: account creation date of user
string password : This is always returned as null. Field exists so it may be updated from UpdateAccount()

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 /gcasjobs/services/users.asmx HTTP/1.1
Host: mastweb.stsci.edu
Content-Type: text/xml; charset=utf-8
Content-Length: length
SOAPAction: "http://Services.Cas.jhu.edu/GetUsers"

<?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>
    <GetUsers xmlns="http://Services.Cas.jhu.edu">
      <admin_wsid>long</admin_wsid>
      <admin_pw>string</admin_pw>
      <conditions>string</conditions>
    </GetUsers>
  </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>
    <GetUsersResponse xmlns="http://Services.Cas.jhu.edu">
      <GetUsersResult>
        <CJUser>
          <UserID>string</UserID>
          <Name>string</Name>
          <Email>string</Email>
          <Privileges>string</Privileges>
          <Password>string</Password>
          <GVisible>boolean</GVisible>
          <WebServicesID>long</WebServicesID>
          <EmailLevel>int</EmailLevel>
          <TimeCreated>dateTime</TimeCreated>
        </CJUser>
        <CJUser>
          <UserID>string</UserID>
          <Name>string</Name>
          <Email>string</Email>
          <Privileges>string</Privileges>
          <Password>string</Password>
          <GVisible>boolean</GVisible>
          <WebServicesID>long</WebServicesID>
          <EmailLevel>int</EmailLevel>
          <TimeCreated>dateTime</TimeCreated>
        </CJUser>
      </GetUsersResult>
    </GetUsersResponse>
  </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 /gcasjobs/services/users.asmx HTTP/1.1
Host: mastweb.stsci.edu
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>
    <GetUsers xmlns="http://Services.Cas.jhu.edu">
      <admin_wsid>long</admin_wsid>
      <admin_pw>string</admin_pw>
      <conditions>string</conditions>
    </GetUsers>
  </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>
    <GetUsersResponse xmlns="http://Services.Cas.jhu.edu">
      <GetUsersResult>
        <CJUser>
          <UserID>string</UserID>
          <Name>string</Name>
          <Email>string</Email>
          <Privileges>string</Privileges>
          <Password>string</Password>
          <GVisible>boolean</GVisible>
          <WebServicesID>long</WebServicesID>
          <EmailLevel>int</EmailLevel>
          <TimeCreated>dateTime</TimeCreated>
        </CJUser>
        <CJUser>
          <UserID>string</UserID>
          <Name>string</Name>
          <Email>string</Email>
          <Privileges>string</Privileges>
          <Password>string</Password>
          <GVisible>boolean</GVisible>
          <WebServicesID>long</WebServicesID>
          <EmailLevel>int</EmailLevel>
          <TimeCreated>dateTime</TimeCreated>
        </CJUser>
      </GetUsersResult>
    </GetUsersResponse>
  </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 /gcasjobs/services/users.asmx/GetUsers?admin_wsid=string&admin_pw=string&conditions=string HTTP/1.1
Host: mastweb.stsci.edu
HTTP/1.1 200 OK
Content-Type: text/xml; charset=utf-8
Content-Length: length

<?xml version="1.0" encoding="utf-8"?>
<ArrayOfCJUser xmlns="http://Services.Cas.jhu.edu">
  <CJUser>
    <UserID>string</UserID>
    <Name>string</Name>
    <Email>string</Email>
    <Privileges>string</Privileges>
    <Password>string</Password>
    <GVisible>boolean</GVisible>
    <WebServicesID>long</WebServicesID>
    <EmailLevel>int</EmailLevel>
    <TimeCreated>dateTime</TimeCreated>
  </CJUser>
  <CJUser>
    <UserID>string</UserID>
    <Name>string</Name>
    <Email>string</Email>
    <Privileges>string</Privileges>
    <Password>string</Password>
    <GVisible>boolean</GVisible>
    <WebServicesID>long</WebServicesID>
    <EmailLevel>int</EmailLevel>
    <TimeCreated>dateTime</TimeCreated>
  </CJUser>
</ArrayOfCJUser>

HTTP POST

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

POST /gcasjobs/services/users.asmx/GetUsers HTTP/1.1
Host: mastweb.stsci.edu
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"?>
<ArrayOfCJUser xmlns="http://Services.Cas.jhu.edu">
  <CJUser>
    <UserID>string</UserID>
    <Name>string</Name>
    <Email>string</Email>
    <Privileges>string</Privileges>
    <Password>string</Password>
    <GVisible>boolean</GVisible>
    <WebServicesID>long</WebServicesID>
    <EmailLevel>int</EmailLevel>
    <TimeCreated>dateTime</TimeCreated>
  </CJUser>
  <CJUser>
    <UserID>string</UserID>
    <Name>string</Name>
    <Email>string</Email>
    <Privileges>string</Privileges>
    <Password>string</Password>
    <GVisible>boolean</GVisible>
    <WebServicesID>long</WebServicesID>
    <EmailLevel>int</EmailLevel>
    <TimeCreated>dateTime</TimeCreated>
  </CJUser>
</ArrayOfCJUser>