Count Number of Schedules

This API lets you fetch the count of schedules that have been created.

POSTsm/v1/scheduler/count

Input ParametersInput Parameters

 Parameter  Mandatory/Optional  Data Type  Description
filter Optional String Filter requests by providing a query using Qualys syntax. Refer to the How to Search topic in the online help for assistance.

Some examples are:

  • name: “Weekly Schedule”
  • status: ACTIVE
  • createdBy: "adminuser"
startAt/endAt Optional String Search for schedules by specifying the start date/end date.
groupBy Optional String Group schedules by specifying parameters such as scheduler status, agent version, and so on.

Sample 1: Get the Total Count of Schedules by Specifying startAt and endAt ValuesSample 1: Get the Total Count of Schedules by Specifying startAt and endAt Values

API Request

curl -X POST 
"<qualys_base_url>/sm/v1/scheduler/count"
--header "Authorization: Bearer <Token>"
--header "Content-Type: application/json"
--data-raw '{
  "startAt": "2022-11-01T00:00:01.000Z",
  "endAt": "2023-01-11T23:59:59.999Z"
}' 

Request Body

 {
   "startAt": "2022-11-01T00:00:01.000Z",
   "endAt": "2023-01-11T23:59:59.999Z"
}    

API Response

 {
   "body": {
       "count": 17
   }
}   

Sample 2: Get the Total Count of Schedules by Specifying groupBy=status as Query ParameterSample 2: Get the Total Count of Schedules by Specifying groupBy=status as Query Parameter

API Request

curl -X POST
"<qualys_base_url>/sm/v1/scheduler/count"
--header "Authorization: Bearer <Token>"
--header "Content-Type: application/json"
--data-raw '{
  "groupBy": [
    "status"
  ]
}'

Request Body

 {
"groupBy":["status"]
}

API Response

 {
   "body": {
       "ACTIVE": 133,
       "INACTIVE": 60
   }
}