scope is
identical to the scope you requested, so you can reliably match the value to the
right element in your user interface.
A metric value is
null until the solver publishes its first metrics update, or when the selected scope has no value.Choose what each metric measures
A metric scope is defined by itsmetricKey and, optionally, its ruleLabel:
ruleLabel can only be used for metrics based on labeled rules.- With only a
metricKey, the service aggregates that metric across every rule of the relevant type. - With both a
metricKeyandruleLabel, it aggregates only rules of that type that have the exact, case-sensitive label.
maximum-weekend-amount, then request
PERIOD_DISTRIBUTION.EXCESSIVE_WORKED_PERIODS with that label. The result is the
total number of excessive weekend periods across all matching rules.
Track excessive weekend periods
Add numerical updates to your interface
1
Choose the numbers users need
Add each metric scope to
statusOptions.metricScopes in your POST /roster/start request. A scope can track a metric across all matching rules, or use ruleLabel to limit it to a labeled group of rules.Add status options to the roster start request
2
Start the roster job
Send the roster start request and retain the returned
jobId. The service creates one status-metric entry for every
requested scope.3
Poll for the latest numbers
Call
GET /roster/status/{jobId} while the job runs. Each response contains the latest values in the metrics array, using the same scopes you requested.Metrics returned when checking job status
4
Keep the interface up to date
Match every returned
scope to the metric in your interface and update its displayed value on each poll. Values will move as the solver improves the roster.