Epicor 10 Cloud REST API

Hello folks!

We’re upgrading from Vantage 8.03 to Epicor Cloud 10.2.x and trying to establish a parallel with our existing Vantage API calls to the new E10 variants.

We have several C# applications that talk to the Vantage web service endpoints to support our internal operations. Those were easy to establish inside of Visual Studio by simply adding Service/Web References to them and calling them in code.

In E10 however, I’m surprised to find that I can’t use the built-in Visual Studio reference options to connect to E10’s REST API endpoints. I’m finding all sorts of NSwag type layers for client code generation, but why…?

Can someone explain why, for a completely new E10 Microsoft .NET stack on Microsoft Azure that I can leverage Microsoft Visual Studio to easily add these references and call them in code as per every other API I’ve encountered before? Seems like there’s an opportunity for VS here, right?

I’m ranting a bit, but definitely want to learn why if anyone can share. Thanks!

You can use the REST end points with visual studio without issue. What are you running into?
REST is REST right just web verbs and web commands you can do that from pretty much any platform
We have a nuget wrapper around the epicor rest api search for epicor in nuget and here.
Also here in the forum there are two swagger class generators that some other folks put together
What issues are you running into specifically?

I re read your post and I think what you are looking for may be better suited to use the wcf web services. There’s a tech guide about it on epicweb
But it’ll give you what you are looking for. Typed references like you had in 8.03.
But it wouldn’t be REST it would use wcf

Thanks for the reply Jose. Yeah, I started at the WCF level, and created an Epicor ticket asking why it wasn’t working. The support person who was talking to Development said they suggested going this route and passed along a link to Kevin Krumwiede and Ed Welsh GitHub NSwag based projects.

If you feel strongly that WCF is still an option that works then I can re-approach support on the matter.

Do you or anyone else in here have experience connecting using Visual Studio successfully that could elaborate more on it?

Thanks again.

Did you follow the wcf guide on epicweb?
It’s got step by step instructions

1 Like

https://epicweb.epicor.com/doc/Docs/Epicor10_techrefWCFServices_102300.pdf

1 Like

Sorry … I just saw you made two replies and missed the first one.

Whenever I try to bind in Visual Studio using the various options to the solution/project I have an issue of some variant:

Add REST API Client
We get a “Failed to download metadata…” dialog error.
Service Reference (WCF)
We get “The specified OData API cannot be added because OData APIs are now only supported with the OData Client Code Generation Tool.” dialog error.
Web Reference
We get a prompt to download an XML file of the service to disk (VS doesn’t consume it and add it as a reference like it should).
Connected Services (OData Connected Service)
We also get a prompt claiming it can’t find $metadata.

WCF <> REST so you can’t use OData for WCF. please follow the WCF Guide in EpicWeb if you want to use WCF.

1 Like

It looks like you are confusing the two technological approaches.

SOAP via WCF gives you that add reference VS experience you are looking for.
REST gives you the loose coupling approach that is more common in javascript type apps where you do not have ‘add ref’ in WS.
Each has their own url addresses so don’t cross the streams. [server]/api/help help pages will show you the REST Urls.
The SOAP endpoints follow the pathing you see in your serevr - [server]/erp/bo/vendor.svc

NOTE - The REST endpoints are NOT WCF. WCF CAN use REST but the decision was made against using the WCF plumbing for the REST implementation and we went with a different MSFT framework for it - OWIN

1 Like

Never cross streams

1 Like

I understand the differences, I’m just trying ALL methods to try to get at least SOME type of connection proved working.

Okay, so let me understand. Are you saying we CAN’T use the WCF method documented (as mention above Sign In)?

Because that’s what we’ve tried (see trials in my previous post) with no joy. For example, when I use the Service Reference option, shouldn’t I be able to connect to this?

https://centralusdtpilot09.epicorsaas.com/saas593pilot/api/v1/Erp.BO.JobPartSvc

If so, then when I do we get a dialog message saying: “The specified OData API cannot be added because OData APIs are now only supported with the OData Client Code Generation Tool.”

… which is why I mentioned our trial trying the new Connected Services (OData Connected Service) option to add a reference… also without joy.

I must be missing something very obvious here…?

Did you setup your http and or WSHttpBinding on your server as outlined in the sintructions? You should not be getting oData API issues with WCF.
The URL you provide as an example is for oData not for WCF. The guide provides examples of what that URL should look like.

We’re Epicor Cloud … so we don’t have any control over the server.

In terms of the look of the URI, the document mentions using: http://localhost/ERP100500/ICE/Lib/SessionMod.svc
… and our equivalent would be:
https://centralusdtpilot09.epicorsaas.com/saas593pilot/api/v1/Ice.Lib.SessionModSvc

Correct?

No that is not correct, you added /api/v1 to the URL it should match the sample provided by them.
/api/v1 is specifically for REST calls.

Though I’m not sure if they enable the WCF End points publicly for the SaaS side of things.
Since you are SaaS you’ll probably have to use the REST end point and NOT WCF

To use the REST end point you can find documentation in the Epicor Help,
also
Here

and many more examples available in the forum.

1 Like

Currently doing penetration testing :rofl:

that only takes like what… 5 seconds.

What takes only 5 seconds?