Menu

Seed demo

1 endpoint in the Mattering Productivity API.

POST seed-demo/ User API

Batched synthetic seeding for scale demos (user API, org-key auth).

POST {project_id, target?, batch?}: resolves the project's first tab's TASKS widget and its backing list (self-healing one on if missing), bulk-creates up to 25k rows per call, and stops once the list holds target rows (cap 2M). Callers loop until done is true. Statuses come from the space's default status preset so grouped views and the fail-closed create validator agree with the seeded data.

Replaces the seed_demo_tasks management command: environments where nothing can shell into the database drive this over HTTP with a mat_ org API key (see tools/seed_demo_1m.py).

This read is not paginated. It returns at most 8 rows and does not report a total, so a result of exactly 8 may be truncated.

URL

  • User APIhttps://productivity.mattering.io/api/user/v1/seed-demo/

Body keys (JSON)

KeyRequiredDefault
batchoptional or conditional20000
project_idoptional or conditionalnone
targetoptional or conditional1000000
user_idoptional or conditionalnone

Keys the view reads. A key not in this list is ignored by the view. Where a key is required only for some actions (for example the action dispatch), the description above says which.

Responses

200 bare JSON object (no envelope)

{
  "success": true,
  "done": true,
  "total": 0,
  "created": "...",
  "list_id": "..."
}

200 bare JSON object (no envelope)

{
  "success": true,
  "done": true,
  "total": "...",
  "created": 0,
  "list_id": "..."
}

Field names come from the code; values are placeholders (... is a string, 0 a number, dates are ISO 8601).

Errors

StatusCode
400bad_params
400no_tasks_widget
400widget_not_a_tasks_widget
401missing_actor
401unauthorized
403forbidden
404project_not_found

Example

curl -X POST "https://productivity.mattering.io/api/user/v1/seed-demo/" \
  -H "Authorization: Bearer $MATTERING_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
  "batch": 20000,
  "project_id": "...",
  "target": 1000000,
  "user_id": "..."
}'

Source: MatteringPMCore/internal_api.py (internal_api.internal_seed_demo_tasks)

All Productivity resources
Start Free Explore our Products