Skip to content

Latest commit

 

History

History
259 lines (181 loc) · 8.72 KB

File metadata and controls

259 lines (181 loc) · 8.72 KB

fastreport_cloud_sdk.UserSettingsApi

All URIs are relative to http://localhost

Method HTTP request Description
user_settings_accept_agreements POST /api/manage/v1/UserSettings/accept Use this endpoint to accept current version of service license agreement
user_settings_get_current_user_settings GET /api/manage/v1/UserSettings Return current user settings.
user_settings_update_my_settings PUT /api/manage/v1/UserSettings Update settings of the current user

user_settings_accept_agreements

user_settings_accept_agreements(accept_agreements_vm=accept_agreements_vm)

Use this endpoint to accept current version of service license agreement

Example

  • Basic Authentication (ApiKey):
  • Bearer (JWT) Authentication (JWT):
import fastreport_cloud_sdk
from fastreport_cloud_sdk.models.accept_agreements_vm import AcceptAgreementsVM
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.UserSettingsApi(api_client)
    accept_agreements_vm = fastreport_cloud_sdk.AcceptAgreementsVM() # AcceptAgreementsVM |  (optional)

    try:
        # Use this endpoint to accept current version of service license agreement
        api_instance.user_settings_accept_agreements(accept_agreements_vm=accept_agreements_vm)
    except Exception as e:
        print("Exception when calling UserSettingsApi->user_settings_accept_agreements: %s\n" % e)

Parameters

Name Type Description Notes
accept_agreements_vm AcceptAgreementsVM [optional]

Return type

void (empty response body)

Authorization

ApiKey, JWT

HTTP request headers

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

HTTP response details

Status code Description Response headers
204 No Content -

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

user_settings_get_current_user_settings

UserSettingsVM user_settings_get_current_user_settings()

Return current user settings.

Example

  • Basic Authentication (ApiKey):
  • Bearer (JWT) Authentication (JWT):
import fastreport_cloud_sdk
from fastreport_cloud_sdk.models.user_settings_vm import UserSettingsVM
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.UserSettingsApi(api_client)

    try:
        # Return current user settings.
        api_response = api_instance.user_settings_get_current_user_settings()
        print("The response of UserSettingsApi->user_settings_get_current_user_settings:\n")
        pprint(api_response)
    except Exception as e:
        print("Exception when calling UserSettingsApi->user_settings_get_current_user_settings: %s\n" % e)

Parameters

This endpoint does not need any parameter.

Return type

UserSettingsVM

Authorization

ApiKey, JWT

HTTP request headers

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

HTTP response details

Status code Description Response headers
200 Succesfully returned -
400 Current user is null -
404 User not found -

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

user_settings_update_my_settings

UserSettingsVM user_settings_update_my_settings(update_user_settings_vm=update_user_settings_vm)

Update settings of the current user

Example

  • Basic Authentication (ApiKey):
  • Bearer (JWT) Authentication (JWT):
import fastreport_cloud_sdk
from fastreport_cloud_sdk.models.update_user_settings_vm import UpdateUserSettingsVM
from fastreport_cloud_sdk.models.user_settings_vm import UserSettingsVM
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.UserSettingsApi(api_client)
    update_user_settings_vm = fastreport_cloud_sdk.UpdateUserSettingsVM() # UpdateUserSettingsVM |  (optional)

    try:
        # Update settings of the current user
        api_response = api_instance.user_settings_update_my_settings(update_user_settings_vm=update_user_settings_vm)
        print("The response of UserSettingsApi->user_settings_update_my_settings:\n")
        pprint(api_response)
    except Exception as e:
        print("Exception when calling UserSettingsApi->user_settings_update_my_settings: %s\n" % e)

Parameters

Name Type Description Notes
update_user_settings_vm UpdateUserSettingsVM [optional]

Return type

UserSettingsVM

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
200 Succesfully updated -
400 The request is wrong -
403 You have no permission for this action -

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