gRPC API - subscription info showing stale data

Dear Dlubal community,

I use the new API to automate creating models and running static analysis. Because I don't want to exceed my API requests limit, I check how many credits are still available before every run (with the method get_subscription_info).

But the method returns stale data - I see for example api_requests_count: 581 after three or four runs - the value does not change although the credits are consumed. After a while, it shows updated value. Sometimes api_requests_count updates after one minute, sometimes it stays the same quarter of an hour.

This is quite inconvenient because I would like to track, how many credits exactly was consumed after a single run.

RFEM / API version: 6.14.0005 / 2.14.5

Why is not value updating immediately?
Thanks for clarifying.

        with Application(api_key_value=api_key, port=port) as rfem:
            print("SUMMARY:")
            subscription_info : SubscriptionInfo = rfem.get_subscription_info()
            print(subscription_info)
            print("Credits left: ", subscription_info.api_requests_limit - subscription_info.api_requests_count)

Jane

Hi janel-cz,

first of all,welcome to the community.

Regarding to your question why the request counts are not updated just in time I can just tell you that it is not possible yet. There are several tasks done in the background whicht takes time.

However, you can see the current state in the Extranet. There you'll find a section API & Cloud, and in the Menu API II you'll find lots of informations about your API request usage. You should find the information you're looking for there.

Best regards
Robert Milrath

Hi,
thank you for your response and explanation. I know that it is possible to see request count and credit usage in the Extranet. I was facing some issues with loading data in extranet recently - the data in API requests count | My page weren't loading so I got only blank page.

I think that getting credit usage just in time from python API could be a nice feature. Maybe in some future release :slightly_smiling_face:?

Best regards
Jane

Hi janel-cz,

this feature was already requested from other users, I added you to the list of requester. The RUS ID = 5434. But for now, I cannot tell you when it will be implemented.

Best regards
Robert Milrath