Sentry Dashboards API

Manage custom dashboards and their widgets

Documentation

Specifications

Schemas & Data

Other Resources

OpenAPI Specification

sentry-system-dashboards-api-openapi.yml Raw ↑
openapi: 3.1.0
info:
  title: Sentry Alerts Dashboards 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: Dashboards
  description: Manage custom dashboards and their widgets
paths:
  /organizations/{organization_id_or_slug}/dashboards/:
    get:
      operationId: listOrganizationDashboards
      summary: Sentry List an organization's custom dashboards
      description: Returns a list of custom dashboards for the given organization.
      tags:
      - Dashboards
      parameters:
      - $ref: '#/components/parameters/OrganizationIdOrSlug'
      - name: cursor
        in: query
        description: Pagination cursor.
        schema:
          type: string
      responses:
        '200':
          description: A list of dashboards.
          content:
            application/json:
              schema:
                type: array
                items:
                  $ref: '#/components/schemas/DashboardSummary'
        '401':
          description: Unauthorized.
        '403':
          description: Forbidden.
    post:
      operationId: createOrganizationDashboard
      summary: Sentry Create a new dashboard for an organization
      description: Creates a new custom dashboard for the given organization.
      tags:
      - Dashboards
      parameters:
      - $ref: '#/components/parameters/OrganizationIdOrSlug'
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              required:
              - title
              properties:
                title:
                  type: string
                  description: The title of the dashboard.
                widgets:
                  type: array
                  items:
                    $ref: '#/components/schemas/Widget'
                  description: Widgets to include in the dashboard.
      responses:
        '201':
          description: Dashboard created.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Dashboard'
        '400':
          description: Bad request.
        '401':
          description: Unauthorized.
        '403':
          description: Forbidden.
  /organizations/{organization_id_or_slug}/dashboards/{dashboard_id}/:
    get:
      operationId: retrieveOrganizationDashboard
      summary: Sentry Retrieve an organization's custom dashboard
      description: Returns a custom dashboard with its widgets.
      tags:
      - Dashboards
      parameters:
      - $ref: '#/components/parameters/OrganizationIdOrSlug'
      - $ref: '#/components/parameters/DashboardId'
      responses:
        '200':
          description: Dashboard details.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Dashboard'
        '401':
          description: Unauthorized.
        '404':
          description: Dashboard not found.
    put:
      operationId: editOrganizationDashboard
      summary: Sentry Edit an organization's custom dashboard
      description: Updates a custom dashboard.
      tags:
      - Dashboards
      parameters:
      - $ref: '#/components/parameters/OrganizationIdOrSlug'
      - $ref: '#/components/parameters/DashboardId'
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              properties:
                title:
                  type: string
                widgets:
                  type: array
                  items:
                    $ref: '#/components/schemas/Widget'
      responses:
        '200':
          description: Dashboard updated.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Dashboard'
        '400':
          description: Bad request.
        '401':
          description: Unauthorized.
        '404':
          description: Dashboard not found.
    delete:
      operationId: deleteOrganizationDashboard
      summary: Sentry Delete an organization's custom dashboard
      description: Deletes a custom dashboard.
      tags:
      - Dashboards
      parameters:
      - $ref: '#/components/parameters/OrganizationIdOrSlug'
      - $ref: '#/components/parameters/DashboardId'
      responses:
        '204':
          description: Dashboard deleted.
        '401':
          description: Unauthorized.
        '404':
          description: Dashboard not found.
components:
  schemas:
    Dashboard:
      type: object
      properties:
        id:
          type: string
        title:
          type: string
        dateCreated:
          type: string
          format: date-time
        createdBy:
          type: object
          properties:
            id:
              type: string
            name:
              type: string
            email:
              type: string
        widgets:
          type: array
          items:
            $ref: '#/components/schemas/Widget'
      required:
      - id
      - title
    DashboardSummary:
      type: object
      properties:
        id:
          type: string
        title:
          type: string
        dateCreated:
          type: string
          format: date-time
        createdBy:
          type: object
          properties:
            id:
              type: string
            name:
              type: string
            email:
              type: string
        widgetDisplay:
          type: array
          items:
            type: string
      required:
      - id
      - title
    Widget:
      type: object
      properties:
        id:
          type: string
        title:
          type: string
        displayType:
          type: string
          enum:
          - line
          - area
          - stacked_area
          - bar
          - table
          - big_number
          - top_n
        interval:
          type: string
        queries:
          type: array
          items:
            type: object
            properties:
              id:
                type: string
              name:
                type: string
              fields:
                type: array
                items:
                  type: string
              conditions:
                type: string
              orderby:
                type: string
        layout:
          type: object
          properties:
            x:
              type: integer
            y:
              type: integer
            w:
              type: integer
            h:
              type: integer
            minH:
              type: integer
      required:
      - title
      - displayType
      - queries
  parameters:
    OrganizationIdOrSlug:
      name: organization_id_or_slug
      in: path
      required: true
      description: The ID or slug of the organization.
      schema:
        type: string
    DashboardId:
      name: dashboard_id
      in: path
      required: true
      description: The ID of the dashboard.
      schema:
        type: string
  securitySchemes:
    BearerAuth:
      type: http
      scheme: bearer
      description: Authentication token for the Sentry API.