> For clean Markdown of any page, append .md to the page URL.
> For a complete documentation index, see https://developer.open-controls.com/llms.txt.
> For AI client integration (Claude Code, Cursor, etc.), connect to the MCP server at https://developer.open-controls.com/_mcp/server.

# Download a complete STIG export

GET https://www.stigviewer.com/api/v1/stigs/{slug}/download

Reference: https://developer.open-controls.com/api-reference/stigs/download-stig

## Authentication

- `Authorization` header (bearer token, required) — Bearer authentication of the form `Bearer <token>`, where token is your auth token.

## Request

### Path parameters

- `slug` (string, required) — Unique STIG benchmark slug

### Query parameters

- `format` (enum, optional, default: json) — Export format. Defaults to `json`.
  - Allowed values: `json`, `csv`, `xml`

## Response

### 200

STIG export in the requested format

- `id` (integer, required)
- `benchmarkId` (string, required)
- `slug` (string, required)
- `status` (enum, required)
  - Allowed values: `accepted`, `draft`, `deprecated`
- `statusDate` (date, required)
- `title` (string, required)
- `description` (string, required)
- `version` (string, required)
- `createdAt` (datetime, required)
- `updatedAt` (datetime, required)
- `groups` (list of Group, required)
- `profiles` (list of Profile, required)

## Errors

### 400 Bad Request Error

Invalid export format

- `error` (ErrorResponseError, required)

### 401 Unauthorized Error

Missing, malformed, invalid, expired, or inactive bearer token

- `error` (ErrorResponseError, required)

### 404 Not Found Error

Benchmark slug not found

- `error` (ErrorResponseError, required)

### 500 Internal Server Error

Unexpected server error

- `error` (ErrorResponseError, required)

## Types

### Group

- `id` (integer, required)
- `benchmarkId` (integer, required)
- `groupId` (string, required)
- `title` (string, required)
- `description` (string, required)
- `ruleId` (string, required)
- `ruleWeight` (string, required)
- `ruleSeverity` (enum, required)
  - Allowed values: `low`, `medium`, `high`
- `ruleVersion` (string, required)
- `ruleTitle` (string, required)
- `ruleVulnDiscussion` (string, required)
- `ruleFalsePositives` (string, required)
- `ruleFalseNegatives` (string, required)
- `ruleDocumentable` (string, required)
- `ruleMitigations` (string, required)
- `ruleIdent` (string, required)
- `ruleFixText` (string, required)
- `ruleFixId` (string, required)
- `ruleCheckSystem` (string, required)
- `ruleCheckContent` (string, required)
- `createdAt` (datetime, required)
- `updatedAt` (datetime, required)

### Profile

- `id` (integer, required)
- `benchmarkId` (integer, required)
- `profileId` (string, required)
- `title` (string, required)
- `description` (string, required)
- `createdAt` (datetime, required)
- `updatedAt` (datetime, required)

### ErrorResponseError

- `code` (string, required)
- `message` (string, required)

## Examples

**Response**

```json
{
  "id": 123,
  "benchmarkId": "Windows_Server_2022",
  "slug": "windows-server-2022",
  "status": "accepted",
  "statusDate": "2024-09-13",
  "title": "Windows Server 2022 Security Technical Implementation Guide",
  "description": "Microsoft Windows Server 2022 security benchmark.",
  "version": "1",
  "createdAt": "2026-03-16T00:00:00.000Z",
  "updatedAt": "2026-03-16T00:00:00.000Z",
  "groups": [
    {
      "id": 456,
      "benchmarkId": 123,
      "groupId": "V-254123",
      "title": "Group title",
      "description": "Group description",
      "ruleId": "SV-254123r123456_rule",
      "ruleWeight": "10.0",
      "ruleSeverity": "high",
      "ruleVersion": "SRG-OS-000001-GPOS-00001",
      "ruleTitle": "Windows Server 2022 must enforce an example control.",
      "ruleVulnDiscussion": "Discussion text.",
      "ruleFalsePositives": "False positives text.",
      "ruleFalseNegatives": "False negatives text.",
      "ruleDocumentable": "documentable",
      "ruleMitigations": "Mitigation text.",
      "ruleIdent": "CCI-000001",
      "ruleFixText": "Fix text.",
      "ruleFixId": "F-000001r1_fix",
      "ruleCheckSystem": "http://example.com/check-system",
      "ruleCheckContent": "Check content.",
      "createdAt": "2026-03-16T00:00:00.000Z",
      "updatedAt": "2026-03-16T00:00:00.000Z"
    }
  ],
  "profiles": [
    {
      "id": 10,
      "benchmarkId": 123,
      "profileId": "MAC-1_Classified",
      "title": "MAC-1 Classified",
      "description": "Example profile.",
      "createdAt": "2026-03-16T00:00:00.000Z",
      "updatedAt": "2026-03-16T00:00:00.000Z"
    }
  ]
}
```

