Skip to Main Content

APEX

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

How to use API Command from Apex

b KMay 4 2022

Hi, I'm trying to consume json (or xml) from an https web api call to eia.gov to get stats on energy information. I have an API key and the query will work in a browser but I need to know how to make this call work in Apex so that I can consume the data and combine it with other data. Getting the json or xml and putting it into a table would be ideal.

Where it says YOUR_API_KEY_HERE is where my key would actually go but I'm not posting my key publicly. Here is another link to the EIA site https://www.eia.gov/opendata/commands.php. They are using modified Rest but I'm not sure how to implement this in Apex.
Here is an example of what I want to use:
https://api.eia.gov/series/?api_key=YOUR_API_KEY_HERE&series_id=PET.F003001__3.A
Thank you

Comments
Post Details
Added on May 4 2022
3 comments
279 views