Build beautiful and interactive API documentation for ORDS

Image
In this blog post, I will show you how to quickly build beautiful and interactive API documentation for your Oracle APEX REST data sources using  swagger hub . Using APEX v23.1. I downloaded the  titanic data set  and loaded them into tables in my APEX instance, created some authorized restful services and published them using swagger hub. You can create a free account on swagger hub.   Check out my titanic swagger hub here ; Press Authorize. Username REST, password Glasgow123! I won't go through creating RESTful services and just show you the four I created that sit on top of the titanic data set; The GET is a very simple SQL query;      select * from TITANIC_DATA_SET_NEW A handy tip is to add comments, as there will appear on swagger hub, making your API self documenting; Once you have created your modules, press the Generate Swagger Doc button; This will generate an open API for you.  Copy the API and paste it into swagger hub This will generate the documentation; As mentioned b

Test & Monitor you APEX app. Part 1 : Monitor your APEX app using Jenkins

This is the first of a series of posts where I will show you how you can use Jenkins, Selenium, JMeter and Maven to test, monitor and create a continuous integration pipeline for your APEX application.

This is part 1, Set-up Jenkins to monitor your APEX app and get alerted when your app is unavailable.

Creating a simple Jenkins job that takes 5 minutes to set up, your APEX application will be monitored 24 hours a day, and you will get alerted as soon as it becomes unavailable.  You can then build on this using free open source software to run web (Selenium) and database (JMeter) tests on your APEX app controlled by Jenkins, which will I describe in upcoming posts.

In upcoming posts, I will show you how to set up Jenkins to;

Run web (Selenium) tests on your APEX application.  Schedule web tests logging into your APEX app running tests using Selenium and Maven and get notified of any failures.

Schedule deployment of your APEX dev env nightly to a test env. Deploy your APEX app from your development environment to a test environment nightly, then run a suite of Selenium web tests and get notified of any failures.

Monitor your APEX DB. Run scheduled database checks on your APEX database using JMeter and get notified of any failures.

Load test your APEX app. Stress test your APEX application, logging in with thousands of users using JMeter distributed testing.

In this post I will also create a job to monitor our Apex Office Print server and get alerted if it's unavailable.  These are the 2 Jenkins monitoring jobs I am going to set-up;

Prerequisite: Install Jenkins and the site monitor plugin.  Jenkins is simple to set up and there are lots of online guides, so I won't go into it here.

Let's set up the monitor APEX application job.  Log into Jenkins and press New Item (top left);


name it "Monitor APEX application", select Freestyle project and press OK;



press configure;

set-up  how often we want to monitor our APEX app, which will be every 5 minutes; 

H/5 * * * *


(press the blue ? beside to the right of schedule to get help on setting up the schedule cron)

Now tell it the APEX URL you want to monitor by pressing Add post-build action;

and choose Monitor Site;

the URL is your APEX app URL;


You can leave Success Response Codes empty, where it will check for 2XX codes by default.

Lastly, set up the email recipients who will get emailed if the app is unavailable;


Exactly the same steps for the Monitor AOP job, replacing the APEX URL with our AOP Server address.

It's free and took about 5 minutes to set the jobs up, my team now get alerted as soon as our APEX app or AOP server is unavailable. I have found this invaluable, as we now get alerted if there is an issue with our application, so we can try and fix it before any users report it.









Comments

Post a Comment

Popular posts from this blog

Oracle APEX Interactive Grid colour cells based on a condition using JavaScript and CSS

Oracle APEX pretty checkbox item plugin

Build beautiful and interactive API documentation for ORDS