Users


Click here for a complete list of operations.

CreateAccount

Create a new user account. Returns WebServices of account created. Requires admin priv.

Parameters:
long admin_wsid : WebServicesID of account that will create the new account. This must be an admin account.
string admin_pw : Password of admin account
string userid : Desired UserID of new user. Must be unique.
string name : Name of user
string email : Email of user
string password : Password of user.
string privileges : Privileges of user. Defaults to null.
int emaillevel : Describes when to send automatic email to this user. Valid values are below
 0 = do not send automated mail to this user
 1 = send automated mail when non-quick jobs fail
 2 = send automated mail when non-quick jobs complete successfully
 3 = send automated mail in either of the above two cases
short gvisible : Determines whether a user is visible for group membership. 1 for yes, 0 for no.

Output:
long : A unique identifier of the newly created account, also referred to as WebServicesID, or just wsid.

Test

To test the operation using the HTTP POST protocol, click the 'Invoke' button.
Parameter Value
admin_wsid:
admin_pw:
userid:
name:
email:
password:
privileges:
emaillevel:
gvisible:

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

<?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>
    <CreateAccount xmlns="http://Services.Cas.jhu.edu">
      <admin_wsid>long</admin_wsid>
      <admin_pw>string</admin_pw>
      <userid>string</userid>
      <name>string</name>
      <email>string</email>
      <password>string</password>
      <privileges>string</privileges>
      <emaillevel>int</emaillevel>
      <gvisible>short</gvisible>
    </CreateAccount>
  </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>
    <CreateAccountResponse xmlns="http://Services.Cas.jhu.edu">
      <CreateAccountResult>long</CreateAccountResult>
    </CreateAccountResponse>
  </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>
    <CreateAccount xmlns="http://Services.Cas.jhu.edu">
      <admin_wsid>long</admin_wsid>
      <admin_pw>string</admin_pw>
      <userid>string</userid>
      <name>string</name>
      <email>string</email>
      <password>string</password>
      <privileges>string</privileges>
      <emaillevel>int</emaillevel>
      <gvisible>short</gvisible>
    </CreateAccount>
  </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>
    <CreateAccountResponse xmlns="http://Services.Cas.jhu.edu">
      <CreateAccountResult>long</CreateAccountResult>
    </CreateAccountResponse>
  </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/CreateAccount?admin_wsid=string&admin_pw=string&userid=string&name=string&email=string&password=string&privileges=string&emaillevel=string&gvisible=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"?>
<long xmlns="http://Services.Cas.jhu.edu">long</long>

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/CreateAccount HTTP/1.1
Host: mastweb.stsci.edu
Content-Type: application/x-www-form-urlencoded
Content-Length: length

admin_wsid=string&admin_pw=string&userid=string&name=string&email=string&password=string&privileges=string&emaillevel=string&gvisible=string
HTTP/1.1 200 OK
Content-Type: text/xml; charset=utf-8
Content-Length: length

<?xml version="1.0" encoding="utf-8"?>
<long xmlns="http://Services.Cas.jhu.edu">long</long>