Solved

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

  • 4 October 2023
  • 7 replies
  • 113 views

Userlevel 1

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.

 

 

icon

Best answer by Vignesh Ponnusamy 5 October 2023, 18:51

View original

7 replies

Userlevel 7
Badge +4

Hi @dannygraham,

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

 Good Luck.!

Userlevel 1

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

Userlevel 7
Badge +4

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.

Userlevel 7
Badge +4

@dannygraham @Vignesh Ponnusamy is correct.

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

 

Userlevel 1

Chaps! You’ve done it!

Who doesn’t love a one character fix?

And only a little bit embarassing!

Many thanks to you both!

Userlevel 7
Badge +4

@dannygraham 

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

Good luck with your integration

Userlevel 1

Done - thanks Rohit!

Reply


About Acumatica ERP system
Acumatica Cloud ERP provides the best business management solution for transforming your company to thrive in the new digital economy. Built on a future-proof platform with open architecture for rapid integrations, scalability, and ease of use, Acumatica delivers unparalleled value to small and midmarket organizations. Connected Business. Delivered.
© 2008 — 2024  Acumatica, Inc. All rights reserved