# \AdminApi All URIs are relative to *http://localhost/api/v1* Method | HTTP request | Description ------------- | ------------- | ------------- [**admin_create_org**](AdminApi.md#admin_create_org) | **Post** /admin/users/{username}/orgs | Create an organization [**admin_create_public_key**](AdminApi.md#admin_create_public_key) | **Post** /admin/users/{username}/keys | Add a public key on behalf of a user [**admin_create_repo**](AdminApi.md#admin_create_repo) | **Post** /admin/users/{username}/repos | Create a repository on behalf a user [**admin_create_user**](AdminApi.md#admin_create_user) | **Post** /admin/users | Create a user [**admin_delete_user**](AdminApi.md#admin_delete_user) | **Delete** /admin/users/{username} | Delete a user [**admin_delete_user_public_key**](AdminApi.md#admin_delete_user_public_key) | **Delete** /admin/users/{username}/keys/{id} | Delete a user's public key [**admin_edit_user**](AdminApi.md#admin_edit_user) | **Patch** /admin/users/{username} | Edit an existing user [**admin_get_all_orgs**](AdminApi.md#admin_get_all_orgs) | **Get** /admin/orgs | List all organizations [**admin_get_all_users**](AdminApi.md#admin_get_all_users) | **Get** /admin/users | List all users # **admin_create_org** > ::models::Organization admin_create_org(ctx, ctx, ctx, ctx, ctx, ctx, username, organization) Create an organization ### Required Parameters Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- **ctx** | **context.Context** | context containing the authentication | nil if no authentication **ctx** | **context.Context** | context containing the authentication | nil if no authentication **ctx** | **context.Context** | context containing the authentication | nil if no authentication **ctx** | **context.Context** | context containing the authentication | nil if no authentication **ctx** | **context.Context** | context containing the authentication | nil if no authentication **ctx** | **context.Context** | context containing the authentication | nil if no authentication **username** | **String**| username of the user that will own the created organization | **organization** | [**CreateOrgOption**](CreateOrgOption.md)| | ### Return type [**::models::Organization**](Organization.md) ### Authorization [AccessToken](../README.md#AccessToken), [AuthorizationHeaderToken](../README.md#AuthorizationHeaderToken), [BasicAuth](../README.md#BasicAuth), [SudoHeader](../README.md#SudoHeader), [SudoParam](../README.md#SudoParam), [Token](../README.md#Token) ### 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) # **admin_create_public_key** > ::models::PublicKey admin_create_public_key(ctx, ctx, ctx, ctx, ctx, ctx, username, optional) Add a public key on behalf of a user ### Required Parameters Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- **ctx** | **context.Context** | context containing the authentication | nil if no authentication **ctx** | **context.Context** | context containing the authentication | nil if no authentication **ctx** | **context.Context** | context containing the authentication | nil if no authentication **ctx** | **context.Context** | context containing the authentication | nil if no authentication **ctx** | **context.Context** | context containing the authentication | nil if no authentication **ctx** | **context.Context** | context containing the authentication | nil if no authentication **username** | **String**| username of the user | **optional** | **map[string]interface{}** | optional parameters | nil if no parameters ### Optional Parameters Optional parameters are passed through a map[string]interface{}. Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- **username** | **String**| username of the user | **key** | [**CreateKeyOption**](CreateKeyOption.md)| | ### Return type [**::models::PublicKey**](PublicKey.md) ### Authorization [AccessToken](../README.md#AccessToken), [AuthorizationHeaderToken](../README.md#AuthorizationHeaderToken), [BasicAuth](../README.md#BasicAuth), [SudoHeader](../README.md#SudoHeader), [SudoParam](../README.md#SudoParam), [Token](../README.md#Token) ### 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) # **admin_create_repo** > ::models::Repository admin_create_repo(ctx, ctx, ctx, ctx, ctx, ctx, username, repository) Create a repository on behalf a user ### Required Parameters Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- **ctx** | **context.Context** | context containing the authentication | nil if no authentication **ctx** | **context.Context** | context containing the authentication | nil if no authentication **ctx** | **context.Context** | context containing the authentication | nil if no authentication **ctx** | **context.Context** | context containing the authentication | nil if no authentication **ctx** | **context.Context** | context containing the authentication | nil if no authentication **ctx** | **context.Context** | context containing the authentication | nil if no authentication **username** | **String**| username of the user. This user will own the created repository | **repository** | [**CreateRepoOption**](CreateRepoOption.md)| | ### Return type [**::models::Repository**](Repository.md) ### Authorization [AccessToken](../README.md#AccessToken), [AuthorizationHeaderToken](../README.md#AuthorizationHeaderToken), [BasicAuth](../README.md#BasicAuth), [SudoHeader](../README.md#SudoHeader), [SudoParam](../README.md#SudoParam), [Token](../README.md#Token) ### 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) # **admin_create_user** > ::models::User admin_create_user(ctx, ctx, ctx, ctx, ctx, ctx, optional) Create a user ### Required Parameters Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- **ctx** | **context.Context** | context containing the authentication | nil if no authentication **ctx** | **context.Context** | context containing the authentication | nil if no authentication **ctx** | **context.Context** | context containing the authentication | nil if no authentication **ctx** | **context.Context** | context containing the authentication | nil if no authentication **ctx** | **context.Context** | context containing the authentication | nil if no authentication **ctx** | **context.Context** | context containing the authentication | nil if no authentication **optional** | **map[string]interface{}** | optional parameters | nil if no parameters ### Optional Parameters Optional parameters are passed through a map[string]interface{}. Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- **body** | [**CreateUserOption**](CreateUserOption.md)| | ### Return type [**::models::User**](User.md) ### Authorization [AccessToken](../README.md#AccessToken), [AuthorizationHeaderToken](../README.md#AuthorizationHeaderToken), [BasicAuth](../README.md#BasicAuth), [SudoHeader](../README.md#SudoHeader), [SudoParam](../README.md#SudoParam), [Token](../README.md#Token) ### 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) # **admin_delete_user** > admin_delete_user(ctx, ctx, ctx, ctx, ctx, ctx, username) Delete a user ### Required Parameters Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- **ctx** | **context.Context** | context containing the authentication | nil if no authentication **ctx** | **context.Context** | context containing the authentication | nil if no authentication **ctx** | **context.Context** | context containing the authentication | nil if no authentication **ctx** | **context.Context** | context containing the authentication | nil if no authentication **ctx** | **context.Context** | context containing the authentication | nil if no authentication **ctx** | **context.Context** | context containing the authentication | nil if no authentication **username** | **String**| username of user to delete | ### Return type (empty response body) ### Authorization [AccessToken](../README.md#AccessToken), [AuthorizationHeaderToken](../README.md#AuthorizationHeaderToken), [BasicAuth](../README.md#BasicAuth), [SudoHeader](../README.md#SudoHeader), [SudoParam](../README.md#SudoParam), [Token](../README.md#Token) ### HTTP request headers - **Content-Type**: application/json, text/plain - **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) # **admin_delete_user_public_key** > admin_delete_user_public_key(ctx, ctx, ctx, ctx, ctx, ctx, username, id) Delete a user's public key ### Required Parameters Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- **ctx** | **context.Context** | context containing the authentication | nil if no authentication **ctx** | **context.Context** | context containing the authentication | nil if no authentication **ctx** | **context.Context** | context containing the authentication | nil if no authentication **ctx** | **context.Context** | context containing the authentication | nil if no authentication **ctx** | **context.Context** | context containing the authentication | nil if no authentication **ctx** | **context.Context** | context containing the authentication | nil if no authentication **username** | **String**| username of user | **id** | **i64**| id of the key to delete | ### Return type (empty response body) ### Authorization [AccessToken](../README.md#AccessToken), [AuthorizationHeaderToken](../README.md#AuthorizationHeaderToken), [BasicAuth](../README.md#BasicAuth), [SudoHeader](../README.md#SudoHeader), [SudoParam](../README.md#SudoParam), [Token](../README.md#Token) ### HTTP request headers - **Content-Type**: application/json, text/plain - **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) # **admin_edit_user** > ::models::User admin_edit_user(ctx, ctx, ctx, ctx, ctx, ctx, username, optional) Edit an existing user ### Required Parameters Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- **ctx** | **context.Context** | context containing the authentication | nil if no authentication **ctx** | **context.Context** | context containing the authentication | nil if no authentication **ctx** | **context.Context** | context containing the authentication | nil if no authentication **ctx** | **context.Context** | context containing the authentication | nil if no authentication **ctx** | **context.Context** | context containing the authentication | nil if no authentication **ctx** | **context.Context** | context containing the authentication | nil if no authentication **username** | **String**| username of user to edit | **optional** | **map[string]interface{}** | optional parameters | nil if no parameters ### Optional Parameters Optional parameters are passed through a map[string]interface{}. Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- **username** | **String**| username of user to edit | **body** | [**EditUserOption**](EditUserOption.md)| | ### Return type [**::models::User**](User.md) ### Authorization [AccessToken](../README.md#AccessToken), [AuthorizationHeaderToken](../README.md#AuthorizationHeaderToken), [BasicAuth](../README.md#BasicAuth), [SudoHeader](../README.md#SudoHeader), [SudoParam](../README.md#SudoParam), [Token](../README.md#Token) ### 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) # **admin_get_all_orgs** > Vec<::models::Organization> admin_get_all_orgs(ctx, ctx, ctx, ctx, ctx, ctx, optional) List all organizations ### Required Parameters Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- **ctx** | **context.Context** | context containing the authentication | nil if no authentication **ctx** | **context.Context** | context containing the authentication | nil if no authentication **ctx** | **context.Context** | context containing the authentication | nil if no authentication **ctx** | **context.Context** | context containing the authentication | nil if no authentication **ctx** | **context.Context** | context containing the authentication | nil if no authentication **ctx** | **context.Context** | context containing the authentication | nil if no authentication **optional** | **map[string]interface{}** | optional parameters | nil if no parameters ### Optional Parameters Optional parameters are passed through a map[string]interface{}. Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- **page** | **i32**| page number of results to return (1-based) | **limit** | **i32**| page size of results, maximum page size is 50 | ### Return type [**Vec<::models::Organization>**](Organization.md) ### Authorization [AccessToken](../README.md#AccessToken), [AuthorizationHeaderToken](../README.md#AuthorizationHeaderToken), [BasicAuth](../README.md#BasicAuth), [SudoHeader](../README.md#SudoHeader), [SudoParam](../README.md#SudoParam), [Token](../README.md#Token) ### HTTP request headers - **Content-Type**: application/json, text/plain - **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) # **admin_get_all_users** > Vec<::models::User> admin_get_all_users(ctx, ctx, ctx, ctx, ctx, ctx, ) List all users ### Required Parameters This endpoint does not need any parameter. ### Return type [**Vec<::models::User>**](User.md) ### Authorization [AccessToken](../README.md#AccessToken), [AuthorizationHeaderToken](../README.md#AuthorizationHeaderToken), [BasicAuth](../README.md#BasicAuth), [SudoHeader](../README.md#SudoHeader), [SudoParam](../README.md#SudoParam), [Token](../README.md#Token) ### HTTP request headers - **Content-Type**: application/json, text/plain - **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)