Skip to content

Latest commit

 

History

History
752 lines (499 loc) · 23.3 KB

NotificationApi.md

File metadata and controls

752 lines (499 loc) · 23.3 KB

sonarr.NotificationApi

All URIs are relative to http://localhost:8989

Method HTTP request Description
create_notification POST /api/v3/notification
create_notification_action_by_name POST /api/v3/notification/action/{name}
delete_notification DELETE /api/v3/notification/{id}
get_notification_by_id GET /api/v3/notification/{id}
list_notification GET /api/v3/notification
list_notification_schema GET /api/v3/notification/schema
test_notification POST /api/v3/notification/test
testall_notification POST /api/v3/notification/testall
update_notification PUT /api/v3/notification/{id}

create_notification

NotificationResource create_notification(force_save=force_save, notification_resource=notification_resource)

Example

  • Api Key Authentication (apikey):
  • Api Key Authentication (X-Api-Key):
import sonarr
from sonarr.models.notification_resource import NotificationResource
from sonarr.rest import ApiException
from pprint import pprint

# Defining the host is optional and defaults to http://localhost:8989
# See configuration.py for a list of all supported configuration parameters.
configuration = sonarr.Configuration(
    host = "http://localhost:8989"
)

# The client must configure the authentication and authorization parameters
# in accordance with the API server security policy.
# Examples for each auth method are provided below, use the example that
# satisfies your auth use case.

# Configure API key authorization: apikey
configuration.api_key['apikey'] = os.environ["API_KEY"]

# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
# configuration.api_key_prefix['apikey'] = 'Bearer'

# Configure API key authorization: X-Api-Key
configuration.api_key['X-Api-Key'] = os.environ["API_KEY"]

# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
# configuration.api_key_prefix['X-Api-Key'] = 'Bearer'

# Enter a context with an instance of the API client
with sonarr.ApiClient(configuration) as api_client:
    # Create an instance of the API class
    api_instance = sonarr.NotificationApi(api_client)
    force_save = False # bool |  (optional) (default to False)
    notification_resource = sonarr.NotificationResource() # NotificationResource |  (optional)

    try:
        api_response = api_instance.create_notification(force_save=force_save, notification_resource=notification_resource)
        print("The response of NotificationApi->create_notification:\n")
        pprint(api_response)
    except Exception as e:
        print("Exception when calling NotificationApi->create_notification: %s\n" % e)

Parameters

Name Type Description Notes
force_save bool [optional] [default to False]
notification_resource NotificationResource [optional]

Return type

NotificationResource

Authorization

apikey, X-Api-Key

HTTP request headers

  • Content-Type: application/json
  • Accept: application/json

HTTP response details

Status code Description Response headers
2XX OK -

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

create_notification_action_by_name

create_notification_action_by_name(name, notification_resource=notification_resource)

Example

  • Api Key Authentication (apikey):
  • Api Key Authentication (X-Api-Key):
import sonarr
from sonarr.models.notification_resource import NotificationResource
from sonarr.rest import ApiException
from pprint import pprint

# Defining the host is optional and defaults to http://localhost:8989
# See configuration.py for a list of all supported configuration parameters.
configuration = sonarr.Configuration(
    host = "http://localhost:8989"
)

# The client must configure the authentication and authorization parameters
# in accordance with the API server security policy.
# Examples for each auth method are provided below, use the example that
# satisfies your auth use case.

# Configure API key authorization: apikey
configuration.api_key['apikey'] = os.environ["API_KEY"]

# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
# configuration.api_key_prefix['apikey'] = 'Bearer'

# Configure API key authorization: X-Api-Key
configuration.api_key['X-Api-Key'] = os.environ["API_KEY"]

# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
# configuration.api_key_prefix['X-Api-Key'] = 'Bearer'

# Enter a context with an instance of the API client
with sonarr.ApiClient(configuration) as api_client:
    # Create an instance of the API class
    api_instance = sonarr.NotificationApi(api_client)
    name = 'name_example' # str | 
    notification_resource = sonarr.NotificationResource() # NotificationResource |  (optional)

    try:
        api_instance.create_notification_action_by_name(name, notification_resource=notification_resource)
    except Exception as e:
        print("Exception when calling NotificationApi->create_notification_action_by_name: %s\n" % e)

