Skip to main content
Question

Return value of api_request changed?

  • January 19, 2024
  • 2 replies
  • 19 views

pablo.messa11
Level 3

Hello all,

we are still using PyCelonis 1.7 and we figured out that since yesterday the response of the function "api_request" has been changed.

Before we got a list / dict or string. Since yesterday we get a request.model.response object.

 

Have you noticed that? Are you also having issues with your api_request calls?

 

Our current workaround was to get the "text" of the response object. Like:

 

resp.text

 

instead of:

 

resp

2 replies

  • Level 0
  • January 19, 2024

Hi Pablo,

does this occur for all requests or only for a specific endpoint? PyCelonis parses requests only if the content type is set to 'application/json' so it might be the case that the content type for the endpoint you are using has changed.

In general, we can't guarantee that endpoints called with the `api_request` method do not change over time as these are endpoints that are not officially supported/documented in PyCelonis.

 

Best,

Simon


pablo.messa11
Level 3
  • Author
  • Level 3
  • January 19, 2024

Hi @simon.klotz,

Many thanks for your answer. We observed the issue in this endpoint:

 

https://realm.celonis.cloud/platform-adoption/adoption-tracking-events/csv?eventType=STUDIO_ASSET

 

and changed the processing of the response as previously mentioned.

 

Regards,

Pablo