I looked on the forum but only found the posts about creating REST calls from ECM. I am wondering if anyone has actually made a REST call to ECM from another application (or even Postman).
Don’t know the answer but my curiosity is piqued.
Well, technically I did prototype the function to upload to ECM in LINQPad, but I went through Epicor’s API to do it using a REST call.
I was going to suggest you could use Epicor BOs as an intermediary, but direct access would be cool.
I did find a post on here from back when it was DocStar, where a guy was calling it, but there was no real info there:
Yes, I thought about going through Kinetic’s APIs but was hoping for direct. This is the error I am getting in postman.
{
"Error": {
"Data": "NoToken",
"Message": "An authentication Token was not provided",
"Stack": " at Astria.Framework.Runtime.V2.ServiceBase.InitCall(String key, Boolean initialize)\r\n at Astria.Service.Company.V2.SearchService.Search(SearchRequest searchRequest)",
"Type": "Astria.Framework.DataContracts.LoginRequiredException"
},
"Result": null
}
It should have a token service you need to call to get a token.
You’ll have to add the token to the headers of the call.
Might still be “ds-token”.
That link Kevin provided above should help you need to get one and it is maintained throughout subsequent calls using ds-token at least it was in 10.2.X DocStar
And answer my question slowpoke. “We” must know.
But how do I find said token? I do not see anything in ECM to generate one.
It’ll be an API call to the same service.
How did you discover the url you are trying to call?
HostingV2/Authentication.svc
{
"Error": {
"Data": "NoToken",
"Message": "An authentication Token was not provided",
"Stack": " at Astria.Framework.Runtime.V2.ServiceBase.InitCall(String key, Boolean initialize)\r\n at Astria.Services.Hosting.V2.LicenseService.GetTokens()",
"Type": "Astria.Framework.DataContracts.LoginRequiredException"
},
"Result": null
}
It’s probably this one then:
/HostingV2/Authentication.svc
However, there is no example of the request body.
You can try debugging the calls in chrome while logging in to the web app.
good idea
Could you also monitor the ECM Client? You can force the client to reconnect using the button on the login page and see the traffic.
I also checked around in ECM and the Help system - couldn’t find anything useful.
this is in the web.config and mine is false and commented out and it looks like you want to hit the user.svc
Authentication has changed a bit in the last 5 years and we’ve moved to the cloud since then, but I was able to piece it together for you guys.
use /EclipseServer/HostingV2/User.svc/restssl/LogIn
{
"Password":"SuperSecurePassword123",
"ProxyLogin": false,
"ProxyOnBehalfOf": "00000000-0000-0000-0000-000000000000",
"Username":"user@domain.com"
}
It’ll return some information on the user, the instance guid, and a token to be used in subsequent calls.