# \PermissionsApi

All URIs are relative to *https://registry.example.com*

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



## create_permission

> models::Permission create_permission(create_permission_request)
Create permission

Creates a new permission grant associating a principal (user or group) with allowed actions on a resource. Requires admin privileges.

### Parameters


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

### Return type

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

### Authorization

[apiKeyAuth](../README.md#apiKeyAuth), [bearerAuth](../README.md#bearerAuth)

### 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 permission

Permanently removes a permission grant. Requires admin privileges.

### Parameters


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

### Return type

 (empty response body)

### Authorization

[apiKeyAuth](../README.md#apiKeyAuth), [bearerAuth](../README.md#bearerAuth)

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


## get_permission

> models::Permission get_permission(id)
Get permission

Returns a single permission grant by its unique identifier.

### Parameters


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

### Return type

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

### Authorization

[apiKeyAuth](../README.md#apiKeyAuth), [bearerAuth](../README.md#bearerAuth)

### 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

> Vec<models::Permission> list_permissions()
List permissions

Returns all permission grants. Requires admin privileges.

### Parameters

This endpoint does not need any parameter.

### Return type

[**Vec<models::Permission>**](Permission.md)

### Authorization

[apiKeyAuth](../README.md#apiKeyAuth), [bearerAuth](../README.md#bearerAuth)

### 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::Permission update_permission(id, update_permission_request)
Update permission

Updates the allowed actions on an existing permission grant. Requires admin privileges.

### Parameters


Name | Type | Description  | Required | Notes
------------- | ------------- | ------------- | ------------- | -------------
**id** | **uuid::Uuid** | Permission UUID | [required] |
**update_permission_request** | [**UpdatePermissionRequest**](UpdatePermissionRequest.md) |  | [required] |

### Return type

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

### Authorization

[apiKeyAuth](../README.md#apiKeyAuth), [bearerAuth](../README.md#bearerAuth)

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

