Reference for DSService.svc - GetToken

Given user credentials, retrieves a secure token that can be used for data access.

HTTP METHOD

POST

FORMATS

Xml or Json

URL

GetToken

REQUEST PARAMETERS

The operation takes in a parameter of type DSGetTokenRequest which has the following members.

Name Type Description Example Value
UserName String The username to validate ZABC123
Password String The password corresponding to username mypassword
Properties DSStringObjectKVPair[] Properties to customize behavior null

The operation returns a parameter of type DSGetTokenResponse which has the following members.

Name Type Description Example Value
TokenValue String The token value that must be used in subsequent data requests. n9IcXCXIq+ApBEe0zLBeTrU11D65F6BB2ED74E3467EA0EBE
TokenExpiry DateTime The duration (in UTC) until which the token is valid. 2013-01-30T21:11:22.2771093Z
Properties DSStringObjectKVPair[] Properties describing behavior null

XML

The following is a sample request.

<DSGetTokenRequest xmlns="http://dsws.datastream.com/client/V1/" xmlns:i="http://www.w3.org/2001/XMLSchema-instance">
  <Password>yourpassword</Password>
  <Properties i:nil="true"/>
  <UserName>ZABC123</UserName>
</DSGetTokenRequest>

The following is a sample response.

<DSGetTokenResponse xmlns="http://dsws.datastream.com/client/V1/" xmlns:i="http://www.w3.org/2001/XMLSchema-instance">
  <Properties i:nil="true"/>
  <TokenExpiry>2014-11-19T14:37:24.2696093Z</TokenExpiry>
  <TokenValue>TNLxBuBOVWUAMbQ1EVE096026A</TokenValue>
</DSGetTokenResponse>

JSON

{
    "Password": "yourpassword",
    "Properties": null,
    "UserName": "ZABC123" 
}

The following is a sample response.

{
	"Properties":null,
	"TokenExpiry":"\/Date(928149600000+0000)\/",
	"TokenValue":"n9IcXCXIq+ApBEe0zLBeTrU11D65F6BB2ED74E3467EA0EBE0C"
}