-
Notifications
You must be signed in to change notification settings - Fork 27
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
/api/scheduled_scans - pull last 100 scans #2
Comments
Hey @jacekjaros - apologies, did not get an email or alert for this one.
https://github.com/opsdisk/scantron/tree/master/scantron_api_client
|
hi @opsdisk i'm using scantron console api directly. |
Thanks for that info @jacekjaros. Unfortunately right now, it pulls back all scan data because of this line: https://github.com/opsdisk/scantron/blob/master/console/django_scantron/api/views.py#L245 If you're willing to add a few lines of code, this will work. Disclaimer, I have not done any thorough testing of this! It shouldn't hurt anything, but may not work because of the line above that returns all results for an admin GET request instead of respecting the filtering code below.
systemctl restart uwsgi
Update the API client to be:
when you call it
This will generate something like
|
Hi,
I have script which utilize
/api/scheduled_scans
endpoint to expose scan stats to external system. This script was created some times ago. Now a day i had tones of scans in my system and each request are pulling few MB data. Is there some way to limit this to last 100 submitted scans?I know that in current version retention feature was introduced however I want to keep this data as long as this is possible.
The text was updated successfully, but these errors were encountered: