Rust API for Gitea, automatically generated https://git.exmods.org/swagger.v1.json
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
This repo is archived. You can view files and clone it, but cannot push or open issues/pull-requests.

AdminApi.md 15KB

4 years ago
123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323
  1. # \AdminApi
  2. All URIs are relative to *http://localhost/api/v1*
  3. Method | HTTP request | Description
  4. ------------- | ------------- | -------------
  5. [**admin_create_org**](AdminApi.md#admin_create_org) | **Post** /admin/users/{username}/orgs | Create an organization
  6. [**admin_create_public_key**](AdminApi.md#admin_create_public_key) | **Post** /admin/users/{username}/keys | Add a public key on behalf of a user
  7. [**admin_create_repo**](AdminApi.md#admin_create_repo) | **Post** /admin/users/{username}/repos | Create a repository on behalf a user
  8. [**admin_create_user**](AdminApi.md#admin_create_user) | **Post** /admin/users | Create a user
  9. [**admin_delete_user**](AdminApi.md#admin_delete_user) | **Delete** /admin/users/{username} | Delete a user
  10. [**admin_delete_user_public_key**](AdminApi.md#admin_delete_user_public_key) | **Delete** /admin/users/{username}/keys/{id} | Delete a user's public key
  11. [**admin_edit_user**](AdminApi.md#admin_edit_user) | **Patch** /admin/users/{username} | Edit an existing user
  12. [**admin_get_all_orgs**](AdminApi.md#admin_get_all_orgs) | **Get** /admin/orgs | List all organizations
  13. [**admin_get_all_users**](AdminApi.md#admin_get_all_users) | **Get** /admin/users | List all users
  14. # **admin_create_org**
  15. > ::models::Organization admin_create_org(ctx, ctx, ctx, ctx, ctx, ctx, username, organization)
  16. Create an organization
  17. ### Required Parameters
  18. Name | Type | Description | Notes
  19. ------------- | ------------- | ------------- | -------------
  20. **ctx** | **context.Context** | context containing the authentication | nil if no authentication
  21. **ctx** | **context.Context** | context containing the authentication | nil if no authentication
  22. **ctx** | **context.Context** | context containing the authentication | nil if no authentication
  23. **ctx** | **context.Context** | context containing the authentication | nil if no authentication
  24. **ctx** | **context.Context** | context containing the authentication | nil if no authentication
  25. **ctx** | **context.Context** | context containing the authentication | nil if no authentication
  26. **username** | **String**| username of the user that will own the created organization |
  27. **organization** | [**CreateOrgOption**](CreateOrgOption.md)| |
  28. ### Return type
  29. [**::models::Organization**](Organization.md)
  30. ### Authorization
  31. [AccessToken](../README.md#AccessToken), [AuthorizationHeaderToken](../README.md#AuthorizationHeaderToken), [BasicAuth](../README.md#BasicAuth), [SudoHeader](../README.md#SudoHeader), [SudoParam](../README.md#SudoParam), [Token](../README.md#Token)
  32. ### HTTP request headers
  33. - **Content-Type**: application/json
  34. - **Accept**: application/json
  35. [[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)
  36. # **admin_create_public_key**
  37. > ::models::PublicKey admin_create_public_key(ctx, ctx, ctx, ctx, ctx, ctx, username, optional)
  38. Add a public key on behalf of a user
  39. ### Required Parameters
  40. Name | Type | Description | Notes
  41. ------------- | ------------- | ------------- | -------------
  42. **ctx** | **context.Context** | context containing the authentication | nil if no authentication
  43. **ctx** | **context.Context** | context containing the authentication | nil if no authentication
  44. **ctx** | **context.Context** | context containing the authentication | nil if no authentication
  45. **ctx** | **context.Context** | context containing the authentication | nil if no authentication
  46. **ctx** | **context.Context** | context containing the authentication | nil if no authentication
  47. **ctx** | **context.Context** | context containing the authentication | nil if no authentication
  48. **username** | **String**| username of the user |
  49. **optional** | **map[string]interface{}** | optional parameters | nil if no parameters
  50. ### Optional Parameters
  51. Optional parameters are passed through a map[string]interface{}.
  52. Name | Type | Description | Notes
  53. ------------- | ------------- | ------------- | -------------
  54. **username** | **String**| username of the user |
  55. **key** | [**CreateKeyOption**](CreateKeyOption.md)| |
  56. ### Return type
  57. [**::models::PublicKey**](PublicKey.md)
  58. ### Authorization
  59. [AccessToken](../README.md#AccessToken), [AuthorizationHeaderToken](../README.md#AuthorizationHeaderToken), [BasicAuth](../README.md#BasicAuth), [SudoHeader](../README.md#SudoHeader), [SudoParam](../README.md#SudoParam), [Token](../README.md#Token)
  60. ### HTTP request headers
  61. - **Content-Type**: application/json
  62. - **Accept**: application/json
  63. [[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)
  64. # **admin_create_repo**
  65. > ::models::Repository admin_create_repo(ctx, ctx, ctx, ctx, ctx, ctx, username, repository)
  66. Create a repository on behalf a user
  67. ### Required Parameters
  68. Name | Type | Description | Notes
  69. ------------- | ------------- | ------------- | -------------
  70. **ctx** | **context.Context** | context containing the authentication | nil if no authentication
  71. **ctx** | **context.Context** | context containing the authentication | nil if no authentication
  72. **ctx** | **context.Context** | context containing the authentication | nil if no authentication
  73. **ctx** | **context.Context** | context containing the authentication | nil if no authentication
  74. **ctx** | **context.Context** | context containing the authentication | nil if no authentication
  75. **ctx** | **context.Context** | context containing the authentication | nil if no authentication
  76. **username** | **String**| username of the user. This user will own the created repository |
  77. **repository** | [**CreateRepoOption**](CreateRepoOption.md)| |
  78. ### Return type
  79. [**::models::Repository**](Repository.md)
  80. ### Authorization
  81. [AccessToken](../README.md#AccessToken), [AuthorizationHeaderToken](../README.md#AuthorizationHeaderToken), [BasicAuth](../README.md#BasicAuth), [SudoHeader](../README.md#SudoHeader), [SudoParam](../README.md#SudoParam), [Token](../README.md#Token)
  82. ### HTTP request headers
  83. - **Content-Type**: application/json
  84. - **Accept**: application/json
  85. [[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)
  86. # **admin_create_user**
  87. > ::models::User admin_create_user(ctx, ctx, ctx, ctx, ctx, ctx, optional)
  88. Create a user
  89. ### Required Parameters
  90. Name | Type | Description | Notes
  91. ------------- | ------------- | ------------- | -------------
  92. **ctx** | **context.Context** | context containing the authentication | nil if no authentication
  93. **ctx** | **context.Context** | context containing the authentication | nil if no authentication
  94. **ctx** | **context.Context** | context containing the authentication | nil if no authentication
  95. **ctx** | **context.Context** | context containing the authentication | nil if no authentication
  96. **ctx** | **context.Context** | context containing the authentication | nil if no authentication
  97. **ctx** | **context.Context** | context containing the authentication | nil if no authentication
  98. **optional** | **map[string]interface{}** | optional parameters | nil if no parameters
  99. ### Optional Parameters
  100. Optional parameters are passed through a map[string]interface{}.
  101. Name | Type | Description | Notes
  102. ------------- | ------------- | ------------- | -------------
  103. **body** | [**CreateUserOption**](CreateUserOption.md)| |
  104. ### Return type
  105. [**::models::User**](User.md)
  106. ### Authorization
  107. [AccessToken](../README.md#AccessToken), [AuthorizationHeaderToken](../README.md#AuthorizationHeaderToken), [BasicAuth](../README.md#BasicAuth), [SudoHeader](../README.md#SudoHeader), [SudoParam](../README.md#SudoParam), [Token](../README.md#Token)
  108. ### HTTP request headers
  109. - **Content-Type**: application/json
  110. - **Accept**: application/json
  111. [[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)
  112. # **admin_delete_user**
  113. > admin_delete_user(ctx, ctx, ctx, ctx, ctx, ctx, username)
  114. Delete a user
  115. ### Required Parameters
  116. Name | Type | Description | Notes
  117. ------------- | ------------- | ------------- | -------------
  118. **ctx** | **context.Context** | context containing the authentication | nil if no authentication
  119. **ctx** | **context.Context** | context containing the authentication | nil if no authentication
  120. **ctx** | **context.Context** | context containing the authentication | nil if no authentication
  121. **ctx** | **context.Context** | context containing the authentication | nil if no authentication
  122. **ctx** | **context.Context** | context containing the authentication | nil if no authentication
  123. **ctx** | **context.Context** | context containing the authentication | nil if no authentication
  124. **username** | **String**| username of user to delete |
  125. ### Return type
  126. (empty response body)
  127. ### Authorization
  128. [AccessToken](../README.md#AccessToken), [AuthorizationHeaderToken](../README.md#AuthorizationHeaderToken), [BasicAuth](../README.md#BasicAuth), [SudoHeader](../README.md#SudoHeader), [SudoParam](../README.md#SudoParam), [Token](../README.md#Token)
  129. ### HTTP request headers
  130. - **Content-Type**: application/json, text/plain
  131. - **Accept**: application/json
  132. [[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)
  133. # **admin_delete_user_public_key**
  134. > admin_delete_user_public_key(ctx, ctx, ctx, ctx, ctx, ctx, username, id)
  135. Delete a user's public key
  136. ### Required Parameters
  137. Name | Type | Description | Notes
  138. ------------- | ------------- | ------------- | -------------
  139. **ctx** | **context.Context** | context containing the authentication | nil if no authentication
  140. **ctx** | **context.Context** | context containing the authentication | nil if no authentication
  141. **ctx** | **context.Context** | context containing the authentication | nil if no authentication
  142. **ctx** | **context.Context** | context containing the authentication | nil if no authentication
  143. **ctx** | **context.Context** | context containing the authentication | nil if no authentication
  144. **ctx** | **context.Context** | context containing the authentication | nil if no authentication
  145. **username** | **String**| username of user |
  146. **id** | **i64**| id of the key to delete |
  147. ### Return type
  148. (empty response body)
  149. ### Authorization
  150. [AccessToken](../README.md#AccessToken), [AuthorizationHeaderToken](../README.md#AuthorizationHeaderToken), [BasicAuth](../README.md#BasicAuth), [SudoHeader](../README.md#SudoHeader), [SudoParam](../README.md#SudoParam), [Token](../README.md#Token)
  151. ### HTTP request headers
  152. - **Content-Type**: application/json, text/plain
  153. - **Accept**: application/json
  154. [[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)
  155. # **admin_edit_user**
  156. > ::models::User admin_edit_user(ctx, ctx, ctx, ctx, ctx, ctx, username, optional)
  157. Edit an existing user
  158. ### Required Parameters
  159. Name | Type | Description | Notes
  160. ------------- | ------------- | ------------- | -------------
  161. **ctx** | **context.Context** | context containing the authentication | nil if no authentication
  162. **ctx** | **context.Context** | context containing the authentication | nil if no authentication
  163. **ctx** | **context.Context** | context containing the authentication | nil if no authentication
  164. **ctx** | **context.Context** | context containing the authentication | nil if no authentication
  165. **ctx** | **context.Context** | context containing the authentication | nil if no authentication
  166. **ctx** | **context.Context** | context containing the authentication | nil if no authentication
  167. **username** | **String**| username of user to edit |
  168. **optional** | **map[string]interface{}** | optional parameters | nil if no parameters
  169. ### Optional Parameters
  170. Optional parameters are passed through a map[string]interface{}.
  171. Name | Type | Description | Notes
  172. ------------- | ------------- | ------------- | -------------
  173. **username** | **String**| username of user to edit |
  174. **body** | [**EditUserOption**](EditUserOption.md)| |
  175. ### Return type
  176. [**::models::User**](User.md)
  177. ### Authorization
  178. [AccessToken](../README.md#AccessToken), [AuthorizationHeaderToken](../README.md#AuthorizationHeaderToken), [BasicAuth](../README.md#BasicAuth), [SudoHeader](../README.md#SudoHeader), [SudoParam](../README.md#SudoParam), [Token](../README.md#Token)
  179. ### HTTP request headers
  180. - **Content-Type**: application/json
  181. - **Accept**: application/json
  182. [[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)
  183. # **admin_get_all_orgs**
  184. > Vec<::models::Organization> admin_get_all_orgs(ctx, ctx, ctx, ctx, ctx, ctx, optional)
  185. List all organizations
  186. ### Required Parameters
  187. Name | Type | Description | Notes
  188. ------------- | ------------- | ------------- | -------------
  189. **ctx** | **context.Context** | context containing the authentication | nil if no authentication
  190. **ctx** | **context.Context** | context containing the authentication | nil if no authentication
  191. **ctx** | **context.Context** | context containing the authentication | nil if no authentication
  192. **ctx** | **context.Context** | context containing the authentication | nil if no authentication
  193. **ctx** | **context.Context** | context containing the authentication | nil if no authentication
  194. **ctx** | **context.Context** | context containing the authentication | nil if no authentication
  195. **optional** | **map[string]interface{}** | optional parameters | nil if no parameters
  196. ### Optional Parameters
  197. Optional parameters are passed through a map[string]interface{}.
  198. Name | Type | Description | Notes
  199. ------------- | ------------- | ------------- | -------------
  200. **page** | **i32**| page number of results to return (1-based) |
  201. **limit** | **i32**| page size of results, maximum page size is 50 |
  202. ### Return type
  203. [**Vec<::models::Organization>**](Organization.md)
  204. ### Authorization
  205. [AccessToken](../README.md#AccessToken), [AuthorizationHeaderToken](../README.md#AuthorizationHeaderToken), [BasicAuth](../README.md#BasicAuth), [SudoHeader](../README.md#SudoHeader), [SudoParam](../README.md#SudoParam), [Token](../README.md#Token)
  206. ### HTTP request headers
  207. - **Content-Type**: application/json, text/plain
  208. - **Accept**: application/json
  209. [[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)
  210. # **admin_get_all_users**
  211. > Vec<::models::User> admin_get_all_users(ctx, ctx, ctx, ctx, ctx, ctx, )
  212. List all users
  213. ### Required Parameters
  214. This endpoint does not need any parameter.
  215. ### Return type
  216. [**Vec<::models::User>**](User.md)
  217. ### Authorization
  218. [AccessToken](../README.md#AccessToken), [AuthorizationHeaderToken](../README.md#AuthorizationHeaderToken), [BasicAuth](../README.md#BasicAuth), [SudoHeader](../README.md#SudoHeader), [SudoParam](../README.md#SudoParam), [Token](../README.md#Token)
  219. ### HTTP request headers
  220. - **Content-Type**: application/json, text/plain
  221. - **Accept**: application/json
  222. [[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)