Skip to main content
Question

PyCelonisPermissionError: You don't have permission to perform 'GET'

  • November 23, 2023
  • 4 replies
  • 72 views

jonas.schei12
Level 5
Forum|alt.badge.img

Hi all,

 

I want to pulling data from a knowledge model through the following code ...

 

space = celonis.apps.get_spaces().find('Default')

package = space.get_packages().find('Knowledge Model Test')

knowledge_model = package.get_knowledge_model('999-automation-rate-bw-download')

content = knowledge_model.get_content()

 

But I get the error "PyCelonisPermissionError: You don't have permission to perform 'GET' ", even I have set all possible permissions (for "Space" / "Package / "Analysis").

Any ideas which permissions are missing.

Unfortunately the article below does not help me here.

 

Thanks in advance,

Best,

Jonas

 

4 replies

  • Level 0
  • 11 replies
  • November 23, 2023

Hi Jonas,

for which call do you get the permission error? Can you try using `celonis.apps.get_space(<space-id>)` ?

 

You can find the ID in the URL when you open the space: /package-manager/ui/studio/ui/spaces/<ID>


jonas.schei12
Level 5
Forum|alt.badge.img
  • Author
  • Level 5
  • 14 replies
  • November 24, 2023

Hi Simon,

thanks for your reply.

celonis.apps.get_space(<space-id>) is working. So on space level no problem.

 

But in row 3 I get the permission error, when I want to instantiate the knowledgemodel:

knowledge_model = package.get_knowledge_model('Knowledge_Model_Name_Here')

 

I do it as documented here:

Pulling Data from a Knowledge Model - PyCelonis

 

Thanks in advance.

Best,

Jonas


  • Level 0
  • 11 replies
  • November 24, 2023

Hi Jonas,

can you try `package.get_knowledge_models()` to verify if you have access to the knowledge model? If that is the case you can also do `package.get_knowledge_models().find(...)`.

 

Best,

Simon


jonas.schei12
Level 5
Forum|alt.badge.img
  • Author
  • Level 5
  • 14 replies
  • November 24, 2023

Hi Simon,

it works now. Stupid mistake on my part. I have used the 'Key' from the Knowledge Model instead of the ID in the URL.

 

Thanks a lot for your support and have a nice weekend.

 

Best,

Jonas