Skip to main content
Question

Trying to find documentation on pycelonis to get list of pacakges from a space and list of analysis from the package

  • January 26, 2022
  • 9 replies
  • 6 views

muthappan.alaga
Level 8
Forum|alt.badge.img+1

i am using pycelonis in jupyter notebook to get list of spaces, list of packages and its analysis. I am able to get list of spaces, but list of packages is not possible, also space.packages.find is not pulling one of my package key.

 

If i can get the documentation to find list of packages and analysis that will help.

 

Thanks

Muthappan

9 replies

  • January 28, 2022

Hello,

 

Below is sample code to get packages and analyses.

 

import pycelonis

celonis = pycelonis.get_celonis() # change argments of get_celonis depending on your environment

packages = [p for s in celonis.spaces for p in s.packages] # list of package

analyses = [a for s in celonis.spaces for p in s.packages for a in p.analyses] # list of analysis


muthappan.alaga
Level 8
Forum|alt.badge.img+1

Hi Kazuhiko,

 

i am getting empty list " [] " for packages for the below code.

 

packages = [p for s in celonis.spaces for p in s.packages] # list of package

packages

 

I am getting values for spaces for the below code, but no luck for packages

 

space = celonis.spaces

space

 

 

Thanks

Muthu


  • January 30, 2022

Could you check permission of space ? "EDIT ALL PACKAGES" permission is required for pycelonis to retrieve package.


muthappan.alaga
Level 8
Forum|alt.badge.img+1

Here are the list of permissions i have for the jupyter workbenchAll permission list for Jupyter workbench


  • January 31, 2022

You can click three dots in your space then click Permissions menu, then you can select "EDIT ALL PACKAGES" permission to your User or Application.

If you use Default space, it is like below.

 

permission 

 


muthappan.alaga
Level 8
Forum|alt.badge.img+1

That Works, so i have to provide permissions for each spaces and each package if we have multiple spaces and multiple packages. That will be too much maintenance. Anyway thank you Kazuhiko for detailed explanations.


  • January 31, 2022

It is nice to hear that.

 

In my case, package level permission is not required when using Admin role.


muthappan.alaga
Level 8
Forum|alt.badge.img+1

How do you use admin role in jupyter workbench, do you use key?

 


  • February 1, 2022

Go to Edit Profile in right upper avatar, then Create API key. That key is same role as your login user account.