For a deeper look into our DataScope Select SOAP API, look into:

Overview |  Quickstart |  Documentation |  Downloads |  Tutorials

question

Upvotes
Accepted
3 0 0 2

Is the DSS REST API ValidateToken method implemented and how do you invoke it?

The DSS REST API Reference Tree gives details for the validate token operation - https://hosted.datascopeapi.reuters.com/RestApi.Help/Context/Operation?ctx=Authentication&opn=ValidateToken

I can't get this to work, having tried GET, as per the above, and also trying to formulate a POST. Details of both below. All I can manage is a "404:Not Found" response with message "No HTTP resource was found that matches the request URI 'https://hosted.datascopeapi.reuters.com/RestApi/v1/Authentication/ValidateToken'."

Can anyone offer any help as to how to do this, or whether it's actually implemented.

Thanks in advance

James

GET https://hosted.datascopeapi.reuters.com/RestApi/v1/Authentication/ValidateToken?Token=<my token> HTTP/1.1

X-Request-Execution-Correlation-Id: 58c88a35-0ecf-4275-a316-2b3378ff1edd

Set-Cookie: DSSAPI-COOKIE=R2817038826; path=/
Cache-Control: no-cache
Pragma: no-cache
Content-Type: application/json; charset=utf-8
Expires: -1
Server: Microsoft-IIS/7.5
X-Request-Execution-Correlation-Id: 58c88a35-0ecf-4275-a316-2b3378ff1edd
X-App-Id: Custom.RestApi
X-App-Version: 11.0.483.64
Date: Wed, 29 Mar 2017 14:35:18 GMT
Content-Length: 469
{"error":{"message":"No HTTP resource was found that matches the request URI 'https://hosted.datascopeapi.reuters.com/RestApi/v1/Authentication/ValidateToken?Token=<my token>'."}}


POST https://hosted.datascopeapi.reuters.com/RestApi/v1/Authentication/ValidateToken HTTP/1.1
X-Request-Execution-Correlation-Id: 0ac7ace5-0a36-49d9-a427-df69eff491ee
content-type: application/json
{"Token":"<my token>"}

Set-Cookie: DSSAPI-COOKIE=R2485808843; path=/
Cache-Control: no-cache
Pragma: no-cache
Content-Type: application/json; charset=utf-8
Expires: -1
Server: Microsoft-IIS/7.5
X-Request-Execution-Correlation-Id: 0ac7ace5-0a36-49d9-a427-df69eff491ee
X-App-Id: Custom.RestApi
X-App-Version: 11.0.483.64
Date: Wed, 29 Mar 2017 14:31:49 GMT
Content-Length: 162
{"error":{"message":"No HTTP resource was found that matches the request URI 'https://hosted.datascopeapi.reuters.com/RestApi/v1/Authentication/ValidateToken'."}}

dss-rest-apidatascope-selectdss
icon clock
10 |1500

Up to 2 attachments (including images) can be used with a maximum of 5.0 MiB each and 10.0 MiB total.

Hi @james.cooper,

Just want to confirm if the RequestToken POST command works for you?

1 Answer

Upvote
Accepted
11.3k 25 8 13

Hi @james.cooper,

The ValidateToken works with the following method.

GET https://hosted.datascopeapi.reuters.com/RestApi/v1/Authentication/ValidateToken(Token='<token string to be validated>')

Also, below is the sample of result

{
  "@odata.context": "https://hosted.datascopeapi.reuters.com/RestApi/v1/$metadata#ThomsonReuters.Dss.Api.Authentication.ValidateTokenResult",
  "IsValid": true,
  "Expires": "2017-03-31T03:05:34.427Z"
}
icon clock
10 |1500

Up to 2 attachments (including images) can be used with a maximum of 5.0 MiB each and 10.0 MiB total.

Thanks, Veerapath - that works a treat.

Click below to post an Idea Post Idea