jellyfin.generated.api_10_10.ScheduledTasksApi
All URIs are relative to http://localhost
Method | HTTP request | Description |
---|---|---|
get_task | GET /ScheduledTasks/{taskId} | Get task by id. |
get_tasks | GET /ScheduledTasks | Get tasks. |
start_task | POST /ScheduledTasks/Running/{taskId} | Start specified task. |
stop_task | DELETE /ScheduledTasks/Running/{taskId} | Stop specified task. |
update_task | POST /ScheduledTasks/{taskId}/Triggers | Update specified task triggers. |
get_task
TaskInfo get_task(task_id)
Get task by id.
Example
- Api Key Authentication (CustomAuthentication):
import jellyfin.generated.api_10_10
from jellyfin.generated.api_10_10 import ApiClient, Configuration
from jellyfin.generated.api_10_10.models.task_info import TaskInfo
from jellyfin.generated.api_10_10.rest import ApiException
from pprint import pprint
# Defining the host is optional and defaults to http://localhost
# See configuration.py for a list of all supported configuration parameters.
configuration = Configuration(
host = "http://localhost"
)
# Configure API key authorization: CustomAuthentication
configuration.api_key['CustomAuthentication'] = f'Token="{os.getenv("API_KEY")}"'
configuration.api_key_prefix['CustomAuthentication'] = "MediaBrowser"
# Enter a context with an instance of the API client
with ApiClient(configuration) as api_client:
# Create an instance of the API class
api_instance = jellyfin.generated.api_10_10.ScheduledTasksApi(api_client)
task_id = 'task_id_example' # str | Task Id.
try:
# Get task by id.
api_response = api_instance.get_task(task_id)
print("The response of ScheduledTasksApi->get_task:\n")
pprint(api_response)
except Exception as e:
print("Exception when calling ScheduledTasksApi->get_task: %s\n" % e)
Parameters
Name | Type | Description | Notes |
---|---|---|---|
task_id | str | Task Id. |
Return type
Authorization
HTTP request headers
- Content-Type: Not defined
- Accept: application/json, application/json; profile="CamelCase", application/json; profile="PascalCase"
HTTP response details
Status code | Description | Response headers |
---|---|---|
200 | Task retrieved. | - |
401 | Unauthorized | - |
403 | Forbidden | - |
404 | Task not found. | - |
[Back to top] [Back to API list] [Back to Model list] [Back to README]
get_tasks
List[TaskInfo] get_tasks(is_hidden=is_hidden, is_enabled=is_enabled)
Get tasks.
Example
- Api Key Authentication (CustomAuthentication):
import jellyfin.generated.api_10_10
from jellyfin.generated.api_10_10 import ApiClient, Configuration
from jellyfin.generated.api_10_10.models.task_info import TaskInfo
from jellyfin.generated.api_10_10.rest import ApiException
from pprint import pprint
# Defining the host is optional and defaults to http://localhost
# See configuration.py for a list of all supported configuration parameters.
configuration = Configuration(
host = "http://localhost"
)
# Configure API key authorization: CustomAuthentication
configuration.api_key['CustomAuthentication'] = f'Token="{os.getenv("API_KEY")}"'
configuration.api_key_prefix['CustomAuthentication'] = "MediaBrowser"
# Enter a context with an instance of the API client
with ApiClient(configuration) as api_client:
# Create an instance of the API class
api_instance = jellyfin.generated.api_10_10.ScheduledTasksApi(api_client)
is_hidden = True # bool | Optional filter tasks that are hidden, or not. (optional)
is_enabled = True # bool | Optional filter tasks that are enabled, or not. (optional)
try:
# Get tasks.
api_response = api_instance.get_tasks(is_hidden=is_hidden, is_enabled=is_enabled)
print("The response of ScheduledTasksApi->get_tasks:\n")
pprint(api_response)
except Exception as e:
print("Exception when calling ScheduledTasksApi->get_tasks: %s\n" % e)
Parameters
Name | Type | Description | Notes |
---|---|---|---|
is_hidden | bool | Optional filter tasks that are hidden, or not. | [optional] |
is_enabled | bool | Optional filter tasks that are enabled, or not. | [optional] |
Return type
Authorization
HTTP request headers
- Content-Type: Not defined
- Accept: application/json, application/json; profile="CamelCase", application/json; profile="PascalCase"
HTTP response details
Status code | Description | Response headers |
---|---|---|
200 | Scheduled tasks retrieved. | - |
401 | Unauthorized | - |
403 | Forbidden | - |
[Back to top] [Back to API list] [Back to Model list] [Back to README]
start_task
start_task(task_id)
Start specified task.
Example
- Api Key Authentication (CustomAuthentication):
import jellyfin.generated.api_10_10
from jellyfin.generated.api_10_10 import ApiClient, Configuration
from jellyfin.generated.api_10_10.rest import ApiException
from pprint import pprint
# Defining the host is optional and defaults to http://localhost
# See configuration.py for a list of all supported configuration parameters.
configuration = Configuration(
host = "http://localhost"
)
# Configure API key authorization: CustomAuthentication
configuration.api_key['CustomAuthentication'] = f'Token="{os.getenv("API_KEY")}"'
configuration.api_key_prefix['CustomAuthentication'] = "MediaBrowser"
# Enter a context with an instance of the API client
with ApiClient(configuration) as api_client:
# Create an instance of the API class
api_instance = jellyfin.generated.api_10_10.ScheduledTasksApi(api_client)
task_id = 'task_id_example' # str | Task Id.
try:
# Start specified task.
api_instance.start_task(task_id)
except Exception as e:
print("Exception when calling ScheduledTasksApi->start_task: %s\n" % e)
Parameters
Name | Type | Description | Notes |
---|---|---|---|
task_id | str | Task Id. |
Return type
void (empty response body)
Authorization
HTTP request headers
- Content-Type: Not defined
- Accept: application/json, application/json; profile="CamelCase", application/json; profile="PascalCase"
HTTP response details
Status code | Description | Response headers |
---|---|---|
204 | Task started. | - |
401 | Unauthorized | - |
403 | Forbidden | - |
404 | Task not found. | - |
[Back to top] [Back to API list] [Back to Model list] [Back to README]
stop_task
stop_task(task_id)
Stop specified task.
Example
- Api Key Authentication (CustomAuthentication):
import jellyfin.generated.api_10_10
from jellyfin.generated.api_10_10 import ApiClient, Configuration
from jellyfin.generated.api_10_10.rest import ApiException
from pprint import pprint
# Defining the host is optional and defaults to http://localhost
# See configuration.py for a list of all supported configuration parameters.
configuration = Configuration(
host = "http://localhost"
)
# Configure API key authorization: CustomAuthentication
configuration.api_key['CustomAuthentication'] = f'Token="{os.getenv("API_KEY")}"'
configuration.api_key_prefix['CustomAuthentication'] = "MediaBrowser"
# Enter a context with an instance of the API client
with ApiClient(configuration) as api_client:
# Create an instance of the API class
api_instance = jellyfin.generated.api_10_10.ScheduledTasksApi(api_client)
task_id = 'task_id_example' # str | Task Id.
try:
# Stop specified task.
api_instance.stop_task(task_id)
except Exception as e:
print("Exception when calling ScheduledTasksApi->stop_task: %s\n" % e)
Parameters
Name | Type | Description | Notes |
---|---|---|---|
task_id | str | Task Id. |
Return type
void (empty response body)
Authorization
HTTP request headers
- Content-Type: Not defined
- Accept: application/json, application/json; profile="CamelCase", application/json; profile="PascalCase"
HTTP response details
Status code | Description | Response headers |
---|---|---|
204 | Task stopped. | - |
401 | Unauthorized | - |
403 | Forbidden | - |
404 | Task not found. | - |
[Back to top] [Back to API list] [Back to Model list] [Back to README]
update_task
update_task(task_id, task_trigger_info)
Update specified task triggers.
Example
- Api Key Authentication (CustomAuthentication):
import jellyfin.generated.api_10_10
from jellyfin.generated.api_10_10 import ApiClient, Configuration
from jellyfin.generated.api_10_10.models.task_trigger_info import TaskTriggerInfo
from jellyfin.generated.api_10_10.rest import ApiException
from pprint import pprint
# Defining the host is optional and defaults to http://localhost
# See configuration.py for a list of all supported configuration parameters.
configuration = Configuration(
host = "http://localhost"
)
# Configure API key authorization: CustomAuthentication
configuration.api_key['CustomAuthentication'] = f'Token="{os.getenv("API_KEY")}"'
configuration.api_key_prefix['CustomAuthentication'] = "MediaBrowser"
# Enter a context with an instance of the API client
with ApiClient(configuration) as api_client:
# Create an instance of the API class
api_instance = jellyfin.generated.api_10_10.ScheduledTasksApi(api_client)
task_id = 'task_id_example' # str | Task Id.
task_trigger_info = [jellyfin.generated.api_10_10.TaskTriggerInfo()] # List[TaskTriggerInfo] | Triggers.
try:
# Update specified task triggers.
api_instance.update_task(task_id, task_trigger_info)
except Exception as e:
print("Exception when calling ScheduledTasksApi->update_task: %s\n" % e)
Parameters
Name | Type | Description | Notes |
---|---|---|---|
task_id | str | Task Id. | |
task_trigger_info | List[TaskTriggerInfo] | Triggers. |
Return type
void (empty response body)
Authorization
HTTP request headers
- Content-Type: application/json, text/json, application/*+json
- Accept: application/json, application/json; profile="CamelCase", application/json; profile="PascalCase"
HTTP response details
Status code | Description | Response headers |
---|---|---|
204 | Task triggers updated. | - |
401 | Unauthorized | - |
403 | Forbidden | - |
404 | Task not found. | - |
[Back to top] [Back to API list] [Back to Model list] [Back to README]