Trigger a Metrics Archive Run
POST /obp/v7.0.0/management/system/diagnostics/metrics/run
OBPv7.0.0-triggerMetricsArchiveRun Roles: CanCreateMetricsArchiveRun MetricSystemAPI
Manually run the metrics-archiving job once, on demand.
This invokes the same code path as the scheduled
MetricsArchiveScheduler run, so it respects all the same checks:
- Concurrency lock — if an archive run is already in progress (the
JobSchedulerlock is held, on this or another node), no new run is started and the responsestatusisskipped_already_in_progress. - Retention rules — moves
metricrows older thanretain_metrics_daystometricarchive, up toretain_metrics_move_limitrows; then deletesmetricarchiverows older thanretain_archive_metrics_days. - Run log — the outcome is written to the
metricsarchiverunaudit log, exactly as a scheduled run would be.
Response fields:
status—completed(a run executed — inspectrun.success) orskipped_already_in_progress.message— human-readable summary.run— the recorded run (run id, counts, duration, success, remark); absent when skipped.in_progress— present only when skipped: the lock that blocked the run (job_id,api_instance_id,started_at,age_seconds). A largeage_seconds(much older than a normal run) indicates a stale lock left by a dead JVM — clear the matchingjobschedulerrow to unblock.
Note: the run executes synchronously, so a large backlog may take a while.
User Authentication is Required. The User must be logged in. The Application must also be authenticated.
JSON request body fields (0)
JSON response body fields (12)
Example success response
{
"status": "completed",
"message": "Archive run completed: moved 4000 rows to the archive, deleted 1500 outdated archive rows.",
"run": {
"run_id": "9f3c2b1a-7d4e-4c8a-9b2f-1e6d5a0c4b7e",
"api_instance_id": "obp",
"started_at": "2024-06-01T00:00:00Z",
"ended_at": "2024-06-01T00:00:12Z",
"duration_ms": 12000,
"rows_moved_to_archive": 4000,
"rows_deleted_from_archive": 1500,
"success": true,
"remark": ""
}
}Possible errors (3)
- OBP-20001: User not logged in. Authentication is required!
- OBP-20006: User is missing one or more roles:
- OBP-50000: Unknown Error.