Click or drag to resize
dyostem api documentation

ThirdPartySystemOpenSession Method

[This is preliminary documentation and is subject to change.]

Open a session to query the API. This method allows the third party system to get a token to use in other queries. This token has a time to live, which is reset each time a query is done (successfully or not).

Namespace:  Dyostem.Services
Assembly:  Dyostem (in Dyostem.dll) Version: 5.3
Syntax
public SessionResult OpenSession(
	string sLogin,
	string sPassword
)

Parameters

sLogin
Type: SystemString
Login to use
sPassword
Type: SystemString
Password to use

Return Value

Type: SessionResult
The result of the open session command
Examples
Request
1POST http://www.dyostem.com/Services/ThirdPartySystem.svc/OpenSession HTTP/1.1
2Content-Type: application/json
3Host: www.dyostem.com
4Content-Length: 44
5Expect: 100-continue
6
7{"sLogin":"sim_test","sPassword":"sim_test"}
Response
 1HTTP/1.1 200 OK
 2Cache-Control: private
 3Transfer-Encoding: chunked
 4Content-Type: application/json; charset=utf-8
 5Server: Microsoft-IIS/7.5
 6Set-Cookie: ASP.NET_SessionId=o5owk4yefroeplfipsfcy3sk; path=/; HttpOnly
 7X-AspNet-Version: 4.0.30319
 8X-Powered-By: ASP.NET
 9Date: Mon, 23 May 2016 14:21:53 GMT
10
117f
12{"d":{"__type":"SessionResult:#Dyostem.Services.Data","Message":"Login OK","SessionId":"d291a5c9-60ab-429b-a167-1a97d15c91b3"}}
130
SOAP 1.1 The following is a sample SOAP 1.1 request and response. The placeholders shown need to be replaced with actual values.
Request
 1POST /soap/ThirdPartySystem.asmx HTTP/1.1
 2Host: www.dyostem.com
 3Content-Type: text/xml; charset=utf-8
 4Content-Length: length
 5SOAPAction: "http://www.dyostem.com/soap/OpenSession"
 6
 7<?xml version="1.0" encoding="utf-8"?>
 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/">
 9  <soap:Body>
10    <OpenSession xmlns="http://www.dyostem.com/soap">
11      <sLogin>string</sLogin>
12      <sPassword>string</sPassword>
13    </OpenSession>
14  </soap:Body>
15</soap:Envelope>
Response
 1HTTP/1.1 200 OK
 2Content-Type: text/xml; charset=utf-8
 3Content-Length: length
 4
 5<?xml version="1.0" encoding="utf-8"?>
 6<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/">
 7  <soap:Body>
 8    <OpenSessionResponse xmlns="http://www.dyostem.com/soap">
 9      <OpenSessionResult>
10        <Message>string</Message>
11        <SessionId>guid</SessionId>
12      </OpenSessionResult>
13    </OpenSessionResponse>
14  </soap:Body>
15</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.
Request
 1POST /soap/ThirdPartySystem.asmx HTTP/1.1
 2Host: www.dyostem.com
 3Content-Type: application/soap+xml; charset=utf-8
 4Content-Length: length
 5
 6<?xml version="1.0" encoding="utf-8"?>
 7<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">
 8  <soap12:Body>
 9    <OpenSession xmlns="http://www.dyostem.com/soap">
10      <sLogin>string</sLogin>
11      <sPassword>string</sPassword>
12    </OpenSession>
13  </soap12:Body>
14</soap12:Envelope>
Response
 1HTTP/1.1 200 OK
 2Content-Type: application/soap+xml; charset=utf-8
 3Content-Length: length
 4
 5<?xml version="1.0" encoding="utf-8"?>
 6<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">
 7  <soap12:Body>
 8    <OpenSessionResponse xmlns="http://www.dyostem.com/soap">
 9      <OpenSessionResult>
10        <Message>string</Message>
11        <SessionId>guid</SessionId>
12      </OpenSessionResult>
13    </OpenSessionResponse>
14  </soap12:Body>
15</soap12:Envelope>
HTTP POST The following is a sample HTTP POST request and response. The placeholders shown need to be replaced with actual values.
Request
1POST /soap/ThirdPartySystem.asmx/OpenSession HTTP/1.1
2Host: www.dyostem.com
3Content-Type: application/x-www-form-urlencoded
4Content-Length: length
5
6sLogin=string&sPassword=string
Response
1HTTP/1.1 200 OK
2Content-Type: text/xml; charset=utf-8
3Content-Length: length
4
5<?xml version="1.0" encoding="utf-8"?>
6<SessionResult xmlns="http://www.dyostem.com/soap">
7  <Message>string</Message>
8  <SessionId>guid</SessionId>
9</SessionResult>
See Also