Admin console

Operational controls for imports, articles, and snapshots.

These pages stay tied to the same Railway PostgreSQL database as the public site so importing, reporting, and editorial work all share one source of truth.

Database ready

Latest import finished Jul 8, 2026, 6:08 AM after finding 11,657 records.

DATABASE_URL

Configured

Railway PostgreSQL connection for Prisma

USAJOBS headers

Configured

Server-only authorization key and registered user agent

ADMIN_IMPORT_TOKEN

Configured

Required for Bearer-protected manual imports

NEXT_PUBLIC_SITE_URL

Configured

Used in the copy-paste trigger command below

Import runs

5

Total ImportRun rows stored in PostgreSQL

Latest status

succeeded

Started Jul 8, 2026, 6:03 AM

Found

11,657

Unique current announcements returned by the latest run

Closed

0

Jobs marked closed because they no longer appeared in USAJOBS

Manual trigger

Run a protected USAJOBS import

The importer runs on the server, authenticates with USAJOBS using Railway environment variables, writes all normalized data through Prisma, and never exposes API secrets to the client.

curl -X POST "https://www.federalhiringdata.com/api/admin/import/usajobs" \
  -H "Authorization: Bearer <ADMIN_IMPORT_TOKEN>"

Pipeline behavior

Production safety checks

Jobs are upserted by USAJOBS control number so repeated imports do not create duplicates.
ImportRun rows capture status, timestamps, counts, warnings, and structured error details for auditability.
Jobs not returned by a successful import are marked closed instead of being deleted, which preserves historical data.
If the importer encounters a segment-level fetch failure or receives zero active announcements, it skips the closed-job pass to avoid unsafe mass deactivations.

Latest outcome

Success and error state

Latest import

succeeded

Started Jul 8, 2026, 6:03 AM and completed Jul 8, 2026, 6:08 AM.

succeeded
Found
11,657
Imported
11,357
Updated
300
Errors
0

Warnings

The unfiltered USAJOBS search reported 10,000 active announcements, so the importer switched to organization-based segmentation to reduce the chance of truncation.

Recent import runs

Operational history

USAJOBS import run

Started Jul 8, 2026, 6:03 AM

succeeded
Found
11,657
Imported
11,357
Updated
300
Closed
0
Errors
0

USAJOBS import run

Started Jul 8, 2026, 6:00 AM

failed
Found
500
Imported
200
Updated
300
Closed
0
Errors
1
Invalid `prisma.job.upsert()` invocation: Unique constraint failed on the fields: (`"usajobsId"`)

USAJOBS import run

Started Jul 8, 2026, 6:00 AM

failed
Found
500
Imported
498
Updated
2
Closed
0
Errors
1
Invalid `prisma.job.upsert()` invocation: Unique constraint failed on the fields: (`"usajobsId"`)

USAJOBS import run

Started Jul 8, 2026, 5:56 AM

failed
Found
500
Imported
499
Updated
1
Closed
0
Errors
1
Invalid `prisma.job.upsert()` invocation: Transaction API error: A rollback cannot be executed on an expired transaction. The timeout for this transaction was 5000 ms, however 5033 ms passed since the start of the transaction. Consider increasing the interactive transaction timeout or doing less work in the transaction.

USAJOBS import run

Started Jul 8, 2026, 5:56 AM

failed
Found
500
Imported
500
Updated
0
Closed
0
Errors
1
Invalid `prisma.job.upsert()` invocation: Transaction API error: A rollback cannot be executed on an expired transaction. The timeout for this transaction was 5000 ms, however 5027 ms passed since the start of the transaction. Consider increasing the interactive transaction timeout or doing less work in the transaction.