Skip to content

Latest commit

 

History

History
358 lines (254 loc) · 11.5 KB

File metadata and controls

358 lines (254 loc) · 11.5 KB

fastreport_cloud_sdk.GroupUsersApi

All URIs are relative to http://localhost

Method HTTP request Description
group_users_add_user_to_group PUT /api/manage/v1/Groups/{id}/Users/{userId} Add user to the group by identifier
group_users_get_users_in_group GET /api/manage/v1/Groups/{id}/Users Returns users in the group by identifier
group_users_leave_from_group DELETE /api/manage/v1/Groups/{id}/leave Leave from the group
group_users_remove_from_group DELETE /api/manage/v1/Groups/{id}/Users/{userId} Remove user from the group by identifier

group_users_add_user_to_group

group_users_add_user_to_group(id, user_id)

Add user to the group by identifier

Example

  • Basic Authentication (ApiKey):
  • Bearer (JWT) Authentication (JWT):
import fastreport_cloud_sdk
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.GroupUsersApi(api_client)
    id = 'id_example' # str | Identifier of group
    user_id = 'user_id_example' # str | Identifier of user

    try:
        # Add user to the group by identifier
        api_instance.group_users_add_user_to_group(id, user_id)
    except Exception as e:
        print("Exception when calling GroupUsersApi->group_users_add_user_to_group: %s\n" % e)

Parameters

Name Type Description Notes
id str Identifier of group
user_id str Identifier of user

Return type

void (empty response body)

Authorization

ApiKey, JWT

HTTP request headers

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

HTTP response details

Status code Description Response headers
204 Succesfully retured -
400 The request is wrong -
402 subscription is outdated -
403 You don't have permissions for the operation -
404 Group with this identifier, subscription or user is not found -

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

group_users_get_users_in_group

GroupUsersVM group_users_get_users_in_group(id, skip=skip, take=take)

Returns users in the group by identifier

Example

  • Basic Authentication (ApiKey):
  • Bearer (JWT) Authentication (JWT):
import fastreport_cloud_sdk
from fastreport_cloud_sdk.models.group_users_vm import GroupUsersVM
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.GroupUsersApi(api_client)
    id = 'id_example' # str | Identifier of group
    skip = 0 # int | how many to skip (optional) (default to 0)
    take = 10 # int | how many to take (optional) (default to 10)

    try:
        # Returns users in the group by identifier
        api_response = api_instance.group_users_get_users_in_group(id, skip=skip, take=take)
        print("The response of GroupUsersApi->group_users_get_users_in_group:\n")
        pprint(api_response)
    except Exception as e:
        print("Exception when calling GroupUsersApi->group_users_get_users_in_group: %s\n" % e)

Parameters

Name Type Description Notes
id str Identifier of group
skip int how many to skip [optional] [default to 0]
take int how many to take [optional] [default to 10]

Return type

GroupUsersVM

Authorization

ApiKey, JWT

HTTP request headers

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

HTTP response details

Status code Description Response headers
200 Succesfully retured -
400 The request is wrong -
402 Subscription is outdated -
403 You don't have permissions for the operation -
404 Group with this identifier or subscription is not found -

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

group_users_leave_from_group

group_users_leave_from_group(id)

Leave from the group

Example

  • Basic Authentication (ApiKey):
  • Bearer (JWT) Authentication (JWT):
import fastreport_cloud_sdk
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.GroupUsersApi(api_client)
    id = 'id_example' # str | Identifier of group

    try:
        # Leave from the group
        api_instance.group_users_leave_from_group(id)
    except Exception as e:
        print("Exception when calling GroupUsersApi->group_users_leave_from_group: %s\n" % e)

Parameters

Name Type Description Notes
id str Identifier of group

Return type

void (empty response body)

Authorization

ApiKey, JWT

HTTP request headers

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

HTTP response details

Status code Description Response headers
204 Succesfully removed -
400 The request is wrong -
402 subscription is outdated -
404 Group with this identifier or subscription is not found -

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

group_users_remove_from_group

group_users_remove_from_group(id, user_id)

Remove user from the group by identifier

Example

  • Basic Authentication (ApiKey):
  • Bearer (JWT) Authentication (JWT):
import fastreport_cloud_sdk
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.GroupUsersApi(api_client)
    id = 'id_example' # str | Identifier of group
    user_id = 'user_id_example' # str | Identifier of user

    try:
        # Remove user from the group by identifier
        api_instance.group_users_remove_from_group(id, user_id)
    except Exception as e:
        print("Exception when calling GroupUsersApi->group_users_remove_from_group: %s\n" % e)

Parameters

Name Type Description Notes
id str Identifier of group
user_id str Identifier of user

Return type

void (empty response body)

Authorization

ApiKey, JWT

HTTP request headers

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

HTTP response details

Status code Description Response headers
204 Succesfully removed -
400 The request is wrong -
402 subscription is outdated -
403 You don't have permissions for the operation -
404 Group with this identifier, subscription or user is not found -

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