# \PermissionsApi

All URIs are relative to *http://localhost*

Method | HTTP request | Description
------------- | ------------- | -------------
[**create_permission**](PermissionsApi.md#create_permission) | **POST** /api/v1/permissions | Create a permission
[**delete_permission**](PermissionsApi.md#delete_permission) | **DELETE** /api/v1/permissions/{id} | Delete a permission
[**get_permission**](PermissionsApi.md#get_permission) | **GET** /api/v1/permissions/{id} | Get a permission by ID
[**list_permissions**](PermissionsApi.md#list_permissions) | **GET** /api/v1/permissions | List permissions
[**update_permission**](PermissionsApi.md#update_permission) | **PUT** /api/v1/permissions/{id} | Update a permission



## create_permission

> models::PermissionResponse create_permission(create_permission_request)
Create a permission

### Parameters


Name | Type | Description  | Required | Notes
------------- | ------------- | ------------- | ------------- | -------------
**create_permission_request** | [**CreatePermissionRequest**](CreatePermissionRequest.md) |  | [required] |

### Return type

[**models::PermissionResponse**](PermissionResponse.md)

### Authorization

[bearer_auth](../README.md#bearer_auth)

### HTTP request headers

- **Content-Type**: application/json
- **Accept**: application/json

[[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_permission

> delete_permission(id)
Delete a permission

### Parameters


Name | Type | Description  | Required | Notes
------------- | ------------- | ------------- | ------------- | -------------
**id** | **uuid::Uuid** | Permission ID | [required] |

### Return type

 (empty response body)

### Authorization

[bearer_auth](../README.md#bearer_auth)

### HTTP request headers

- **Content-Type**: Not defined
- **Accept**: Not defined

[[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_permission

> models::PermissionResponse get_permission(id)
Get a permission by ID

### Parameters


Name | Type | Description  | Required | Notes
------------- | ------------- | ------------- | ------------- | -------------
**id** | **uuid::Uuid** | Permission ID | [required] |

### Return type

[**models::PermissionResponse**](PermissionResponse.md)

### Authorization

[bearer_auth](../README.md#bearer_auth)

### HTTP request headers

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

[[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)


## list_permissions

> models::PermissionListResponse list_permissions(principal_type, principal_id, target_type, target_id, page, per_page)
List permissions

### Parameters


Name | Type | Description  | Required | Notes
------------- | ------------- | ------------- | ------------- | -------------
**principal_type** | Option<**String**> |  |  |
**principal_id** | Option<**uuid::Uuid**> |  |  |
**target_type** | Option<**String**> |  |  |
**target_id** | Option<**uuid::Uuid**> |  |  |
**page** | Option<**i32**> |  |  |
**per_page** | Option<**i32**> |  |  |

### Return type

[**models::PermissionListResponse**](PermissionListResponse.md)

### Authorization

[bearer_auth](../README.md#bearer_auth)

### HTTP request headers

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

[[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_permission

> models::PermissionResponse update_permission(id, create_permission_request)
Update a permission

### Parameters


Name | Type | Description  | Required | Notes
------------- | ------------- | ------------- | ------------- | -------------
**id** | **uuid::Uuid** | Permission ID | [required] |
**create_permission_request** | [**CreatePermissionRequest**](CreatePermissionRequest.md) |  | [required] |

### Return type

[**models::PermissionResponse**](PermissionResponse.md)

### Authorization

[bearer_auth](../README.md#bearer_auth)

### HTTP request headers

- **Content-Type**: application/json
- **Accept**: application/json

[[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)

