Errors and Response Formats

Common Error Envelope

Stigviewer route errors use this structure:

1{
2 "error": {
3 "code": "BAD_REQUEST",
4 "message": "Invalid format. Must be one of: json, csv, xml"
5 }
6}

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