Skip to main content
Question

i am trying to use the celonis.api_request() function in the ML workbench, but facing below error:AttributeError: 'Celonis' object has no attribute 'api_request'

  • July 17, 2023
  • 3 replies
  • 23 views

pavan.bhara13
Level 4
Forum|alt.badge.img

The same function was working a week back, but we are recently noticing that api_request() is not an attribute of Celonis anymore. 

 

Same goes for Celonis.pools() function as well. where it displays the list of data pools available.

 

Any inputs on how to tackle this issue is much appreciated. TIA!

 

image

3 replies

I am pretty sure somebody has upgraded pycelonis to a 2.x version

 

Try this and check the version.

 

import pycelonis

print(pycelonis.__version__)

 

In pycelonis 2.0 object celonis has NOT the api_request call (maybe is hidden in other part, check the docs)

 

HTH


mukesh.gupta12
Level 1

https://celonis.github.io/pycelonis/2.4.0/reference/pycelonis/

 

Please check the official Celonis python api doc


mikolaj.siuta
Level 1

Give it a try with client.request() method. https://celonis.github.io/pycelonis/2.0.1/reference/pycelonis_core/client/client/#pycelonis_core.client.client.Client.request

In your case changing your code the below line might work.

consumption_table = celonis.client.request(method='GET', url=url)

 

Regards,

Mikolaj