Parameters

Name Type Description Notes
name str
notification_resource NotificationResource [optional]

Return type

void (empty response body)

Authorization

apikey, X-Api-Key

HTTP request headers

  • Content-Type: application/json
  • Accept: Not defined

HTTP response details

Status code Description Response headers
2XX OK -

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

delete_notification

delete_notification(id)

Example

  • Api Key Authentication (apikey):
  • Api Key Authentication (X-Api-Key):
import sonarr
from sonarr.rest import ApiException
from pprint import pprint

# Defining the host is optional and defaults to http://localhost:8989
# See configuration.py for a list of all supported configuration parameters.
configuration = sonarr.Configuration(
    host = "http://localhost:8989"
)

# The client must configure the authentication and authorization parameters
# in accordance with the API server security policy.
# Examples for each auth method are provided below, use the example that
# satisfies your auth use case.

# Configure API key authorization: apikey
configuration.api_key['apikey'] = os.environ["API_KEY"]

# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
# configuration.api_key_prefix['apikey'] = 'Bearer'

# Configure API key authorization: X-Api-Key
configuration.api_key['X-Api-Key'] = os.environ["API_KEY"]

# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
# configuration.api_key_prefix['X-Api-Key'] = 'Bearer'

# Enter a context with an instance of the API client
with sonarr.ApiClient(configuration) as api_client:
    # Create an instance of the API class
    api_instance = sonarr.NotificationApi(api_client)
    id = 56 # int | 

    try:
        api_instance.delete_notification(id)
    except Exception as e:
        print("Exception when calling NotificationApi->delete_notification: %s\n" % e)

Parameters

Name Type Description Notes
id int

Return type

void (empty response body)

Authorization

apikey, X-Api-Key

HTTP request headers

  • Content-Type: Not defined
  • Accept: Not defined

HTTP response details

Status code Description Response headers
2XX OK -

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

get_notification_by_id

NotificationResource get_notification_by_id(id)

Example

  • Api Key Authentication (apikey):
  • Api Key Authentication (X-Api-Key):
import sonarr
from sonarr.models.notification_resource import NotificationResource
from sonarr.rest import ApiException
from pprint import pprint

# Defining the host is optional and defaults to http://localhost:8989
# See configuration.py for a list of all supported configuration parameters.
configuration = sonarr.Configuration(
    host = "http://localhost:8989"
)

# The client must configure the authentication and authorization parameters
# in accordance with the API server security policy.
# Examples for each auth method are provided below, use the example that
# satisfies your auth use case.

# Configure API key authorization: apikey
configuration.api_key['apikey'] = os.environ["API_KEY"]

# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
# configuration.api_key_prefix['apikey'] = 'Bearer'

# Configure API key authorization: X-Api-Key
configuration.api_key['X-Api-Key'] = os.environ["API_KEY"]

# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
# configuration.api_key_prefix['X-Api-Key'] = 'Bearer'

# Enter a context with an instance of the API client
with sonarr.ApiClient(configuration) as api_client:
    # Create an instance of the API class
    api_instance = sonarr.NotificationApi(api_client)
    id = 56 # int | 

    try:
        api_response = api_instance.get_notification_by_id(id)
        print("The response of NotificationApi->get_notification_by_id:\n")
        pprint(api_response)
    except Exception as e:
        print("Exception when calling NotificationApi->get_notification_by_id: %s\n" % e)

Parameters

Name Type Description Notes
id int

Return type

NotificationResource

Authorization

apikey, X-Api-Key

HTTP request headers

  • Content-Type: Not defined
  • Accept: application/json

HTTP response details

Status code Description Response headers
2XX OK -

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

list_notification

List[NotificationResource] list_notification()

Example

  • Api Key Authentication (apikey):
  • Api Key Authentication (X-Api-Key):
import sonarr
from sonarr.models.notification_resource import NotificationResource
from sonarr.rest import ApiException
from pprint import pprint

# Defining the host is optional and defaults to http://localhost:8989
# See configuration.py for a list of all supported configuration parameters.
configuration = sonarr.Configuration(
    host = "http://localhost:8989"
)

