# Monitors

Monitors allow Secoda admins to have insight into the health of the data stack. Learn more about monitors [here](https://docs.secoda.com/features/monitoring).

## List Monitors

> This endpoint allows you to retrieve a list of all the monitors in your workspace.<br>

```json
{"openapi":"3.0.0","info":{"title":"Secoda API","version":"8.22.39"},"tags":[{"name":"Monitors","description":"Monitors allow Secoda admins to have insight into the health of the data stack. Learn more about monitors [here](https://docs.secoda.com/features/monitoring).\n"}],"servers":[{"url":"https://api.secoda.co","description":"Base URL for all US cloud based workspaces"},{"url":"https://eapi.secoda.co","description":"Base URL for all EU cloud based workspaces"},{"url":"https://aapi.secoda.co","description":"Base URL for all APAC cloud based workspaces"},{"url":"https://{customer_domain}.secoda.co","description":"Base URL for On Premise Secoda workspaces","variables":{"customer_domain":{"default":"customer_domain","description":"The specific domain set up for your On Premise Secoda workspace."}}}],"security":[{"ApiKeyAuth":[]}],"paths":{"/api/v1/monitor/monitors":{"get":{"summary":"List Monitors","description":"This endpoint allows you to retrieve a list of all the monitors in your workspace.\n","tags":["Monitors"],"responses":{"200":{"description":"List of Monitors.","content":{"application/json":{"schema":{"allOf":[{"$ref":"#/components/schemas/v1_ListResponse"},{"type":"object","properties":{"results":{"type":"array","items":{"$ref":"#/components/schemas/v1_MonitorResponse"}}}}]}}}},"400":{"description":"Bad Request"},"500":{"description":"Internal Server Error"}}}}},"components":{"schemas":{"v1_ListResponse":{"type":"object","properties":{"links":{"type":"object","description":"Indicates Links to associated pages.","properties":{"next":{"type":"string","description":"The link to the next page (null if there are no more pages)."},"previous":{"type":"string","description":"The link to the previous page (null if on the first page)."}}},"meta":{"type":"object","description":"Reprents the meta data of the response.","properties":{"page":{"type":"integer","description":"The current page number."},"previous_page":{"type":"integer","description":"The previous page number (null if on the first page)."},"next_page":{"type":"integer","description":"The next page number (null if on the last page)."}}},"count":{"type":"integer","description":"The total count of items returned."},"total_pages":{"type":"integer","description":"The total number of pages."}}},"v1_MonitorResponse":{"type":"object","properties":{"id":{"type":"string","description":"The unique identifier of the monitor."},"created_at":{"type":"string","description":"The timestamp when the monitor was created."},"updated_at":{"type":"string","description":"The timestamp when the data was last updated."},"integration":{"type":"string","description":"The identifier of the integration associated with the resource."},"target":{"type":"string","description":"The identifier of the resource that the monitor is watching."},"workspace":{"type":"string","description":"The identifier of the workspace."},"metric_type":{"type":"string","enum":["row_count","cardinality","mean","max","min","unique_percentage","null_percentage","freshness","custom_sql"],"description":"The type of metric."},"metric_config":{"type":"string","description":"Configuration for the metric."},"frequency":{"type":"integer","description":"The frequency with which this monitor is run."},"name":{"type":"string","description":"The full name of the monitor, includes the metric type and target resource."},"is_enabled":{"type":"boolean","description":"Whether the monitor is enabled."},"last_attempted_at":{"type":"string","description":"The timestamp of the last attempted monitor."},"last_success_at":{"type":"string","format":"date-time","description":"The timestamp of the last check on Secoda's access and ability to read the data source on which this monitor is set. This is connctivity check - not a data quality check."},"last_error_at":{"type":"string","description":"The timestamp of the last error, if any."},"last_error_message":{"type":"string","description":"The message associated with the last error, if any."},"condition_auto_sensitivity":{"type":"integer","description":"The automatic sensitivity condition."},"condition_manual_min":{"type":"integer","description":"The manual minimum condition if set by the user."},"condition_manual_max":{"type":"integer","description":"The manual maximum condition if set by the user."},"status":{"type":"string","enum":["normal","incident","error","learning","inactive"],"description":"The status of the monitor."},"display_metadata":{"type":"object","description":"This is an internally used object that provides additional information about the incident. This can be ignored by customers.","properties":{"target":{"type":"object","properties":{"icon":{"type":"string","description":"Icon associated with the target resource, if one exists."},"label":{"type":"string","description":"Title of the target resource."},"entity_type":{"type":"string","description":"The type of the target resource (e.g., column)."},"integration":{"type":"string","description":"The UUID of the integration from which the target resource is extracted."},"integration_type":{"type":"string","description":"The type of integration."}}}}},"last_measurement_value":{"type":"number","description":"The last measured value if one is available."},"last_incident":{"type":"string","description":"The UUID of the last active incident. If there are no active incidents (if the last incident has been closed), the field is set to null."},"last_measurement":{"type":"string","description":"The identifier of the last measurement."},"next_run_at":{"type":"string","description":"The timestamp for the next run. Note, the run may occur shortly after the time set, but never before."}}}}}}
```

## Create a Monitor

> This endpoint allows you to create a monitor in your workspace.

```json
{"openapi":"3.0.0","info":{"title":"Secoda API","version":"8.22.39"},"tags":[{"name":"Monitors","description":"Monitors allow Secoda admins to have insight into the health of the data stack. Learn more about monitors [here](https://docs.secoda.com/features/monitoring).\n"}],"servers":[{"url":"https://api.secoda.co","description":"Base URL for all US cloud based workspaces"},{"url":"https://eapi.secoda.co","description":"Base URL for all EU cloud based workspaces"},{"url":"https://aapi.secoda.co","description":"Base URL for all APAC cloud based workspaces"},{"url":"https://{customer_domain}.secoda.co","description":"Base URL for On Premise Secoda workspaces","variables":{"customer_domain":{"default":"customer_domain","description":"The specific domain set up for your On Premise Secoda workspace."}}}],"security":[{"ApiKeyAuth":[]}],"paths":{"/api/v1/monitor/monitors":{"post":{"summary":"Create a Monitor","description":"This endpoint allows you to create a monitor in your workspace.","tags":["Monitors"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"target":{"type":"string","format":"uuid","description":"The UUID of the column or table to be monitored."},"metric_type":{"type":"string","enum":["null_percentage","row_count","freshness","cardinality","maximum","minimum","unique_percentage","custom_sql"],"description":"Type of metric to monitor, e.g., percentage of null values."},"metric_config":{"type":"object","description":"Where the custom SQL is defined if the custom_sql metric type is chosen.","properties":{"query_select":{"type":"string","description":"The SQL query for the Custom SQL monitor. This SQL query must return a single scalar value or GROUP BY results."}}},"is_enabled":{"type":"boolean","description":"Flag to enable or disable the monitor."},"condition_auto_sensitivity":{"type":"integer","description":"Auto sensitivity level for learning thresholds. Set to 5 if using the auto threshold, otherwise set to null if manual thresholds are used."},"condition_manual_min":{"type":"number","description":"Manually set minimum threshold value, applicable only if auto sensitivity is null."},"condition_manual_max":{"type":"number","description":"Manually set maximum threshold value, applicable only if auto sensitivity is null."},"notify_slack_channel":{"type":"string","description":"The Slack channel ID where monitor incident notifications will be sent. To find a channel ID, right-click the channel in Slack, select \"View channel details\", and copy the Channel ID from the bottom of the popup. The channel must be joined by the Secoda Slack app."},"schedule":{"type":"object","properties":{"day":{"type":"integer","description":"Day of the week the monitor should run, 0 (Sunday) to 6 (Saturday)."},"hour":{"type":"integer","description":"Hour of the day (in UTC) the monitor should run."},"cadence":{"type":"string","enum":["daily","hourly"],"description":"Frequency cadence of the monitoring schedule."},"frequency":{"type":"integer","description":"Set at 1."}}}}}}}},"responses":{"201":{"description":"Created","content":{"application/json":{"schema":{"$ref":"#/components/schemas/v1_MonitorResponse"}}}},"400":{"description":"Bad Request"},"500":{"description":"Internal Server Error"}}}}},"components":{"schemas":{"v1_MonitorResponse":{"type":"object","properties":{"id":{"type":"string","description":"The unique identifier of the monitor."},"created_at":{"type":"string","description":"The timestamp when the monitor was created."},"updated_at":{"type":"string","description":"The timestamp when the data was last updated."},"integration":{"type":"string","description":"The identifier of the integration associated with the resource."},"target":{"type":"string","description":"The identifier of the resource that the monitor is watching."},"workspace":{"type":"string","description":"The identifier of the workspace."},"metric_type":{"type":"string","enum":["row_count","cardinality","mean","max","min","unique_percentage","null_percentage","freshness","custom_sql"],"description":"The type of metric."},"metric_config":{"type":"string","description":"Configuration for the metric."},"frequency":{"type":"integer","description":"The frequency with which this monitor is run."},"name":{"type":"string","description":"The full name of the monitor, includes the metric type and target resource."},"is_enabled":{"type":"boolean","description":"Whether the monitor is enabled."},"last_attempted_at":{"type":"string","description":"The timestamp of the last attempted monitor."},"last_success_at":{"type":"string","format":"date-time","description":"The timestamp of the last check on Secoda's access and ability to read the data source on which this monitor is set. This is connctivity check - not a data quality check."},"last_error_at":{"type":"string","description":"The timestamp of the last error, if any."},"last_error_message":{"type":"string","description":"The message associated with the last error, if any."},"condition_auto_sensitivity":{"type":"integer","description":"The automatic sensitivity condition."},"condition_manual_min":{"type":"integer","description":"The manual minimum condition if set by the user."},"condition_manual_max":{"type":"integer","description":"The manual maximum condition if set by the user."},"status":{"type":"string","enum":["normal","incident","error","learning","inactive"],"description":"The status of the monitor."},"display_metadata":{"type":"object","description":"This is an internally used object that provides additional information about the incident. This can be ignored by customers.","properties":{"target":{"type":"object","properties":{"icon":{"type":"string","description":"Icon associated with the target resource, if one exists."},"label":{"type":"string","description":"Title of the target resource."},"entity_type":{"type":"string","description":"The type of the target resource (e.g., column)."},"integration":{"type":"string","description":"The UUID of the integration from which the target resource is extracted."},"integration_type":{"type":"string","description":"The type of integration."}}}}},"last_measurement_value":{"type":"number","description":"The last measured value if one is available."},"last_incident":{"type":"string","description":"The UUID of the last active incident. If there are no active incidents (if the last incident has been closed), the field is set to null."},"last_measurement":{"type":"string","description":"The identifier of the last measurement."},"next_run_at":{"type":"string","description":"The timestamp for the next run. Note, the run may occur shortly after the time set, but never before."}}}}}}
```

## Get Monitor

> This endpoint allows you to retrieve a monitors by it's ID. You can find the ID in the URL of the monitor when accessing it from the Secoda UI.<br>

```json
{"openapi":"3.0.0","info":{"title":"Secoda API","version":"8.22.39"},"tags":[{"name":"Monitors","description":"Monitors allow Secoda admins to have insight into the health of the data stack. Learn more about monitors [here](https://docs.secoda.com/features/monitoring).\n"}],"servers":[{"url":"https://api.secoda.co","description":"Base URL for all US cloud based workspaces"},{"url":"https://eapi.secoda.co","description":"Base URL for all EU cloud based workspaces"},{"url":"https://aapi.secoda.co","description":"Base URL for all APAC cloud based workspaces"},{"url":"https://{customer_domain}.secoda.co","description":"Base URL for On Premise Secoda workspaces","variables":{"customer_domain":{"default":"customer_domain","description":"The specific domain set up for your On Premise Secoda workspace."}}}],"security":[{"ApiKeyAuth":[]}],"paths":{"/api/v1/monitor/monitors/{monitor_id}":{"get":{"summary":"Get Monitor","description":"This endpoint allows you to retrieve a monitors by it's ID. You can find the ID in the URL of the monitor when accessing it from the Secoda UI.\n","tags":["Monitors"],"parameters":[{"in":"path","name":"monitor_id","description":"The unique identifier of the monitor","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Monitor retrieved successfully","content":{"application/json":{"schema":{"$ref":"#/components/schemas/v1_MonitorResponse"}}}},"404":{"description":"Monitor not found"},"500":{"description":"Internal Server Error"}}}}},"components":{"schemas":{"v1_MonitorResponse":{"type":"object","properties":{"id":{"type":"string","description":"The unique identifier of the monitor."},"created_at":{"type":"string","description":"The timestamp when the monitor was created."},"updated_at":{"type":"string","description":"The timestamp when the data was last updated."},"integration":{"type":"string","description":"The identifier of the integration associated with the resource."},"target":{"type":"string","description":"The identifier of the resource that the monitor is watching."},"workspace":{"type":"string","description":"The identifier of the workspace."},"metric_type":{"type":"string","enum":["row_count","cardinality","mean","max","min","unique_percentage","null_percentage","freshness","custom_sql"],"description":"The type of metric."},"metric_config":{"type":"string","description":"Configuration for the metric."},"frequency":{"type":"integer","description":"The frequency with which this monitor is run."},"name":{"type":"string","description":"The full name of the monitor, includes the metric type and target resource."},"is_enabled":{"type":"boolean","description":"Whether the monitor is enabled."},"last_attempted_at":{"type":"string","description":"The timestamp of the last attempted monitor."},"last_success_at":{"type":"string","format":"date-time","description":"The timestamp of the last check on Secoda's access and ability to read the data source on which this monitor is set. This is connctivity check - not a data quality check."},"last_error_at":{"type":"string","description":"The timestamp of the last error, if any."},"last_error_message":{"type":"string","description":"The message associated with the last error, if any."},"condition_auto_sensitivity":{"type":"integer","description":"The automatic sensitivity condition."},"condition_manual_min":{"type":"integer","description":"The manual minimum condition if set by the user."},"condition_manual_max":{"type":"integer","description":"The manual maximum condition if set by the user."},"status":{"type":"string","enum":["normal","incident","error","learning","inactive"],"description":"The status of the monitor."},"display_metadata":{"type":"object","description":"This is an internally used object that provides additional information about the incident. This can be ignored by customers.","properties":{"target":{"type":"object","properties":{"icon":{"type":"string","description":"Icon associated with the target resource, if one exists."},"label":{"type":"string","description":"Title of the target resource."},"entity_type":{"type":"string","description":"The type of the target resource (e.g., column)."},"integration":{"type":"string","description":"The UUID of the integration from which the target resource is extracted."},"integration_type":{"type":"string","description":"The type of integration."}}}}},"last_measurement_value":{"type":"number","description":"The last measured value if one is available."},"last_incident":{"type":"string","description":"The UUID of the last active incident. If there are no active incidents (if the last incident has been closed), the field is set to null."},"last_measurement":{"type":"string","description":"The identifier of the last measurement."},"next_run_at":{"type":"string","description":"The timestamp for the next run. Note, the run may occur shortly after the time set, but never before."}}}}}}
```

## List Incidents

> This endpoint allows you to retrieve a list of all the incidents in your workspace.<br>

```json
{"openapi":"3.0.0","info":{"title":"Secoda API","version":"8.22.39"},"tags":[{"name":"Monitors","description":"Monitors allow Secoda admins to have insight into the health of the data stack. Learn more about monitors [here](https://docs.secoda.com/features/monitoring).\n"}],"servers":[{"url":"https://api.secoda.co","description":"Base URL for all US cloud based workspaces"},{"url":"https://eapi.secoda.co","description":"Base URL for all EU cloud based workspaces"},{"url":"https://aapi.secoda.co","description":"Base URL for all APAC cloud based workspaces"},{"url":"https://{customer_domain}.secoda.co","description":"Base URL for On Premise Secoda workspaces","variables":{"customer_domain":{"default":"customer_domain","description":"The specific domain set up for your On Premise Secoda workspace."}}}],"security":[{"ApiKeyAuth":[]}],"paths":{"/api/v1/monitor/incidents":{"get":{"summary":"List Incidents","description":"This endpoint allows you to retrieve a list of all the incidents in your workspace.\n","tags":["Monitors"],"responses":{"200":{"description":"List of Incidents.","content":{"application/json":{"schema":{"allOf":[{"$ref":"#/components/schemas/v1_ListResponse"},{"type":"object","properties":{"results":{"type":"array","items":{"$ref":"#/components/schemas/v1_IncidentResponse"}}}}]}}}},"400":{"description":"Bad Request"},"500":{"description":"Internal Server Error"}}}}},"components":{"schemas":{"v1_ListResponse":{"type":"object","properties":{"links":{"type":"object","description":"Indicates Links to associated pages.","properties":{"next":{"type":"string","description":"The link to the next page (null if there are no more pages)."},"previous":{"type":"string","description":"The link to the previous page (null if on the first page)."}}},"meta":{"type":"object","description":"Reprents the meta data of the response.","properties":{"page":{"type":"integer","description":"The current page number."},"previous_page":{"type":"integer","description":"The previous page number (null if on the first page)."},"next_page":{"type":"integer","description":"The next page number (null if on the last page)."}}},"count":{"type":"integer","description":"The total count of items returned."},"total_pages":{"type":"integer","description":"The total number of pages."}}},"v1_IncidentResponse":{"type":"object","properties":{"acknowledged_at":{"type":"string","format":"date-time","description":"The time that the incident was acknowledged at. This will be null if an incident hasn't been acknowledged yet."},"actions":{"type":"array","description":"A list of actions associated with the incident.","items":{"type":"object","properties":{"type":{"type":"string","enum":["notification_initial","notification_reminder","notification_resolved","acknowledged","resolved"]},"user_id":{"type":"string"},"user_name":{"type":"string"}}}},"created_at":{"type":"string","format":"date-time","description":"When the incident was created."},"display_metadata":{"type":"object","description":"This is an internally used object that provides additional information about the incident. This can be ignored by customers.","properties":{"monitor":{"type":"object","properties":{"label":{"type":"string"}}},"target":{"type":"object","properties":{"entity_type":{"type":"string","description":"The type of resource the incident is associated with."},"icon":{"type":"string"},"integration":{"type":"string","description":"The UUID of the integration associated with the resource."},"integration_type":{"type":"string","description":"The type of the integration that the resource is extracted from."},"label":{"type":"string"}}}}},"first_seen_at":{"type":"string","format":"date-time","description":"The first time this incident was observed."},"id":{"type":"string","description":"The UUID of the incident."},"last_notified_at":{"type":"string","format":"date-time","description":"The time of the last notification sent about this incident."},"last_seen_at":{"type":"string","format":"date-time","description":"The most recent occurence about this incident."},"monitor":{"type":"string","description":"The UUID of the associated monitor."},"name":{"type":"string","description":"The name of the incident, which indicates the type of metric set for the monitor."},"resolved_at":{"type":"string","format":"date-time","description":"The time that the incident was resolved. Will be null if the incident has not yet been resolved."},"status":{"type":"string","enum":["acknowledged","expired","resolved","active"],"description":"The status of the incident."},"summary":{"type":"string","description":"An automatically generated short summary of the incident."},"target":{"type":"string","description":"The UUID of the target resource being monitored for anomolies."},"updated_at":{"type":"string","format":"date-time","description":"The last updated time for the incident."},"value":{"type":"number","description":"The value of the measurement at the time of incident creation."}}}}}}
```

## Get Incident

> This endpoint allows you to retrieve an incident by it's ID.<br>

```json
{"openapi":"3.0.0","info":{"title":"Secoda API","version":"8.22.39"},"tags":[{"name":"Monitors","description":"Monitors allow Secoda admins to have insight into the health of the data stack. Learn more about monitors [here](https://docs.secoda.com/features/monitoring).\n"}],"servers":[{"url":"https://api.secoda.co","description":"Base URL for all US cloud based workspaces"},{"url":"https://eapi.secoda.co","description":"Base URL for all EU cloud based workspaces"},{"url":"https://aapi.secoda.co","description":"Base URL for all APAC cloud based workspaces"},{"url":"https://{customer_domain}.secoda.co","description":"Base URL for On Premise Secoda workspaces","variables":{"customer_domain":{"default":"customer_domain","description":"The specific domain set up for your On Premise Secoda workspace."}}}],"security":[{"ApiKeyAuth":[]}],"paths":{"/api/v1/monitor/incident/{incident_id}":{"get":{"summary":"Get Incident","description":"This endpoint allows you to retrieve an incident by it's ID.\n","tags":["Monitors"],"parameters":[{"in":"path","name":"incident_id","description":"The unique identifier of the incident","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Monitor retrieved successfully","content":{"application/json":{"schema":{"$ref":"#/components/schemas/v1_IncidentResponse"}}}},"404":{"description":"Incident not found"},"500":{"description":"Internal Server Error"}}}}},"components":{"schemas":{"v1_IncidentResponse":{"type":"object","properties":{"acknowledged_at":{"type":"string","format":"date-time","description":"The time that the incident was acknowledged at. This will be null if an incident hasn't been acknowledged yet."},"actions":{"type":"array","description":"A list of actions associated with the incident.","items":{"type":"object","properties":{"type":{"type":"string","enum":["notification_initial","notification_reminder","notification_resolved","acknowledged","resolved"]},"user_id":{"type":"string"},"user_name":{"type":"string"}}}},"created_at":{"type":"string","format":"date-time","description":"When the incident was created."},"display_metadata":{"type":"object","description":"This is an internally used object that provides additional information about the incident. This can be ignored by customers.","properties":{"monitor":{"type":"object","properties":{"label":{"type":"string"}}},"target":{"type":"object","properties":{"entity_type":{"type":"string","description":"The type of resource the incident is associated with."},"icon":{"type":"string"},"integration":{"type":"string","description":"The UUID of the integration associated with the resource."},"integration_type":{"type":"string","description":"The type of the integration that the resource is extracted from."},"label":{"type":"string"}}}}},"first_seen_at":{"type":"string","format":"date-time","description":"The first time this incident was observed."},"id":{"type":"string","description":"The UUID of the incident."},"last_notified_at":{"type":"string","format":"date-time","description":"The time of the last notification sent about this incident."},"last_seen_at":{"type":"string","format":"date-time","description":"The most recent occurence about this incident."},"monitor":{"type":"string","description":"The UUID of the associated monitor."},"name":{"type":"string","description":"The name of the incident, which indicates the type of metric set for the monitor."},"resolved_at":{"type":"string","format":"date-time","description":"The time that the incident was resolved. Will be null if the incident has not yet been resolved."},"status":{"type":"string","enum":["acknowledged","expired","resolved","active"],"description":"The status of the incident."},"summary":{"type":"string","description":"An automatically generated short summary of the incident."},"target":{"type":"string","description":"The UUID of the target resource being monitored for anomolies."},"updated_at":{"type":"string","format":"date-time","description":"The last updated time for the incident."},"value":{"type":"number","description":"The value of the measurement at the time of incident creation."}}}}}}
```

## List Measurements

> This endpoint allows you to retrieve a list of all the measurements in your workspace filtered by a Monitor or Incident. A query param of either the Monitor ID or Incident ID is required.\
> \
> If using monitoring in automatic mode, thresholds will take some time to populate as the system learnins the appropriate range for your data.<br>

```json
{"openapi":"3.0.0","info":{"title":"Secoda API","version":"8.22.39"},"tags":[{"name":"Monitors","description":"Monitors allow Secoda admins to have insight into the health of the data stack. Learn more about monitors [here](https://docs.secoda.com/features/monitoring).\n"}],"servers":[{"url":"https://api.secoda.co","description":"Base URL for all US cloud based workspaces"},{"url":"https://eapi.secoda.co","description":"Base URL for all EU cloud based workspaces"},{"url":"https://aapi.secoda.co","description":"Base URL for all APAC cloud based workspaces"},{"url":"https://{customer_domain}.secoda.co","description":"Base URL for On Premise Secoda workspaces","variables":{"customer_domain":{"default":"customer_domain","description":"The specific domain set up for your On Premise Secoda workspace."}}}],"security":[{"ApiKeyAuth":[]}],"paths":{"/api/v1/monitor/measurements":{"get":{"summary":"List Measurements","description":"This endpoint allows you to retrieve a list of all the measurements in your workspace filtered by a Monitor or Incident. A query param of either the Monitor ID or Incident ID is required.\n\nIf using monitoring in automatic mode, thresholds will take some time to populate as the system learnins the appropriate range for your data.\n","tags":["Monitors"],"parameters":[{"in":"query","name":"monitor","description":"The unique identifier of the monitor","schema":{"type":"string"}},{"in":"query","name":"incident_id","description":"The unique identifier of the incident","schema":{"type":"string"}}],"responses":{"200":{"description":"List of Measurements.","content":{"application/json":{"schema":{"allOf":[{"$ref":"#/components/schemas/v1_ListResponse"},{"type":"object","properties":{"results":{"type":"array","items":{"$ref":"#/components/schemas/v1_MeasurementResponse"}}}}]}}}},"400":{"description":"Bad Request"},"500":{"description":"Internal Server Error"}}}}},"components":{"schemas":{"v1_ListResponse":{"type":"object","properties":{"links":{"type":"object","description":"Indicates Links to associated pages.","properties":{"next":{"type":"string","description":"The link to the next page (null if there are no more pages)."},"previous":{"type":"string","description":"The link to the previous page (null if on the first page)."}}},"meta":{"type":"object","description":"Reprents the meta data of the response.","properties":{"page":{"type":"integer","description":"The current page number."},"previous_page":{"type":"integer","description":"The previous page number (null if on the first page)."},"next_page":{"type":"integer","description":"The next page number (null if on the last page)."}}},"count":{"type":"integer","description":"The total count of items returned."},"total_pages":{"type":"integer","description":"The total number of pages."}}},"v1_MeasurementResponse":{"type":"object","properties":{"id":{"type":"string","description":"The UUID of the measurement."},"created_at":{"type":"string","format":"date-time","description":"Timestamp of when the measurement was created."},"updated_at":{"type":"string","format":"date-time","description":"Timestamp of the when the measurement was updated."},"incident":{"type":"string","nullable":true,"description":"The UUID of the associated incident, if it exists. Otherwise, this is set to null."},"incident_metadata":{"type":"string","description":"Additional information about the incident."},"monitor":{"type":"string","description":"The UUID of the associated monitor."},"upper_threshold":{"type":"number","description":"The upper threshold of the measurement. A value crossing this threshold will trigger an incident. The threshold will be set to null when one is not configured, or the monitor is still learning the thresholds.\n"},"lower_threshold":{"type":"number","description":"The lower threshold of the measurement. A value crossing this threshold will trigger an incident. The threshold will be set to null when one is not configured, or the monitor is still learning the thresholds.\n"},"value":{"type":"number","description":"The exact value at the time of measurement."}}}}}}
```

## Run Monitors

> This endpoint allows you to trigger one or more monitors to run immediately through the API. A background job is created to process the monitors.

```json
{"openapi":"3.0.0","info":{"title":"Secoda API","version":"8.22.39"},"tags":[{"name":"Monitors","description":"Monitors allow Secoda admins to have insight into the health of the data stack. Learn more about monitors [here](https://docs.secoda.com/features/monitoring).\n"}],"servers":[{"url":"https://api.secoda.co","description":"Base URL for all US cloud based workspaces"},{"url":"https://eapi.secoda.co","description":"Base URL for all EU cloud based workspaces"},{"url":"https://aapi.secoda.co","description":"Base URL for all APAC cloud based workspaces"},{"url":"https://{customer_domain}.secoda.co","description":"Base URL for On Premise Secoda workspaces","variables":{"customer_domain":{"default":"customer_domain","description":"The specific domain set up for your On Premise Secoda workspace."}}}],"security":[{"ApiKeyAuth":[]}],"paths":{"/api/v1/monitor/monitors/run":{"post":{"summary":"Run Monitors","description":"This endpoint allows you to trigger one or more monitors to run immediately through the API. A background job is created to process the monitors.","tags":["Monitors"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"monitors":{"type":"array","items":{"type":"string","format":"uuid"},"description":"A list of UUIDs for the monitors to run."}}}}}},"responses":{"200":{"description":"Monitors triggered successfully. The response includes details of the background job processing the request.","content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string","format":"uuid","description":"Unique identifier for the background job."},"user":{"type":"string","description":"ID of the user who initiated the background job."},"failed":{"type":"boolean","description":"Indicates whether the job failed."},"started":{"type":"string","format":"date-time","description":"Timestamp when the job started."},"completed":{"type":"string","format":"date-time","description":"Timestamp when the job completed, or null if still in progress."},"logs":{"type":"string","description":"Logs generated during the execution of the job."},"title":{"type":"string","description":"Title of the job for tracking."},"has_artifact":{"type":"boolean","description":"Indicates if the job has an associated artifact (e.g., a result file)."}}}}}},"400":{"description":"Bad Request"},"500":{"description":"Internal Server Error"}}}}}}
```


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.secoda.co/api/reference/monitors.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
