openapi: 3.1.0 info: title: Sentry Alerts Monitors API description: The Alerts API provides endpoints for managing alert rules in Sentry, including creating, retrieving, updating, and deleting metric alert rules and issue alert rules, as well as managing spike protection notification actions. version: 0.0.1 contact: name: Sentry Support url: https://sentry.io/support/ email: support@sentry.io servers: - url: https://sentry.io/api/0 description: Sentry Production API security: - BearerAuth: [] tags: - name: Monitors description: Manage cron job monitors paths: /organizations/{organization_id_or_slug}/monitors/: get: operationId: listOrganizationMonitors summary: Sentry Retrieve monitors for an organization description: Returns a list of monitors for the given organization. tags: - Monitors parameters: - $ref: '#/components/parameters/OrganizationIdOrSlug' - name: cursor in: query description: Pagination cursor. schema: type: string - name: environment in: query description: Filter by environment name. schema: type: string responses: '200': description: A list of monitors. content: application/json: schema: type: array items: $ref: '#/components/schemas/Monitor' '401': description: Unauthorized. '403': description: Forbidden. post: operationId: createMonitor summary: Sentry Create a monitor description: Creates a new monitor for the given organization. tags: - Monitors parameters: - $ref: '#/components/parameters/OrganizationIdOrSlug' requestBody: required: true content: application/json: schema: type: object required: - name - type - config properties: name: type: string description: The name of the monitor. slug: type: string description: The slug for the monitor. type: type: string enum: - cron_job description: The type of monitor. config: type: object required: - schedule_type - schedule properties: schedule_type: type: string enum: - crontab - interval schedule: oneOf: - type: string description: Crontab expression. - type: array items: type: integer description: Interval value and unit. checkin_margin: type: integer description: Margin of minutes before a check-in is marked as missed. max_runtime: type: integer description: Max runtime in minutes before a check-in is marked as timed out. timezone: type: string description: The timezone for the schedule. project: type: string description: The project slug. responses: '201': description: Monitor created. content: application/json: schema: $ref: '#/components/schemas/Monitor' '400': description: Bad request. '401': description: Unauthorized. '403': description: Forbidden. put: operationId: mutateOrganizationMonitors summary: Sentry Mutate an organization's monitors description: Bulk update monitors for an organization. tags: - Monitors parameters: - $ref: '#/components/parameters/OrganizationIdOrSlug' requestBody: required: true content: application/json: schema: type: object properties: ids: type: array items: type: string status: type: string responses: '200': description: Monitors updated. '401': description: Unauthorized. '403': description: Forbidden. delete: operationId: bulkDeleteMonitors summary: Sentry Bulk delete monitors description: Bulk delete monitors for an organization. tags: - Monitors parameters: - $ref: '#/components/parameters/OrganizationIdOrSlug' - name: id in: query description: IDs of monitors to delete. schema: type: array items: type: string responses: '204': description: Monitors deleted. '401': description: Unauthorized. '403': description: Forbidden. /organizations/{organization_id_or_slug}/monitors/{monitor_id_or_slug}/: get: operationId: retrieveMonitor summary: Sentry Retrieve a monitor description: Returns details for a specific monitor. tags: - Monitors parameters: - $ref: '#/components/parameters/OrganizationIdOrSlug' - $ref: '#/components/parameters/MonitorIdOrSlug' responses: '200': description: Monitor details. content: application/json: schema: $ref: '#/components/schemas/Monitor' '401': description: Unauthorized. '404': description: Monitor not found. put: operationId: updateMonitor summary: Sentry Update a monitor description: Updates a monitor. tags: - Monitors parameters: - $ref: '#/components/parameters/OrganizationIdOrSlug' - $ref: '#/components/parameters/MonitorIdOrSlug' requestBody: required: true content: application/json: schema: type: object properties: name: type: string slug: type: string config: type: object properties: schedule_type: type: string schedule: oneOf: - type: string - type: array items: type: integer checkin_margin: type: integer max_runtime: type: integer timezone: type: string responses: '200': description: Monitor updated. content: application/json: schema: $ref: '#/components/schemas/Monitor' '400': description: Bad request. '401': description: Unauthorized. '404': description: Monitor not found. delete: operationId: deleteMonitor summary: Sentry Delete a monitor or monitor environments description: Deletes a monitor or specific monitor environments. Use the environment query parameter to selectively delete environments. tags: - Monitors parameters: - $ref: '#/components/parameters/OrganizationIdOrSlug' - $ref: '#/components/parameters/MonitorIdOrSlug' - name: environment in: query description: Specific environment to delete rather than the entire monitor. schema: type: string responses: '202': description: Monitor or environment scheduled for deletion. '401': description: Unauthorized. '404': description: Monitor not found. /projects/{organization_id_or_slug}/{project_id_or_slug}/monitors/{monitor_id_or_slug}/: get: operationId: retrieveMonitorForProject summary: Sentry Retrieve a monitor for a project description: Returns a monitor scoped to a specific project. tags: - Monitors parameters: - $ref: '#/components/parameters/OrganizationIdOrSlug' - $ref: '#/components/parameters/ProjectIdOrSlug' - $ref: '#/components/parameters/MonitorIdOrSlug' responses: '200': description: Monitor details. content: application/json: schema: $ref: '#/components/schemas/Monitor' '401': description: Unauthorized. '404': description: Monitor not found. put: operationId: updateMonitorForProject summary: Sentry Update a monitor for a project description: Updates a monitor scoped to a specific project. tags: - Monitors parameters: - $ref: '#/components/parameters/OrganizationIdOrSlug' - $ref: '#/components/parameters/ProjectIdOrSlug' - $ref: '#/components/parameters/MonitorIdOrSlug' requestBody: required: true content: application/json: schema: type: object properties: name: type: string config: type: object responses: '200': description: Monitor updated. content: application/json: schema: $ref: '#/components/schemas/Monitor' '400': description: Bad request. '401': description: Unauthorized. '404': description: Monitor not found. delete: operationId: deleteMonitorForProject summary: Sentry Delete a monitor or monitor environments for a project description: Deletes a monitor or its environments scoped to a project. tags: - Monitors parameters: - $ref: '#/components/parameters/OrganizationIdOrSlug' - $ref: '#/components/parameters/ProjectIdOrSlug' - $ref: '#/components/parameters/MonitorIdOrSlug' - name: environment in: query description: Specific environment to delete. schema: type: string responses: '202': description: Monitor or environment scheduled for deletion. '401': description: Unauthorized. '404': description: Monitor not found. /projects/{organization_id_or_slug}/{project_id_or_slug}/uptime-monitors/: post: operationId: createProjectMonitor summary: Sentry Create a monitor for a project description: Creates a new uptime monitor for a specific project. tags: - Monitors parameters: - $ref: '#/components/parameters/OrganizationIdOrSlug' - $ref: '#/components/parameters/ProjectIdOrSlug' requestBody: required: true content: application/json: schema: type: object required: - name - url properties: name: type: string description: The name of the monitor. url: type: string format: uri description: The URL to monitor. intervalSeconds: type: integer description: Check interval in seconds. responses: '201': description: Monitor created. content: application/json: schema: $ref: '#/components/schemas/UptimeMonitor' '400': description: Bad request. '401': description: Unauthorized. /organizations/{organization_id_or_slug}/uptime-monitors/{monitor_id}/: get: operationId: fetchMonitor summary: Sentry Fetch a monitor description: Returns details for a specific uptime monitor. tags: - Monitors parameters: - $ref: '#/components/parameters/OrganizationIdOrSlug' - $ref: '#/components/parameters/MonitorId' responses: '200': description: Monitor details. content: application/json: schema: $ref: '#/components/schemas/UptimeMonitor' '401': description: Unauthorized. '404': description: Monitor not found. put: operationId: updateMonitor summary: Sentry Update a monitor by ID description: Updates an uptime monitor. tags: - Monitors parameters: - $ref: '#/components/parameters/OrganizationIdOrSlug' - $ref: '#/components/parameters/MonitorId' requestBody: required: true content: application/json: schema: type: object properties: name: type: string url: type: string format: uri intervalSeconds: type: integer responses: '200': description: Monitor updated. content: application/json: schema: $ref: '#/components/schemas/UptimeMonitor' '400': description: Bad request. '401': description: Unauthorized. '404': description: Monitor not found. delete: operationId: deleteMonitor summary: Sentry Delete a monitor description: Deletes an uptime monitor. tags: - Monitors parameters: - $ref: '#/components/parameters/OrganizationIdOrSlug' - $ref: '#/components/parameters/MonitorId' responses: '204': description: Monitor deleted. '401': description: Unauthorized. '404': description: Monitor not found. components: parameters: MonitorId: name: monitor_id in: path required: true description: The ID of the monitor. schema: type: string ProjectIdOrSlug: name: project_id_or_slug in: path required: true description: The ID or slug of the project. schema: type: string OrganizationIdOrSlug: name: organization_id_or_slug in: path required: true description: The ID or slug of the organization. schema: type: string MonitorIdOrSlug: name: monitor_id_or_slug in: path required: true description: The ID or slug of the monitor. schema: type: string schemas: UptimeMonitor: type: object properties: id: type: string name: type: string url: type: string format: uri status: type: string intervalSeconds: type: integer projectSlug: type: string dateCreated: type: string format: date-time required: - id - name - url Monitor: type: object properties: id: type: string slug: type: string name: type: string type: type: string config: type: object properties: schedule_type: type: string schedule: oneOf: - type: string - type: array items: type: integer checkin_margin: type: integer nullable: true max_runtime: type: integer nullable: true timezone: type: string status: type: string dateCreated: type: string format: date-time project: type: object properties: id: type: string slug: type: string name: type: string environments: type: array items: type: object properties: name: type: string status: type: string lastCheckIn: type: string format: date-time nullable: true nextCheckIn: type: string format: date-time nullable: true required: - id - name - type - config securitySchemes: BearerAuth: type: http scheme: bearer description: Authentication token for the Sentry API.