Log on (POST)

Description

URL

scheme://domain:port/platform/ws/logon

Description

The logon service generates the security token required to access the other web services.

HTTP Method

POST

Parameters

None

Request

Request-Method

POST

Request-URI

/platform/ws/logon

Request-Header

Name

Value

Accept

application/xml or application/json

Content-Type

application/xml

Message-body

User account and password to use to log on to web services.

<User>
     <name>%s</name>
     <pass>%s</pass> 
</User>

Response

Response-Code

  • 200 Successful: Request was successful.
  • 400 Bad request: The user is empty.
  • 403 Forbidden: Access restricted by role-based access control permissions.
  • 409 Conflict: User is already logged on.
  • 500 Internal Server Error: Exception occurred.
  • 503 Service Unavailable: You must have Platform Application Center Standard Edition to use web services.

Response-Header

Name

Value

Content-Type

application/xml or application/json

Message-body

Success Message

If successful, returns the security token for the user.


<User> 
   <token>%s</token>
</User >

For X.509, returns the user name:


<User>
    <name>%s</name>
</User >
Failure Message

If not successful, returns an error message.

For additional information, refer to the schema file ./schemas/jobs/error.xsd.

<error>
  <message>
     %s
  </message>
</error>

Example


# Request
POST /platform/ws/logon HTTP/1.1
Host: www.example.org
Accept: application/xml
Content-Type: application/xml;

<User>
<name>root</name>
<pass>123</pass>
</User>

# Response
200 Successful
Content-Type: application/xml;

<User>
<token>root&quot;2015-12-08T14:35:51Z&quot;57hGfEL/mzqCURhexq8jF2vnSI07zUqA1eVL5Yzic0mmwSm3cwR/ULHs2TeJFZkuIyhmmT56WnHAwG55EtfKCnrxi0sQy+0uKd1boyKZER0=&quot;3Y+TeccJUBlN8KAjFtUxLg==
</token>
</User>