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.

15KB

\AdminApi

All URIs are relative to http://localhost/api/v1

Method HTTP request Description
admin_create_org Post /admin/users/{username}/orgs Create an organization
admin_create_public_key Post /admin/users/{username}/keys Add a public key on behalf of a user
admin_create_repo Post /admin/users/{username}/repos Create a repository on behalf a user
admin_create_user Post /admin/users Create a user
admin_delete_user Delete /admin/users/{username} Delete a user
admin_delete_user_public_key Delete /admin/users/{username}/keys/{id} Delete a user's public key
admin_edit_user Patch /admin/users/{username} Edit an existing user
admin_get_all_orgs Get /admin/orgs List all organizations
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

Return type

::models::Organization

Authorization

AccessToken, AuthorizationHeaderToken, BasicAuth, SudoHeader, SudoParam, Token

HTTP request headers

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

[Back to top] [Back to API list] [Back to Model list] [Back to README]

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

Return type

::models::PublicKey

Authorization

AccessToken, AuthorizationHeaderToken, BasicAuth, SudoHeader, SudoParam, Token

HTTP request headers

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

[Back to top] [Back to API list] [Back to Model list] [Back to README]

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

Return type

::models::Repository

Authorization

AccessToken, AuthorizationHeaderToken, BasicAuth, SudoHeader, SudoParam, Token

HTTP request headers

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

[Back to top] [Back to API list] [Back to Model list] [Back to README]

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

Return type

::models::User

Authorization

AccessToken, AuthorizationHeaderToken, BasicAuth, SudoHeader, SudoParam, Token

HTTP request headers

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

[Back to top] [Back to API list] [Back to Model list] [Back to README]

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, AuthorizationHeaderToken, BasicAuth, SudoHeader, SudoParam, Token

HTTP request headers

  • Content-Type: application/json, text/plain
  • Accept: application/json

[Back to top] [Back to API list] [Back to Model list] [Back to README]

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, AuthorizationHeaderToken, BasicAuth, SudoHeader, SudoParam, Token

HTTP request headers

  • Content-Type: application/json, text/plain
  • Accept: application/json

[Back to top] [Back to API list] [Back to Model list] [Back to README]

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

Return type

::models::User

Authorization

AccessToken, AuthorizationHeaderToken, BasicAuth, SudoHeader, SudoParam, Token

HTTP request headers

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

[Back to top] [Back to API list] [Back to Model list] [Back to README]

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>

Authorization

AccessToken, AuthorizationHeaderToken, BasicAuth, SudoHeader, SudoParam, Token

HTTP request headers

  • Content-Type: application/json, text/plain
  • Accept: application/json

[Back to top] [Back to API list] [Back to Model list] [Back to README]

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>

Authorization

AccessToken, AuthorizationHeaderToken, BasicAuth, SudoHeader, SudoParam, Token

HTTP request headers

  • Content-Type: application/json, text/plain
  • Accept: application/json

[Back to top] [Back to API list] [Back to Model list] [Back to README]