Skip to content

Bulk-backfill created_at / updated_at for seeded entities

POST
/admin/seed/timestamps

Operator-tooling endpoint for the demo-seed loader (see seed/SEED_INSTRUCTIONS.md). NOT for general operator use — gated on system.admin; not surfaced in the admin UI.

Accepts an array of (kind, id, created_at, updated_at, last_reviewed_at?) tuples and bulk-updates the corresponding rows in assets / posts / comments. Idempotent: re-running the same payload produces the same end state (UPDATE stamps the same value twice).

Cap: 1,000 items per request. Larger seeds split into multiple calls.

Emits ONE admin.seed.timestamps_backfilled audit event per call summarising per-kind counts.

object
items
required
Array<object>
>= 1 items <= 1000 items
object
kind
required

Domain table to UPDATE.

string
Allowed values: asset post comment
id
required
string format: uuid
created_at
required
string format: date-time
updated_at

Defaults to created_at when omitted.

string format: date-time
nullable

Backfill applied.

object
asset_updated
required
integer
post_updated
required
integer
comment_updated
required
integer
skipped_unknown_id
required

Items whose id didn’t match any existing row. Apply scripts treat this as a soft failure (operator log + continue).

integer

Malformed request

object
error
required

Human-readable error summary

string
Example
the request could not be completed

Authentication required, missing, or invalid

object
error
required

Human-readable error summary

string
Example
the request could not be completed
Example
{
"error": "authentication required: sign in and retry with a valid session or API token"
}

Authenticated but missing required capabilities

object
error
required

Human-readable error summary

string
Example
the request could not be completed