Finding the REST URL for Oracle Cloud Instances

Learning a new technology (or technologies, in my case) is hard. What ends up being so simple is so hard because you don’t know your tool well enough, don’t know the correct words to Google, and don’t know how to ask questions the right way yet. But, this is part of the process and allows you to connect the dots in the tool. …At least this is what I tell myself when I am frustrated in finding a solution to my issue.

Not going to lie, this one took me a few months to figure out. It wasn’t days straight I would look into this; it was on and off while I had time to cool down from frustration. Little did I know my answer was so simple!

Here is what I was trying to figure out with ORDS (Oracle Rest Data Services):

If I am using a cloud instance of, say for example, APEX, how do I reference the URL of my REST script?

If you have a static IP address for your application, accessing the script is easy. But what if you are using an Oracle cloud URL? I had gotten so frustrated with figuring this out that I resolved the answer to being that you could only run ORDS on hosted instances. I was wrong…

Below I have created an example based off an application that I’ve created to compare heart rate, distance, and calories burned between my Apple watch and Garmin watch. I am doing a simple raw data dump from the table (HR_TEST). Here’s the process I used to determine what the URL was for the REST script:

  1. In APEX, go to SQL Workshop -> RESTful Services.

A6

2. Click on Create.

A5

3. Create the details for the REST script. I chose Feed as my Source Type to best show this example.A4

4. Once you save (Apply Changes), you will see the Handler (GET) on the left side of the screen. Click GET.

A3

5. In the bottom portion of the screen, click Test.A2

6. In the first line of the feed, you will see the URL to use for page 1 of the feed. The URL in the address box is the actual REST script URL. If you use a query, for example, and output to a CSV file, you will still use the same URL in the address box.A1

Voila! So simple, yet it took me so long to figure this out because being a n00bie is hard (just bein’ honest with ya). I tested this many times (because *surely* it couldn’t be that easy) and it worked each time.

So there you go…there’s (just one way) how to figure out the URL of your cloud instance ORDS reference. 🙂

(PS: If I have misspoken on terminology here, please correct me. I’m still learning it all. 🙂  )

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s