octopush/crates/gitea_raw_client/docs/AdminApi.md
2022-11-27 12:16:44 +01:00

16 KiB

\AdminApi

All URIs are relative to /api/v1

Method HTTP request Description
admin_adopt_repository POST /admin/unadopted/{owner}/{repo} Adopt unadopted files as a repository
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 of a user
admin_create_user POST /admin/users Create a user
admin_cron_list GET /admin/cron List cron tasks
admin_cron_run POST /admin/cron/{task} Run cron task
admin_delete_unadopted_repository DELETE /admin/unadopted/{owner}/{repo} Delete unadopted files
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_unadopted_list GET /admin/unadopted List unadopted repositories

admin_adopt_repository

admin_adopt_repository(owner, repo) Adopt unadopted files as a repository

Parameters

Name Type Description Required Notes
owner String owner of the repo [required]
repo String name of the repo [required]

Return type

(empty response body)

Authorization

AccessToken, AuthorizationHeaderToken, BasicAuth, SudoHeader, SudoParam, TOTPHeader, Token

HTTP request headers

  • Content-Type: Not defined
  • Accept: Not defined

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

admin_create_org

crate::models::Organization admin_create_org(username, organization) Create an organization

Parameters

Name Type Description Required Notes
username String username of the user that will own the created organization [required]
organization CreateOrgOption [required]

Return type

crate::models::Organization

Authorization

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

crate::models::PublicKey admin_create_public_key(username, key) Add a public key on behalf of a user

Parameters

Name Type Description Required Notes
username String username of the user [required]
key Option<CreateKeyOption>

Return type

crate::models::PublicKey

Authorization

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

crate::models::Repository admin_create_repo(username, repository) Create a repository on behalf of a user

Parameters

Name Type Description Required Notes
username String username of the user. This user will own the created repository [required]
repository CreateRepoOption [required]

Return type

crate::models::Repository

Authorization

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

crate::models::User admin_create_user(body) Create a user

Parameters

Name Type Description Required Notes
body Option<CreateUserOption>

Return type

crate::models::User

Authorization

AccessToken, AuthorizationHeaderToken, BasicAuth, SudoHeader, SudoParam, TOTPHeader, 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_cron_list

Veccrate::models::Cron admin_cron_list(page, limit) List cron tasks

Parameters

Name Type Description Required Notes
page Option<i32> page number of results to return (1-based)
limit Option<i32> page size of results

Return type

Veccrate::models::Cron

Authorization

AccessToken, AuthorizationHeaderToken, BasicAuth, SudoHeader, SudoParam, TOTPHeader, Token

HTTP request headers

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

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

admin_cron_run

admin_cron_run(task) Run cron task

Parameters

Name Type Description Required Notes
task String task to run [required]

Return type

(empty response body)

Authorization

AccessToken, AuthorizationHeaderToken, BasicAuth, SudoHeader, SudoParam, TOTPHeader, Token

HTTP request headers

  • Content-Type: Not defined
  • Accept: Not defined

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

admin_delete_unadopted_repository

admin_delete_unadopted_repository(owner, repo) Delete unadopted files

Parameters

Name Type Description Required Notes
owner String owner of the repo [required]
repo String name of the repo [required]

Return type

(empty response body)

Authorization

AccessToken, AuthorizationHeaderToken, BasicAuth, SudoHeader, SudoParam, TOTPHeader, Token

HTTP request headers

  • Content-Type: Not defined
  • Accept: Not defined

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

admin_delete_user

admin_delete_user(username) Delete a user

Parameters

Name Type Description Required Notes
username String username of user to delete [required]

Return type

(empty response body)

Authorization

AccessToken, AuthorizationHeaderToken, BasicAuth, SudoHeader, SudoParam, TOTPHeader, Token

HTTP request headers

  • Content-Type: Not defined
  • Accept: Not defined

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

admin_delete_user_public_key

admin_delete_user_public_key(username, id) Delete a user's public key

Parameters

Name Type Description Required Notes
username String username of user [required]
id i64 id of the key to delete [required]

Return type

(empty response body)

Authorization

AccessToken, AuthorizationHeaderToken, BasicAuth, SudoHeader, SudoParam, TOTPHeader, Token

HTTP request headers

  • Content-Type: Not defined
  • Accept: Not defined

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

admin_edit_user

crate::models::User admin_edit_user(username, body) Edit an existing user

Parameters

Name Type Description Required Notes
username String username of user to edit [required]
body Option<EditUserOption>

Return type

crate::models::User

Authorization

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

Veccrate::models::Organization admin_get_all_orgs(page, limit) List all organizations

Parameters

Name Type Description Required Notes
page Option<i32> page number of results to return (1-based)
limit Option<i32> page size of results

Return type

Veccrate::models::Organization

Authorization

AccessToken, AuthorizationHeaderToken, BasicAuth, SudoHeader, SudoParam, TOTPHeader, Token

HTTP request headers

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

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

admin_get_all_users

Veccrate::models::User admin_get_all_users(page, limit) List all users

Parameters

Name Type Description Required Notes
page Option<i32> page number of results to return (1-based)
limit Option<i32> page size of results

Return type

Veccrate::models::User

Authorization

AccessToken, AuthorizationHeaderToken, BasicAuth, SudoHeader, SudoParam, TOTPHeader, Token

HTTP request headers

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

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

admin_unadopted_list

Vec admin_unadopted_list(page, limit, pattern) List unadopted repositories

Parameters

Name Type Description Required Notes
page Option<i32> page number of results to return (1-based)
limit Option<i32> page size of results
pattern Option<String> pattern of repositories to search for

Return type

Vec

Authorization

AccessToken, AuthorizationHeaderToken, BasicAuth, SudoHeader, SudoParam, TOTPHeader, Token

HTTP request headers

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

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