---
title: "Generate Test Data"
method: POST
path: "/api/admin/generate-test-data"
tags: ["v2", "admin", "test-data"]
---

# Generate Test Data

`POST /api/admin/generate-test-data`

Generate test data for the platform.

This endpoint runs the test data generation scripts to populate the database
with sample users, agents, graphs, executions, store listings, and more.

Available script types:
- `e2e`: Creates a set of test users with graphs, library agents, presets,
         and store submissions. Uses API functions for better compatibility.
- `full`: Creates 100+ users with comprehensive test data using direct Prisma
          calls. Generates more data but may take longer.

**Warning**: This will add significant data to your database. Use with caution.
**Note**: This endpoint is only available in local environments; requests from
any shared/cloud environment are rejected and alerted on.

## Request body

- GenerateTestDataRequest — Request model for test data generation.
  - `script_type` 'full' | 'e2e' — Available test data generation scripts.

## Response `200`

Successful Response

- GenerateTestDataResponse — Response model for test data generation.
  - `success` boolean, required
  - `message` string, required
  - `details` object, nullable

## Other responses

- `401` — Authentication required
- `422` — Validation Error

## Changes

- **2026-09-07** `d3946c727d24` — 1 info
  - endpoint added

[Change history](https://skmtc.dev/significant-gravitas/apis/autogpt-agent-server/changes/api/admin/generate-test-data/post.md)

---

[API](https://skmtc.dev/significant-gravitas/apis/autogpt-agent-server.md) · [All operations](https://skmtc.dev/significant-gravitas/apis/autogpt-agent-server/llms.txt) · [OpenAPI document](https://skmtc.dev/significant-gravitas/apis/autogpt-agent-server/revisions/9a062c6d49b5?raw)
