Skip to content

Latest commit

 

History

History
180 lines (126 loc) · 6.18 KB

File metadata and controls

180 lines (126 loc) · 6.18 KB

fastreport_cloud_sdk.UserNotificationsApi

All URIs are relative to http://localhost

Method HTTP request Description
user_notifications_clear_notifications DELETE /api/manage/v1/notifications Use this endpoint to "clear" your notifications
user_notifications_get_notifications GET /api/manage/v1/notifications Use this endpoint to recieve notifications

user_notifications_clear_notifications

user_notifications_clear_notifications(clear_notifications_vm=clear_notifications_vm)

Use this endpoint to "clear" your notifications

Example

  • Basic Authentication (ApiKey):
  • Bearer (JWT) Authentication (JWT):
import fastreport_cloud_sdk
from fastreport_cloud_sdk.models.clear_notifications_vm import ClearNotificationsVM
from fastreport_cloud_sdk.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 = fastreport_cloud_sdk.Configuration(
    host = "http://localhost"
)

# 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 HTTP basic authorization: ApiKey
configuration = fastreport_cloud_sdk.Configuration(
    username = os.environ["USERNAME"],
    password = os.environ["PASSWORD"]
)

# Configure Bearer authorization (JWT): JWT
configuration = fastreport_cloud_sdk.Configuration(
    access_token = os.environ["BEARER_TOKEN"]
)

# Enter a context with an instance of the API client
with fastreport_cloud_sdk.ApiClient(configuration) as api_client:
    # Create an instance of the API class
    api_instance = fastreport_cloud_sdk.UserNotificationsApi(api_client)
    clear_notifications_vm = fastreport_cloud_sdk.ClearNotificationsVM() # ClearNotificationsVM |  (optional)

    try:
        # Use this endpoint to \"clear\" your notifications
        api_instance.user_notifications_clear_notifications(clear_notifications_vm=clear_notifications_vm)
    except Exception as e:
        print("Exception when calling UserNotificationsApi->user_notifications_clear_notifications: %s\n" % e)

Parameters

Name Type Description Notes
clear_notifications_vm ClearNotificationsVM [optional]

Return type

void (empty response body)

Authorization

ApiKey, JWT

HTTP request headers

  • Content-Type: application/json, text/json, application/*+json
  • Accept: application/json

HTTP response details

Status code Description Response headers
204 Notifications are cleared -
400 Bad VM -
404 User is not found -

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

user_notifications_get_notifications

AuditActionsVM user_notifications_get_notifications(skip=skip, take=take, subscription_id=subscription_id)

Use this endpoint to recieve notifications

Example

  • Basic Authentication (ApiKey):
  • Bearer (JWT) Authentication (JWT):
import fastreport_cloud_sdk
from fastreport_cloud_sdk.models.audit_actions_vm import AuditActionsVM
from fastreport_cloud_sdk.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 = fastreport_cloud_sdk.Configuration(
    host = "http://localhost"
)

# 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 HTTP basic authorization: ApiKey
configuration = fastreport_cloud_sdk.Configuration(
    username = os.environ["USERNAME"],
    password = os.environ["PASSWORD"]
)

# Configure Bearer authorization (JWT): JWT
configuration = fastreport_cloud_sdk.Configuration(
    access_token = os.environ["BEARER_TOKEN"]
)

# Enter a context with an instance of the API client
with fastreport_cloud_sdk.ApiClient(configuration) as api_client:
    # Create an instance of the API class
    api_instance = fastreport_cloud_sdk.UserNotificationsApi(api_client)
    skip = 0 # int |  (optional) (default to 0)
    take = 5 # int |  (optional) (default to 5)
    subscription_id = '' # str |  (optional) (default to '')

    try:
        # Use this endpoint to recieve notifications
        api_response = api_instance.user_notifications_get_notifications(skip=skip, take=take, subscription_id=subscription_id)
        print("The response of UserNotificationsApi->user_notifications_get_notifications:\n")
        pprint(api_response)
    except Exception as e:
        print("Exception when calling UserNotificationsApi->user_notifications_get_notifications: %s\n" % e)

Parameters

Name Type Description Notes
skip int [optional] [default to 0]
take int [optional] [default to 5]
subscription_id str [optional] [default to '']

Return type

AuditActionsVM

Authorization

ApiKey, JWT

HTTP request headers

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

HTTP response details

Status code Description Response headers
200 Notifications are getted -

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