# cvat_sdk.MembershipsApi All URIs are relative to *http://localhost* Method | HTTP request | Description ------------- | ------------- | ------------- [**memberships_destroy**](MembershipsApi.md#memberships_destroy) | **DELETE** /api/memberships/{id} | Method deletes a membership [**memberships_list**](MembershipsApi.md#memberships_list) | **GET** /api/memberships | Method returns a paginated list of memberships according to query parameters [**memberships_partial_update**](MembershipsApi.md#memberships_partial_update) | **PATCH** /api/memberships/{id} | Methods does a partial update of chosen fields in a membership [**memberships_retrieve**](MembershipsApi.md#memberships_retrieve) | **GET** /api/memberships/{id} | Method returns details of a membership # **memberships_destroy** > memberships_destroy(id) Method deletes a membership ### Example * Api Key Authentication (SignatureAuthentication): * Basic Authentication (basicAuth): * Api Key Authentication (cookieAuth): * Api Key Authentication (tokenAuth): ```python import time import cvat_sdk from cvat_sdk.api import memberships_api 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 = cvat_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 API key authorization: SignatureAuthentication configuration.api_key['SignatureAuthentication'] = 'YOUR_API_KEY' # Uncomment below to setup prefix (e.g. Bearer) for API key, if needed # configuration.api_key_prefix['SignatureAuthentication'] = 'Bearer' # Configure HTTP basic authorization: basicAuth configuration = cvat_sdk.Configuration( username = 'YOUR_USERNAME', password = 'YOUR_PASSWORD' ) # Configure API key authorization: cookieAuth configuration.api_key['cookieAuth'] = 'YOUR_API_KEY' # Uncomment below to setup prefix (e.g. Bearer) for API key, if needed # configuration.api_key_prefix['cookieAuth'] = 'Bearer' # Configure API key authorization: tokenAuth configuration.api_key['tokenAuth'] = 'YOUR_API_KEY' # Uncomment below to setup prefix (e.g. Bearer) for API key, if needed # configuration.api_key_prefix['tokenAuth'] = 'Bearer' # Enter a context with an instance of the API client with cvat_sdk.ApiClient(configuration) as api_client: # Create an instance of the API class api_instance = memberships_api.MembershipsApi(api_client) id = 1 # int | A unique integer value identifying this membership. x_organization = "X-Organization_example" # str | (optional) org = "org_example" # str | Organization unique slug (optional) org_id = 1 # int | Organization identifier (optional) # example passing only required values which don't have defaults set try: # Method deletes a membership api_instance.memberships_destroy(id) except cvat_sdk.ApiException as e: print("Exception when calling MembershipsApi->memberships_destroy: %s\n" % e) # example passing only required values which don't have defaults set # and optional values try: # Method deletes a membership api_instance.memberships_destroy(id, x_organization=x_organization, org=org, org_id=org_id) except cvat_sdk.ApiException as e: print("Exception when calling MembershipsApi->memberships_destroy: %s\n" % e) ``` ### Parameters Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- **id** | **int**| A unique integer value identifying this membership. | **x_organization** | **str**| | [optional] **org** | **str**| Organization unique slug | [optional] **org_id** | **int**| Organization identifier | [optional] ### Return type void (empty response body) ### Authorization [SignatureAuthentication](../README.md#SignatureAuthentication), [basicAuth](../README.md#basicAuth), [cookieAuth](../README.md#cookieAuth), [tokenAuth](../README.md#tokenAuth) ### HTTP request headers - **Content-Type**: Not defined - **Accept**: Not defined ### HTTP response details | Status code | Description | Response headers | |-------------|-------------|------------------| **204** | The membership has been deleted | - | [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) # **memberships_list** > PaginatedMembershipReadList memberships_list() Method returns a paginated list of memberships according to query parameters ### Example * Api Key Authentication (SignatureAuthentication): * Basic Authentication (basicAuth): * Api Key Authentication (cookieAuth): * Api Key Authentication (tokenAuth): ```python import time import cvat_sdk from cvat_sdk.api import memberships_api from cvat_sdk.model.paginated_membership_read_list import PaginatedMembershipReadList 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 = cvat_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 API key authorization: SignatureAuthentication configuration.api_key['SignatureAuthentication'] = 'YOUR_API_KEY' # Uncomment below to setup prefix (e.g. Bearer) for API key, if needed # configuration.api_key_prefix['SignatureAuthentication'] = 'Bearer' # Configure HTTP basic authorization: basicAuth configuration = cvat_sdk.Configuration( username = 'YOUR_USERNAME', password = 'YOUR_PASSWORD' ) # Configure API key authorization: cookieAuth configuration.api_key['cookieAuth'] = 'YOUR_API_KEY' # Uncomment below to setup prefix (e.g. Bearer) for API key, if needed # configuration.api_key_prefix['cookieAuth'] = 'Bearer' # Configure API key authorization: tokenAuth configuration.api_key['tokenAuth'] = 'YOUR_API_KEY' # Uncomment below to setup prefix (e.g. Bearer) for API key, if needed # configuration.api_key_prefix['tokenAuth'] = 'Bearer' # Enter a context with an instance of the API client with cvat_sdk.ApiClient(configuration) as api_client: # Create an instance of the API class api_instance = memberships_api.MembershipsApi(api_client) x_organization = "X-Organization_example" # str | (optional) filter = "filter_example" # str | A filter term. Avaliable filter_fields: ['user_name', 'role', 'id', 'user'] (optional) org = "org_example" # str | Organization unique slug (optional) org_id = 1 # int | Organization identifier (optional) page = 1 # int | A page number within the paginated result set. (optional) page_size = 1 # int | Number of results to return per page. (optional) search = "search_example" # str | A search term. Avaliable search_fields: ('user_name', 'role') (optional) sort = "sort_example" # str | Which field to use when ordering the results. Avaliable ordering_fields: ['user_name', 'role', 'id', 'user'] (optional) # example passing only required values which don't have defaults set # and optional values try: # Method returns a paginated list of memberships according to query parameters api_response = api_instance.memberships_list(x_organization=x_organization, filter=filter, org=org, org_id=org_id, page=page, page_size=page_size, search=search, sort=sort) pprint(api_response) except cvat_sdk.ApiException as e: print("Exception when calling MembershipsApi->memberships_list: %s\n" % e) ``` ### Parameters Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- **x_organization** | **str**| | [optional] **filter** | **str**| A filter term. Avaliable filter_fields: ['user_name', 'role', 'id', 'user'] | [optional] **org** | **str**| Organization unique slug | [optional] **org_id** | **int**| Organization identifier | [optional] **page** | **int**| A page number within the paginated result set. | [optional] **page_size** | **int**| Number of results to return per page. | [optional] **search** | **str**| A search term. Avaliable search_fields: ('user_name', 'role') | [optional] **sort** | **str**| Which field to use when ordering the results. Avaliable ordering_fields: ['user_name', 'role', 'id', 'user'] | [optional] ### Return type [**PaginatedMembershipReadList**](PaginatedMembershipReadList.md) ### Authorization [SignatureAuthentication](../README.md#SignatureAuthentication), [basicAuth](../README.md#basicAuth), [cookieAuth](../README.md#cookieAuth), [tokenAuth](../README.md#tokenAuth) ### HTTP request headers - **Content-Type**: Not defined - **Accept**: application/vnd.cvat+json ### HTTP response details | Status code | Description | Response headers | |-------------|-------------|------------------| **200** | | - | [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) # **memberships_partial_update** > MembershipWrite memberships_partial_update(id) Methods does a partial update of chosen fields in a membership ### Example * Api Key Authentication (SignatureAuthentication): * Basic Authentication (basicAuth): * Api Key Authentication (cookieAuth): * Api Key Authentication (tokenAuth): ```python import time import cvat_sdk from cvat_sdk.api import memberships_api from cvat_sdk.model.patched_membership_write_request import PatchedMembershipWriteRequest from cvat_sdk.model.membership_write import MembershipWrite 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 = cvat_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 API key authorization: SignatureAuthentication configuration.api_key['SignatureAuthentication'] = 'YOUR_API_KEY' # Uncomment below to setup prefix (e.g. Bearer) for API key, if needed # configuration.api_key_prefix['SignatureAuthentication'] = 'Bearer' # Configure HTTP basic authorization: basicAuth configuration = cvat_sdk.Configuration( username = 'YOUR_USERNAME', password = 'YOUR_PASSWORD' ) # Configure API key authorization: cookieAuth configuration.api_key['cookieAuth'] = 'YOUR_API_KEY' # Uncomment below to setup prefix (e.g. Bearer) for API key, if needed # configuration.api_key_prefix['cookieAuth'] = 'Bearer' # Configure API key authorization: tokenAuth configuration.api_key['tokenAuth'] = 'YOUR_API_KEY' # Uncomment below to setup prefix (e.g. Bearer) for API key, if needed # configuration.api_key_prefix['tokenAuth'] = 'Bearer' # Enter a context with an instance of the API client with cvat_sdk.ApiClient(configuration) as api_client: # Create an instance of the API class api_instance = memberships_api.MembershipsApi(api_client) id = 1 # int | A unique integer value identifying this membership. x_organization = "X-Organization_example" # str | (optional) org = "org_example" # str | Organization unique slug (optional) org_id = 1 # int | Organization identifier (optional) patched_membership_write_request = PatchedMembershipWriteRequest( role=RoleEnum("worker"), ) # PatchedMembershipWriteRequest | (optional) # example passing only required values which don't have defaults set try: # Methods does a partial update of chosen fields in a membership api_response = api_instance.memberships_partial_update(id) pprint(api_response) except cvat_sdk.ApiException as e: print("Exception when calling MembershipsApi->memberships_partial_update: %s\n" % e) # example passing only required values which don't have defaults set # and optional values try: # Methods does a partial update of chosen fields in a membership api_response = api_instance.memberships_partial_update(id, x_organization=x_organization, org=org, org_id=org_id, patched_membership_write_request=patched_membership_write_request) pprint(api_response) except cvat_sdk.ApiException as e: print("Exception when calling MembershipsApi->memberships_partial_update: %s\n" % e) ``` ### Parameters Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- **id** | **int**| A unique integer value identifying this membership. | **x_organization** | **str**| | [optional] **org** | **str**| Organization unique slug | [optional] **org_id** | **int**| Organization identifier | [optional] **patched_membership_write_request** | [**PatchedMembershipWriteRequest**](PatchedMembershipWriteRequest.md)| | [optional] ### Return type [**MembershipWrite**](MembershipWrite.md) ### Authorization [SignatureAuthentication](../README.md#SignatureAuthentication), [basicAuth](../README.md#basicAuth), [cookieAuth](../README.md#cookieAuth), [tokenAuth](../README.md#tokenAuth) ### HTTP request headers - **Content-Type**: application/json, application/x-www-form-urlencoded, multipart/form-data, application/offset+octet-stream - **Accept**: application/vnd.cvat+json ### HTTP response details | Status code | Description | Response headers | |-------------|-------------|------------------| **200** | | - | [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) # **memberships_retrieve** > MembershipRead memberships_retrieve(id) Method returns details of a membership ### Example * Api Key Authentication (SignatureAuthentication): * Basic Authentication (basicAuth): * Api Key Authentication (cookieAuth): * Api Key Authentication (tokenAuth): ```python import time import cvat_sdk from cvat_sdk.api import memberships_api from cvat_sdk.model.membership_read import MembershipRead 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 = cvat_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 API key authorization: SignatureAuthentication configuration.api_key['SignatureAuthentication'] = 'YOUR_API_KEY' # Uncomment below to setup prefix (e.g. Bearer) for API key, if needed # configuration.api_key_prefix['SignatureAuthentication'] = 'Bearer' # Configure HTTP basic authorization: basicAuth configuration = cvat_sdk.Configuration( username = 'YOUR_USERNAME', password = 'YOUR_PASSWORD' ) # Configure API key authorization: cookieAuth configuration.api_key['cookieAuth'] = 'YOUR_API_KEY' # Uncomment below to setup prefix (e.g. Bearer) for API key, if needed # configuration.api_key_prefix['cookieAuth'] = 'Bearer' # Configure API key authorization: tokenAuth configuration.api_key['tokenAuth'] = 'YOUR_API_KEY' # Uncomment below to setup prefix (e.g. Bearer) for API key, if needed # configuration.api_key_prefix['tokenAuth'] = 'Bearer' # Enter a context with an instance of the API client with cvat_sdk.ApiClient(configuration) as api_client: # Create an instance of the API class api_instance = memberships_api.MembershipsApi(api_client) id = 1 # int | A unique integer value identifying this membership. x_organization = "X-Organization_example" # str | (optional) org = "org_example" # str | Organization unique slug (optional) org_id = 1 # int | Organization identifier (optional) # example passing only required values which don't have defaults set try: # Method returns details of a membership api_response = api_instance.memberships_retrieve(id) pprint(api_response) except cvat_sdk.ApiException as e: print("Exception when calling MembershipsApi->memberships_retrieve: %s\n" % e) # example passing only required values which don't have defaults set # and optional values try: # Method returns details of a membership api_response = api_instance.memberships_retrieve(id, x_organization=x_organization, org=org, org_id=org_id) pprint(api_response) except cvat_sdk.ApiException as e: print("Exception when calling MembershipsApi->memberships_retrieve: %s\n" % e) ``` ### Parameters Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- **id** | **int**| A unique integer value identifying this membership. | **x_organization** | **str**| | [optional] **org** | **str**| Organization unique slug | [optional] **org_id** | **int**| Organization identifier | [optional] ### Return type [**MembershipRead**](MembershipRead.md) ### Authorization [SignatureAuthentication](../README.md#SignatureAuthentication), [basicAuth](../README.md#basicAuth), [cookieAuth](../README.md#cookieAuth), [tokenAuth](../README.md#tokenAuth) ### HTTP request headers - **Content-Type**: Not defined - **Accept**: application/vnd.cvat+json ### HTTP response details | Status code | Description | Response headers | |-------------|-------------|------------------| **200** | | - | [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md)