Corridor Dashboard API

Access dashboard metrics and AI usage data.

OpenAPI Specification

corridor-dashboard-api-openapi.yml Raw ↑
openapi: 3.1.0
info:
  title: Corridor Dashboard API
  version: '1.0'
  summary: Programmatic access to Corridor findings, guardrails, PR reviews, team settings, and dashboard data.
  description: 'Corridor exposes a REST API for integrating its AI-coding security platform with CI/CD pipelines, custom dashboards, and other tools. All endpoints are authenticated with API tokens (the `cor_` prefix) passed as an `Authorization: Bearer` header. API tokens carry the same access as the user who created them and cannot perform admin operations (those require a user session). This specification was faithfully generated by the API Evangelist enrichment pipeline from Corridor''s published API reference; it is not a verbatim provider-published machine-readable spec.'
  contact:
    name: Corridor Support
    email: support@corridor.dev
    url: https://docs.corridor.dev/api/reference
  x-apievangelist-generated: '2026-07-18'
  x-apievangelist-method: generated
  x-apievangelist-source: https://docs.corridor.dev/api/reference
servers:
- url: https://app.corridor.dev/api
  description: Corridor production API
security:
- bearerAuth: []
tags:
- name: Dashboard
  description: Access dashboard metrics and AI usage data.
paths:
  /teams/{id}/dashboard-data:
    parameters:
    - name: id
      in: path
      required: true
      schema:
        type: string
      description: Team ID.
    get:
      operationId: getDashboardData
      tags:
      - Dashboard
      summary: Get dashboard data
      description: Returns aggregated security metrics including findings by severity, trends over time, and top projects.
      responses:
        '200':
          description: Dashboard metrics.
        '401':
          $ref: '#/components/responses/Unauthorized'
  /teams/{id}/list-requests:
    parameters:
    - name: id
      in: path
      required: true
      schema:
        type: string
      description: Team ID.
    get:
      operationId: listLlmRequests
      tags:
      - Dashboard
      summary: List LLM requests
      description: Returns a summary of AI/LLM requests made across the team, useful for tracking AI usage and compliance.
      responses:
        '200':
          description: LLM request summary.
        '401':
          $ref: '#/components/responses/Unauthorized'
  /teams/{id}/guardrail-invocations-staging:
    parameters:
    - name: id
      in: path
      required: true
      schema:
        type: string
      description: Team ID.
    get:
      operationId: getGuardrailInvocations
      tags:
      - Dashboard
      summary: Get guardrail invocations
      description: Returns data on which guardrails were triggered during real-time code analysis (hook events and security checks).
      parameters:
      - name: reportId
        in: query
        required: true
        schema:
          type: string
        description: Guardrail report ID.
      - name: period
        in: query
        required: false
        schema:
          type: string
          default: 7d
      - name: projectId
        in: query
        required: false
        schema:
          type: string
      - name: limit
        in: query
        required: false
        schema:
          type: integer
          default: 15
      - name: offset
        in: query
        required: false
        schema:
          type: integer
      responses:
        '200':
          description: Guardrail invocations.
        '401':
          $ref: '#/components/responses/Unauthorized'
  /teams/{id}/stop-hook-invocations:
    parameters:
    - name: id
      in: path
      required: true
      schema:
        type: string
      description: Team ID.
    get:
      operationId: getStopHookInvocations
      tags:
      - Dashboard
      summary: Get stop hook invocations
      description: Returns instances where Corridor's hooks blocked an action (e.g., prevented an insecure code pattern from being applied).
      responses:
        '200':
          description: Stop hook invocations.
        '401':
          $ref: '#/components/responses/Unauthorized'
  /log:
    post:
      operationId: logExtensionData
      tags:
      - Dashboard
      summary: Log extension data
      description: The primary endpoint used by IDE extensions to send code analysis data to Corridor. The `type` field determines processing (`hook-event`, `async-security-check`, `fetch-security-results`, `mcp-detection`, `compliance-data`).
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              required:
              - type
              properties:
                type:
                  type: string
                  enum:
                  - hook-event
                  - async-security-check
                  - fetch-security-results
                  - mcp-detection
                  - compliance-data
      responses:
        '200':
          description: Logged.
        '400':
          $ref: '#/components/responses/BadRequest'
        '401':
          $ref: '#/components/responses/Unauthorized'
components:
  responses:
    BadRequest:
      description: Bad request — check your parameters.
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/Error'
    Unauthorized:
      description: Unauthorized — invalid or missing token.
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/Error'
  schemas:
    Error:
      type: object
      properties:
        error:
          type: string
          description: Description of what went wrong.
      required:
      - error
  securitySchemes:
    bearerAuth:
      type: http
      scheme: bearer
      description: 'API token with the `cor_` prefix, generated from Profile > API Tokens in the Corridor dashboard. Passed as `Authorization: Bearer cor_...`.'