Open garu opened 6 years ago
If we're talk about Metabase compatibility, I'm not sure if any current client can do this, or if Metabase could do this. There were some lines in the Metabase webapp code about updating existing reports, so we can see if any current client does this when updating a profile (with all the duplicate Metabase profiles I've been finding, I'm almost positive they do not).
For the new API, sending new reports with new profile data is fine. But updating old reports to set the tester's information isn't possible yet, like you said. I can some APIs for searching reports by tester, and an API so that a client can send patches to those reports (so you only need to send the data that's updated, not a copy of the whole report with the updated data).
But, before we allow that, we would absolutely need an authentication scheme, or else anyone would be able to update anything at any time (a bit more dangerous than our current "anyone can submit anything at any time"). There'd need to be an API to set up an account, with a profile and a passphrase/shared key. Then we'd need some other things:
The authentication token would need to be sent with each report. My initial instinct is to make this in to a JSON Web Token, but I will likely need to do some research: The Perl NOC has been trying to move everything to Auth0, so it would be a good thing for us to use Auth0 for authentication as well.
I'll spend some time in the coming weeks to build the list of tasks (as tickets) on the server side that need completion to start attempting this, and link them to this ticket. But I think it would be of great value, and most of the tasks have value for other reasons as well.
Once updated, old and new reports shown on cpantesters.org should reflect it.
This is probably going to require a new API endpoint on the backend, but it's an important change nonetheless!