OpenAPI Specification
openapi: 3.0.1
info:
title: StackHawk Api Authentication Hosted OAS 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: Hosted OAS
description: OpenAPI spec uploads and mapping
paths:
/api/v1/oas/{appId}/upload:
post:
operationId: uploadOpenAPISpec
summary: Upload OpenAPI Spec File
description: Upload an OpenAPI specification file for an application.
tags:
- Hosted OAS
parameters:
- name: appId
in: path
required: true
schema:
type: string
requestBody:
content:
multipart/form-data:
schema:
type: object
properties:
file:
type: string
format: binary
responses:
'200':
description: Upload confirmation
/api/v1/oas/{appId}/mapping:
get:
operationId: getOASMapping
summary: Get Application OpenAPI Specs
description: Retrieve the OpenAPI spec mapping for an application.
tags:
- Hosted OAS
parameters:
- name: appId
in: path
required: true
schema:
type: string
responses:
'200':
description: OpenAPI spec mapping
post:
operationId: mapOASSpec
summary: Map Application OpenAPI Specs
description: Map an OpenAPI spec to an application.
tags:
- Hosted OAS
parameters:
- name: appId
in: path
required: true
schema:
type: string
requestBody:
content:
application/json:
schema:
type: object
responses:
'200':
description: Mapping updated
components:
securitySchemes:
BearerAuth:
type: http
scheme: bearer
bearerFormat: JWT
description: JWT token obtained via /api/v1/auth/login