TweetShareSharePin0 SharesThis post is part of a series that starts with this post. In the last post we made the service secure beyond all recognition (sebar 🙂 ) or maybe better expressed as so secure that nobody has access. In this post we’ll look at how to set up access to it to allow just those we have given credentials to to have access. To access a protected service one need to use a client-definition. id + secret, pretty much […]
Recent Posts
Let’s talk about ORDS VII
TweetShareSharePin0 SharesThis post is part of a series that starts with this post. Having gone through much of what can be done with a basic REST-service earlier in this series, it is time to look at securing the service. When you can access a service with noting noire than just the URL, then so can anyone else that has access to sen toe ORDS-server the URL. Not only can they read, but if the view allows writing then they can […]
Let’s talk about ORDS VI
TweetShareSharePin0 SharesThis post is part of a series that starts with this post. It is time to turn to query parameters. It expands on the end point to allow slicing and dicing what we get back. Or in other words it allows projection. Or in layman terms, you can supply a where-clause expressed in jSON. You can also define sorting and much more. query parameters are basically key-value pairs with an equal sign as the separator. THis sounds much more […]
Let’s talk about ORDS V
TweetShareSharePin0 SharesThis post is part of a series that starts with this post. In the last post we covered how to get the JSON-data returned from a REST-call converted back over to be represented as the rows and columns we are used to work with in the database. We’ll now take a look at how paging works and how we work with it to get a view to read all the rows. Let us first revisit how one reads one […]
Lets talk about ORDS IV
TweetShareSharePin0 SharesThis post is part of a series that starts with this post. Having seen REST-calls from the database to get the raw JSON-response it is time to look at how it can be transformed into separate columns. This is the SQL we use to get data split up. OBJECT_ID OWNER OBJECT_NAME ——— —— ———————– 134 SYS ORA$BASE 143 SYS DUAL 144 PUBLIC DUAL 441 PUBLIC MAP_OBJECT 543 SYS SYSTEM_PRIVILEGE_MAP 544 SYS I_SYSTEM_PRIVILEGE_MAP 545 PUBLIC SYSTEM_PRIVILEGE_MAP 546 SYS TABLE_PRIVILEGE_MAP 547 […]
Let’s talk about ORDS III
TweetShareSharePin0 SharesThis post is part of a series that starts with this post. Now that we have seen various ways to get data and validate the REST-service working we can move on to implement access from within an Oracle database. I find validating outside the database as the first step to be very valuable. If you have one database that has the rest enabled view, the rest service and then a view in another database reading from that view setup […]
Let’s talk about ORDS II
TweetShareSharePin0 SharesThis post is part of a series that starts with this post. Now that we have a restenabled view and we can get data from ut with a basic cURL call, let’s look at more ways to make that call and view the response. But before those calls, lets look at what data we actually get from the REST-call. If we format the output from the cURL-call it looks something like this. {“items”:[……] ,”hasMore”:true ,”limit”:25 ,”offset”:0 ,”count”:25 ,”links”: [{“rel”:”self”. […]
Let’s talk about ORDS I
TweetShareSharePin0 SharesI recently started looking into a problem at work with getting security added to our setup with views making REST-calls to work as if they were served with a database link. In that work I started from scratch adding one piece at a time to make sure I could troubleshoot it. In doing so I realised that we often talk about the amazing magic of ORDS, but how does one break it down to understand and troubleshoot the smoke […]
Using package variables in SQL
TweetShareSharePin0 SharesI often want to use the constants defined in packages also in my SQL. It has in the past never worked and it for the most part still does not. If I have a a package like this to simplify my code for what department it is I’m looking at. This now allows using dept_info.c_accounting in PL/SQL instead of just hardcoding 10 and having to remember what department 10 is. This is how we usually use PL/SQL and especially […]
Change the compatability mode in APEX
TweetShareSharePin0 SharesI ran across a funny thing today in an application I built 10 yesrs ago but that I have not been involved in maintaining since then. The application is gettings som much needed UI upgrades, like getting out of the dark ages and using universal theme. During that work there were a set of things that didn’t work, components could nbot be found and some unexpected things happened. Unexpected compared to the behavior that had been experienced while doing […]