Can I use restful for statistical api?

problem description

Restful"s api can be used for regular add, delete, modify and other operations, but if my api is to do "statistics" for resources, how should I design such Api?

the environmental background of the problem

currently, I have a resource for reporting alarms, (alert),. I need to count the number of alarms added within a month, the number of alarms of emergency types, and the alarm data of corrective types.

related codes

{
  method: "GET",
  path: "/api/alert/alertByCategoryMonth",
  config: {
    tags: ["api", "alert", "category", "day"],
    description: " ",
    handler: { async: controller.AlertByCategoryMonth },
  },
},

result

this weird api / api/alert/alertByCategoryMonth makes me feel completely different from other rest api styles. I wonder if there is a rest api? suitable for this type

.
Mar.28,2021

first of all, you can create a table of alarm resources in the database, which probably includes the following field id (primary key), date (statistics date). Warning_resource_counts, emergency_counts,reform_counts, then uses a script to put the data statistics into the table built above, and then uses api to obtain the data in the table and display it at the front end

.
MySQL Query : SELECT * FROM `codeshelper`.`v9_news` WHERE status=99 AND catid='6' ORDER BY rand() LIMIT 5
MySQL Error : Disk full (/tmp/#sql-temptable-64f5-1b31234-2bd9a.MAI); waiting for someone to free some space... (errno: 28 "No space left on device")
MySQL Errno : 1021
Message : Disk full (/tmp/#sql-temptable-64f5-1b31234-2bd9a.MAI); waiting for someone to free some space... (errno: 28 "No space left on device")
Need Help?