Photo by Markus Winkler on Unsplash

Find File in EPM using REST APIs and Python

As you may already know, I love using Python to work with Oracle Cloud EPM REST APIs. Today I wanted to share the code snippet that can be used to search for a file in EPM. Under the hood is the “List Files” REST API. You can read more about the API here.

Here is the code snippet for the function. The function has one input, which is the file name to be searched for in EPM.

epmUrl is the url of the EPM instance. On Line 6, I am constructing the listFile API end point. The API version is 11.1.2.3.600. One Line 7, I invoke the REST API. Make sure to provide the correct user and password.

If you are on OCI Gen 1, the user name should be “identity domain.username”. If you are on OCIG Gen 2, you dont need to prefix the identity domain with the username.

Now you can search the file by invoking the function like below

The fileDetails object has the following information

  • name
  • size
  • type
  • lastmodifiedtime

You are gonna need the following packages 📦 for the code to work.

I will adding more helpful python code snippets. Follow me for more code snippets related to Oracle EPM REST APIs. You can improve this code by using try, except, finally block in the function.

--

--

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store
Arun Raj

Arun Raj

Manager Strategic Cloud Services (Oracle Cloud ERP, EPM), Integration Specialist, Big Data, Data Science & Python Enthusiast)