jellyfin.generated.api_10_10.EnvironmentApi

All URIs are relative to http://localhost

Method HTTP request Description
get_default_directory_browser GET /Environment/DefaultDirectoryBrowser Get Default directory browser.
get_directory_contents GET /Environment/DirectoryContents Gets the contents of a given directory in the file system.
get_drives GET /Environment/Drives Gets available drives from the server's file system.
get_network_shares GET /Environment/NetworkShares Gets network paths.
get_parent_path GET /Environment/ParentPath Gets the parent path of a given path.
validate_path POST /Environment/ValidatePath Validates path.

get_default_directory_browser

DefaultDirectoryBrowserInfoDto get_default_directory_browser()

Get Default directory browser.

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.default_directory_browser_info_dto import DefaultDirectoryBrowserInfoDto
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.EnvironmentApi(api_client)

    try:
        # Get Default directory browser.
        api_response = api_instance.get_default_directory_browser()
        print("The response of EnvironmentApi->get_default_directory_browser:\n")
        pprint(api_response)
    except Exception as e:
        print("Exception when calling EnvironmentApi->get_default_directory_browser: %s\n" % e)

Parameters

This endpoint does not need any parameter.

Return type

DefaultDirectoryBrowserInfoDto

Authorization

CustomAuthentication

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 Default directory browser returned. -
401 Unauthorized -
403 Forbidden -

[Back to top] [Back to API list] [Back to Model list] [Back to README]

get_directory_contents

List[FileSystemEntryInfo] get_directory_contents(path, include_files=include_files, include_directories=include_directories)

Gets the contents of a given directory in the file system.

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.file_system_entry_info import FileSystemEntryInfo
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.EnvironmentApi(api_client)
    path = 'path_example' # str | The path.
    include_files = False # bool | An optional filter to include or exclude files from the results. true/false. (optional) (default to False)
    include_directories = False # bool | An optional filter to include or exclude folders from the results. true/false. (optional) (default to False)

    try:
        # Gets the contents of a given directory in the file system.
        api_response = api_instance.get_directory_contents(path, include_files=include_files, include_directories=include_directories)
        print("The response of EnvironmentApi->get_directory_contents:\n")
        pprint(api_response)
    except Exception as e:
        print("Exception when calling EnvironmentApi->get_directory_contents: %s\n" % e)

Parameters

Name Type Description Notes
path str The path.
include_files bool An optional filter to include or exclude files from the results. true/false. [optional] [default to False]
include_directories bool An optional filter to include or exclude folders from the results. true/false. [optional] [default to False]

Return type

List[FileSystemEntryInfo]

Authorization

CustomAuthentication

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 Directory contents returned. -
401 Unauthorized -
403 Forbidden -

[Back to top] [Back to API list] [Back to Model list] [Back to README]

get_drives

List[FileSystemEntryInfo] get_drives()

Gets available drives from the server's file system.

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.file_system_entry_info import FileSystemEntryInfo
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.EnvironmentApi(api_client)

    try:
        # Gets available drives from the server's file system.
        api_response = api_instance.get_drives()
        print("The response of EnvironmentApi->get_drives:\n")
        pprint(api_response)
    except Exception as e:
        print("Exception when calling EnvironmentApi->get_drives: %s\n" % e)

Parameters

This endpoint does not need any parameter.

Return type

List[FileSystemEntryInfo]

Authorization

CustomAuthentication

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 List of entries returned. -
401 Unauthorized -
403 Forbidden -

[Back to top] [Back to API list] [Back to Model list] [Back to README]

get_network_shares

List[FileSystemEntryInfo] get_network_shares()

Gets network paths.

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.file_system_entry_info import FileSystemEntryInfo
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.EnvironmentApi(api_client)

    try:
        # Gets network paths.
        api_response = api_instance.get_network_shares()
        print("The response of EnvironmentApi->get_network_shares:\n")
        pprint(api_response)
    except Exception as e:
        print("Exception when calling EnvironmentApi->get_network_shares: %s\n" % e)

Parameters

This endpoint does not need any parameter.

Return type

List[FileSystemEntryInfo]

Authorization

CustomAuthentication

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 Empty array returned. -
401 Unauthorized -
403 Forbidden -

[Back to top] [Back to API list] [Back to Model list] [Back to README]

get_parent_path

str get_parent_path(path)

Gets the parent path of a given path.

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.EnvironmentApi(api_client)
    path = 'path_example' # str | The path.

    try:
        # Gets the parent path of a given path.
        api_response = api_instance.get_parent_path(path)
        print("The response of EnvironmentApi->get_parent_path:\n")
        pprint(api_response)
    except Exception as e:
        print("Exception when calling EnvironmentApi->get_parent_path: %s\n" % e)

Parameters

Name Type Description Notes
path str The path.

Return type

str

Authorization

CustomAuthentication

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 Success -
401 Unauthorized -
403 Forbidden -

[Back to top] [Back to API list] [Back to Model list] [Back to README]

validate_path

validate_path(validate_path_dto)

Validates path.

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.validate_path_dto import ValidatePathDto
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.EnvironmentApi(api_client)
    validate_path_dto = jellyfin.generated.api_10_10.ValidatePathDto() # ValidatePathDto | Validate request object.

    try:
        # Validates path.
        api_instance.validate_path(validate_path_dto)
    except Exception as e:
        print("Exception when calling EnvironmentApi->validate_path: %s\n" % e)

Parameters

Name Type Description Notes
validate_path_dto ValidatePathDto Validate request object.

Return type

void (empty response body)

Authorization

CustomAuthentication

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 Path validated. -
401 Unauthorized -
403 Forbidden -
404 Path not found. -

[Back to top] [Back to API list] [Back to Model list] [Back to README]