Session/Logon

This method initiates a new session with the Datacap Server and logs on to the Datacap application. The response header includes a wTmId cookie and value that must be included in subsequent requests to maintain the session.

The session timeout is specified in wtm\web.config file. If the number of minutes is exceeded, the session expires and the user must log on again.

URI

http://{IP address}:{Port}/ServicewTM.svc/Session/Logon

Request content

The request for this method contains no content.

Response content

The Set-Cookie session value wTmId=<session cookie> that is returned by this method is kept within the session header of subsequent requests.

This method returns one of the following response codes.
Table 1. Response codes for the POST Logon method
Response Code Description
200 OK The request was successful.
400 Bad Request The request was not understood by the service because of malformed syntax.
401 Unauthorized The request requires user authentication. If the request included valid credentials, the 401 response indicates that authorization was refused for those credentials.
411 Length Required The service refuses to accept the request without a defined Content-Length. The client can repeat the request if it adds a valid Content-Length header field that contains the length of the message body in the request message.
500 Internal Error An unexpected condition was encountered that prevented the service from fulfilling the request.

POST Logon method JSON request example

{ 
  "application":"String content", 
  "password":"String content", 
  "station":"String content", 
  "user":"String content"
}

POST Logon method XML request example

<LogonProperties>
  <application>String content</application>
  <password>String content</password> 
  <station>String content</station> 
  <user>String content</user>
</LogonProperties>