Skip to main content
Solved

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

  • October 4, 2023
  • 7 replies
  • 311 views

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.

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.!


Forum|alt.badge.img
  • Author
  • Freshman I
  • October 5, 2023

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


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.


RohitRattan88
Acumatica Moderator
Forum|alt.badge.img+4
  • Acumatica Moderator
  • October 5, 2023

@dannygraham @Vignesh Ponnusamy is correct.

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

 


Forum|alt.badge.img
  • Author
  • Freshman I
  • October 6, 2023

Chaps! You’ve done it!

Who doesn’t love a one character fix?

And only a little bit embarassing!

Many thanks to you both!


RohitRattan88
Acumatica Moderator
Forum|alt.badge.img+4
  • Acumatica Moderator
  • October 6, 2023

@dannygraham 

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

Good luck with your integration


Forum|alt.badge.img
  • Author
  • Freshman I
  • October 6, 2023

Done - thanks Rohit!