diff --git a/develop/404.html b/develop/404.html index 6fa4711b18..830ba7276e 100644 --- a/develop/404.html +++ b/develop/404.html @@ -78,7 +78,7 @@ diff --git a/develop/CAPTCHA_SETUP.html b/develop/CAPTCHA_SETUP.html index 5bb16a1607..743f99b690 100644 --- a/develop/CAPTCHA_SETUP.html +++ b/develop/CAPTCHA_SETUP.html @@ -77,7 +77,7 @@ diff --git a/develop/admin_api/account_validity.html b/develop/admin_api/account_validity.html index 655bca95d1..fd9bb9ed32 100644 --- a/develop/admin_api/account_validity.html +++ b/develop/admin_api/account_validity.html @@ -77,7 +77,7 @@ diff --git a/develop/admin_api/event_reports.html b/develop/admin_api/event_reports.html index ea281ade61..55b20a48ee 100644 --- a/develop/admin_api/event_reports.html +++ b/develop/admin_api/event_reports.html @@ -77,7 +77,7 @@ diff --git a/develop/admin_api/experimental_features.html b/develop/admin_api/experimental_features.html index 15e055f6e9..eb5f6689e5 100644 --- a/develop/admin_api/experimental_features.html +++ b/develop/admin_api/experimental_features.html @@ -77,7 +77,7 @@ diff --git a/develop/admin_api/media_admin_api.html b/develop/admin_api/media_admin_api.html index f12a411277..52f8d51309 100644 --- a/develop/admin_api/media_admin_api.html +++ b/develop/admin_api/media_admin_api.html @@ -77,7 +77,7 @@ diff --git a/develop/admin_api/purge_history_api.html b/develop/admin_api/purge_history_api.html index a42453d478..69e20823a5 100644 --- a/develop/admin_api/purge_history_api.html +++ b/develop/admin_api/purge_history_api.html @@ -77,7 +77,7 @@ diff --git a/develop/admin_api/register_api.html b/develop/admin_api/register_api.html index 1a019cfb66..9c04a0f432 100644 --- a/develop/admin_api/register_api.html +++ b/develop/admin_api/register_api.html @@ -77,7 +77,7 @@ diff --git a/develop/admin_api/room_membership.html b/develop/admin_api/room_membership.html index cbd5f1b3ce..e5b5937e96 100644 --- a/develop/admin_api/room_membership.html +++ b/develop/admin_api/room_membership.html @@ -77,7 +77,7 @@ diff --git a/develop/admin_api/rooms.html b/develop/admin_api/rooms.html index 488fb83f47..9611d6c497 100644 --- a/develop/admin_api/rooms.html +++ b/develop/admin_api/rooms.html @@ -77,7 +77,7 @@ @@ -1140,7 +1140,7 @@ that were deleted.

-
@@ -1152,7 +1152,7 @@ that were deleted.

- diff --git a/develop/admin_api/scheduled_tasks.html b/develop/admin_api/scheduled_tasks.html new file mode 100644 index 0000000000..9cffdba9e3 --- /dev/null +++ b/develop/admin_api/scheduled_tasks.html @@ -0,0 +1,259 @@ + + + + + + Scheduled tasks - Synapse + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ +
+ + + + + + + +
+
+ +
+ +
+ +

Show scheduled tasks

+

This API returns information about scheduled tasks.

+

To use it, you will need to authenticate by providing an access_token +for a server admin: see Admin API.

+

The api is:

+
GET /_synapse/admin/v1/scheduled_tasks
+
+

It returns a JSON body like the following:

+
{
+    "scheduled_tasks": [
+        {
+            "id": "GSA124oegf1",
+            "action": "shutdown_room",
+            "status": "complete",
+            "timestamp_ms": 23423523,
+            "resource_id": "!roomid",
+            "result": "some result",
+            "error": null
+        }
+      ]
+}
+
+

Query parameters:

+
    +
  • +

    action_name: string - Is optional. Returns only the scheduled tasks with the given action name.

    +
  • +
  • +

    resource_id: string - Is optional. Returns only the scheduled tasks with the given resource id.

    +
  • +
  • +

    status: string - Is optional. Returns only the scheduled tasks matching the given status, one of

    +
      +
    • "scheduled" - Task is scheduled but not active
    • +
    • "active" - Task is active and probably running, and if not will be run on next scheduler loop run
    • +
    • "complete" - Task has completed successfully
    • +
    • "failed" - Task is over and either returned a failed status, or had an exception
    • +
    +
  • +
  • +

    max_timestamp: int - Is optional. Returns only the scheduled tasks with a timestamp inferior to the specified one.

    +
  • +
+

Response

+

The following fields are returned in the JSON response body along with a 200 HTTP status code:

+
    +
  • id: string - ID of scheduled task.
  • +
  • action: string - The name of the scheduled task's action.
  • +
  • status: string - The status of the scheduled task.
  • +
  • timestamp_ms: integer - The timestamp (in milliseconds since the unix epoch) of the given task - If the status is "scheduled" then this represents when it should be launched. +Otherwise it represents the last time this task got a change of state.
  • +
  • resource_id: Optional string - The resource id of the scheduled task, if it possesses one
  • +
  • result: Optional Json - Any result of the scheduled task, if given
  • +
  • error: Optional string - If the task has the status "failed", the error associated with this failure
  • +
+ +
+ + +
+
+ + + +
+ + + + + + + + + + + + + + + diff --git a/develop/admin_api/server_notices.html b/develop/admin_api/server_notices.html index 8ab3b8a8d7..b06c9720db 100644 --- a/develop/admin_api/server_notices.html +++ b/develop/admin_api/server_notices.html @@ -77,7 +77,7 @@ @@ -195,7 +195,7 @@ can be used. See the server notices documentati