Operate the API and Scheduler
Check PBRS API availability, inspect scheduler status, start and stop scheduling, and manage collaboration settings through the REST API.
Use the PBRS REST API to check connectivity, inspect scheduler state, control scheduling, monitor execution, and apply collaboration settings.
API availability, scheduler state, execution capacity, and report delivery are separate checks. A successful response from one does not establish that the others are healthy.
Before you begin
You need the configured PBRS API address and a valid access token for protected endpoints.
Send these headers:
Authorization: Bearer YOUR_ACCESS_TOKEN
Accept: application/jsonFor JSON request bodies, also send:
Content-Type: application/jsonGET /api/Service/Ping does not require authentication.
Run scheduler controls and collaboration changes through an administrative integration. Confirm which server you are addressing before changing its state.
Operations at a glance
| Operation | Request | Successful response |
|---|---|---|
| Check API connectivity | GET /api/Service/Ping | JSON number 1 |
| Check scheduler state | GET /api/Service/IsSchedulerRunning | JSON boolean |
| Start the scheduler | GET /api/Service/StartScheduler | HTTP 200, empty body |
| Stop the scheduler | GET /api/Service/StopScheduler | HTTP 200, empty body |
| Retrieve the configuration path | GET /api/Service/GetConfigPath | JSON string |
| Apply collaboration settings | POST /api/Service/UpdateCollaborationSettings | HTTP 200, empty body |
| Check available execution capacity | GET /api/Schedule/GetNumberOfFreeThreads | Object containing Result |
| Inspect the API execution queue | GET /api/Schedule/GetExecutionQueue | Array of queue records |
| Inspect schedules due today | GET /api/SystemMonitor/AllDue | Array of schedule summaries |
| Inspect currently executing schedules | GET /api/SystemMonitor/GetCurrentlyExecuting | Array of active execution records |
Check API connectivity
GET /api/Service/PingA successful response is HTTP 200 with:
1This confirms that the API endpoint is reachable and responding. It does not verify:
- Authentication.
- Scheduler state.
- Reporting account access.
- Database connectivity.
- Rendering or delivery.
If Ping fails, check the API service, configured address, network route, firewall, and applicable HTTPS configuration.
The API service must already be running to receive requests. StartScheduler starts the scheduler; it does not start an unavailable API service.
Check scheduler state
GET /api/Service/IsSchedulerRunningA running scheduler returns:
trueA stopped scheduler returns:
falseThe response is a JSON boolean, not an object containing a Result property.
A value of true describes scheduler state. It does not prove that every report, destination, or external dependency is working.
Start the scheduler
GET /api/Service/StartSchedulerA successful request returns HTTP 200 with an empty body.
After the request, call:
GET /api/Service/IsSchedulerRunningConfirm that the scheduler reports the intended state. Review due schedules and execution activity after starting it.
Do not attempt to parse the empty start response as JSON.
Stop the scheduler
GET /api/Service/StopSchedulerA successful request returns HTTP 200 with an empty body.
Then retrieve scheduler state again:
GET /api/Service/IsSchedulerRunningStopping the scheduler can interrupt scheduled reporting. Do not treat it as a guarantee that all active work has finished or that every execution submitted through another path has been cancelled.
Inspect current execution activity separately.
StartSchedulerandStopSchedulerchange server state despite using GET. Keep them out of health probes, automatic link checks, prefetching, and generic GET retry policies.
Retrieve the configuration path
GET /api/Service/GetConfigPathWith Accept: application/json, the response is a JSON string. For example:
"\\\\PBRS-SERVER\\PBRS\\config"The result can be a network path. It is not the configuration file contents or a download URL.
Accessing that path from another machine requires the appropriate network connectivity and filesystem permissions.
Monitor execution
Use the monitoring endpoint that matches the question you need to answer.
| Question | Endpoint |
|---|---|
| Which API executions are waiting, running, or retained? | /api/Schedule/GetExecutionQueue |
| Which schedules appear in the Due Today — All view? | /api/SystemMonitor/AllDue |
| Which schedules are currently executing in the task monitor? | /api/SystemMonitor/GetCurrentlyExecuting |
| What happened to a specific API execution? | /api/Schedule/GetExecutionStatus?ExecutionId=... |
These endpoints provide different views. Do not assume their results contain the same records or identifiers.
Inspect the API execution queue
GET /api/Schedule/GetExecutionQueueThe response contains waiting, executing, and retained API execution records.
Example:
[
{
"ExecutionId": "b2ad1236-e4f9-43d5-9593-993347fa4792",
"uniqueid": 101,
"ProcessId": 4820,
"Status": "Completed",
"EntryDateEpoch": 1789462800,
"CompletionDateEpoch": 1789462812,
"RunBy": "API",
"ResultJson": "{\"Result\":true,\"ErrorMessage\":\"\",\"ErrorNumber\":0}",
"ServerName": "PBRS-SERVER",
"ScheduleType": "report",
"ScheduleName": "Daily sales"
}
]Keep these identifiers separate:
| Field | Identifies |
|---|---|
ExecutionId | An API execution |
uniqueid | The schedule |
ProcessId | An execution process |
ServerName | The associated server |
Observed queue states include Waiting, Executing, Completed, Terminated by user, and Stale. Handle additional state values without rejecting the entire response.
Interpret execution results
ResultJson contains JSON encoded inside a string. Parse it separately when a value is present.
For the example above, the decoded result is:
{
"Result": true,
"ErrorMessage": "",
"ErrorNumber": 0
}A record can have Status: "Completed" and still contain Result: false.
An empty ResultJson is not proof of success. It can occur while work is waiting, executing, or stale.
For an individual execution, request:
GET /api/Schedule/GetExecutionStatus?ExecutionId=b2ad1236-e4f9-43d5-9593-993347fa4792Use bounded polling, inspect the result, and confirm the generated output and delivery when required.
Queue retention
The queue selection includes completed entries whose completion age is less than 120000 seconds, or 33 hours and 20 minutes.
This selection window is not a guarantee that every record remains available for that duration. The API queue is not a durable execution archive.
Store execution identifiers, timestamps, results, and relevant delivery evidence separately when your application requires long-term history.
Inspect due schedules
GET /api/SystemMonitor/AllDueThis returns the Due Today — All monitor view, ordered by NextRunEpoch.
A due schedule is not necessarily an execution already submitted to the API queue. Do not use this response as evidence that a report is running or has been delivered.
Inspect currently executing schedules
GET /api/SystemMonitor/GetCurrentlyExecutingThe response contains task-monitor records with fields such as:
ScheduleName.ScheduleType.uniqueid.ProcessId.ServerName.Status.EntryDateEpoch.
These records describe running processes. They are distinct from API queue records identified by ExecutionId.
Correlate process IDs with server names and execution details rather than treating a process ID as a globally unique execution identifier.
Check available execution capacity
GET /api/Schedule/GetNumberOfFreeThreadsExample response:
{
"Result": 2
}Result reports available schedule-execution capacity for the current server. The default capacity is four, but configuration can change it. The returned count is clamped to zero.
The value is a snapshot, not a reservation. Another request or scheduler action can consume capacity before your application submits work.
A result of zero does not by itself indicate a service failure.
Schedule execution slots, report-page renderer processes, and data-driver row threads are different capacities. This endpoint does not report all three.
The capacity calculation can also clean up old execution entries, so it is not a capacity-reservation operation.
Apply collaboration settings
Collaboration allows a primary PBRS installation to delegate schedule execution to other PBRS servers.
Before changing collaboration configuration:
- Configure the API on every participating server.
- Verify connectivity between the servers.
- Ensure collaborators use the primary scheduler’s database.
- Verify reporting, email, database, filesystem, and other execution dependencies on each server.
- Record the current configuration and recovery procedure.
- Coordinate the change with active scheduling.
Collaborators execute work assigned by the primary rather than their own local schedules. Follow the PBRS collaboration setup procedure when establishing the environment.
Request fields
POST /api/Service/UpdateCollaborationSettings| Field | Type | Purpose |
|---|---|---|
IsCollaborationEnabled | Boolean | Collaboration enabled state |
CollaborationId | Integer | Collaboration identifier |
CollaborationLeader | String or null | Collaboration leader setting |
ConType | String or null | Database connection type setting |
ConString | String or null | Database connection setting |
ConString2 | String or null | Additional database connection setting |
Supply values appropriate to the target server and its configured database. These connection fields are not API authentication credentials.
Do not send an empty object as a no-op request or assume omitted properties preserve every existing setting.
Effects of the update
This operation:
- Applies collaboration settings.
- Terminates relevant system processes.
- Rewrites configuration.
- Replaces stored connection values when nonempty connection fields are supplied.
- Clears local database connection fields.
It is not a simple flag update. Disabling collaboration must not be assumed to restore a previous standalone database configuration.
A successful request returns HTTP 200 with an empty body. It does not return the resulting configuration.
After the operation:
- Verify configuration on the affected server.
- Confirm access to the intended scheduler database.
- Confirm the required processes and services are running.
- Check API connectivity and scheduler state.
- Verify delegated execution with a controlled schedule.
- Inspect generated output and delivery.
If the connection is lost during the change, inspect the server before retrying. The operation may already have changed configuration or terminated processes.
Understand collaboration and failover
Collaboration distributes execution across participating servers. Failover provides a backup scheduler that can take over when the primary fails.
The supported collaboration methods include:
| Method | Behavior |
|---|---|
| Server Affinity | Uses the selected server assignment for a schedule |
| Round-Robin | Distributes ready work across servers rather than following the schedule’s affinity selection |
UpdateCollaborationSettings does not, by itself, complete a failover deployment.
Configure the backup scheduler and required shared dependencies using the PBRS failover setup procedure.
Validate takeover and recovery in your environment, including execution ownership, access to reports, and destination delivery. Do not assume a configuration response guarantees uninterrupted or duplicate-free delivery.
Verify collaboration with an automation workflow
Use a controlled automation workflow to verify that child schedules execute on the intended collaborating servers and deliver the expected reports.
Configure and run this initial test through the PBRS interface. It verifies the collaboration environment independently of an application's API request handling.
Prepare the test
- Complete collaboration setup and confirm the required dependencies on each participating server.
- Use at least two collaborating execution servers for this test so that you can observe work assigned to different servers. This is a test arrangement, not a universal deployment minimum.
- Select Server Affinity when testing whether a child schedule runs on its designated server.
- Prepare two or more child report schedules with controlled email destinations.
- Assign the child schedules to different servers.
- In each child's email subject, include a recognizable test label and insert Current Server Name using the PBRS message-insert selector.
Use the actual Current Server Name insert rather than typing a fixed server name into the subject.
Confirm that each assigned server can access the report source and deliver to the test destination.
Run a parent automation schedule
- Create a parent Automation schedule.
- Add multiple Run Schedule tasks, each referencing one of the prepared child report schedules.
- Execute the parent manually.
- Inspect the parent and child execution activity and results.
- Check each delivered email's subject for the actual execution server.
- Open the attached reports and verify their content.
Compare the observed execution server with each child's assigned server. A successful parent execution alone does not establish that every child generated and delivered its report.
Cover other automation workflows
Repeat the test for the workflow types used in your environment:
| Parent workflow | Test coverage |
|---|---|
| Automation | Multiple Run Schedule tasks referencing child reports assigned to different servers. |
| Event-Based Automation | Child report execution and delivery when the configured event occurs. |
| Data-Driven Automation | Child report execution and delivery for the selected test records. |
| Nested automation | A parent automation runs another automation, which runs the child reports. |
Use controlled events and a small, known set of driver records. For nested automation, inspect each level rather than relying only on the top-level result.
This procedure verifies the distribution of child schedules within a workflow. It does not establish that one report is divided across servers, that all child schedules execute simultaneously, or that a particular speed improvement is guaranteed.
Record execution and delivery evidence
For each test case, record:
| Evidence | What to capture |
|---|---|
| Parent workflow | Schedule name, identifier, type, and test start time. |
| Child schedule | Schedule name and identifier, including its place in a nested workflow. |
| Collaboration method | Server Affinity or Round-Robin. |
| Assigned server | The child's configured server assignment. |
| Observed server | The Current Server Name insert and available execution records. |
| Execution result | Parent and child results, including errors. |
| Delivery result | Expected destination, received files, and verified report content. |
Under Round-Robin, the schedule's affinity selection does not determine the execution server. Verify execution on participating servers and successful delivery without treating a difference from the affinity assignment as a failure.
If a child fails, identify which reports were already generated or delivered before retrying the parent. Re-running the entire workflow can repeat successful deliveries.
Verify API-triggered execution separately
After the manual workflow succeeds, test the execution operation used by your application against the same controlled configuration.
Use an operation that supports the parent schedule type, and follow that operation's request and identifier contract. Retain any returned execution identifier and correlate it with the parent, child execution records, and delivery evidence.
Do not assume that every child appears as a separate API queue entry or receives its own API ExecutionId. Use the task monitor, schedule history, server information, and delivered output as appropriate.
The manual workflow test does not by itself validate an API request, event-context payload, or application retry policy.
Perform a maintenance check
Before maintenance:
- Confirm the target server and its role.
- Check API connectivity and scheduler state.
- Inspect due schedules, the API queue, and currently executing work.
- Coordinate external applications that can submit executions.
- Record relevant execution IDs and configuration.
- Stop scheduling if the maintenance procedure requires it.
After maintenance:
- Confirm that the API responds.
- Confirm the intended scheduler state.
- Verify database and reporting dependencies.
- Inspect outstanding executions.
- Run a controlled report and verify delivery.
- Resume normal scheduling and submissions.
In a collaborative environment, perform the applicable checks on every affected server.
Handle responses and failures
Parse responses according to the endpoint contract:
- Ping returns a number.
- Scheduler status returns a boolean.
- Configuration path returns a string.
- Capacity returns an object.
- Monitoring endpoints return arrays.
- Start, stop, and collaboration updates return empty bodies.
Do not apply a universal “parse every successful response as a JSON object” rule.
Protected requests require a valid bearer token. Renew authentication when the token expires.
Service operations can return HTTP 500 for processing failures. Inspect available error details and the server’s actual state before retrying a state-changing request.
| Symptom | What to check |
|---|---|
| Ping fails | API service, address, network route, firewall, and HTTPS configuration |
| Ping succeeds but protected requests fail | Bearer token, expiration, and access requirements |
| Scheduler status is false | Scheduler service or process state and recent maintenance |
| Start or stop succeeds but client parsing fails | The successful response body is empty |
| Capacity is zero | Active execution load and configured schedule capacity |
| Queue is empty but reports are running | The task monitor and other execution paths |
| An execution is completed but delivery failed | Decoded ResultJson, report output, and destination errors |
| Collaboration changes interrupt service | Process state, rewritten configuration, and database connections |
| A collaborator cannot run a report | Reporting accounts, source access, paths, and delivery configuration on that server |
Updated 1 day ago

