AugForums.com

An Acumatica User Group

  • Free
    • Start Here
    • Rolodex
    • Podcast
    • Blog
    • Forums
  • Paid
    • AugSQL
    • GI Course
    • GI Library
    • Consulting
  • Register
Acumatica Forums

By using this website, you agree to our Terms of Use (click here)

Forums
AUG Forums
Acumatica OData wit...
Using JSON with ODa...
 
Notifications
Clear all

Questions Using JSON with OData in Acumatica

 
Acumatica OData with Microsoft Excel and Power BI
Last Post by Tim Rodman 7 years ago
2 Posts
1 Users
1 Reactions
7,639 Views
RSS
Tim Rodman
Posts: 3193
 Tim Rodman
Admin
Topic starter
October 4, 2018 12:15 pm
(@timrodman)
Famed Member
Joined: 10 years ago

By default, the OData format used by Acumatica is Atom in XML which is pretty wordy and verbose. JSON is A LOT cleaner.

Here is an example of the regular OData output from Acumatica:

Note that the only stuff I care about is the actual data which is highlighted in red, but there is a lot of other "junk" in there too:

 

The screenshot above came from the following URL:
https://acumaticademo.aktion.com/Acumatica2018R1/OData/Demo%20Company/Test1

 

But you can add a parameter to the end of the URL to get back JSON instead of Atom like this:
https://acumaticademo.aktion.com/Acumatica2018R1/odata/Demo%20Company/Test1?$format=json

The JSON format is a lot cleaner which means that there is A LOT less data that needs to flow across the pipe.

The JSON format looks like this:

 

Thanks to Vlad and Vladimir for teaching me this over on StackOverflow:
https://stackoverflow.com/questions/52612875/acumatica-odata-as-json-instead-of-atom/52622804#52622804

 

Final note, if you want to connect to the JSON version of OData in Acumatica from Excel, you can't use the normal From Other Sources -> From OData Feed option pictured below:

 

Instead, you have to use this From Other Sources -> From Web option:

 

Just paste the URL that has the extra JSON parameter in it:

 

Then authenticate using Basic and your Acumatica credentials like your would normally do with OData:

 

Next, you have to go through a few manual gyrations to get the data in the format that you are expecting:

 

Note in the most recent screenshot above that the JSON format is not as "smart" as the regular OData format. Everything defaults to text and you'll have to do additional work to format things like dates.

But this is a good option for when the normal OData format is running slowly because the JSON format seems to me to be less than 50% of the size so in theory it should be more than 50% faster.


1 Reply
Tim Rodman
Posts: 3193
 Tim Rodman
Admin
Topic starter
November 7, 2018 8:18 am
(@timrodman)
Famed Member
Joined: 10 years ago

So, it appears that this is not needed when using Excel. I assumed (incorrectly) that Excel was retrieving the data in the OData format since that's the format you see when hitting the URL in a web browser.

But when you hit that URL in Excel, Excel is smart enough to retrieve the less wordy JSON format which is really cool.

Thanks to Vladimir (again) for pointing this out to me. He used an application called Fiddler to analyze the requests coming from Excel. He also found that his discovery is mentioned at the bottom of this article where it says "Note: Connect to an OData feed supports the JSON light data service format."

https://support.office.com/en-us/article/connect-to-an-odata-feed-power-query-4441a94d-9392-488a-a6a9-739b6d2ad500


Reply
AhmedBahar reacted
Forum Jump:
  Previous Topic
Next Topic  
Forum Information
Recent Posts
Unread Posts
Tags
  • 12 Forums
  • 2,526 Topics
  • 10.9 K Posts
  • 11 Online
  • 2,324 Members
Our newest member: Michael Kiley
Latest Post: Pick List report suddenly not splitting on Shipment
Forum Icons: Forum contains no unread posts Forum contains unread posts
Topic Icons: Not Replied Replied Active Hot Sticky Unapproved Solved Private Closed

Online Members

 No online members at the moment

Acumatica Forums

Terms of Use & Disclaimers :: Privacy Policy

Copyright © 2025 · AUG Forums, LLC. All rights reserved. This website is not owned, affiliated with, or endorsed by Acumatica, Inc.

‹›×

    ‹›×