StackHawk Scan Configuration API

Scan configuration file management

OpenAPI Specification

stackhawk-scan-configuration-api-openapi.yml Raw ↑
openapi: 3.0.1
info:
  title: StackHawk Api Authentication Scan Configuration API
  description: The StackHawk Public API provides programmatic access to the StackHawk application and API security testing platform. Manage applications, environments, scan configurations, scan results, findings, repositories, teams, policies, and security reports. Authentication requires obtaining a JWT token via the /api/v1/auth/login endpoint using an API key from the StackHawk platform settings.
  version: 0.0.1
  contact:
    url: https://www.stackhawk.com/
    email: support@stackhawk.com
  termsOfService: https://www.stackhawk.com/terms/
servers:
- url: https://api.stackhawk.com
  description: StackHawk API
security:
- BearerAuth: []
tags:
- name: Scan Configuration
  description: Scan configuration file management
paths:
  /api/v1/app/{appId}/config/{configHash}:
    get:
      operationId: getApplicationConfig
      summary: Get Application Config
      description: Retrieve a specific application configuration by hash.
      tags:
      - Scan Configuration
      parameters:
      - name: appId
        in: path
        required: true
        schema:
          type: string
      - name: configHash
        in: path
        required: true
        schema:
          type: string
      responses:
        '200':
          description: Application configuration
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ScanConfiguration'
  /api/v1/app/{appId}/scan-config:
    get:
      operationId: getScanConfiguration
      summary: Get Scan Configuration
      description: Get the scan configuration for an application.
      tags:
      - Scan Configuration
      parameters:
      - name: appId
        in: path
        required: true
        schema:
          type: string
      responses:
        '200':
          description: Scan configuration
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ScanConfiguration'
    post:
      operationId: updateScanConfiguration
      summary: Update Scan Configuration
      description: Update the scan configuration for an application.
      tags:
      - Scan Configuration
      parameters:
      - name: appId
        in: path
        required: true
        schema:
          type: string
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/ScanConfigurationUpdateRequest'
      responses:
        '200':
          description: Updated scan configuration
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ScanConfiguration'
  /api/v1/org/{orgId}/scan-config:
    get:
      operationId: listOrgScanConfigurations
      summary: List Organization Scan Configs
      description: List all scan configurations for an organization.
      tags:
      - Scan Configuration
      parameters:
      - name: orgId
        in: path
        required: true
        schema:
          type: string
      responses:
        '200':
          description: List of scan configurations
          content:
            application/json:
              schema:
                type: object
                properties:
                  scanConfigurations:
                    type: array
                    items:
                      $ref: '#/components/schemas/ScanConfiguration'
    post:
      operationId: createOrgScanConfiguration
      summary: Create Scan Configuration
      description: Create a new scan configuration for an organization.
      tags:
      - Scan Configuration
      parameters:
      - name: orgId
        in: path
        required: true
        schema:
          type: string
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/ScanConfigurationUpdateRequest'
      responses:
        '200':
          description: Created scan configuration
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ScanConfiguration'
components:
  schemas:
    ScanConfigurationUpdateRequest:
      type: object
      additionalProperties: true
    ScanConfiguration:
      type: object
      properties:
        configHash:
          type: string
        appId:
          type: string
        configData:
          type: object
          additionalProperties: true
  securitySchemes:
    BearerAuth:
      type: http
      scheme: bearer
      bearerFormat: JWT
      description: JWT token obtained via /api/v1/auth/login