---
title: "Create Row Count Schedule"
method: POST
path: "/api/v1/assets/{asset_id}/row-count/schedules"
tags: ["row-count"]
---

# Create Row Count Schedule

`POST /api/v1/assets/{asset_id}/row-count/schedules`

## Request

- Base URL: `http://localhost:8000`
- URL: `http://localhost:8000/api/v1/assets/{asset_id}/row-count/schedules`
- Auth: none declared

Create row_count monitoring schedule for a table.

Starts row count monitoring according to the specified time window
and check interval.

## Path parameters

- `asset_id` string, uuid, required

## Headers

- `Authorization` string

## Request body

- CreateRowCountScheduleRequest: Request to create row_count monitoring schedule.
  - `table_path` string, required: Table path (schema.table_name)
  - `timestamp_column` string, nullable: Column to filter rows by time period. If NULL, counts all rows.
  - `time_window_hours` 1 | 6 | 12 | 24 | 168: Time window for row count measurement (1, 6, 12, 24, or 168 hours)
  - `check_interval` string: Check interval (e.g., '1h', '6h', '1d')
  - `monitoring_mode` 'auto_learn' | 'explicit': Monitoring mode: 'auto_learn' for ML-based or 'explicit' for manual thresholds
  - `expected_min_rows` integer, nullable: For explicit mode: alert when row count falls below this value
  - `expected_max_rows` integer, nullable: For explicit mode: optional upper bound for alerting
  - `sensitivity` integer: Sensitivity (1-4): 1=tight (more alerts), 4=loose (fewer alerts)
  - `freshness_schedule_id` string, nullable: Optional link to freshness schedule UUID (for auto-creation)
  - `operating_period_mode` string: Operating-period awareness (TECH-984): 'off', 'auto', or 'schedule' (segments the baseline by the linked operating schedule)
  - `operating_schedule_id` string, nullable: Operating schedule public UUID, required when operating_period_mode is 'schedule'

## Response `201`

Successful Response

- StandardResponse: Standard API response wrapper.
  - `success` boolean, required
  - `data` unknown
  - `message` string, nullable
  - `error` string, nullable
  - `meta` object, nullable

## Other responses

- `422`: Validation Error

---

[API](https://skmtc.dev/anomalyarmor/apis/anomalyarmor-api.md) · [All operations](https://skmtc.dev/anomalyarmor/apis/anomalyarmor-api/llms.txt) · [OpenAPI document](https://skmtc.dev/anomalyarmor/apis/anomalyarmor-api/revisions/51c755fb5d0b?raw)
