Users


Click here for a complete list of operations.

UpdateAccount

Update account described by 'wsid' with information described in 'user' param.
The WebServicesID in 'user' determines which user's account is updated and must match the parameter 'wsid'; users may only update their own account.
Fields left null in the User object will also be updated as null in the db.
The 'Privileges' and 'Password' fields are exceptions to this rule; null values in these fields will not override existing values.

Parameters:
long wsid : WebServicesID of account to update.
string pw : Password of that account
CJUser user : Object containing user parameters to update. See GetUsers() for CJUser field documentation.

Output:
bool : true if successful, false otherwise

Test

The test form is only available for requests from the local machine.

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/UpdateAccount"

<?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>
    <UpdateAccount xmlns="http://Services.Cas.jhu.edu">
      <wsid>long</wsid>
      <pw>string</pw>
      <user>
        <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>
      </user>
    </UpdateAccount>
  </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>
    <UpdateAccountResponse xmlns="http://Services.Cas.jhu.edu">
      <UpdateAccountResult>boolean</UpdateAccountResult>
    </UpdateAccountResponse>
  </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>
    <UpdateAccount xmlns="http://Services.Cas.jhu.edu">
      <wsid>long</wsid>
      <pw>string</pw>
      <user>
        <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>
      </user>
    </UpdateAccount>
  </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>
    <UpdateAccountResponse xmlns="http://Services.Cas.jhu.edu">
      <UpdateAccountResult>boolean</UpdateAccountResult>
    </UpdateAccountResponse>
  </soap12:Body>
</soap12:Envelope>