{% extends "base.html" %} {% block title %}API Tokens - Job Scheduler{% endblock %} {% block content %}
| Name | Token | Created | Expires | Actions |
|---|---|---|---|---|
| Loading... | ||||
Authenticate requests using the header: Authorization: Bearer <your_token>
Public endpoint to check server status. No auth required.
Returns {"status": "ok", "timestamp": "..."}
Retrieve the public key to encrypt passwords.
Returns: {"publicKey": "..."}
Authenticate with username and password.
{
"username": "admin",
"password": "password"
}
Returns: {"status": "ok", "token": "...", "userId": 1}
Get overall system execution stats.
Returns: {"tasks": 10, "total": 100, "running": 1, "success": 90, "failed": 9}
Create a new task or update an existing one.
id (int): Task ID. Use -1 or omit for a new task.JSON serialized Task object.
Enable or disable a specific task.
id (int): Task IDenabled (bool): true or falseManually trigger a full task execution immediately.
id (int): Task IDPermanently delete a task from the system.
id (int): Task IDManually trigger a single specific job.
id (int): Job IDRetrieve the text log output of an execution.
id (int): Execution IDReturns: {"content": "log text"}
Download the execution log file as an attachment.
id (int): Execution IDAttempt to kill a running execution process (sending SIGTERM/SIGKILL).
id (int): Execution IDCancel an execution if running, then delete the record and its log file.
id (int): Execution IDCreate a new user in the system.
JSON serialized User object including password (plain text, will be hashed server-side).
Update a user's password.
{
"userId": 1,
"password": "new_password"
}
Delete a user from the system.
{
"userId": 1
}
Create a new API token for the current user.
{
"name": "My Token",
"expiresAt": 1700000000000
}
expiresAt is optional and specified in milliseconds since epoch.
Returns: {"status": "ok", "token": "..."}
Revoke and delete an API token.
{
"tokenId": 123
}