Backfill timestamps on posts, assets and comments
POST /admin/seed/timestamps
Overwrites created_at and updated_at on posts, assets and
comments that already exist, so seeded content can look as if it was
made over time. It’s for seed and test tooling, not everyday use.
Send 1 to 1,000 items, each naming a table (kind), a row id and
the times to set. On a post, posted_at is set to created_at as
well, which moves the post in the feed. Rows that don’t exist are
counted in skipped_unknown_id, not created, and deleted rows are
updated like any other. All the updates in one request are saved
together.
An empty list or more than 1,000 items gets a 400. A kind other
than asset, post or comment fails the whole request with a
500, and nothing is changed.
Each successful call writes one admin.seed.timestamps_backfilled
audit event with the counts, on a best-effort basis. No activity is
recorded and peers aren’t told. You need system.admin; the
endpoint works on any instance, not only demo ones.
Authorizations
Section titled “Authorizations ”Request Body required
Section titled “Request Body required ”object
object
The table the id belongs to.
The creation time to set. On a post, this also sets posted_at, which decides where the post appears in the feed.
Defaults to created_at when omitted.
Responses
Section titled “ Responses ”The update ran. The counts say how many rows changed in each table.
object
Items that updated nothing: the number sent minus the number
updated. If the same id appears twice under one kind, the row is
updated once, either copy’s times may be the ones kept, and the
other copy is counted here.
Malformed request
object
Human-readable error summary
Example
the request could not be completedAuthentication required, missing, or invalid
object
Human-readable error summary
Example
the request could not be completedExample
{ "error": "authentication required: sign in and retry with a valid session or API token"}Authenticated but missing required capabilities
object
Human-readable error summary
Example
the request could not be completed