# The client must configure the authentication and authorization parameters
# in accordance with the API server security policy.
# Examples for each auth method are provided below, use the example that
# satisfies your auth use case.

# Configure API key authorization: apikey
configuration.api_key['apikey'] = os.environ["API_KEY"]

# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
# configuration.api_key_prefix['apikey'] = 'Bearer'

# Configure API key authorization: X-Api-Key
configuration.api_key['X-Api-Key'] = os.environ["API_KEY"]

# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
# configuration.api_key_prefix['X-Api-Key'] = 'Bearer'

# Enter a context with an instance of the API client
with sonarr.ApiClient(configuration) as api_client:
    # Create an instance of the API class
    api_instance = sonarr.NotificationApi(api_client)

    try:
        api_response = api_instance.list_notification()
        print("The response of NotificationApi->list_notification:\n")
        pprint(api_response)
    except Exception as e:
        print("Exception when calling NotificationApi->list_notification: %s\n" % e)

Parameters

This endpoint does not need any parameter.

Return type

List[NotificationResource]

Authorization

apikey, X-Api-Key

HTTP request headers

  • Content-Type: Not defined
  • Accept: application/json

HTTP response details

Status code Description Response headers
2XX OK -

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

list_notification_schema

List[NotificationResource] list_notification_schema()

Example

  • Api Key Authentication (apikey):
  • Api Key Authentication (X-Api-Key):
import sonarr
from sonarr.models.notification_resource import NotificationResource
from sonarr.rest import ApiException
from pprint import pprint

# Defining the host is optional and defaults to http://localhost:8989
# See configuration.py for a list of all supported configuration parameters.
configuration = sonarr.Configuration(
    host = "http://localhost:8989"
)

# The client must configure the authentication and authorization parameters
# in accordance with the API server security policy.
# Examples for each auth method are provided below, use the example that
# satisfies your auth use case.

# Configure API key authorization: apikey
configuration.api_key['apikey'] = os.environ["API_KEY"]

# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
# configuration.api_key_prefix['apikey'] = 'Bearer'

# Configure API key authorization: X-Api-Key
configuration.api_key['X-Api-Key'] = os.environ["API_KEY"]

# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
# configuration.api_key_prefix['X-Api-Key'] = 'Bearer'

# Enter a context with an instance of the API client
with sonarr.ApiClient(configuration) as api_client:
    # Create an instance of the API class
    api_instance = sonarr.NotificationApi(api_client)

    try:
        api_response = api_instance.list_notification_schema()
        print("The response of NotificationApi->list_notification_schema:\n")
        pprint(api_response)
    except Exception as e:
        print("Exception when calling NotificationApi->list_notification_schema: %s\n" % e)

Parameters

This endpoint does not need any parameter.

Return type

List[NotificationResource]

Authorization

apikey, X-Api-Key

HTTP request headers

  • Content-Type: Not defined
  • Accept: application/json

HTTP response details

Status code Description Response headers
2XX OK -

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

test_notification

test_notification(force_test=force_test, notification_resource=notification_resource)

Example

  • Api Key Authentication (apikey):
  • Api Key Authentication (X-Api-Key):
import sonarr
from sonarr.models.notification_resource import NotificationResource
from sonarr.rest import ApiException
from pprint import pprint

# Defining the host is optional and defaults to http://localhost:8989
# See configuration.py for a list of all supported configuration parameters.
configuration = sonarr.Configuration(
    host = "http://localhost:8989"
)

# The client must configure the authentication and authorization parameters
# in accordance with the API server security policy.
# Examples for each auth method are provided below, use the example that
# satisfies your auth use case.

# Configure API key authorization: apikey
configuration.api_key['apikey'] = os.environ["API_KEY"]

# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
# configuration.api_key_prefix['apikey'] = 'Bearer'

# Configure API key authorization: X-Api-Key
configuration.api_key['X-Api-Key'] = os.environ["API_KEY"]

# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
# configuration.api_key_prefix['X-Api-Key'] = 'Bearer'

# Enter a context with an instance of the API client
with sonarr.ApiClient(configuration) as api_client:
    # Create an instance of the API class
    api_instance = sonarr.NotificationApi(api_client)
    force_test = False # bool |  (optional) (default to False)
    notification_resource = sonarr.NotificationResource() # NotificationResource |  (optional)

    try:
        api_instance.test_notification(force_test=force_test, notification_resource=notification_resource)
    except Exception as e:
        print("Exception when calling NotificationApi->test_notification: %s\n" % e)

Parameters

Name Type Description Notes
force_test bool [optional] [default to False]
notification_resource NotificationResource [optional]

Return type

void (empty response body)

Authorization

apikey, X-Api-Key

HTTP request headers

  • Content-Type: application/json
  • Accept: Not defined

HTTP response details

Status code Description Response headers
2XX OK -

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

testall_notification

testall_notification()

Example

  • Api Key Authentication (apikey):
  • Api Key Authentication (X-Api-Key):
import sonarr
from sonarr.rest import ApiException
from pprint import pprint

# Defining the host is optional and defaults to http://localhost:8989
# See configuration.py for a list of all supported configuration parameters.
configuration = sonarr.Configuration(
    host = "http://localhost:8989"
)

# The client must configure the authentication and authorization parameters
# in accordance with the API server security policy.
# Examples for each auth method are provided below, use the example that
# satisfies your auth use case.

# Configure API key authorization: apikey
configuration.api_key['apikey'] = os.environ["API_KEY"]

# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
# configuration.api_key_prefix['apikey'] = 'Bearer'

# Configure API key authorization: X-Api-Key
configuration.api_key['X-Api-Key'] = os.environ["API_KEY"]

# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
# configuration.api_key_prefix['X-Api-Key'] = 'Bearer'

# Enter a context with an instance of the API client
with sonarr.ApiClient(configuration) as api_client:
    # Create an instance of the API class
    api_instance = sonarr.NotificationApi(api_client)

    try:
        api_instance.testall_notification()
    except Exception as e:
        print("Exception when calling NotificationApi->testall_notification: %s\n" % e)

Parameters

This endpoint does not need any parameter.

Return type

void (empty response body)

Authorization

apikey, X-Api-Key

HTTP request headers

  • Content-Type: Not defined
  • Accept: Not defined

HTTP response details

Status code Description Response headers
2XX OK -

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

update_notification

NotificationResource update_notification(id, force_save=force_save, notification_resource=notification_resource)

Example

  • Api Key Authentication (apikey):
  • Api Key Authentication (X-Api-Key):
import sonarr
from sonarr.models.notification_resource import NotificationResource
from sonarr.rest import ApiException
from pprint import pprint

# Defining the host is optional and defaults to http://localhost:8989
# See configuration.py for a list of all supported configuration parameters.
configuration = sonarr.Configuration(
    host = "http://localhost:8989"
)

# The client must configure the authentication and authorization parameters
# in accordance with the API server security policy.
# Examples for each auth method are provided below, use the example that
# satisfies your auth use case.

# Configure API key authorization: apikey
configuration.api_key['apikey'] = os.environ["API_KEY"]

# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
# configuration.api_key_prefix['apikey'] = 'Bearer'

# Configure API key authorization: X-Api-Key
configuration.api_key['X-Api-Key'] = os.environ["API_KEY"]

# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
# configuration.api_key_prefix['X-Api-Key'] = 'Bearer'

# Enter a context with an instance of the API client
with sonarr.ApiClient(configuration) as api_client:
    # Create an instance of the API class
    api_instance = sonarr.NotificationApi(api_client)
    id = 56 # int | 
    force_save = False # bool |  (optional) (default to False)
    notification_resource = sonarr.NotificationResource() # NotificationResource |  (optional)

    try:
        api_response = api_instance.update_notification(id, force_save=force_save, notification_resource=notification_resource)
        print("The response of NotificationApi->update_notification:\n")
        pprint(api_response)
    except Exception as e:
        print("Exception when calling NotificationApi->update_notification: %s\n" % e)

Parameters

Name Type Description Notes
id int
force_save bool [optional] [default to False]
notification_resource NotificationResource [optional]

Return type

NotificationResource

Authorization

apikey, X-Api-Key

HTTP request headers

  • Content-Type: application/json
  • Accept: application/json

HTTP response details

Status code Description Response headers
2XX OK -

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