# casdoor\RoleApi All URIs are relative to *http://localhost* Method | HTTP request | Description ------------- | ------------- | ------------- [**add_role**](RoleApi.md#add_role) | **POST** /api/add-role | [**delete_role**](RoleApi.md#delete_role) | **POST** /api/delete-role | [**get_role**](RoleApi.md#get_role) | **GET** /api/get-role | [**get_roles**](RoleApi.md#get_roles) | **GET** /api/get-roles | [**update_role**](RoleApi.md#update_role) | **POST** /api/update-role | ## add_role > models::ControllersResponse add_role(body) add role ### Parameters Name | Type | Description | Required | Notes ------------- | ------------- | ------------- | ------------- | ------------- **body** | [**Role**](Role.md) | The details of the role | [required] | ### Return type [**models::ControllersResponse**](controllers.Response.md) ### Authorization No authorization required ### HTTP request headers - **Content-Type**: Not defined - **Accept**: */* [[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) ## delete_role > models::ControllersResponse delete_role(body) delete role ### Parameters Name | Type | Description | Required | Notes ------------- | ------------- | ------------- | ------------- | ------------- **body** | [**Role**](Role.md) | The details of the role | [required] | ### Return type [**models::ControllersResponse**](controllers.Response.md) ### Authorization No authorization required ### HTTP request headers - **Content-Type**: Not defined - **Accept**: */* [[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) ## get_role > models::Role get_role(id) get role ### Parameters Name | Type | Description | Required | Notes ------------- | ------------- | ------------- | ------------- | ------------- **id** | **String** | The id ( owner/name ) of the role | [required] | ### Return type [**models::Role**](object.Role.md) ### Authorization No authorization required ### HTTP request headers - **Content-Type**: Not defined - **Accept**: */* [[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) ## get_roles > Vec get_roles(owner) get roles ### Parameters Name | Type | Description | Required | Notes ------------- | ------------- | ------------- | ------------- | ------------- **owner** | **String** | The owner of roles | [required] | ### Return type [**Vec**](object.Role.md) ### Authorization No authorization required ### HTTP request headers - **Content-Type**: Not defined - **Accept**: */* [[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) ## update_role > models::ControllersResponse update_role(id, body) update role ### Parameters Name | Type | Description | Required | Notes ------------- | ------------- | ------------- | ------------- | ------------- **id** | **String** | The id ( owner/name ) of the role | [required] | **body** | [**Role**](Role.md) | The details of the role | [required] | ### Return type [**models::ControllersResponse**](controllers.Response.md) ### Authorization No authorization required ### HTTP request headers - **Content-Type**: Not defined - **Accept**: */* [[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)