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

# List Red Team Results

GET https://api.hiddenlayer.ai/evaluations/v1/red-team

\[BETA] This endpoint is not GA or Production ready and is subject to changes at any time. Breaking changes may occur.

List completed red team workflow results with filtering and bidirectional pagination.

Results are ordered by completed\_at DESC (newest first).
Returns metadata only - use GET /evaluations/v1/red-team/\{workflow\_id} for full payload.

Reference: https://hiddenlayer.ferndocs.com/api-reference/llm-proxy-api/red-team/list

## Authentication

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

## Servers

- `https://api.hiddenlayer.ai` (ProdUs, default)
- `https://api.eu.hiddenlayer.ai` (ProdEu)

## Request

### Query parameters

- `target_model` (string, optional)
- `workflow_type` (string, optional)
- `status` (string, optional)
- `start_time_from` (datetime, optional)
- `start_time_to` (datetime, optional)
- `limit` (integer, optional, default: 50)
- `page_size` (integer, optional, default: 50, deprecated)
- `cursor` (string, optional)

## Response

### 200

List of result metadata

- `items` (list of RedTeamResultItem, required) — List of result metadata items
- `first` (string, optional, default: ) — Cursor for first page
- `next` (string, optional, default: ) — Cursor for next page
- `prev` (string, optional, default: ) — Cursor for previous page
- `last` (string, optional, default: ) — Cursor for last page (empty string when not known)

## Errors

### 401 Unauthorized Error

Authentication Error

- `detail` (string, required, default: Failed to authenticate)

### 403 Forbidden Error

Forbidden Error

- `detail` (string, required, default: Forbidden operation)

### 422 Unprocessable Entity Error

Validation Error

- `errors` (list of ProblemDetailsErrorsItems, required) — Error details
- `type` (string, optional) — https://www.rfc-editor.org/rfc/rfc9457.html#name-type
- `title` (string, optional) — https://www.rfc-editor.org/rfc/rfc9457.html#name-title
- `detail` (string, optional) — https://www.rfc-editor.org/rfc/rfc9457.html#name-detail
- `instance` (string, optional) — https://www.rfc-editor.org/rfc/rfc9457.html#name-instance

### 500 Internal Server Error

An unexpected error occurred preventing the operation from being performed.

- `message` (string, required) — A message stating that an error occurred

## Types

### RedTeamResultItem

Metadata for a completed red team workflow result.

- `workflow_id` (string, required) — Workflow identifier
- `run_id` (string, required) — Run identifier
- `name` (string, required) — Workflow name
- `target_model` (string, required) — Target model used
- `objective_ids` (list of string, required) — Objective IDs evaluated
- `started_at` (datetime, required) — When the workflow started
- `completed_at` (datetime, required) — When the workflow completed
- `attack_success_rate` (double, optional) — Attack success rate as a percentage (0 to 100)

### ProblemDetailsErrorsItems

- `code` (string, optional)
- `detail` (string, optional)
- `pointer` (list of string, optional) — array of JSON Pointers

## Examples

**Response**

```json
{
  "items": [
    {
      "workflow_id": "string",
      "run_id": "string",
      "name": "string",
      "target_model": "string",
      "objective_ids": [
        "string"
      ],
      "started_at": "2024-01-15T09:30:00Z",
      "completed_at": "2024-01-15T09:30:00Z",
      "attack_success_rate": 1.1
    }
  ],
  "first": "",
  "next": "",
  "prev": "",
  "last": ""
}
```

**SDK Code**

```python
import requests

url = "https://api.hiddenlayer.ai/evaluations/v1/red-team"

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

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

print(response.json())
```

```javascript
const url = 'https://api.hiddenlayer.ai/evaluations/v1/red-team';
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
package main

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

func main() {

	url := "https://api.hiddenlayer.ai/evaluations/v1/red-team"

	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
require 'uri'
require 'net/http'

url = URI("https://api.hiddenlayer.ai/evaluations/v1/red-team")

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
import com.mashape.unirest.http.HttpResponse;
import com.mashape.unirest.http.Unirest;

HttpResponse<String> response = Unirest.get("https://api.hiddenlayer.ai/evaluations/v1/red-team")
  .header("Authorization", "Bearer <token>")
  .asString();
```

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

$client = new \GuzzleHttp\Client();

$response = $client->request('GET', 'https://api.hiddenlayer.ai/evaluations/v1/red-team', [
  'headers' => [
    'Authorization' => 'Bearer <token>',
  ],
]);

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

```csharp
using RestSharp;

var client = new RestClient("https://api.hiddenlayer.ai/evaluations/v1/red-team");
var request = new RestRequest(Method.GET);
request.AddHeader("Authorization", "Bearer <token>");
IRestResponse response = client.Execute(request);
```

```swift
import Foundation

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

let request = NSMutableURLRequest(url: NSURL(string: "https://api.hiddenlayer.ai/evaluations/v1/red-team")! 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()
```