v1

latestOpenAPI 3.0.3Apache 2.02026-07-142201861.5 MB
Monitors

Create a Monitor for a Project

Create a Monitor for a project

post/api/0/organizations/{organization_id_or_slug}/projects/{project_id_or_slug}/detectors/

Path parameters

organization_id_or_slugstring required

The ID or slug of the organization the resource belongs to.

project_id_or_slugstring required

The ID or slug of the project the resource belongs to. Project slugs are unique within each organization.

Request body

namestring required

Name of the monitor.

typestring required

The type of monitor - metric_issue.

workflow_idsinteger[]

The IDs of the alerts to connect this monitor to. Use the 'Fetch Alerts' endpoint to find the IDs.

configobject
        The issue detection type configuration.


        - `detectionType`
            - `static`: Threshold based monitor
            - `percent`: Change based monitor
            - `dynamic`: Dynamic monitor
        - `comparisonDelta`: If selecting a **change** detection type, the comparison delta is the time period at which to compare against in minutes.
        For example, a value of 3600 compares the metric tracked against data 1 hour ago.
            - `300`: 5 minutes
            - `900`: 15 minutes
            - `3600`: 1 hour
            - `86400`: 1 day
            - `604800`: 1 week
            - `2592000`: 1 month

        **Threshold**
        ```json
        {
            "detectionType": "static",
        }
        ```
        **Change**
        ```json
        {
            "detectionType": "percent",
            "comparisonDelta": 3600,
        }
        ```
        **Dynamic**
        ```json
        {
            "detectionType": "dynamic",
        }
        ```
    
ownerstring nullable
        The ID user or team who owns the monitor or alert prefaced by the string 'user' or 'team'.

        **User**
        ```json
            "user:123456"
        ```

        **Team**
        ```json
            "team:456789"
        ```
    
descriptionstring nullable

A description of the monitor. Will be used in the resulting issue.

enabledboolean

Set to False if you want to disable the monitor.

Response

createdBystring nullable
latestGroupobject nullable
descriptionstring nullable
idstring required
projectIdstring required
namestring required
typestring required
workflowIdsstring[] nullable required
dateCreatedstring date-time required
dateUpdatedstring date-time required
dataSourcesobject[] nullable required
conditionGroupobject nullable required
configobject required
enabledboolean required