Dai un’occhiata a Reverse engineer the Discourse API. Quando provo questo approccio per il report “Argomenti senza risposta”, vedo che effettua richieste GET simili a:\n\nhttp://forum.example.com/admin/reports/bulk?reports%5Btopics_with_no_response%5D%5Bfacets%5D%5B%5D=prev_period&reports%5Btopics_with_no_response%5D%5Bstart_date%5D=2022-02-01&reports%5Btopics_with_no_response%5D%5Bend_date%5D=2023-06-17&reports%5Btopics_with_no_response%5D%5Blimit%5D=50\n\nPuoi ottenere i parametri di query codificati dalla scheda Network dell’inspector del tuo browser. Con quell’URL, dovresti essere in grado di fare qualcosa di simile a:\n\n\ncurl -X GET \"http://localhost:4200/admin/reports/bulk.json?reports%5Btopics_with_no_response%5D%5Bfacets%5D%5B%5D=prev_period&reports%5Btopics_with_no_response%5D%5Bstart_date%5D=2022-05-16&reports%5Btopics_with_no_response%5D%5Bend_date%5D=2022-09-10&reports%5Btopics_with_no_response%5D%5Blimit%5D=50\" \\\n-H \"Api-Key: $api_key\" \\\n-H \"Api-Username: system\"\n\n\nDovrai impostare api_key su una chiave API globale per tutti gli utenti - non credo ci sia uno scope specifico che possa essere utilizzato per i report.\n\nNota che devi aggiungere l’estensione json all’URL (http://localhost:4200/admin/reports/bulk.json)
1 Mi Piace