Summary
VWS can generate a per-database recognition counts report: POST /imagetargets/databases/<database_id>/reports/recoCounts with a {"month": "YYYY-mm"} body returns a presigned_url, and that URL serves a CSV report (target_id,reco_count) once generation has finished. The client library has no support for this.
vws-python-mock implements the endpoint, including the report-generation delay, the 404 returned while the report is not yet available, the text/plain content type the presigned URL actually serves, and validation of the month and the database ID. So the client can be tested through real HTTP transports without bespoke test doubles.
Suggested scope
- Add synchronous and asynchronous methods for requesting a reco counts report, following the existing
VWS / AsyncVWS conventions.
- Accept the database ID and the month, and return the transaction ID and presigned URL in a typed structure.
- Add a method for downloading a generated report, and a wait/poll helper for the period during which the presigned URL returns
404, mirroring wait_for_target_processed.
- Parse the CSV into a typed result, or document why raw content is returned.
- Raise useful public exceptions for an invalid month, a month outside the requestable range (only the current and previous month are accepted), and an unknown database ID.
- Add public API documentation, examples, and a news fragment.
Acceptance criteria
- Both clients cover request → wait → download.
- Tests exercise both clients against
vws-python-mock, including a report which is not yet available.
- Tests cover the documented failure responses for the month and database ID.
Summary
VWS can generate a per-database recognition counts report:
POST /imagetargets/databases/<database_id>/reports/recoCountswith a{"month": "YYYY-mm"}body returns apresigned_url, and that URL serves a CSV report (target_id,reco_count) once generation has finished. The client library has no support for this.vws-python-mockimplements the endpoint, including the report-generation delay, the404returned while the report is not yet available, thetext/plaincontent type the presigned URL actually serves, and validation of the month and the database ID. So the client can be tested through real HTTP transports without bespoke test doubles.Suggested scope
VWS/AsyncVWSconventions.404, mirroringwait_for_target_processed.Acceptance criteria
vws-python-mock, including a report which is not yet available.