Errors and Response Formats

Common Error Envelope

Stigviewer route errors use this structure:

{
"error": {
"code": "BAD_REQUEST",
"message": "Invalid format. Must be one of: json, csv, xml"
}
}

Status Codes

  • 400: invalid request, currently used for unsupported format
  • 401: missing, malformed, invalid, expired, or inactive SAMS bearer token
  • 404: benchmark slug not found
  • 500: unexpected application error

Response Content Types

  • GET /api/v1/stigs: application/json
  • GET /api/v1/stigs/{slug}/download?format=json: application/json
  • GET /api/v1/stigs/{slug}/download?format=csv: text/csv
  • GET /api/v1/stigs/{slug}/download?format=xml: application/xml