---
title: "Count Scheduled Maintenance Template"
method: POST
path: "/scheduled-maintenance-template/count"
tags: ["Scheduled Maintenance Template"]
---

# Count Scheduled Maintenance Template

`POST /scheduled-maintenance-template/count`

## Request

- Base URL: `https://oneuptime.com/api`
- URL: `https://oneuptime.com/api/scheduled-maintenance-template/count`
- Auth: API key in header `APIKey`
- TypeScript: <https://skmtc.dev/oneuptime/apis/oneuptime-openapi-specification/docs/scheduled-maintenance-template/count/post.ts> (a function with typed inputs; its response is checked against the schema)

Endpoint to count Scheduled Maintenance Template items

## Request body

- object
  - `query` ScheduledMaintenanceTemplateQuerySchema: Query schema for ScheduledMaintenanceTemplate. A field takes a value, which it matches exactly, or an operator its type allows. A relation is filtered by the fields of the record it names, {"<relation>": {"<field>": <value or Search>}}, and a resource with owners by who owns it, {"owners": {"_type": "OwnedBy", "userIds": [...], "teamIds": [...]}}.
    - `_id` union: A filter on a Object ID field: a value, which it matches exactly, or one of these operators: EqualTo, NotEqual, IsNull, NotNull, EqualToOrNull, Includes.
      - string, uuid
      - object
        - `_type` 'EqualTo', required
        - `value` string, uuid, required
      - object
        - `_type` 'NotEqual', required
        - `value` string, uuid, required
      - object
        - `_type` 'IsNull', required
      - object
        - `_type` 'NotNull', required
      - object
        - `_type` 'EqualToOrNull', required
        - `value` string, uuid, required
      - object
        - `_type` 'Includes', required
        - `value` string[], required
    - `createdAt` union: A filter on a Date field: a value, which it matches exactly, or one of these operators: EqualTo, NotEqual, IsNull, NotNull, EqualToOrNull, GreaterThan, LessThan, GreaterThanOrEqual, LessThanOrEqual, InBetween. Times are ISO-8601, such as 2026-01-01T00:00:00.000Z.
      - string, date-time
      - object
        - `_type` 'EqualTo', required
        - `value` string, date-time, required
      - object
        - `_type` 'NotEqual', required
        - `value` string, date-time, required
      - object
        - `_type` 'IsNull', required
      - object
        - `_type` 'NotNull', required
      - object
        - `_type` 'EqualToOrNull', required
        - `value` string, date-time, required
      - object
        - `_type` 'GreaterThan', required
        - `value` string, date-time, required
      - object
        - `_type` 'LessThan', required
        - `value` string, date-time, required
      - object
        - `_type` 'GreaterThanOrEqual', required
        - `value` string, date-time, required
      - object
        - `_type` 'LessThanOrEqual', required
        - `value` string, date-time, required
      - object
        - `_type` 'InBetween', required
        - `startValue` string, date-time, required
        - `endValue` string, date-time, required
    - `updatedAt` union: A filter on a Date field: a value, which it matches exactly, or one of these operators: EqualTo, NotEqual, IsNull, NotNull, EqualToOrNull, GreaterThan, LessThan, GreaterThanOrEqual, LessThanOrEqual, InBetween. Times are ISO-8601, such as 2026-01-01T00:00:00.000Z.
      - string, date-time
      - object
        - `_type` 'EqualTo', required
        - `value` string, date-time, required
      - object
        - `_type` 'NotEqual', required
        - `value` string, date-time, required
      - object
        - `_type` 'IsNull', required
      - object
        - `_type` 'NotNull', required
      - object
        - `_type` 'EqualToOrNull', required
        - `value` string, date-time, required
      - object
        - `_type` 'GreaterThan', required
        - `value` string, date-time, required
      - object
        - `_type` 'LessThan', required
        - `value` string, date-time, required
      - object
        - `_type` 'GreaterThanOrEqual', required
        - `value` string, date-time, required
      - object
        - `_type` 'LessThanOrEqual', required
        - `value` string, date-time, required
      - object
        - `_type` 'InBetween', required
        - `startValue` string, date-time, required
        - `endValue` string, date-time, required
    - `deletedAt` union: A filter on a Date field: a value, which it matches exactly, or one of these operators: EqualTo, NotEqual, IsNull, NotNull, EqualToOrNull, GreaterThan, LessThan, GreaterThanOrEqual, LessThanOrEqual, InBetween. Times are ISO-8601, such as 2026-01-01T00:00:00.000Z.
      - string, date-time
      - object
        - `_type` 'EqualTo', required
        - `value` string, date-time, required
      - object
        - `_type` 'NotEqual', required
        - `value` string, date-time, required
      - object
        - `_type` 'IsNull', required
      - object
        - `_type` 'NotNull', required
      - object
        - `_type` 'EqualToOrNull', required
        - `value` string, date-time, required
      - object
        - `_type` 'GreaterThan', required
        - `value` string, date-time, required
      - object
        - `_type` 'LessThan', required
        - `value` string, date-time, required
      - object
        - `_type` 'GreaterThanOrEqual', required
        - `value` string, date-time, required
      - object
        - `_type` 'LessThanOrEqual', required
        - `value` string, date-time, required
      - object
        - `_type` 'InBetween', required
        - `startValue` string, date-time, required
        - `endValue` string, date-time, required
    - `projectId` union: A filter on a Object ID field: a value, which it matches exactly, or one of these operators: EqualTo, NotEqual, IsNull, NotNull, EqualToOrNull, Includes.
      - string, uuid
      - object
        - `_type` 'EqualTo', required
        - `value` string, uuid, required
      - object
        - `_type` 'NotEqual', required
        - `value` string, uuid, required
      - object
        - `_type` 'IsNull', required
      - object
        - `_type` 'NotNull', required
      - object
        - `_type` 'EqualToOrNull', required
        - `value` string, uuid, required
      - object
        - `_type` 'Includes', required
        - `value` string[], required
    - `templateName` union: A filter on a Text field: a value, which it matches exactly, or one of these operators: EqualTo, NotEqual, IsNull, NotNull, EqualToOrNull, Search, Includes.
      - string
      - object
        - `_type` 'EqualTo', required
        - `value` string, required
      - object
        - `_type` 'NotEqual', required
        - `value` string, required
      - object
        - `_type` 'IsNull', required
      - object
        - `_type` 'NotNull', required
      - object
        - `_type` 'EqualToOrNull', required
        - `value` string, required
      - object
        - `_type` 'Search', required
        - `value` string, required
      - object
        - `_type` 'Includes', required
        - `value` string[], required
    - `templateDescription` union: A filter on a Long Text field: a value, which it matches exactly, or one of these operators: EqualTo, NotEqual, IsNull, NotNull, EqualToOrNull, Search, Includes.
      - string
      - object
        - `_type` 'EqualTo', required
        - `value` string, required
      - object
        - `_type` 'NotEqual', required
        - `value` string, required
      - object
        - `_type` 'IsNull', required
      - object
        - `_type` 'NotNull', required
      - object
        - `_type` 'EqualToOrNull', required
        - `value` string, required
      - object
        - `_type` 'Search', required
        - `value` string, required
      - object
        - `_type` 'Includes', required
        - `value` string[], required
    - `title` union: A filter on a Text field: a value, which it matches exactly, or one of these operators: EqualTo, NotEqual, IsNull, NotNull, EqualToOrNull, Search, Includes.
      - string
      - object
        - `_type` 'EqualTo', required
        - `value` string, required
      - object
        - `_type` 'NotEqual', required
        - `value` string, required
      - object
        - `_type` 'IsNull', required
      - object
        - `_type` 'NotNull', required
      - object
        - `_type` 'EqualToOrNull', required
        - `value` string, required
      - object
        - `_type` 'Search', required
        - `value` string, required
      - object
        - `_type` 'Includes', required
        - `value` string[], required
    - `description` union: A filter on a Markdown field: a value, which it matches exactly, or one of these operators: EqualTo, NotEqual, IsNull, NotNull, EqualToOrNull, Search, Includes.
      - string
      - object
        - `_type` 'EqualTo', required
        - `value` string, required
      - object
        - `_type` 'NotEqual', required
        - `value` string, required
      - object
        - `_type` 'IsNull', required
      - object
        - `_type` 'NotNull', required
      - object
        - `_type` 'EqualToOrNull', required
        - `value` string, required
      - object
        - `_type` 'Search', required
        - `value` string, required
      - object
        - `_type` 'Includes', required
        - `value` string[], required
    - `slug` union: A filter on a Slug field: a value, which it matches exactly, or one of these operators: EqualTo, NotEqual, IsNull, NotNull, EqualToOrNull, Includes.
      - string
      - object
        - `_type` 'EqualTo', required
        - `value` string, required
      - object
        - `_type` 'NotEqual', required
        - `value` string, required
      - object
        - `_type` 'IsNull', required
      - object
        - `_type` 'NotNull', required
      - object
        - `_type` 'EqualToOrNull', required
        - `value` string, required
      - object
        - `_type` 'Includes', required
        - `value` string[], required
    - `createdByUserId` union: A filter on a Object ID field: a value, which it matches exactly, or one of these operators: EqualTo, NotEqual, IsNull, NotNull, EqualToOrNull, Includes.
      - string, uuid
      - object
        - `_type` 'EqualTo', required
        - `value` string, uuid, required
      - object
        - `_type` 'NotEqual', required
        - `value` string, uuid, required
      - object
        - `_type` 'IsNull', required
      - object
        - `_type` 'NotNull', required
      - object
        - `_type` 'EqualToOrNull', required
        - `value` string, uuid, required
      - object
        - `_type` 'Includes', required
        - `value` string[], required
    - `monitors` union: A filter on a Entity Array field: a value, which it matches exactly, or one of these operators: EqualTo, IsNull, NotNull, Includes. A list of ids, or Includes, matches the records related to any of them; IsNull those related to none.
      - string[]
      - object
        - `_type` 'IsNull', required
      - object
        - `_type` 'NotNull', required
      - object
        - `_type` 'Includes', required
        - `value` string[], required
    - `hosts` union: A filter on a Entity Array field: a value, which it matches exactly, or one of these operators: EqualTo, IsNull, NotNull, Includes. A list of ids, or Includes, matches the records related to any of them; IsNull those related to none.
      - string[]
      - object
        - `_type` 'IsNull', required
      - object
        - `_type` 'NotNull', required
      - object
        - `_type` 'Includes', required
        - `value` string[], required
    - `kubernetesClusters` union: A filter on a Entity Array field: a value, which it matches exactly, or one of these operators: EqualTo, IsNull, NotNull, Includes. A list of ids, or Includes, matches the records related to any of them; IsNull those related to none.
      - string[]
      - object
        - `_type` 'IsNull', required
      - object
        - `_type` 'NotNull', required
      - object
        - `_type` 'Includes', required
        - `value` string[], required
    - `dockerHosts` union: A filter on a Entity Array field: a value, which it matches exactly, or one of these operators: EqualTo, IsNull, NotNull, Includes. A list of ids, or Includes, matches the records related to any of them; IsNull those related to none.
      - string[]
      - object
        - `_type` 'IsNull', required
      - object
        - `_type` 'NotNull', required
      - object
        - `_type` 'Includes', required
        - `value` string[], required
    - `podmanHosts` union: A filter on a Entity Array field: a value, which it matches exactly, or one of these operators: EqualTo, IsNull, NotNull, Includes. A list of ids, or Includes, matches the records related to any of them; IsNull those related to none.
      - string[]
      - object
        - `_type` 'IsNull', required
      - object
        - `_type` 'NotNull', required
      - object
        - `_type` 'Includes', required
        - `value` string[], required
    - `services` union: A filter on a Entity Array field: a value, which it matches exactly, or one of these operators: EqualTo, IsNull, NotNull, Includes. A list of ids, or Includes, matches the records related to any of them; IsNull those related to none.
      - string[]
      - object
        - `_type` 'IsNull', required
      - object
        - `_type` 'NotNull', required
      - object
        - `_type` 'Includes', required
        - `value` string[], required
    - `statusPages` union: A filter on a Entity Array field: a value, which it matches exactly, or one of these operators: EqualTo, IsNull, NotNull, Includes. A list of ids, or Includes, matches the records related to any of them; IsNull those related to none.
      - string[]
      - object
        - `_type` 'IsNull', required
      - object
        - `_type` 'NotNull', required
      - object
        - `_type` 'Includes', required
        - `value` string[], required
    - `labels` union: A filter on a Entity Array field: a value, which it matches exactly, or one of these operators: EqualTo, IsNull, NotNull, Includes. A list of ids, or Includes, matches the records related to any of them; IsNull those related to none.
      - string[]
      - object
        - `_type` 'IsNull', required
      - object
        - `_type` 'NotNull', required
      - object
        - `_type` 'Includes', required
        - `value` string[], required
    - `changeMonitorStatusToId` union: A filter on a Object ID field: a value, which it matches exactly, or one of these operators: EqualTo, NotEqual, IsNull, NotNull, EqualToOrNull, Includes.
      - string, uuid
      - object
        - `_type` 'EqualTo', required
        - `value` string, uuid, required
      - object
        - `_type` 'NotEqual', required
        - `value` string, uuid, required
      - object
        - `_type` 'IsNull', required
      - object
        - `_type` 'NotNull', required
      - object
        - `_type` 'EqualToOrNull', required
        - `value` string, uuid, required
      - object
        - `_type` 'Includes', required
        - `value` string[], required
    - `firstEventScheduledAt` union: A filter on a Date field: a value, which it matches exactly, or one of these operators: EqualTo, NotEqual, IsNull, NotNull, EqualToOrNull, GreaterThan, LessThan, GreaterThanOrEqual, LessThanOrEqual, InBetween. Times are ISO-8601, such as 2026-01-01T00:00:00.000Z.
      - string, date-time
      - object
        - `_type` 'EqualTo', required
        - `value` string, date-time, required
      - object
        - `_type` 'NotEqual', required
        - `value` string, date-time, required
      - object
        - `_type` 'IsNull', required
      - object
        - `_type` 'NotNull', required
      - object
        - `_type` 'EqualToOrNull', required
        - `value` string, date-time, required
      - object
        - `_type` 'GreaterThan', required
        - `value` string, date-time, required
      - object
        - `_type` 'LessThan', required
        - `value` string, date-time, required
      - object
        - `_type` 'GreaterThanOrEqual', required
        - `value` string, date-time, required
      - object
        - `_type` 'LessThanOrEqual', required
        - `value` string, date-time, required
      - object
        - `_type` 'InBetween', required
        - `startValue` string, date-time, required
        - `endValue` string, date-time, required
    - `firstEventStartsAt` union: A filter on a Date field: a value, which it matches exactly, or one of these operators: EqualTo, NotEqual, IsNull, NotNull, EqualToOrNull, GreaterThan, LessThan, GreaterThanOrEqual, LessThanOrEqual, InBetween. Times are ISO-8601, such as 2026-01-01T00:00:00.000Z.
      - string, date-time
      - object
        - `_type` 'EqualTo', required
        - `value` string, date-time, required
      - object
        - `_type` 'NotEqual', required
        - `value` string, date-time, required
      - object
        - `_type` 'IsNull', required
      - object
        - `_type` 'NotNull', required
      - object
        - `_type` 'EqualToOrNull', required
        - `value` string, date-time, required
      - object
        - `_type` 'GreaterThan', required
        - `value` string, date-time, required
      - object
        - `_type` 'LessThan', required
        - `value` string, date-time, required
      - object
        - `_type` 'GreaterThanOrEqual', required
        - `value` string, date-time, required
      - object
        - `_type` 'LessThanOrEqual', required
        - `value` string, date-time, required
      - object
        - `_type` 'InBetween', required
        - `startValue` string, date-time, required
        - `endValue` string, date-time, required
    - `firstEventEndsAt` union: A filter on a Date field: a value, which it matches exactly, or one of these operators: EqualTo, NotEqual, IsNull, NotNull, EqualToOrNull, GreaterThan, LessThan, GreaterThanOrEqual, LessThanOrEqual, InBetween. Times are ISO-8601, such as 2026-01-01T00:00:00.000Z.
      - string, date-time
      - object
        - `_type` 'EqualTo', required
        - `value` string, date-time, required
      - object
        - `_type` 'NotEqual', required
        - `value` string, date-time, required
      - object
        - `_type` 'IsNull', required
      - object
        - `_type` 'NotNull', required
      - object
        - `_type` 'EqualToOrNull', required
        - `value` string, date-time, required
      - object
        - `_type` 'GreaterThan', required
        - `value` string, date-time, required
      - object
        - `_type` 'LessThan', required
        - `value` string, date-time, required
      - object
        - `_type` 'GreaterThanOrEqual', required
        - `value` string, date-time, required
      - object
        - `_type` 'LessThanOrEqual', required
        - `value` string, date-time, required
      - object
        - `_type` 'InBetween', required
        - `startValue` string, date-time, required
        - `endValue` string, date-time, required
    - `recurringInterval` union: A filter on a JSON field, by key: {"<field>": {"<key>": <value or operator>}}. A key takes a value, which it matches exactly, or one of these operators: EqualTo, NotEqual, IsNull, NotNull, EqualToOrNull, Search, Includes, GreaterThan, LessThan, GreaterThanOrEqual, LessThanOrEqual, InBetween. IsNull and NotNull on the field itself ask whether it holds anything.
      - object
        - `_type` 'IsNull', required
      - object
        - `_type` 'NotNull', required
      - object
    - `isRecurringEvent` union: A filter on a Boolean field: a value, which it matches exactly, or one of these operators: EqualTo, NotEqual, IsNull, NotNull, EqualToOrNull.
      - boolean
      - object
        - `_type` 'EqualTo', required
        - `value` boolean, required
      - object
        - `_type` 'NotEqual', required
        - `value` boolean, required
      - object
        - `_type` 'IsNull', required
      - object
        - `_type` 'NotNull', required
      - object
        - `_type` 'EqualToOrNull', required
        - `value` boolean, required
    - `scheduleNextEventAt` union: A filter on a Date field: a value, which it matches exactly, or one of these operators: EqualTo, NotEqual, IsNull, NotNull, EqualToOrNull, GreaterThan, LessThan, GreaterThanOrEqual, LessThanOrEqual, InBetween. Times are ISO-8601, such as 2026-01-01T00:00:00.000Z.
      - string, date-time
      - object
        - `_type` 'EqualTo', required
        - `value` string, date-time, required
      - object
        - `_type` 'NotEqual', required
        - `value` string, date-time, required
      - object
        - `_type` 'IsNull', required
      - object
        - `_type` 'NotNull', required
      - object
        - `_type` 'EqualToOrNull', required
        - `value` string, date-time, required
      - object
        - `_type` 'GreaterThan', required
        - `value` string, date-time, required
      - object
        - `_type` 'LessThan', required
        - `value` string, date-time, required
      - object
        - `_type` 'GreaterThanOrEqual', required
        - `value` string, date-time, required
      - object
        - `_type` 'LessThanOrEqual', required
        - `value` string, date-time, required
      - object
        - `_type` 'InBetween', required
        - `startValue` string, date-time, required
        - `endValue` string, date-time, required
    - `shouldStatusPageSubscribersBeNotifiedOnEventCreated` union: A filter on a Boolean field: a value, which it matches exactly, or one of these operators: EqualTo, NotEqual, IsNull, NotNull, EqualToOrNull.
      - boolean
      - object
        - `_type` 'EqualTo', required
        - `value` boolean, required
      - object
        - `_type` 'NotEqual', required
        - `value` boolean, required
      - object
        - `_type` 'IsNull', required
      - object
        - `_type` 'NotNull', required
      - object
        - `_type` 'EqualToOrNull', required
        - `value` boolean, required
    - `shouldStatusPageSubscribersBeNotifiedWhenEventChangedToOngoing` union: A filter on a Boolean field: a value, which it matches exactly, or one of these operators: EqualTo, NotEqual, IsNull, NotNull, EqualToOrNull.
      - boolean
      - object
        - `_type` 'EqualTo', required
        - `value` boolean, required
      - object
        - `_type` 'NotEqual', required
        - `value` boolean, required
      - object
        - `_type` 'IsNull', required
      - object
        - `_type` 'NotNull', required
      - object
        - `_type` 'EqualToOrNull', required
        - `value` boolean, required
    - `shouldStatusPageSubscribersBeNotifiedWhenEventChangedToEnded` union: A filter on a Boolean field: a value, which it matches exactly, or one of these operators: EqualTo, NotEqual, IsNull, NotNull, EqualToOrNull.
      - boolean
      - object
        - `_type` 'EqualTo', required
        - `value` boolean, required
      - object
        - `_type` 'NotEqual', required
        - `value` boolean, required
      - object
        - `_type` 'IsNull', required
      - object
        - `_type` 'NotNull', required
      - object
        - `_type` 'EqualToOrNull', required
        - `value` boolean, required
    - `customFields` union: A filter on a JSON field, by key: {"<field>": {"<key>": <value or operator>}}. A key takes a value, which it matches exactly, or one of these operators: EqualTo, NotEqual, IsNull, NotNull, EqualToOrNull, Search, Includes, GreaterThan, LessThan, GreaterThanOrEqual, LessThanOrEqual, InBetween. IsNull and NotNull on the field itself ask whether it holds anything.
      - object
        - `_type` 'IsNull', required
      - object
        - `_type` 'NotNull', required
      - object
    - `sendSubscriberNotificationsOnBeforeTheEvent` union: A filter on a JSON field, by key: {"<field>": {"<key>": <value or operator>}}. A key takes a value, which it matches exactly, or one of these operators: EqualTo, NotEqual, IsNull, NotNull, EqualToOrNull, Search, Includes, GreaterThan, LessThan, GreaterThanOrEqual, LessThanOrEqual, InBetween. IsNull and NotNull on the field itself ask whether it holds anything.
      - object
        - `_type` 'IsNull', required
      - object
        - `_type` 'NotNull', required
      - object

## Response `200`

Successful response

- object
  - `count` number

## Other responses

- `400`: Bad request. This response indicates that the request was malformed or contained invalid data.
- `401`: Unauthorized. This response indicates that the request requires user authentication.
- `402`: Payment Required. This response indicates that the request requires payment or a valid subscription.
- `403`: Forbidden. This response indicates that the server understood the request, but refuses to authorize it.
- `405`: Project not found. This response indicates that the requested project does not exist or is not accessible.
- `408`: Request Timeout. This response indicates that the server timed out waiting for the request.
- `415`: Unable to reach server. This response indicates that the server is currently unreachable or down.
- `422`: Not authorized. This response indicates that the user does not have permission to access the requested resource.
- `500`: Internal Server Error. This response indicates that the server encountered an unexpected condition that prevented it from fulfilling the request.

---

[API](https://skmtc.dev/oneuptime/apis/oneuptime-openapi-specification.md) - [All operations](https://skmtc.dev/oneuptime/apis/oneuptime-openapi-specification/llms.txt) - [OpenAPI document](https://skmtc.dev/oneuptime/apis/oneuptime-openapi-specification/revisions/ba3307d00304?raw)
