Dear Sir,
I am trying to set up a CData Json datasource connection with TimeXtender.
This is my connectionstring:
Auth Scheme=OAuth;Data Model=Document;Initiate OAuth=REFRESH;OAuth Access Token URL=https://pilot.binnenbeter.nl/api/v2/login/venray;OAuth Grant Type=PASSWORD;OAuth Refresh Token URL=https://pilot.binnenbeter.nl/api/v2/login/venray;Row Scan Depth=100;User=api@venray.nl
I am able to get the bearer Token with Postman with this:
url: https://pilot.binnenbeter.nl/api/v2/login/venray
JSON Body:
{
"id": "",
"language": "en",
"data": {
"resourceType": "AUTH",
"item": {
"loginName": api@venray.nl,
"password": "password",
"module": "API"
}
}
This is the documentation I used for the connectionstring:
Password
Finally there also is an Password method. It is similar to the others, in that it requires an Access Token URL and an Refresh Token URL, the difference is that it uses an User and Password instead of client and secret. Notice that these fields are in the "Authentication" section, not in the area of the other OAuth fields.
But it doesn’t work:Service request failed: System.Reflection.TargetInvocationException: Exception has been thrown by the target of an invocation. ---> djo230f.nQ: URI or DataSource must be set if schemas are not available in C:\Users\RijnA\AppData\Roaming\CData\JSON...
Module: TimeXtender.ODX.Engine
TimeXtender.ODX.Engine.ODXFaultException
at TimeXtender.ODX.Engine.ODXEngine.SendServiceRequest/C](WcfServerSettings serverSettings, ProjectInformation projectInformation, Action`2 action)
at TimeXtender.ODX.Engine.DataSourceController`1.TestConnection(DataSourceModel dataSourceModel)
at TimeXtender.DataManager.ConnectingThread.ExecuteConnectingThread(Object dummy)
Please advice, this is a tough cookie.
Regards,
Arthur