Forums

Beta API console history

I'm sending a request to the endpoint https://www.pythonanywhere.com/api/v0/user/*/consoles/***/get_latest_output along with my token, and it successfully returns data. However, when there is a large amount of data, it only returns the first 500 characters. Would it be too much to request a more functional alternative or perhaps a v1 implementation?

I'll add that to our list of suggested enhancements. However, there is a limit to how much we store from a console's history -- how much would you need for your use case?

First of all, thank you for adding this to the list. My suggestion is as follows: instead of saving all the data, the system could return only the last 500 lines of the console history. Alternatively, when the data exceeds a certain limit, the oldest entries could be overwritten by new ones. This could provide a more efficient and practical solution. And I need 100 - 200 maximum

im working some kind action and every time the action runs, it writes more than 1000 rows, and this doesn't work as I expect. What I need is just the latest 100-200 rows. Therefore, it is necessary to adjust the process to fetch only the latest data instead of all rows.

Perhaps you could instead store the data in a file, and then use the files API to download that file?