Question

Login Syntax for OData

  • 11 January 2024
  • 12 replies
  • 171 views

Userlevel 4
Badge

Hello community,

I have been trying to use a GET method to login to my Acumatica instance using Postman, but it displays 404 error or sometimes 401 unauthorized error.

i have created a user account and have given the account as Admin & Access to OData roles. I have been using the following syntax in the postman:

https://siteURL/AcumaticaERP/OData

Is this the correct syntax that I have been using? If yes then why I am facing the issue?

 

Thanks in advance.


12 replies

Userlevel 4
Badge

Hi @Harry ,

To configure basic authorization in Postman and test it, do the following:

1.In Postman, create a new collection and, on the Authorization tab, configure its authorization settings as follows:

a. In the Type box, select the Basic Auth type.

b. In the Username and Password boxes, type the username and password that you are using to access the Acumatica ERP instance for the training course.

c. Click Save.

2. In the collection, add a GET request to the following URL to retrieve the list of generic inquiries exposed through OData.

http://localhost/MyStoreInstance/OData/$metadata

3.Send the request

Is ODATA only used to retrieve the data from Generic Inquiries?

Userlevel 7
Badge +11

Hi @Harry 

To configure basic authorization in Postman and test it, do the following:

1.In Postman, create a new collection and, on the Authorization tab, configure its authorization settings as follows:
a. In the Type box, select the Basic Auth type.
b. In the Username and Password boxes, type the username and password that you are using to access the Acumatica ERP instance for the training course.
c. Click Save.

2. In the collection, add a GET request to the following URL to retrieve the list of generic inquiries exposed through OData.

Url : siteURL/AcumaticaERP/OData/$metadata


3. Send the request.
 

Userlevel 4
Badge

Hey @jinin , is the OData only used to work on Generic Inquiries of Acumatica?

Userlevel 7
Badge +11

Hi @Harry ,

  • By using OData Version 3.0, you can expose the results of generic inquiries to external systems.
  • By using OData Version 4.0, you can request data from Acumatica ERP by directly accessing data access classes (DACs) without configuring any generic inquiry.
Userlevel 4
Badge

Hi @Harry ,

  • By using OData Version 3.0, you can expose the results of generic inquiries to external systems.
  • By using OData Version 4.0, you can request data from Acumatica ERP by directly accessing data access classes (DACs) without configuring any generic inquiry.

So can we apply CRUD operations using ODATA?

Userlevel 7
Badge +11

Hi @Harry ,

  • By using OData Version 3.0, you can expose the results of generic inquiries to external systems.
  • By using OData Version 4.0, you can request data from Acumatica ERP by directly accessing data access classes (DACs) without configuring any generic inquiry.

So can we apply CRUD operations using ODATA?

OData is primarily used for data retrieval purposes

Userlevel 4
Badge

Hi @Harry 

To configure basic authorization in Postman and test it, do the following:

1.In Postman, create a new collection and, on the Authorization tab, configure its authorization settings as follows:
a. In the Type box, select the Basic Auth type.
b. In the Username and Password boxes, type the username and password that you are using to access the Acumatica ERP instance for the training course.
c. Click Save.

2. In the collection, add a GET request to the following URL to retrieve the list of generic inquiries exposed through OData.

Url : siteURL/AcumaticaERP/OData/$metadata


3. Send the request.
 

What is the purpose of $metadata?
So if i have a dac of APInvoice then my syntax would be siteURL/AcumaticaERP/OData/APInvoice ?

Userlevel 7
Badge +11

Hi @Harry 

To configure basic authorization in Postman and test it, do the following:

1.In Postman, create a new collection and, on the Authorization tab, configure its authorization settings as follows:
a. In the Type box, select the Basic Auth type.
b. In the Username and Password boxes, type the username and password that you are using to access the Acumatica ERP instance for the training course.
c. Click Save.

2. In the collection, add a GET request to the following URL to retrieve the list of generic inquiries exposed through OData.

Url : siteURL/AcumaticaERP/OData/$metadata


3. Send the request.
 

What is the purpose of $metadata?
So if i have a dac of APInvoice then my syntax would be siteURL/AcumaticaERP/OData/APInvoice ?

You should use like below,

siteURL/AcumaticaERP/ODatav4/PX_Objects_AP_APInvoice

Userlevel 4
Badge

Hi @Harry 

To configure basic authorization in Postman and test it, do the following:

1.In Postman, create a new collection and, on the Authorization tab, configure its authorization settings as follows:
a. In the Type box, select the Basic Auth type.
b. In the Username and Password boxes, type the username and password that you are using to access the Acumatica ERP instance for the training course.
c. Click Save.

2. In the collection, add a GET request to the following URL to retrieve the list of generic inquiries exposed through OData.

Url : siteURL/AcumaticaERP/OData/$metadata


3. Send the request.
 

What is the purpose of $metadata?
So if i have a dac of APInvoice then my syntax would be siteURL/AcumaticaERP/OData/APInvoice ?

You should use like below,

siteURL/AcumaticaERP/ODatav4/PX_Objects_AP_APInvoice

Hey @jinin , i followed the above steps: but still it says 401 Unauthorized access.

Userlevel 4
Badge

When I tried with Metada it works fine but when i enter this table name: it says 401

Userlevel 4
Badge

Hello @jinin , Have now resolved. I had to give out Parameters

Userlevel 7
Badge +11

HI @Harry ,

I hope you given username and password for the instance and tried to get the DAC information.

 

 

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