Merge pull request #33333 from chanchalkhatri19/docs/scheduler-rest-api-url-examples

docs(scheduler): add REST API URL examples
This commit is contained in:
Patrik Oldsberg
2026-03-17 22:04:47 +01:00
committed by GitHub
+27 -1
View File
@@ -45,7 +45,21 @@ The scheduler exposes a REST API on top of each plugin's base URL, that lets you
### `GET <pluginBaseURL>/.backstage/scheduler/v1/tasks`
Lists all tasks that the given plugin registered at startup, and their current states. The response shape is as follows:
Lists all tasks that the given plugin registered at startup, and their current states.
For example, to list all scheduled tasks for the Catalog plugin:
```sh
curl 'https://<instance-name>/api/catalog/.backstage/scheduler/v1/tasks'
```
You can try this out on the Backstage demo instance:
```sh
curl 'https://demo.backstage.io/api/catalog/.backstage/scheduler/v1/tasks'
```
The response shape is as follows:
```json
{
@@ -118,6 +132,18 @@ The `workerState` shape is as follows:
Schedules the given task ID for immediate execution, instead of waiting for its
next scheduled time slot to arrive.
For example, to trigger a specific Catalog task:
```bash
curl -X POST "https://<instance-name>/api/catalog/.backstage/scheduler/v1/tasks/InternalOpenApiDocumentationProvider:refresh/trigger"
```
A working example would be:
```bash
curl -X POST "https://demo.backstage.io/api/catalog/.backstage/scheduler/v1/tasks/InternalOpenApiDocumentationProvider:refresh/trigger"
```
Note that there can still be an additional small delay before a worker discovers
that the task is due and actually picks it up. This typically takes less than a
second, but it can vary.