I needed to do a follow-up to last week’s quarantine post. I thought today, we’d do a quick little post on how EPM Cloud REST functionality has changed, for the better, over the last few months. Last year, I did a KScope presentation with my friend, William Andreelli (who sometimes writes on this blog, and should write more…). This presentation, which can be found here, shows how to upload a file to (in this example) EPBCS (as it was known then) using Oracle Integration Cloud and the Migration REST API. Here is a screenshot from the deck we presented.
Notice the outlined code? At the time, the REST API required a query parameter to be passed through on the REST call. I can tell you for a fact that I agonized (at the time) over what to do with the “chunkSize” value, and spent many a useless hour figuring out how to handle it. I remember trying to explain the following slide to the assembled folks (all 5 of them, including Mrs. Andreelli Sr.) and freaking out on how to explain this.
At the time, the documentation, and indeed, the API required us to have this query parameter and specify expected chunk sizes. If you now look at the upload documentation, you’ll notice that this does not exist anymore.
All you really need to specify now, is the file name that you are trying to upload, at bare minimum. I was pleasantly surprised with this recent change. I think it makes the API much more approachable, for something as critical as uploading files. For instance, here is a cURL request to upload a zip file to EPM Cloud.
curl --location --request POST 'https://unlk.pbcs.us2.oraclecloud.com/interop/rest/184.108.40.206.600/applicationsnapshots/ArsenalSUX.zip/contents' \
--header 'Content-Type: application/octet-stream' \
--header 'Authorization: Basic 8wee4444uuuuud==' \
And of course, Arsenal sucks…this is known.
I am so glad Oracle made this update. It definitely makes things so much more simpler. It does mean that it is a good time to start updating any scripts you may be using, if you are using REST.
Have you noticed the Postman examples which show you how to use REST? Nice work, Oracle.
Friends, that’s all I had for today. Be safe, wash your hands, show compassion, and be positive.