Discourse API 역공학을 참고해 보세요. 이 접근 방식을 ‘응답 없는 토픽’ 보고서에 적용해 보았더니, 다음과 유사한 GET 요청이 수행되는 것을 확인했습니다:
http://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
브라우저 인스펙터의 네트워크 탭에서 인코딩된 쿼리 파라미터를 가져올 수 있습니다. 해당 URL을 사용하면 다음과 같은 작업을 수행할 수 있습니다:
curl -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" \
-H "Api-Key: $api_key" \
-H "Api-Username: system"
api_key를 ‘모든 사용자’ 글로벌 API 키로 설정해야 합니다. 보고서에 사용할 수 있는 특정 스코프가 있다고 생각되지 않습니다.
URL에 json 확장자를 추가해야 함에 유의하세요 (http://localhost:4200/admin/reports/bulk.json).