Reference for DSService.svc - Token
Given user credentials, retrieves a secure token that can be used for data access.
HTTP METHOD
GET
FORMATS
Xml or Json
URL
Token?username={USERNAME}&password={PASSWORD}&props={PROPS}format={FORMAT}
REQUEST PARAMETERS
The operation takes in a following parameters:
Name | Type | Description | Example Value |
---|---|---|---|
username | String | The username to validate. Note that the value must be URL encoded. | ZABC123 |
password | String | The password corresponding to username. Note that the value must be URL encoded. | yourpassword |
props | DSStringObjectKVPair[] | Optional properties to customize behavior. | Ex: Empty string value |
format | String | Optional format for xml or json | Empty string value |
The operation returns the following parameter:
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.
Token?username=ZABC123&password=mypassword
The following is a sample response.
<DSGetTokenResponse xmlns="http://dsws.datastream.com/client/V1/"> <Properties/> <TokenExpiry>1999-05-31T11:20:00</TokenExpiry> <TokenValue>n9IcXCXIq+ApBEe0zLBeTrU11D65F6BB2ED74E3467EA0EBE0C</TokenValue> </DSGetTokenResponse>
JSON
Token?username=ZABC123&password=mypassword
The following is a sample response.
{ "Properties":null, "TokenExpiry":"\/Date(928149600000+0000)\/", "TokenValue":"n9IcXCXIq+ApBEe0zLBeTrU11D65F6BB2ED74E3467EA0EBE0C" }