Skip to main content
Solved

Local Acumatica Trial Install - OData / BasicAuth - Doesn't

  • Oct 4, 2023 3:15 PM UTC
  • 7 replies
  • 359 views
  • Translate All

Forum|alt.badge.img

Hi There,

I’m a newbie - trying to setup a dev instance.

I have downloaded and installed a trial instance of Acumatica on a VM - it is unlicenced so comes with the limitations that go with that. I have test data deployed as well.

I can communicate with the instance on the VM from my Dev Machine - for example open the web interface and use Acumatica’s built in screens. All that works fine.

I’m currently using http rather than https.

I am now looking to integrate via the OData APIs with my application. And the first step of that is to communicate via Postman with it.

If I use the entity API (ie: URLs like this one http://192.168.1.149/AcumaticaDemoDB/entity/Default/22.200.001/Customer) - it works fine (once I’ve done the login request of course) and I can pull data.

However - I am getting nowhere with the OData API. A request like this one for example http://AcumaticaVM/AcumaticaDemoDB/OData4/$metadata

gets a 401 Unauthorized response.

I’m using BasicAuth in the header cookies using the same user and password as I used for the entity API.

Any pointers would be much appreciated.

 

 

Best answer by Vignesh Ponnusamy

Hi @dannygraham,

I think the issue with the URL than the headers.

I see you are using /OData4/$metadata but you should be using /ODatav4/$metadata. Add v before 4 in the URL.

View original

7 replies

Vignesh Ponnusamy
Acumatica Moderator
Forum|alt.badge.img+5

Hi @dannygraham,

You can provide the authorization information in the request itself. Following is the postman setup you can try,

 Good Luck.!

Translate

Forum|alt.badge.img
  • Author
  • Freshman I
  • Oct 5, 2023 3:09 PM UTC

Thanks for coming back to me - that’s very kind.

Unfortunately no joy as below

However - I note that you have 11 items in your header and I have only 8 - so am I missing some Params?

Best wishes

Translate

Vignesh Ponnusamy
Acumatica Moderator
Forum|alt.badge.img+5

Hi @dannygraham,

I think the issue with the URL than the headers.

I see you are using /OData4/$metadata but you should be using /ODatav4/$metadata. Add v before 4 in the URL.

Translate

RohitRattan88
Acumatica Moderator
Forum|alt.badge.img+5
  • Acumatica Moderator
  • Oct 5, 2023 5:51 PM UTC

@dannygraham @Vignesh Ponnusamy is correct.

Additionally, check if your admin user has “Odata V4 User” role assigned under User Roles

 

Translate

Forum|alt.badge.img
  • Author
  • Freshman I
  • Oct 6, 2023 8:29 AM UTC

Chaps! You’ve done it!

Who doesn’t love a one character fix?

And only a little bit embarassing!

Many thanks to you both!

Translate

RohitRattan88
Acumatica Moderator
Forum|alt.badge.img+5
  • Acumatica Moderator
  • Oct 6, 2023 1:05 PM UTC

@dannygraham 

Dont forget to mark @Vignesh Ponnusamy’s reply as answer to help future visitors

Good luck with your integration

Translate

Forum|alt.badge.img
  • Author
  • Freshman I
  • Oct 6, 2023 1:13 PM UTC

Done - thanks Rohit!

Translate