**SDK Code**

```python Stigs_downloadStig_example
import requests

url = "https://www.stigviewer.com/api/v1/stigs/slug/download"

headers = {"Authorization": "Bearer <token>"}

response = requests.get(url, headers=headers)

print(response.json())
```

```javascript Stigs_downloadStig_example
const url = 'https://www.stigviewer.com/api/v1/stigs/slug/download';
const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};

try {
  const response = await fetch(url, options);
  const data = await response.json();
  console.log(data);
} catch (error) {
  console.error(error);
}
```

```go Stigs_downloadStig_example
package main

import (
	"fmt"
	"net/http"
	"io"
)

func main() {

	url := "https://www.stigviewer.com/api/v1/stigs/slug/download"

	req, _ := http.NewRequest("GET", url, nil)

	req.Header.Add("Authorization", "Bearer <token>")

	res, _ := http.DefaultClient.Do(req)

	defer res.Body.Close()
	body, _ := io.ReadAll(res.Body)

	fmt.Println(res)
	fmt.Println(string(body))

}
```

```ruby Stigs_downloadStig_example
require 'uri'
require 'net/http'

url = URI("https://www.stigviewer.com/api/v1/stigs/slug/download")

http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true

request = Net::HTTP::Get.new(url)
request["Authorization"] = 'Bearer <token>'

response = http.request(request)
puts response.read_body
```

```java Stigs_downloadStig_example
import com.mashape.unirest.http.HttpResponse;
import com.mashape.unirest.http.Unirest;

HttpResponse<String> response = Unirest.get("https://www.stigviewer.com/api/v1/stigs/slug/download")
  .header("Authorization", "Bearer <token>")
  .asString();
```

```php Stigs_downloadStig_example
<?php
require_once('vendor/autoload.php');

$client = new \GuzzleHttp\Client();

$response = $client->request('GET', 'https://www.stigviewer.com/api/v1/stigs/slug/download', [
  'headers' => [
    'Authorization' => 'Bearer <token>',
  ],
]);

echo $response->getBody();
```

```csharp Stigs_downloadStig_example
using RestSharp;

var client = new RestClient("https://www.stigviewer.com/api/v1/stigs/slug/download");
var request = new RestRequest(Method.GET);
request.AddHeader("Authorization", "Bearer <token>");
IRestResponse response = client.Execute(request);
```

```swift Stigs_downloadStig_example
import Foundation

let headers = ["Authorization": "Bearer <token>"]

let request = NSMutableURLRequest(url: NSURL(string: "https://www.stigviewer.com/api/v1/stigs/slug/download")! as URL,
                                        cachePolicy: .useProtocolCachePolicy,
                                    timeoutInterval: 10.0)
request.httpMethod = "GET"
request.allHTTPHeaderFields = headers

let session = URLSession.shared
let dataTask = session.dataTask(with: request as URLRequest, completionHandler: { (data, response, error) -> Void in
  if (error != nil) {
    print(error as Any)
  } else {
    let httpResponse = response as? HTTPURLResponse
    print(httpResponse)
  }
})

dataTask.resume()
```