All URIs are relative to /api/v1
Method | HTTP request | Description |
---|---|---|
admin_add_rule_to_quota_group | PUT /admin/quota/groups/{quotagroup}/rules/{quotarule} | Adds a rule to a quota group |
admin_add_user_to_quota_group | PUT /admin/quota/groups/{quotagroup}/users/{username} | Add a user to a quota group |
admin_adopt_repository | POST /admin/unadopted/{owner}/{repo} | Adopt unadopted files as a repository |
admin_create_hook | POST /admin/hooks | Create a hook |
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_quota_group | POST /admin/quota/groups | Create a new quota group |
admin_create_quota_rule | POST /admin/quota/rules | Create a new quota rule |
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_d_elete_quota_rule | DELETE /admin/quota/rules/{quotarule} | Deletes a quota rule |
admin_delete_hook | DELETE /admin/hooks/{id} | Delete a hook |
admin_delete_quota_group | DELETE /admin/quota/groups/{quotagroup} | Delete a quota group |
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_hook | PATCH /admin/hooks/{id} | Update a hook |
admin_edit_quota_rule | PATCH /admin/quota/rules/{quotarule} | Change an existing quota rule |
admin_edit_user | PATCH /admin/users/{username} | Edit an existing user |
admin_get_all_emails | GET /admin/emails | List all emails |
admin_get_all_orgs | GET /admin/orgs | List all organizations |
admin_get_hook | GET /admin/hooks/{id} | Get a hook |
admin_get_quota_group | GET /admin/quota/groups/{quotagroup} | Get information about the quota group |
admin_get_quota_rule | GET /admin/quota/rules/{quotarule} | Get information about a quota rule |
admin_get_runner_registration_token | GET /admin/runners/registration-token | Get an global actions runner registration token |
admin_get_user_quota | GET /admin/users/{username}/quota | Get the user's quota info |
admin_list_hooks | GET /admin/hooks | List system's webhooks |
admin_list_quota_groups | GET /admin/quota/groups | List the available quota groups |
admin_list_quota_rules | GET /admin/quota/rules | List the available quota rules |
admin_list_users_in_quota_group | GET /admin/quota/groups/{quotagroup}/users | List users in a quota group |
admin_remove_rule_from_quota_group | DELETE /admin/quota/groups/{quotagroup}/rules/{quotarule} | Removes a rule from a quota group |
admin_remove_user_from_quota_group | DELETE /admin/quota/groups/{quotagroup}/users/{username} | Remove a user from a quota group |
admin_rename_user | POST /admin/users/{username}/rename | Rename a user |
admin_search_emails | GET /admin/emails/search | Search all emails |
admin_search_users | GET /admin/users | Search users according filter conditions |
admin_set_user_quota_groups | POST /admin/users/{username}/quota/groups | Set the user's quota groups to a given list. |
admin_unadopted_list | GET /admin/unadopted | List unadopted repositories |
admin_add_rule_to_quota_group(quotagroup, quotarule)
Adds a rule to a quota group
- Api Key Authentication (TOTPHeader):
- Api Key Authentication (AuthorizationHeaderToken):
- Api Key Authentication (SudoHeader):
- Basic Authentication (BasicAuth):
- Api Key Authentication (AccessToken):
- Api Key Authentication (SudoParam):
- Api Key Authentication (Token):
import clientapi_forgejo
from clientapi_forgejo.rest import ApiException
from pprint import pprint
# Defining the host is optional and defaults to /api/v1
# See configuration.py for a list of all supported configuration parameters.
configuration = clientapi_forgejo.Configuration(
host = "/api/v1"
)
# The client must configure the authentication and authorization parameters
# in accordance with the API server security policy.
# Examples for each auth method are provided below, use the example that
# satisfies your auth use case.
# Configure API key authorization: TOTPHeader
configuration.api_key['TOTPHeader'] = os.environ["API_KEY"]
# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
# configuration.api_key_prefix['TOTPHeader'] = 'Bearer'
# Configure API key authorization: AuthorizationHeaderToken
configuration.api_key['AuthorizationHeaderToken'] = os.environ["API_KEY"]
# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
# configuration.api_key_prefix['AuthorizationHeaderToken'] = 'Bearer'
# Configure API key authorization: SudoHeader
configuration.api_key['SudoHeader'] = os.environ["API_KEY"]
# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
# configuration.api_key_prefix['SudoHeader'] = 'Bearer'
# Configure HTTP basic authorization: BasicAuth
configuration = clientapi_forgejo.Configuration(
username = os.environ["USERNAME"],
password = os.environ["PASSWORD"]
)
# Configure API key authorization: AccessToken
configuration.api_key['AccessToken'] = os.environ["API_KEY"]
# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
# configuration.api_key_prefix['AccessToken'] = 'Bearer'
# Configure API key authorization: SudoParam
configuration.api_key['SudoParam'] = os.environ["API_KEY"]
# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
# configuration.api_key_prefix['SudoParam'] = 'Bearer'
# Configure API key authorization: Token
configuration.api_key['Token'] = os.environ["API_KEY"]
# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
# configuration.api_key_prefix['Token'] = 'Bearer'
# Enter a context with an instance of the API client
with clientapi_forgejo.ApiClient(configuration) as api_client:
# Create an instance of the API class
api_instance = clientapi_forgejo.AdminApi(api_client)
quotagroup = 'quotagroup_example' # str | quota group to add a rule to
quotarule = 'quotarule_example' # str | the name of the quota rule to add to the group
try:
# Adds a rule to a quota group
api_instance.admin_add_rule_to_quota_group(quotagroup, quotarule)
except Exception as e:
print("Exception when calling AdminApi->admin_add_rule_to_quota_group: %s\n" % e)
Name | Type | Description | Notes |
---|---|---|---|
quotagroup | str | quota group to add a rule to | |
quotarule | str | the name of the quota rule to add to the group |
void (empty response body)
TOTPHeader, AuthorizationHeaderToken, SudoHeader, BasicAuth, AccessToken, SudoParam, Token
- Content-Type: Not defined
- Accept: application/json
Status code | Description | Response headers |
---|---|---|
204 | APIEmpty is an empty response | - |
400 | APIError is error format response | - |
403 | APIForbiddenError is a forbidden error response | - |
404 | APINotFound is a not found error response | - |
409 | APIError is error format response | - |
422 | APIValidationError is error format response related to input validation | - |
[Back to top] [Back to API list] [Back to Model list] [Back to README]
admin_add_user_to_quota_group(quotagroup, username)
Add a user to a quota group
- Api Key Authentication (TOTPHeader):
- Api Key Authentication (AuthorizationHeaderToken):
- Api Key Authentication (SudoHeader):
- Basic Authentication (BasicAuth):
- Api Key Authentication (AccessToken):
- Api Key Authentication (SudoParam):
- Api Key Authentication (Token):
import clientapi_forgejo
from clientapi_forgejo.rest import ApiException
from pprint import pprint
# Defining the host is optional and defaults to /api/v1
# See configuration.py for a list of all supported configuration parameters.
configuration = clientapi_forgejo.Configuration(
host = "/api/v1"
)
# The client must configure the authentication and authorization parameters
# in accordance with the API server security policy.
# Examples for each auth method are provided below, use the example that
# satisfies your auth use case.
# Configure API key authorization: TOTPHeader
configuration.api_key['TOTPHeader'] = os.environ["API_KEY"]
# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
# configuration.api_key_prefix['TOTPHeader'] = 'Bearer'
# Configure API key authorization: AuthorizationHeaderToken
configuration.api_key['AuthorizationHeaderToken'] = os.environ["API_KEY"]
# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
# configuration.api_key_prefix['AuthorizationHeaderToken'] = 'Bearer'
# Configure API key authorization: SudoHeader
configuration.api_key['SudoHeader'] = os.environ["API_KEY"]
# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
# configuration.api_key_prefix['SudoHeader'] = 'Bearer'
# Configure HTTP basic authorization: BasicAuth
configuration = clientapi_forgejo.Configuration(
username = os.environ["USERNAME"],
password = os.environ["PASSWORD"]
)
# Configure API key authorization: AccessToken
configuration.api_key['AccessToken'] = os.environ["API_KEY"]
# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
# configuration.api_key_prefix['AccessToken'] = 'Bearer'
# Configure API key authorization: SudoParam
configuration.api_key['SudoParam'] = os.environ["API_KEY"]
# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
# configuration.api_key_prefix['SudoParam'] = 'Bearer'
# Configure API key authorization: Token
configuration.api_key['Token'] = os.environ["API_KEY"]
# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
# configuration.api_key_prefix['Token'] = 'Bearer'
# Enter a context with an instance of the API client
with clientapi_forgejo.ApiClient(configuration) as api_client:
# Create an instance of the API class
api_instance = clientapi_forgejo.AdminApi(api_client)
quotagroup = 'quotagroup_example' # str | quota group to add the user to
username = 'username_example' # str | username of the user to add to the quota group
try:
# Add a user to a quota group
api_instance.admin_add_user_to_quota_group(quotagroup, username)
except Exception as e:
print("Exception when calling AdminApi->admin_add_user_to_quota_group: %s\n" % e)
Name | Type | Description | Notes |
---|---|---|---|
quotagroup | str | quota group to add the user to | |
username | str | username of the user to add to the quota group |
void (empty response body)
TOTPHeader, AuthorizationHeaderToken, SudoHeader, BasicAuth, AccessToken, SudoParam, Token
- Content-Type: Not defined
- Accept: application/json
Status code | Description | Response headers |
---|---|---|
204 | APIEmpty is an empty response | - |
400 | APIError is error format response | - |
403 | APIForbiddenError is a forbidden error response | - |
404 | APINotFound is a not found error response | - |
409 | APIError is error format response | - |
422 | APIValidationError is error format response related to input validation | - |
[Back to top] [Back to API list] [Back to Model list] [Back to README]
admin_adopt_repository(owner, repo)
Adopt unadopted files as a repository
- Api Key Authentication (TOTPHeader):
- Api Key Authentication (AuthorizationHeaderToken):
- Api Key Authentication (SudoHeader):
- Basic Authentication (BasicAuth):
- Api Key Authentication (AccessToken):
- Api Key Authentication (SudoParam):
- Api Key Authentication (Token):
import clientapi_forgejo
from clientapi_forgejo.rest import ApiException
from pprint import pprint
# Defining the host is optional and defaults to /api/v1
# See configuration.py for a list of all supported configuration parameters.
configuration = clientapi_forgejo.Configuration(
host = "/api/v1"
)
# The client must configure the authentication and authorization parameters
# in accordance with the API server security policy.
# Examples for each auth method are provided below, use the example that
# satisfies your auth use case.
# Configure API key authorization: TOTPHeader
configuration.api_key['TOTPHeader'] = os.environ["API_KEY"]
# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
# configuration.api_key_prefix['TOTPHeader'] = 'Bearer'
# Configure API key authorization: AuthorizationHeaderToken
configuration.api_key['AuthorizationHeaderToken'] = os.environ["API_KEY"]
# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
# configuration.api_key_prefix['AuthorizationHeaderToken'] = 'Bearer'
# Configure API key authorization: SudoHeader
configuration.api_key['SudoHeader'] = os.environ["API_KEY"]
# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
# configuration.api_key_prefix['SudoHeader'] = 'Bearer'
# Configure HTTP basic authorization: BasicAuth
configuration = clientapi_forgejo.Configuration(
username = os.environ["USERNAME"],
password = os.environ["PASSWORD"]
)
# Configure API key authorization: AccessToken
configuration.api_key['AccessToken'] = os.environ["API_KEY"]
# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
# configuration.api_key_prefix['AccessToken'] = 'Bearer'
# Configure API key authorization: SudoParam
configuration.api_key['SudoParam'] = os.environ["API_KEY"]
# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
# configuration.api_key_prefix['SudoParam'] = 'Bearer'
# Configure API key authorization: Token
configuration.api_key['Token'] = os.environ["API_KEY"]
# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
# configuration.api_key_prefix['Token'] = 'Bearer'
# Enter a context with an instance of the API client
with clientapi_forgejo.ApiClient(configuration) as api_client:
# Create an instance of the API class
api_instance = clientapi_forgejo.AdminApi(api_client)
owner = 'owner_example' # str | owner of the repo
repo = 'repo_example' # str | name of the repo
try:
# Adopt unadopted files as a repository
api_instance.admin_adopt_repository(owner, repo)
except Exception as e:
print("Exception when calling AdminApi->admin_adopt_repository: %s\n" % e)
Name | Type | Description | Notes |
---|---|---|---|
owner | str | owner of the repo | |
repo | str | name of the repo |
void (empty response body)
TOTPHeader, AuthorizationHeaderToken, SudoHeader, BasicAuth, AccessToken, SudoParam, Token
- Content-Type: Not defined
- Accept: application/json
Status code | Description | Response headers |
---|---|---|
204 | APIEmpty is an empty response | - |
403 | APIForbiddenError is a forbidden error response | - |
404 | APINotFound is a not found error response | - |
[Back to top] [Back to API list] [Back to Model list] [Back to README]
Hook admin_create_hook(body)
Create a hook
- Api Key Authentication (TOTPHeader):
- Api Key Authentication (AuthorizationHeaderToken):
- Api Key Authentication (SudoHeader):
- Basic Authentication (BasicAuth):
- Api Key Authentication (AccessToken):
- Api Key Authentication (SudoParam):
- Api Key Authentication (Token):
import clientapi_forgejo
from clientapi_forgejo.models.create_hook_option import CreateHookOption
from clientapi_forgejo.models.hook import Hook
from clientapi_forgejo.rest import ApiException
from pprint import pprint
# Defining the host is optional and defaults to /api/v1
# See configuration.py for a list of all supported configuration parameters.
configuration = clientapi_forgejo.Configuration(
host = "/api/v1"
)
# The client must configure the authentication and authorization parameters
# in accordance with the API server security policy.
# Examples for each auth method are provided below, use the example that
# satisfies your auth use case.
# Configure API key authorization: TOTPHeader
configuration.api_key['TOTPHeader'] = os.environ["API_KEY"]
# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
# configuration.api_key_prefix['TOTPHeader'] = 'Bearer'
# Configure API key authorization: AuthorizationHeaderToken
configuration.api_key['AuthorizationHeaderToken'] = os.environ["API_KEY"]
# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
# configuration.api_key_prefix['AuthorizationHeaderToken'] = 'Bearer'
# Configure API key authorization: SudoHeader
configuration.api_key['SudoHeader'] = os.environ["API_KEY"]
# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
# configuration.api_key_prefix['SudoHeader'] = 'Bearer'
# Configure HTTP basic authorization: BasicAuth
configuration = clientapi_forgejo.Configuration(
username = os.environ["USERNAME"],
password = os.environ["PASSWORD"]
)
# Configure API key authorization: AccessToken
configuration.api_key['AccessToken'] = os.environ["API_KEY"]
# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
# configuration.api_key_prefix['AccessToken'] = 'Bearer'
# Configure API key authorization: SudoParam
configuration.api_key['SudoParam'] = os.environ["API_KEY"]
# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
# configuration.api_key_prefix['SudoParam'] = 'Bearer'
# Configure API key authorization: Token
configuration.api_key['Token'] = os.environ["API_KEY"]
# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
# configuration.api_key_prefix['Token'] = 'Bearer'
# Enter a context with an instance of the API client
with clientapi_forgejo.ApiClient(configuration) as api_client:
# Create an instance of the API class
api_instance = clientapi_forgejo.AdminApi(api_client)
body = clientapi_forgejo.CreateHookOption() # CreateHookOption |
try:
# Create a hook
api_response = api_instance.admin_create_hook(body)
print("The response of AdminApi->admin_create_hook:\n")
pprint(api_response)
except Exception as e:
print("Exception when calling AdminApi->admin_create_hook: %s\n" % e)
Name | Type | Description | Notes |
---|---|---|---|
body | CreateHookOption |
TOTPHeader, AuthorizationHeaderToken, SudoHeader, BasicAuth, AccessToken, SudoParam, Token
- Content-Type: application/json
- Accept: application/json
Status code | Description | Response headers |
---|---|---|
201 | Hook | - |
[Back to top] [Back to API list] [Back to Model list] [Back to README]
Organization admin_create_org(username, organization)
Create an organization
- Api Key Authentication (TOTPHeader):
- Api Key Authentication (AuthorizationHeaderToken):
- Api Key Authentication (SudoHeader):
- Basic Authentication (BasicAuth):
- Api Key Authentication (AccessToken):
- Api Key Authentication (SudoParam):
- Api Key Authentication (Token):
import clientapi_forgejo
from clientapi_forgejo.models.create_org_option import CreateOrgOption
from clientapi_forgejo.models.organization import Organization
from clientapi_forgejo.rest import ApiException
from pprint import pprint
# Defining the host is optional and defaults to /api/v1
# See configuration.py for a list of all supported configuration parameters.
configuration = clientapi_forgejo.Configuration(
host = "/api/v1"
)
# The client must configure the authentication and authorization parameters
# in accordance with the API server security policy.
# Examples for each auth method are provided below, use the example that
# satisfies your auth use case.
# Configure API key authorization: TOTPHeader
configuration.api_key['TOTPHeader'] = os.environ["API_KEY"]
# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
# configuration.api_key_prefix['TOTPHeader'] = 'Bearer'
# Configure API key authorization: AuthorizationHeaderToken
configuration.api_key['AuthorizationHeaderToken'] = os.environ["API_KEY"]
# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
# configuration.api_key_prefix['AuthorizationHeaderToken'] = 'Bearer'
# Configure API key authorization: SudoHeader
configuration.api_key['SudoHeader'] = os.environ["API_KEY"]
# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
# configuration.api_key_prefix['SudoHeader'] = 'Bearer'
# Configure HTTP basic authorization: BasicAuth
configuration = clientapi_forgejo.Configuration(
username = os.environ["USERNAME"],
password = os.environ["PASSWORD"]
)
# Configure API key authorization: AccessToken
configuration.api_key['AccessToken'] = os.environ["API_KEY"]
# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
# configuration.api_key_prefix['AccessToken'] = 'Bearer'
# Configure API key authorization: SudoParam
configuration.api_key['SudoParam'] = os.environ["API_KEY"]
# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
# configuration.api_key_prefix['SudoParam'] = 'Bearer'
# Configure API key authorization: Token
configuration.api_key['Token'] = os.environ["API_KEY"]
# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
# configuration.api_key_prefix['Token'] = 'Bearer'
# Enter a context with an instance of the API client
with clientapi_forgejo.ApiClient(configuration) as api_client:
# Create an instance of the API class
api_instance = clientapi_forgejo.AdminApi(api_client)
username = 'username_example' # str | username of the user that will own the created organization
organization = clientapi_forgejo.CreateOrgOption() # CreateOrgOption |
try:
# Create an organization
api_response = api_instance.admin_create_org(username, organization)
print("The response of AdminApi->admin_create_org:\n")
pprint(api_response)
except Exception as e:
print("Exception when calling AdminApi->admin_create_org: %s\n" % e)
Name | Type | Description | Notes |
---|---|---|---|
username | str | username of the user that will own the created organization | |
organization | CreateOrgOption |
TOTPHeader, AuthorizationHeaderToken, SudoHeader, BasicAuth, AccessToken, SudoParam, Token
- Content-Type: application/json
- Accept: application/json
Status code | Description | Response headers |
---|---|---|
201 | Organization | - |
403 | APIForbiddenError is a forbidden error response | - |
422 | APIValidationError is error format response related to input validation | - |
[Back to top] [Back to API list] [Back to Model list] [Back to README]
PublicKey admin_create_public_key(username, key=key)
Add a public key on behalf of a user
- Api Key Authentication (TOTPHeader):
- Api Key Authentication (AuthorizationHeaderToken):
- Api Key Authentication (SudoHeader):
- Basic Authentication (BasicAuth):
- Api Key Authentication (AccessToken):
- Api Key Authentication (SudoParam):
- Api Key Authentication (Token):
import clientapi_forgejo
from clientapi_forgejo.models.create_key_option import CreateKeyOption
from clientapi_forgejo.models.public_key import PublicKey
from clientapi_forgejo.rest import ApiException
from pprint import pprint
# Defining the host is optional and defaults to /api/v1
# See configuration.py for a list of all supported configuration parameters.
configuration = clientapi_forgejo.Configuration(
host = "/api/v1"
)
# The client must configure the authentication and authorization parameters
# in accordance with the API server security policy.
# Examples for each auth method are provided below, use the example that
# satisfies your auth use case.
# Configure API key authorization: TOTPHeader
configuration.api_key['TOTPHeader'] = os.environ["API_KEY"]
# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
# configuration.api_key_prefix['TOTPHeader'] = 'Bearer'
# Configure API key authorization: AuthorizationHeaderToken
configuration.api_key['AuthorizationHeaderToken'] = os.environ["API_KEY"]
# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
# configuration.api_key_prefix['AuthorizationHeaderToken'] = 'Bearer'
# Configure API key authorization: SudoHeader
configuration.api_key['SudoHeader'] = os.environ["API_KEY"]
# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
# configuration.api_key_prefix['SudoHeader'] = 'Bearer'
# Configure HTTP basic authorization: BasicAuth
configuration = clientapi_forgejo.Configuration(
username = os.environ["USERNAME"],
password = os.environ["PASSWORD"]
)
# Configure API key authorization: AccessToken
configuration.api_key['AccessToken'] = os.environ["API_KEY"]
# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
# configuration.api_key_prefix['AccessToken'] = 'Bearer'
# Configure API key authorization: SudoParam
configuration.api_key['SudoParam'] = os.environ["API_KEY"]
# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
# configuration.api_key_prefix['SudoParam'] = 'Bearer'
# Configure API key authorization: Token
configuration.api_key['Token'] = os.environ["API_KEY"]
# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
# configuration.api_key_prefix['Token'] = 'Bearer'
# Enter a context with an instance of the API client
with clientapi_forgejo.ApiClient(configuration) as api_client:
# Create an instance of the API class
api_instance = clientapi_forgejo.AdminApi(api_client)
username = 'username_example' # str | username of the user
key = clientapi_forgejo.CreateKeyOption() # CreateKeyOption | (optional)
try:
# Add a public key on behalf of a user
api_response = api_instance.admin_create_public_key(username, key=key)
print("The response of AdminApi->admin_create_public_key:\n")
pprint(api_response)
except Exception as e:
print("Exception when calling AdminApi->admin_create_public_key: %s\n" % e)
Name | Type | Description | Notes |
---|---|---|---|
username | str | username of the user | |
key | CreateKeyOption | [optional] |
TOTPHeader, AuthorizationHeaderToken, SudoHeader, BasicAuth, AccessToken, SudoParam, Token
- Content-Type: application/json
- Accept: application/json
Status code | Description | Response headers |
---|---|---|
201 | PublicKey | - |
403 | APIForbiddenError is a forbidden error response | - |
422 | APIValidationError is error format response related to input validation | - |
[Back to top] [Back to API list] [Back to Model list] [Back to README]
QuotaGroup admin_create_quota_group(group)
Create a new quota group
- Api Key Authentication (TOTPHeader):
- Api Key Authentication (AuthorizationHeaderToken):
- Api Key Authentication (SudoHeader):
- Basic Authentication (BasicAuth):
- Api Key Authentication (AccessToken):
- Api Key Authentication (SudoParam):
- Api Key Authentication (Token):
import clientapi_forgejo
from clientapi_forgejo.models.create_quota_group_options import CreateQuotaGroupOptions
from clientapi_forgejo.models.quota_group import QuotaGroup
from clientapi_forgejo.rest import ApiException
from pprint import pprint
# Defining the host is optional and defaults to /api/v1
# See configuration.py for a list of all supported configuration parameters.
configuration = clientapi_forgejo.Configuration(
host = "/api/v1"
)
# The client must configure the authentication and authorization parameters
# in accordance with the API server security policy.
# Examples for each auth method are provided below, use the example that
# satisfies your auth use case.
# Configure API key authorization: TOTPHeader
configuration.api_key['TOTPHeader'] = os.environ["API_KEY"]
# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
# configuration.api_key_prefix['TOTPHeader'] = 'Bearer'
# Configure API key authorization: AuthorizationHeaderToken
configuration.api_key['AuthorizationHeaderToken'] = os.environ["API_KEY"]
# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
# configuration.api_key_prefix['AuthorizationHeaderToken'] = 'Bearer'
# Configure API key authorization: SudoHeader
configuration.api_key['SudoHeader'] = os.environ["API_KEY"]
# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
# configuration.api_key_prefix['SudoHeader'] = 'Bearer'
# Configure HTTP basic authorization: BasicAuth
configuration = clientapi_forgejo.Configuration(
username = os.environ["USERNAME"],
password = os.environ["PASSWORD"]
)
# Configure API key authorization: AccessToken
configuration.api_key['AccessToken'] = os.environ["API_KEY"]
# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
# configuration.api_key_prefix['AccessToken'] = 'Bearer'
# Configure API key authorization: SudoParam
configuration.api_key['SudoParam'] = os.environ["API_KEY"]
# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
# configuration.api_key_prefix['SudoParam'] = 'Bearer'
# Configure API key authorization: Token
configuration.api_key['Token'] = os.environ["API_KEY"]
# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
# configuration.api_key_prefix['Token'] = 'Bearer'
# Enter a context with an instance of the API client
with clientapi_forgejo.ApiClient(configuration) as api_client:
# Create an instance of the API class
api_instance = clientapi_forgejo.AdminApi(api_client)
group = clientapi_forgejo.CreateQuotaGroupOptions() # CreateQuotaGroupOptions | Definition of the quota group
try:
# Create a new quota group
api_response = api_instance.admin_create_quota_group(group)
print("The response of AdminApi->admin_create_quota_group:\n")
pprint(api_response)
except Exception as e:
print("Exception when calling AdminApi->admin_create_quota_group: %s\n" % e)
Name | Type | Description | Notes |
---|---|---|---|
group | CreateQuotaGroupOptions | Definition of the quota group |
TOTPHeader, AuthorizationHeaderToken, SudoHeader, BasicAuth, AccessToken, SudoParam, Token
- Content-Type: application/json, text/plain
- Accept: application/json
Status code | Description | Response headers |
---|---|---|
201 | QuotaGroup | - |
400 | APIError is error format response | - |
403 | APIForbiddenError is a forbidden error response | - |
409 | APIError is error format response | - |
422 | APIValidationError is error format response related to input validation | - |
[Back to top] [Back to API list] [Back to Model list] [Back to README]
QuotaRuleInfo admin_create_quota_rule(rule)
Create a new quota rule
- Api Key Authentication (TOTPHeader):
- Api Key Authentication (AuthorizationHeaderToken):
- Api Key Authentication (SudoHeader):
- Basic Authentication (BasicAuth):
- Api Key Authentication (AccessToken):
- Api Key Authentication (SudoParam):
- Api Key Authentication (Token):
import clientapi_forgejo
from clientapi_forgejo.models.create_quota_rule_options import CreateQuotaRuleOptions
from clientapi_forgejo.models.quota_rule_info import QuotaRuleInfo
from clientapi_forgejo.rest import ApiException
from pprint import pprint
# Defining the host is optional and defaults to /api/v1
# See configuration.py for a list of all supported configuration parameters.
configuration = clientapi_forgejo.Configuration(
host = "/api/v1"
)
# The client must configure the authentication and authorization parameters
# in accordance with the API server security policy.
# Examples for each auth method are provided below, use the example that
# satisfies your auth use case.
# Configure API key authorization: TOTPHeader
configuration.api_key['TOTPHeader'] = os.environ["API_KEY"]
# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
# configuration.api_key_prefix['TOTPHeader'] = 'Bearer'
# Configure API key authorization: AuthorizationHeaderToken
configuration.api_key['AuthorizationHeaderToken'] = os.environ["API_KEY"]
# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
# configuration.api_key_prefix['AuthorizationHeaderToken'] = 'Bearer'
# Configure API key authorization: SudoHeader
configuration.api_key['SudoHeader'] = os.environ["API_KEY"]
# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
# configuration.api_key_prefix['SudoHeader'] = 'Bearer'
# Configure HTTP basic authorization: BasicAuth
configuration = clientapi_forgejo.Configuration(
username = os.environ["USERNAME"],
password = os.environ["PASSWORD"]
)
# Configure API key authorization: AccessToken
configuration.api_key['AccessToken'] = os.environ["API_KEY"]
# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
# configuration.api_key_prefix['AccessToken'] = 'Bearer'
# Configure API key authorization: SudoParam
configuration.api_key['SudoParam'] = os.environ["API_KEY"]
# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
# configuration.api_key_prefix['SudoParam'] = 'Bearer'
# Configure API key authorization: Token
configuration.api_key['Token'] = os.environ["API_KEY"]
# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
# configuration.api_key_prefix['Token'] = 'Bearer'
# Enter a context with an instance of the API client
with clientapi_forgejo.ApiClient(configuration) as api_client:
# Create an instance of the API class
api_instance = clientapi_forgejo.AdminApi(api_client)
rule = clientapi_forgejo.CreateQuotaRuleOptions() # CreateQuotaRuleOptions | Definition of the quota rule
try:
# Create a new quota rule
api_response = api_instance.admin_create_quota_rule(rule)
print("The response of AdminApi->admin_create_quota_rule:\n")
pprint(api_response)
except Exception as e:
print("Exception when calling AdminApi->admin_create_quota_rule: %s\n" % e)
Name | Type | Description | Notes |
---|---|---|---|
rule | CreateQuotaRuleOptions | Definition of the quota rule |
TOTPHeader, AuthorizationHeaderToken, SudoHeader, BasicAuth, AccessToken, SudoParam, Token
- Content-Type: application/json, text/plain
- Accept: application/json
Status code | Description | Response headers |
---|---|---|
201 | QuotaRuleInfo | - |
400 | APIError is error format response | - |
403 | APIForbiddenError is a forbidden error response | - |
409 | APIError is error format response | - |
422 | APIValidationError is error format response related to input validation | - |
[Back to top] [Back to API list] [Back to Model list] [Back to README]
Repository admin_create_repo(username, repository)
Create a repository on behalf of a user
- Api Key Authentication (TOTPHeader):
- Api Key Authentication (AuthorizationHeaderToken):
- Api Key Authentication (SudoHeader):
- Basic Authentication (BasicAuth):
- Api Key Authentication (AccessToken):
- Api Key Authentication (SudoParam):
- Api Key Authentication (Token):
import clientapi_forgejo
from clientapi_forgejo.models.create_repo_option import CreateRepoOption
from clientapi_forgejo.models.repository import Repository
from clientapi_forgejo.rest import ApiException
from pprint import pprint
# Defining the host is optional and defaults to /api/v1
# See configuration.py for a list of all supported configuration parameters.
configuration = clientapi_forgejo.Configuration(
host = "/api/v1"
)
# The client must configure the authentication and authorization parameters
# in accordance with the API server security policy.
# Examples for each auth method are provided below, use the example that
# satisfies your auth use case.
# Configure API key authorization: TOTPHeader
configuration.api_key['TOTPHeader'] = os.environ["API_KEY"]
# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
# configuration.api_key_prefix['TOTPHeader'] = 'Bearer'
# Configure API key authorization: AuthorizationHeaderToken
configuration.api_key['AuthorizationHeaderToken'] = os.environ["API_KEY"]
# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
# configuration.api_key_prefix['AuthorizationHeaderToken'] = 'Bearer'
# Configure API key authorization: SudoHeader
configuration.api_key['SudoHeader'] = os.environ["API_KEY"]
# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
# configuration.api_key_prefix['SudoHeader'] = 'Bearer'
# Configure HTTP basic authorization: BasicAuth
configuration = clientapi_forgejo.Configuration(
username = os.environ["USERNAME"],
password = os.environ["PASSWORD"]
)
# Configure API key authorization: AccessToken
configuration.api_key['AccessToken'] = os.environ["API_KEY"]
# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
# configuration.api_key_prefix['AccessToken'] = 'Bearer'
# Configure API key authorization: SudoParam
configuration.api_key['SudoParam'] = os.environ["API_KEY"]
# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
# configuration.api_key_prefix['SudoParam'] = 'Bearer'
# Configure API key authorization: Token
configuration.api_key['Token'] = os.environ["API_KEY"]
# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
# configuration.api_key_prefix['Token'] = 'Bearer'
# Enter a context with an instance of the API client
with clientapi_forgejo.ApiClient(configuration) as api_client:
# Create an instance of the API class
api_instance = clientapi_forgejo.AdminApi(api_client)
username = 'username_example' # str | username of the user. This user will own the created repository
repository = clientapi_forgejo.CreateRepoOption() # CreateRepoOption |
try:
# Create a repository on behalf of a user
api_response = api_instance.admin_create_repo(username, repository)
print("The response of AdminApi->admin_create_repo:\n")
pprint(api_response)
except Exception as e:
print("Exception when calling AdminApi->admin_create_repo: %s\n" % e)
Name | Type | Description | Notes |
---|---|---|---|
username | str | username of the user. This user will own the created repository | |
repository | CreateRepoOption |
TOTPHeader, AuthorizationHeaderToken, SudoHeader, BasicAuth, AccessToken, SudoParam, Token
- Content-Type: application/json
- Accept: application/json
Status code | Description | Response headers |
---|---|---|
201 | Repository | - |
400 | APIError is error format response | - |
403 | APIForbiddenError is a forbidden error response | - |
404 | APINotFound is a not found error response | - |
409 | APIError is error format response | - |
422 | APIValidationError is error format response related to input validation | - |
[Back to top] [Back to API list] [Back to Model list] [Back to README]
User admin_create_user(body=body)
Create a user
- Api Key Authentication (TOTPHeader):
- Api Key Authentication (AuthorizationHeaderToken):
- Api Key Authentication (SudoHeader):
- Basic Authentication (BasicAuth):
- Api Key Authentication (AccessToken):
- Api Key Authentication (SudoParam):
- Api Key Authentication (Token):
import clientapi_forgejo
from clientapi_forgejo.models.create_user_option import CreateUserOption
from clientapi_forgejo.models.user import User
from clientapi_forgejo.rest import ApiException
from pprint import pprint
# Defining the host is optional and defaults to /api/v1
# See configuration.py for a list of all supported configuration parameters.
configuration = clientapi_forgejo.Configuration(
host = "/api/v1"
)
# The client must configure the authentication and authorization parameters
# in accordance with the API server security policy.
# Examples for each auth method are provided below, use the example that
# satisfies your auth use case.
# Configure API key authorization: TOTPHeader
configuration.api_key['TOTPHeader'] = os.environ["API_KEY"]
# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
# configuration.api_key_prefix['TOTPHeader'] = 'Bearer'
# Configure API key authorization: AuthorizationHeaderToken
configuration.api_key['AuthorizationHeaderToken'] = os.environ["API_KEY"]
# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
# configuration.api_key_prefix['AuthorizationHeaderToken'] = 'Bearer'
# Configure API key authorization: SudoHeader
configuration.api_key['SudoHeader'] = os.environ["API_KEY"]
# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
# configuration.api_key_prefix['SudoHeader'] = 'Bearer'
# Configure HTTP basic authorization: BasicAuth
configuration = clientapi_forgejo.Configuration(
username = os.environ["USERNAME"],
password = os.environ["PASSWORD"]
)
# Configure API key authorization: AccessToken
configuration.api_key['AccessToken'] = os.environ["API_KEY"]
# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
# configuration.api_key_prefix['AccessToken'] = 'Bearer'
# Configure API key authorization: SudoParam
configuration.api_key['SudoParam'] = os.environ["API_KEY"]
# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
# configuration.api_key_prefix['SudoParam'] = 'Bearer'
# Configure API key authorization: Token
configuration.api_key['Token'] = os.environ["API_KEY"]
# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
# configuration.api_key_prefix['Token'] = 'Bearer'
# Enter a context with an instance of the API client
with clientapi_forgejo.ApiClient(configuration) as api_client:
# Create an instance of the API class
api_instance = clientapi_forgejo.AdminApi(api_client)
body = clientapi_forgejo.CreateUserOption() # CreateUserOption | (optional)
try:
# Create a user
api_response = api_instance.admin_create_user(body=body)
print("The response of AdminApi->admin_create_user:\n")
pprint(api_response)
except Exception as e:
print("Exception when calling AdminApi->admin_create_user: %s\n" % e)
Name | Type | Description | Notes |
---|---|---|---|
body | CreateUserOption | [optional] |
TOTPHeader, AuthorizationHeaderToken, SudoHeader, BasicAuth, AccessToken, SudoParam, Token
- Content-Type: application/json
- Accept: application/json
Status code | Description | Response headers |
---|---|---|
201 | User | - |
400 | APIError is error format response | - |
403 | APIForbiddenError is a forbidden error response | - |
422 | APIValidationError is error format response related to input validation | - |
[Back to top] [Back to API list] [Back to Model list] [Back to README]
List[Cron] admin_cron_list(page=page, limit=limit)
List cron tasks
- Api Key Authentication (TOTPHeader):
- Api Key Authentication (AuthorizationHeaderToken):
- Api Key Authentication (SudoHeader):
- Basic Authentication (BasicAuth):
- Api Key Authentication (AccessToken):
- Api Key Authentication (SudoParam):
- Api Key Authentication (Token):
import clientapi_forgejo
from clientapi_forgejo.models.cron import Cron
from clientapi_forgejo.rest import ApiException
from pprint import pprint
# Defining the host is optional and defaults to /api/v1
# See configuration.py for a list of all supported configuration parameters.
configuration = clientapi_forgejo.Configuration(
host = "/api/v1"
)
# The client must configure the authentication and authorization parameters
# in accordance with the API server security policy.
# Examples for each auth method are provided below, use the example that
# satisfies your auth use case.
# Configure API key authorization: TOTPHeader
configuration.api_key['TOTPHeader'] = os.environ["API_KEY"]
# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
# configuration.api_key_prefix['TOTPHeader'] = 'Bearer'
# Configure API key authorization: AuthorizationHeaderToken
configuration.api_key['AuthorizationHeaderToken'] = os.environ["API_KEY"]
# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
# configuration.api_key_prefix['AuthorizationHeaderToken'] = 'Bearer'
# Configure API key authorization: SudoHeader
configuration.api_key['SudoHeader'] = os.environ["API_KEY"]
# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
# configuration.api_key_prefix['SudoHeader'] = 'Bearer'
# Configure HTTP basic authorization: BasicAuth
configuration = clientapi_forgejo.Configuration(
username = os.environ["USERNAME"],
password = os.environ["PASSWORD"]
)
# Configure API key authorization: AccessToken
configuration.api_key['AccessToken'] = os.environ["API_KEY"]
# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
# configuration.api_key_prefix['AccessToken'] = 'Bearer'
# Configure API key authorization: SudoParam
configuration.api_key['SudoParam'] = os.environ["API_KEY"]
# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
# configuration.api_key_prefix['SudoParam'] = 'Bearer'
# Configure API key authorization: Token
configuration.api_key['Token'] = os.environ["API_KEY"]
# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
# configuration.api_key_prefix['Token'] = 'Bearer'
# Enter a context with an instance of the API client
with clientapi_forgejo.ApiClient(configuration) as api_client:
# Create an instance of the API class
api_instance = clientapi_forgejo.AdminApi(api_client)
page = 56 # int | page number of results to return (1-based) (optional)
limit = 56 # int | page size of results (optional)
try:
# List cron tasks
api_response = api_instance.admin_cron_list(page=page, limit=limit)
print("The response of AdminApi->admin_cron_list:\n")
pprint(api_response)
except Exception as e:
print("Exception when calling AdminApi->admin_cron_list: %s\n" % e)
Name | Type | Description | Notes |
---|---|---|---|
page | int | page number of results to return (1-based) | [optional] |
limit | int | page size of results | [optional] |
TOTPHeader, AuthorizationHeaderToken, SudoHeader, BasicAuth, AccessToken, SudoParam, Token
- Content-Type: Not defined
- Accept: application/json
Status code | Description | Response headers |
---|---|---|
200 | CronList | - |
403 | APIForbiddenError is a forbidden error response | - |
[Back to top] [Back to API list] [Back to Model list] [Back to README]
admin_cron_run(task)
Run cron task
- Api Key Authentication (TOTPHeader):
- Api Key Authentication (AuthorizationHeaderToken):
- Api Key Authentication (SudoHeader):
- Basic Authentication (BasicAuth):
- Api Key Authentication (AccessToken):
- Api Key Authentication (SudoParam):
- Api Key Authentication (Token):
import clientapi_forgejo
from clientapi_forgejo.rest import ApiException
from pprint import pprint
# Defining the host is optional and defaults to /api/v1
# See configuration.py for a list of all supported configuration parameters.
configuration = clientapi_forgejo.Configuration(
host = "/api/v1"
)
# The client must configure the authentication and authorization parameters
# in accordance with the API server security policy.
# Examples for each auth method are provided below, use the example that
# satisfies your auth use case.
# Configure API key authorization: TOTPHeader
configuration.api_key['TOTPHeader'] = os.environ["API_KEY"]
# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
# configuration.api_key_prefix['TOTPHeader'] = 'Bearer'
# Configure API key authorization: AuthorizationHeaderToken
configuration.api_key['AuthorizationHeaderToken'] = os.environ["API_KEY"]
# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
# configuration.api_key_prefix['AuthorizationHeaderToken'] = 'Bearer'
# Configure API key authorization: SudoHeader
configuration.api_key['SudoHeader'] = os.environ["API_KEY"]
# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
# configuration.api_key_prefix['SudoHeader'] = 'Bearer'
# Configure HTTP basic authorization: BasicAuth
configuration = clientapi_forgejo.Configuration(
username = os.environ["USERNAME"],
password = os.environ["PASSWORD"]
)
# Configure API key authorization: AccessToken
configuration.api_key['AccessToken'] = os.environ["API_KEY"]
# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
# configuration.api_key_prefix['AccessToken'] = 'Bearer'
# Configure API key authorization: SudoParam
configuration.api_key['SudoParam'] = os.environ["API_KEY"]
# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
# configuration.api_key_prefix['SudoParam'] = 'Bearer'
# Configure API key authorization: Token
configuration.api_key['Token'] = os.environ["API_KEY"]
# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
# configuration.api_key_prefix['Token'] = 'Bearer'
# Enter a context with an instance of the API client
with clientapi_forgejo.ApiClient(configuration) as api_client:
# Create an instance of the API class
api_instance = clientapi_forgejo.AdminApi(api_client)
task = 'task_example' # str | task to run
try:
# Run cron task
api_instance.admin_cron_run(task)
except Exception as e:
print("Exception when calling AdminApi->admin_cron_run: %s\n" % e)
Name | Type | Description | Notes |
---|---|---|---|
task | str | task to run |
void (empty response body)
TOTPHeader, AuthorizationHeaderToken, SudoHeader, BasicAuth, AccessToken, SudoParam, Token
- Content-Type: Not defined
- Accept: application/json
Status code | Description | Response headers |
---|---|---|
204 | APIEmpty is an empty response | - |
404 | APINotFound is a not found error response | - |
[Back to top] [Back to API list] [Back to Model list] [Back to README]
admin_d_elete_quota_rule(quotarule)
Deletes a quota rule
- Api Key Authentication (TOTPHeader):
- Api Key Authentication (AuthorizationHeaderToken):
- Api Key Authentication (SudoHeader):
- Basic Authentication (BasicAuth):
- Api Key Authentication (AccessToken):
- Api Key Authentication (SudoParam):
- Api Key Authentication (Token):
import clientapi_forgejo
from clientapi_forgejo.rest import ApiException
from pprint import pprint
# Defining the host is optional and defaults to /api/v1
# See configuration.py for a list of all supported configuration parameters.
configuration = clientapi_forgejo.Configuration(
host = "/api/v1"
)
# The client must configure the authentication and authorization parameters
# in accordance with the API server security policy.
# Examples for each auth method are provided below, use the example that
# satisfies your auth use case.
# Configure API key authorization: TOTPHeader
configuration.api_key['TOTPHeader'] = os.environ["API_KEY"]
# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
# configuration.api_key_prefix['TOTPHeader'] = 'Bearer'
# Configure API key authorization: AuthorizationHeaderToken
configuration.api_key['AuthorizationHeaderToken'] = os.environ["API_KEY"]
# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
# configuration.api_key_prefix['AuthorizationHeaderToken'] = 'Bearer'
# Configure API key authorization: SudoHeader
configuration.api_key['SudoHeader'] = os.environ["API_KEY"]
# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
# configuration.api_key_prefix['SudoHeader'] = 'Bearer'
# Configure HTTP basic authorization: BasicAuth
configuration = clientapi_forgejo.Configuration(
username = os.environ["USERNAME"],
password = os.environ["PASSWORD"]
)
# Configure API key authorization: AccessToken
configuration.api_key['AccessToken'] = os.environ["API_KEY"]
# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
# configuration.api_key_prefix['AccessToken'] = 'Bearer'
# Configure API key authorization: SudoParam
configuration.api_key['SudoParam'] = os.environ["API_KEY"]
# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
# configuration.api_key_prefix['SudoParam'] = 'Bearer'
# Configure API key authorization: Token
configuration.api_key['Token'] = os.environ["API_KEY"]
# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
# configuration.api_key_prefix['Token'] = 'Bearer'
# Enter a context with an instance of the API client
with clientapi_forgejo.ApiClient(configuration) as api_client:
# Create an instance of the API class
api_instance = clientapi_forgejo.AdminApi(api_client)
quotarule = 'quotarule_example' # str | quota rule to delete
try:
# Deletes a quota rule
api_instance.admin_d_elete_quota_rule(quotarule)
except Exception as e:
print("Exception when calling AdminApi->admin_d_elete_quota_rule: %s\n" % e)
Name | Type | Description | Notes |
---|---|---|---|
quotarule | str | quota rule to delete |
void (empty response body)
TOTPHeader, AuthorizationHeaderToken, SudoHeader, BasicAuth, AccessToken, SudoParam, Token
- Content-Type: Not defined
- Accept: application/json
Status code | Description | Response headers |
---|---|---|
204 | APIEmpty is an empty response | - |
400 | APIError is error format response | - |
403 | APIForbiddenError is a forbidden error response | - |
404 | APINotFound is a not found error response | - |
[Back to top] [Back to API list] [Back to Model list] [Back to README]
admin_delete_hook(id)
Delete a hook
- Api Key Authentication (TOTPHeader):
- Api Key Authentication (AuthorizationHeaderToken):
- Api Key Authentication (SudoHeader):
- Basic Authentication (BasicAuth):
- Api Key Authentication (AccessToken):
- Api Key Authentication (SudoParam):
- Api Key Authentication (Token):
import clientapi_forgejo
from clientapi_forgejo.rest import ApiException
from pprint import pprint
# Defining the host is optional and defaults to /api/v1
# See configuration.py for a list of all supported configuration parameters.
configuration = clientapi_forgejo.Configuration(
host = "/api/v1"
)
# The client must configure the authentication and authorization parameters
# in accordance with the API server security policy.
# Examples for each auth method are provided below, use the example that
# satisfies your auth use case.
# Configure API key authorization: TOTPHeader
configuration.api_key['TOTPHeader'] = os.environ["API_KEY"]
# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
# configuration.api_key_prefix['TOTPHeader'] = 'Bearer'
# Configure API key authorization: AuthorizationHeaderToken
configuration.api_key['AuthorizationHeaderToken'] = os.environ["API_KEY"]
# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
# configuration.api_key_prefix['AuthorizationHeaderToken'] = 'Bearer'
# Configure API key authorization: SudoHeader
configuration.api_key['SudoHeader'] = os.environ["API_KEY"]
# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
# configuration.api_key_prefix['SudoHeader'] = 'Bearer'
# Configure HTTP basic authorization: BasicAuth
configuration = clientapi_forgejo.Configuration(
username = os.environ["USERNAME"],
password = os.environ["PASSWORD"]
)
# Configure API key authorization: AccessToken
configuration.api_key['AccessToken'] = os.environ["API_KEY"]
# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
# configuration.api_key_prefix['AccessToken'] = 'Bearer'
# Configure API key authorization: SudoParam
configuration.api_key['SudoParam'] = os.environ["API_KEY"]
# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
# configuration.api_key_prefix['SudoParam'] = 'Bearer'
# Configure API key authorization: Token
configuration.api_key['Token'] = os.environ["API_KEY"]
# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
# configuration.api_key_prefix['Token'] = 'Bearer'
# Enter a context with an instance of the API client
with clientapi_forgejo.ApiClient(configuration) as api_client:
# Create an instance of the API class
api_instance = clientapi_forgejo.AdminApi(api_client)
id = 56 # int | id of the hook to delete
try:
# Delete a hook
api_instance.admin_delete_hook(id)
except Exception as e:
print("Exception when calling AdminApi->admin_delete_hook: %s\n" % e)
Name | Type | Description | Notes |
---|---|---|---|
id | int | id of the hook to delete |
void (empty response body)
TOTPHeader, AuthorizationHeaderToken, SudoHeader, BasicAuth, AccessToken, SudoParam, Token
- Content-Type: Not defined
- Accept: Not defined
Status code | Description | Response headers |
---|---|---|
204 | APIEmpty is an empty response | - |
[Back to top] [Back to API list] [Back to Model list] [Back to README]
admin_delete_quota_group(quotagroup)
Delete a quota group
- Api Key Authentication (TOTPHeader):
- Api Key Authentication (AuthorizationHeaderToken):
- Api Key Authentication (SudoHeader):
- Basic Authentication (BasicAuth):
- Api Key Authentication (AccessToken):
- Api Key Authentication (SudoParam):
- Api Key Authentication (Token):
import clientapi_forgejo
from clientapi_forgejo.rest import ApiException
from pprint import pprint
# Defining the host is optional and defaults to /api/v1
# See configuration.py for a list of all supported configuration parameters.
configuration = clientapi_forgejo.Configuration(
host = "/api/v1"
)
# The client must configure the authentication and authorization parameters
# in accordance with the API server security policy.
# Examples for each auth method are provided below, use the example that
# satisfies your auth use case.
# Configure API key authorization: TOTPHeader
configuration.api_key['TOTPHeader'] = os.environ["API_KEY"]
# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
# configuration.api_key_prefix['TOTPHeader'] = 'Bearer'
# Configure API key authorization: AuthorizationHeaderToken
configuration.api_key['AuthorizationHeaderToken'] = os.environ["API_KEY"]
# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
# configuration.api_key_prefix['AuthorizationHeaderToken'] = 'Bearer'
# Configure API key authorization: SudoHeader
configuration.api_key['SudoHeader'] = os.environ["API_KEY"]
# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
# configuration.api_key_prefix['SudoHeader'] = 'Bearer'
# Configure HTTP basic authorization: BasicAuth
configuration = clientapi_forgejo.Configuration(
username = os.environ["USERNAME"],
password = os.environ["PASSWORD"]
)
# Configure API key authorization: AccessToken
configuration.api_key['AccessToken'] = os.environ["API_KEY"]
# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
# configuration.api_key_prefix['AccessToken'] = 'Bearer'
# Configure API key authorization: SudoParam
configuration.api_key['SudoParam'] = os.environ["API_KEY"]
# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
# configuration.api_key_prefix['SudoParam'] = 'Bearer'
# Configure API key authorization: Token
configuration.api_key['Token'] = os.environ["API_KEY"]
# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
# configuration.api_key_prefix['Token'] = 'Bearer'
# Enter a context with an instance of the API client
with clientapi_forgejo.ApiClient(configuration) as api_client:
# Create an instance of the API class
api_instance = clientapi_forgejo.AdminApi(api_client)
quotagroup = 'quotagroup_example' # str | quota group to delete
try:
# Delete a quota group
api_instance.admin_delete_quota_group(quotagroup)
except Exception as e:
print("Exception when calling AdminApi->admin_delete_quota_group: %s\n" % e)
Name | Type | Description | Notes |
---|---|---|---|
quotagroup | str | quota group to delete |
void (empty response body)
TOTPHeader, AuthorizationHeaderToken, SudoHeader, BasicAuth, AccessToken, SudoParam, Token
- Content-Type: Not defined
- Accept: application/json
Status code | Description | Response headers |
---|---|---|
204 | APIEmpty is an empty response | - |
400 | APIError is error format response | - |
403 | APIForbiddenError is a forbidden error response | - |
404 | APINotFound is a not found error response | - |
[Back to top] [Back to API list] [Back to Model list] [Back to README]
admin_delete_unadopted_repository(owner, repo)
Delete unadopted files
- Api Key Authentication (TOTPHeader):
- Api Key Authentication (AuthorizationHeaderToken):
- Api Key Authentication (SudoHeader):
- Basic Authentication (BasicAuth):
- Api Key Authentication (AccessToken):
- Api Key Authentication (SudoParam):
- Api Key Authentication (Token):
import clientapi_forgejo
from clientapi_forgejo.rest import ApiException
from pprint import pprint
# Defining the host is optional and defaults to /api/v1
# See configuration.py for a list of all supported configuration parameters.
configuration = clientapi_forgejo.Configuration(
host = "/api/v1"
)
# The client must configure the authentication and authorization parameters
# in accordance with the API server security policy.
# Examples for each auth method are provided below, use the example that
# satisfies your auth use case.
# Configure API key authorization: TOTPHeader
configuration.api_key['TOTPHeader'] = os.environ["API_KEY"]
# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
# configuration.api_key_prefix['TOTPHeader'] = 'Bearer'
# Configure API key authorization: AuthorizationHeaderToken
configuration.api_key['AuthorizationHeaderToken'] = os.environ["API_KEY"]
# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
# configuration.api_key_prefix['AuthorizationHeaderToken'] = 'Bearer'
# Configure API key authorization: SudoHeader
configuration.api_key['SudoHeader'] = os.environ["API_KEY"]
# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
# configuration.api_key_prefix['SudoHeader'] = 'Bearer'
# Configure HTTP basic authorization: BasicAuth
configuration = clientapi_forgejo.Configuration(
username = os.environ["USERNAME"],
password = os.environ["PASSWORD"]
)
# Configure API key authorization: AccessToken
configuration.api_key['AccessToken'] = os.environ["API_KEY"]
# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
# configuration.api_key_prefix['AccessToken'] = 'Bearer'
# Configure API key authorization: SudoParam
configuration.api_key['SudoParam'] = os.environ["API_KEY"]
# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
# configuration.api_key_prefix['SudoParam'] = 'Bearer'
# Configure API key authorization: Token
configuration.api_key['Token'] = os.environ["API_KEY"]
# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
# configuration.api_key_prefix['Token'] = 'Bearer'
# Enter a context with an instance of the API client
with clientapi_forgejo.ApiClient(configuration) as api_client:
# Create an instance of the API class
api_instance = clientapi_forgejo.AdminApi(api_client)
owner = 'owner_example' # str | owner of the repo
repo = 'repo_example' # str | name of the repo
try:
# Delete unadopted files
api_instance.admin_delete_unadopted_repository(owner, repo)
except Exception as e:
print("Exception when calling AdminApi->admin_delete_unadopted_repository: %s\n" % e)
Name | Type | Description | Notes |
---|---|---|---|
owner | str | owner of the repo | |
repo | str | name of the repo |
void (empty response body)
TOTPHeader, AuthorizationHeaderToken, SudoHeader, BasicAuth, AccessToken, SudoParam, Token
- Content-Type: Not defined
- Accept: application/json
Status code | Description | Response headers |
---|---|---|
204 | APIEmpty is an empty response | - |
403 | APIForbiddenError is a forbidden error response | - |
[Back to top] [Back to API list] [Back to Model list] [Back to README]
admin_delete_user(username, purge=purge)
Delete a user
- Api Key Authentication (TOTPHeader):
- Api Key Authentication (AuthorizationHeaderToken):
- Api Key Authentication (SudoHeader):
- Basic Authentication (BasicAuth):
- Api Key Authentication (AccessToken):
- Api Key Authentication (SudoParam):
- Api Key Authentication (Token):
import clientapi_forgejo
from clientapi_forgejo.rest import ApiException
from pprint import pprint
# Defining the host is optional and defaults to /api/v1
# See configuration.py for a list of all supported configuration parameters.
configuration = clientapi_forgejo.Configuration(
host = "/api/v1"
)
# The client must configure the authentication and authorization parameters
# in accordance with the API server security policy.
# Examples for each auth method are provided below, use the example that
# satisfies your auth use case.
# Configure API key authorization: TOTPHeader
configuration.api_key['TOTPHeader'] = os.environ["API_KEY"]
# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
# configuration.api_key_prefix['TOTPHeader'] = 'Bearer'
# Configure API key authorization: AuthorizationHeaderToken
configuration.api_key['AuthorizationHeaderToken'] = os.environ["API_KEY"]
# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
# configuration.api_key_prefix['AuthorizationHeaderToken'] = 'Bearer'
# Configure API key authorization: SudoHeader
configuration.api_key['SudoHeader'] = os.environ["API_KEY"]
# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
# configuration.api_key_prefix['SudoHeader'] = 'Bearer'
# Configure HTTP basic authorization: BasicAuth
configuration = clientapi_forgejo.Configuration(
username = os.environ["USERNAME"],
password = os.environ["PASSWORD"]
)
# Configure API key authorization: AccessToken
configuration.api_key['AccessToken'] = os.environ["API_KEY"]
# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
# configuration.api_key_prefix['AccessToken'] = 'Bearer'
# Configure API key authorization: SudoParam
configuration.api_key['SudoParam'] = os.environ["API_KEY"]
# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
# configuration.api_key_prefix['SudoParam'] = 'Bearer'
# Configure API key authorization: Token
configuration.api_key['Token'] = os.environ["API_KEY"]
# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
# configuration.api_key_prefix['Token'] = 'Bearer'
# Enter a context with an instance of the API client
with clientapi_forgejo.ApiClient(configuration) as api_client:
# Create an instance of the API class
api_instance = clientapi_forgejo.AdminApi(api_client)
username = 'username_example' # str | username of user to delete
purge = True # bool | purge the user from the system completely (optional)
try:
# Delete a user
api_instance.admin_delete_user(username, purge=purge)
except Exception as e:
print("Exception when calling AdminApi->admin_delete_user: %s\n" % e)
Name | Type | Description | Notes |
---|---|---|---|
username | str | username of user to delete | |
purge | bool | purge the user from the system completely | [optional] |
void (empty response body)
TOTPHeader, AuthorizationHeaderToken, SudoHeader, BasicAuth, AccessToken, SudoParam, Token
- Content-Type: Not defined
- Accept: application/json
Status code | Description | Response headers |
---|---|---|
204 | APIEmpty is an empty response | - |
403 | APIForbiddenError is a forbidden error response | - |
404 | APINotFound is a not found error response | - |
422 | APIValidationError is error format response related to input validation | - |
[Back to top] [Back to API list] [Back to Model list] [Back to README]
admin_delete_user_public_key(username, id)
Delete a user's public key
- Api Key Authentication (TOTPHeader):
- Api Key Authentication (AuthorizationHeaderToken):
- Api Key Authentication (SudoHeader):
- Basic Authentication (BasicAuth):
- Api Key Authentication (AccessToken):
- Api Key Authentication (SudoParam):
- Api Key Authentication (Token):
import clientapi_forgejo
from clientapi_forgejo.rest import ApiException
from pprint import pprint
# Defining the host is optional and defaults to /api/v1
# See configuration.py for a list of all supported configuration parameters.
configuration = clientapi_forgejo.Configuration(
host = "/api/v1"
)
# The client must configure the authentication and authorization parameters
# in accordance with the API server security policy.
# Examples for each auth method are provided below, use the example that
# satisfies your auth use case.
# Configure API key authorization: TOTPHeader
configuration.api_key['TOTPHeader'] = os.environ["API_KEY"]
# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
# configuration.api_key_prefix['TOTPHeader'] = 'Bearer'
# Configure API key authorization: AuthorizationHeaderToken
configuration.api_key['AuthorizationHeaderToken'] = os.environ["API_KEY"]
# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
# configuration.api_key_prefix['AuthorizationHeaderToken'] = 'Bearer'
# Configure API key authorization: SudoHeader
configuration.api_key['SudoHeader'] = os.environ["API_KEY"]
# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
# configuration.api_key_prefix['SudoHeader'] = 'Bearer'
# Configure HTTP basic authorization: BasicAuth
configuration = clientapi_forgejo.Configuration(
username = os.environ["USERNAME"],
password = os.environ["PASSWORD"]
)
# Configure API key authorization: AccessToken
configuration.api_key['AccessToken'] = os.environ["API_KEY"]
# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
# configuration.api_key_prefix['AccessToken'] = 'Bearer'
# Configure API key authorization: SudoParam
configuration.api_key['SudoParam'] = os.environ["API_KEY"]
# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
# configuration.api_key_prefix['SudoParam'] = 'Bearer'
# Configure API key authorization: Token
configuration.api_key['Token'] = os.environ["API_KEY"]
# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
# configuration.api_key_prefix['Token'] = 'Bearer'
# Enter a context with an instance of the API client
with clientapi_forgejo.ApiClient(configuration) as api_client:
# Create an instance of the API class
api_instance = clientapi_forgejo.AdminApi(api_client)
username = 'username_example' # str | username of user
id = 56 # int | id of the key to delete
try:
# Delete a user's public key
api_instance.admin_delete_user_public_key(username, id)
except Exception as e:
print("Exception when calling AdminApi->admin_delete_user_public_key: %s\n" % e)
Name | Type | Description | Notes |
---|---|---|---|
username | str | username of user | |
id | int | id of the key to delete |
void (empty response body)
TOTPHeader, AuthorizationHeaderToken, SudoHeader, BasicAuth, AccessToken, SudoParam, Token
- Content-Type: Not defined
- Accept: application/json
Status code | Description | Response headers |
---|---|---|
204 | APIEmpty is an empty response | - |
403 | APIForbiddenError is a forbidden error response | - |
404 | APINotFound is a not found error response | - |
[Back to top] [Back to API list] [Back to Model list] [Back to README]
Hook admin_edit_hook(id, body=body)
Update a hook
- Api Key Authentication (TOTPHeader):
- Api Key Authentication (AuthorizationHeaderToken):
- Api Key Authentication (SudoHeader):
- Basic Authentication (BasicAuth):
- Api Key Authentication (AccessToken):
- Api Key Authentication (SudoParam):
- Api Key Authentication (Token):
import clientapi_forgejo
from clientapi_forgejo.models.edit_hook_option import EditHookOption
from clientapi_forgejo.models.hook import Hook
from clientapi_forgejo.rest import ApiException
from pprint import pprint
# Defining the host is optional and defaults to /api/v1
# See configuration.py for a list of all supported configuration parameters.
configuration = clientapi_forgejo.Configuration(
host = "/api/v1"
)
# The client must configure the authentication and authorization parameters
# in accordance with the API server security policy.
# Examples for each auth method are provided below, use the example that
# satisfies your auth use case.
# Configure API key authorization: TOTPHeader
configuration.api_key['TOTPHeader'] = os.environ["API_KEY"]
# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
# configuration.api_key_prefix['TOTPHeader'] = 'Bearer'
# Configure API key authorization: AuthorizationHeaderToken
configuration.api_key['AuthorizationHeaderToken'] = os.environ["API_KEY"]
# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
# configuration.api_key_prefix['AuthorizationHeaderToken'] = 'Bearer'
# Configure API key authorization: SudoHeader
configuration.api_key['SudoHeader'] = os.environ["API_KEY"]
# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
# configuration.api_key_prefix['SudoHeader'] = 'Bearer'
# Configure HTTP basic authorization: BasicAuth
configuration = clientapi_forgejo.Configuration(
username = os.environ["USERNAME"],
password = os.environ["PASSWORD"]
)
# Configure API key authorization: AccessToken
configuration.api_key['AccessToken'] = os.environ["API_KEY"]
# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
# configuration.api_key_prefix['AccessToken'] = 'Bearer'
# Configure API key authorization: SudoParam
configuration.api_key['SudoParam'] = os.environ["API_KEY"]
# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
# configuration.api_key_prefix['SudoParam'] = 'Bearer'
# Configure API key authorization: Token
configuration.api_key['Token'] = os.environ["API_KEY"]
# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
# configuration.api_key_prefix['Token'] = 'Bearer'
# Enter a context with an instance of the API client
with clientapi_forgejo.ApiClient(configuration) as api_client:
# Create an instance of the API class
api_instance = clientapi_forgejo.AdminApi(api_client)
id = 56 # int | id of the hook to update
body = clientapi_forgejo.EditHookOption() # EditHookOption | (optional)
try:
# Update a hook
api_response = api_instance.admin_edit_hook(id, body=body)
print("The response of AdminApi->admin_edit_hook:\n")
pprint(api_response)
except Exception as e:
print("Exception when calling AdminApi->admin_edit_hook: %s\n" % e)
Name | Type | Description | Notes |
---|---|---|---|
id | int | id of the hook to update | |
body | EditHookOption | [optional] |
TOTPHeader, AuthorizationHeaderToken, SudoHeader, BasicAuth, AccessToken, SudoParam, Token
- Content-Type: application/json
- Accept: application/json
Status code | Description | Response headers |
---|---|---|
200 | Hook | - |
[Back to top] [Back to API list] [Back to Model list] [Back to README]
QuotaRuleInfo admin_edit_quota_rule(quotarule, rule)
Change an existing quota rule
- Api Key Authentication (TOTPHeader):
- Api Key Authentication (AuthorizationHeaderToken):
- Api Key Authentication (SudoHeader):
- Basic Authentication (BasicAuth):
- Api Key Authentication (AccessToken):
- Api Key Authentication (SudoParam):
- Api Key Authentication (Token):
import clientapi_forgejo
from clientapi_forgejo.models.edit_quota_rule_options import EditQuotaRuleOptions
from clientapi_forgejo.models.quota_rule_info import QuotaRuleInfo
from clientapi_forgejo.rest import ApiException
from pprint import pprint
# Defining the host is optional and defaults to /api/v1
# See configuration.py for a list of all supported configuration parameters.
configuration = clientapi_forgejo.Configuration(
host = "/api/v1"
)
# The client must configure the authentication and authorization parameters
# in accordance with the API server security policy.
# Examples for each auth method are provided below, use the example that
# satisfies your auth use case.
# Configure API key authorization: TOTPHeader
configuration.api_key['TOTPHeader'] = os.environ["API_KEY"]
# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
# configuration.api_key_prefix['TOTPHeader'] = 'Bearer'
# Configure API key authorization: AuthorizationHeaderToken
configuration.api_key['AuthorizationHeaderToken'] = os.environ["API_KEY"]
# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
# configuration.api_key_prefix['AuthorizationHeaderToken'] = 'Bearer'
# Configure API key authorization: SudoHeader
configuration.api_key['SudoHeader'] = os.environ["API_KEY"]
# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
# configuration.api_key_prefix['SudoHeader'] = 'Bearer'
# Configure HTTP basic authorization: BasicAuth
configuration = clientapi_forgejo.Configuration(
username = os.environ["USERNAME"],
password = os.environ["PASSWORD"]
)
# Configure API key authorization: AccessToken
configuration.api_key['AccessToken'] = os.environ["API_KEY"]
# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
# configuration.api_key_prefix['AccessToken'] = 'Bearer'
# Configure API key authorization: SudoParam
configuration.api_key['SudoParam'] = os.environ["API_KEY"]
# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
# configuration.api_key_prefix['SudoParam'] = 'Bearer'
# Configure API key authorization: Token
configuration.api_key['Token'] = os.environ["API_KEY"]
# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
# configuration.api_key_prefix['Token'] = 'Bearer'
# Enter a context with an instance of the API client
with clientapi_forgejo.ApiClient(configuration) as api_client:
# Create an instance of the API class
api_instance = clientapi_forgejo.AdminApi(api_client)
quotarule = 'quotarule_example' # str | Quota rule to change
rule = clientapi_forgejo.EditQuotaRuleOptions() # EditQuotaRuleOptions |
try:
# Change an existing quota rule
api_response = api_instance.admin_edit_quota_rule(quotarule, rule)
print("The response of AdminApi->admin_edit_quota_rule:\n")
pprint(api_response)
except Exception as e:
print("Exception when calling AdminApi->admin_edit_quota_rule: %s\n" % e)
Name | Type | Description | Notes |
---|---|---|---|
quotarule | str | Quota rule to change | |
rule | EditQuotaRuleOptions |
TOTPHeader, AuthorizationHeaderToken, SudoHeader, BasicAuth, AccessToken, SudoParam, Token
- Content-Type: application/json, text/plain
- Accept: application/json
Status code | Description | Response headers |
---|---|---|
200 | QuotaRuleInfo | - |
400 | APIError is error format response | - |
403 | APIForbiddenError is a forbidden error response | - |
404 | APINotFound is a not found error response | - |
422 | APIValidationError is error format response related to input validation | - |
[Back to top] [Back to API list] [Back to Model list] [Back to README]
User admin_edit_user(username, body=body)
Edit an existing user
- Api Key Authentication (TOTPHeader):
- Api Key Authentication (AuthorizationHeaderToken):
- Api Key Authentication (SudoHeader):
- Basic Authentication (BasicAuth):
- Api Key Authentication (AccessToken):
- Api Key Authentication (SudoParam):
- Api Key Authentication (Token):
import clientapi_forgejo
from clientapi_forgejo.models.edit_user_option import EditUserOption
from clientapi_forgejo.models.user import User
from clientapi_forgejo.rest import ApiException
from pprint import pprint
# Defining the host is optional and defaults to /api/v1
# See configuration.py for a list of all supported configuration parameters.
configuration = clientapi_forgejo.Configuration(
host = "/api/v1"
)
# The client must configure the authentication and authorization parameters
# in accordance with the API server security policy.
# Examples for each auth method are provided below, use the example that
# satisfies your auth use case.
# Configure API key authorization: TOTPHeader
configuration.api_key['TOTPHeader'] = os.environ["API_KEY"]
# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
# configuration.api_key_prefix['TOTPHeader'] = 'Bearer'
# Configure API key authorization: AuthorizationHeaderToken
configuration.api_key['AuthorizationHeaderToken'] = os.environ["API_KEY"]
# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
# configuration.api_key_prefix['AuthorizationHeaderToken'] = 'Bearer'
# Configure API key authorization: SudoHeader
configuration.api_key['SudoHeader'] = os.environ["API_KEY"]
# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
# configuration.api_key_prefix['SudoHeader'] = 'Bearer'
# Configure HTTP basic authorization: BasicAuth
configuration = clientapi_forgejo.Configuration(
username = os.environ["USERNAME"],
password = os.environ["PASSWORD"]
)
# Configure API key authorization: AccessToken
configuration.api_key['AccessToken'] = os.environ["API_KEY"]
# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
# configuration.api_key_prefix['AccessToken'] = 'Bearer'
# Configure API key authorization: SudoParam
configuration.api_key['SudoParam'] = os.environ["API_KEY"]
# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
# configuration.api_key_prefix['SudoParam'] = 'Bearer'
# Configure API key authorization: Token
configuration.api_key['Token'] = os.environ["API_KEY"]
# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
# configuration.api_key_prefix['Token'] = 'Bearer'
# Enter a context with an instance of the API client
with clientapi_forgejo.ApiClient(configuration) as api_client:
# Create an instance of the API class
api_instance = clientapi_forgejo.AdminApi(api_client)
username = 'username_example' # str | username of user to edit
body = clientapi_forgejo.EditUserOption() # EditUserOption | (optional)
try:
# Edit an existing user
api_response = api_instance.admin_edit_user(username, body=body)
print("The response of AdminApi->admin_edit_user:\n")
pprint(api_response)
except Exception as e:
print("Exception when calling AdminApi->admin_edit_user: %s\n" % e)
Name | Type | Description | Notes |
---|---|---|---|
username | str | username of user to edit | |
body | EditUserOption | [optional] |
TOTPHeader, AuthorizationHeaderToken, SudoHeader, BasicAuth, AccessToken, SudoParam, Token
- Content-Type: application/json
- Accept: application/json
Status code | Description | Response headers |
---|---|---|
200 | User | - |
400 | APIError is error format response | - |
403 | APIForbiddenError is a forbidden error response | - |
422 | APIValidationError is error format response related to input validation | - |
[Back to top] [Back to API list] [Back to Model list] [Back to README]
List[Email] admin_get_all_emails(page=page, limit=limit)
List all emails
- Api Key Authentication (TOTPHeader):
- Api Key Authentication (AuthorizationHeaderToken):
- Api Key Authentication (SudoHeader):
- Basic Authentication (BasicAuth):
- Api Key Authentication (AccessToken):
- Api Key Authentication (SudoParam):
- Api Key Authentication (Token):
import clientapi_forgejo
from clientapi_forgejo.models.email import Email
from clientapi_forgejo.rest import ApiException
from pprint import pprint
# Defining the host is optional and defaults to /api/v1
# See configuration.py for a list of all supported configuration parameters.
configuration = clientapi_forgejo.Configuration(
host = "/api/v1"
)
# The client must configure the authentication and authorization parameters
# in accordance with the API server security policy.
# Examples for each auth method are provided below, use the example that
# satisfies your auth use case.
# Configure API key authorization: TOTPHeader
configuration.api_key['TOTPHeader'] = os.environ["API_KEY"]
# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
# configuration.api_key_prefix['TOTPHeader'] = 'Bearer'
# Configure API key authorization: AuthorizationHeaderToken
configuration.api_key['AuthorizationHeaderToken'] = os.environ["API_KEY"]
# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
# configuration.api_key_prefix['AuthorizationHeaderToken'] = 'Bearer'
# Configure API key authorization: SudoHeader
configuration.api_key['SudoHeader'] = os.environ["API_KEY"]
# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
# configuration.api_key_prefix['SudoHeader'] = 'Bearer'
# Configure HTTP basic authorization: BasicAuth
configuration = clientapi_forgejo.Configuration(
username = os.environ["USERNAME"],
password = os.environ["PASSWORD"]
)
# Configure API key authorization: AccessToken
configuration.api_key['AccessToken'] = os.environ["API_KEY"]
# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
# configuration.api_key_prefix['AccessToken'] = 'Bearer'
# Configure API key authorization: SudoParam
configuration.api_key['SudoParam'] = os.environ["API_KEY"]
# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
# configuration.api_key_prefix['SudoParam'] = 'Bearer'
# Configure API key authorization: Token
configuration.api_key['Token'] = os.environ["API_KEY"]
# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
# configuration.api_key_prefix['Token'] = 'Bearer'
# Enter a context with an instance of the API client
with clientapi_forgejo.ApiClient(configuration) as api_client:
# Create an instance of the API class
api_instance = clientapi_forgejo.AdminApi(api_client)
page = 56 # int | page number of results to return (1-based) (optional)
limit = 56 # int | page size of results (optional)
try:
# List all emails
api_response = api_instance.admin_get_all_emails(page=page, limit=limit)
print("The response of AdminApi->admin_get_all_emails:\n")
pprint(api_response)
except Exception as e:
print("Exception when calling AdminApi->admin_get_all_emails: %s\n" % e)
Name | Type | Description | Notes |
---|---|---|---|
page | int | page number of results to return (1-based) | [optional] |
limit | int | page size of results | [optional] |
TOTPHeader, AuthorizationHeaderToken, SudoHeader, BasicAuth, AccessToken, SudoParam, Token
- Content-Type: Not defined
- Accept: application/json
Status code | Description | Response headers |
---|---|---|
200 | EmailList | - |
403 | APIForbiddenError is a forbidden error response | - |
[Back to top] [Back to API list] [Back to Model list] [Back to README]
List[Organization] admin_get_all_orgs(page=page, limit=limit)
List all organizations
- Api Key Authentication (TOTPHeader):
- Api Key Authentication (AuthorizationHeaderToken):
- Api Key Authentication (SudoHeader):
- Basic Authentication (BasicAuth):
- Api Key Authentication (AccessToken):
- Api Key Authentication (SudoParam):
- Api Key Authentication (Token):
import clientapi_forgejo
from clientapi_forgejo.models.organization import Organization
from clientapi_forgejo.rest import ApiException
from pprint import pprint
# Defining the host is optional and defaults to /api/v1
# See configuration.py for a list of all supported configuration parameters.
configuration = clientapi_forgejo.Configuration(
host = "/api/v1"
)
# The client must configure the authentication and authorization parameters
# in accordance with the API server security policy.
# Examples for each auth method are provided below, use the example that
# satisfies your auth use case.
# Configure API key authorization: TOTPHeader
configuration.api_key['TOTPHeader'] = os.environ["API_KEY"]
# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
# configuration.api_key_prefix['TOTPHeader'] = 'Bearer'
# Configure API key authorization: AuthorizationHeaderToken
configuration.api_key['AuthorizationHeaderToken'] = os.environ["API_KEY"]
# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
# configuration.api_key_prefix['AuthorizationHeaderToken'] = 'Bearer'
# Configure API key authorization: SudoHeader
configuration.api_key['SudoHeader'] = os.environ["API_KEY"]
# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
# configuration.api_key_prefix['SudoHeader'] = 'Bearer'
# Configure HTTP basic authorization: BasicAuth
configuration = clientapi_forgejo.Configuration(
username = os.environ["USERNAME"],
password = os.environ["PASSWORD"]
)
# Configure API key authorization: AccessToken
configuration.api_key['AccessToken'] = os.environ["API_KEY"]
# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
# configuration.api_key_prefix['AccessToken'] = 'Bearer'
# Configure API key authorization: SudoParam
configuration.api_key['SudoParam'] = os.environ["API_KEY"]
# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
# configuration.api_key_prefix['SudoParam'] = 'Bearer'
# Configure API key authorization: Token
configuration.api_key['Token'] = os.environ["API_KEY"]
# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
# configuration.api_key_prefix['Token'] = 'Bearer'
# Enter a context with an instance of the API client
with clientapi_forgejo.ApiClient(configuration) as api_client:
# Create an instance of the API class
api_instance = clientapi_forgejo.AdminApi(api_client)
page = 56 # int | page number of results to return (1-based) (optional)
limit = 56 # int | page size of results (optional)
try:
# List all organizations
api_response = api_instance.admin_get_all_orgs(page=page, limit=limit)
print("The response of AdminApi->admin_get_all_orgs:\n")
pprint(api_response)
except Exception as e:
print("Exception when calling AdminApi->admin_get_all_orgs: %s\n" % e)
Name | Type | Description | Notes |
---|---|---|---|
page | int | page number of results to return (1-based) | [optional] |
limit | int | page size of results | [optional] |
TOTPHeader, AuthorizationHeaderToken, SudoHeader, BasicAuth, AccessToken, SudoParam, Token
- Content-Type: Not defined
- Accept: application/json
Status code | Description | Response headers |
---|---|---|
200 | OrganizationList | - |
403 | APIForbiddenError is a forbidden error response | - |
[Back to top] [Back to API list] [Back to Model list] [Back to README]
Hook admin_get_hook(id)
Get a hook
- Api Key Authentication (TOTPHeader):
- Api Key Authentication (AuthorizationHeaderToken):
- Api Key Authentication (SudoHeader):
- Basic Authentication (BasicAuth):
- Api Key Authentication (AccessToken):
- Api Key Authentication (SudoParam):
- Api Key Authentication (Token):
import clientapi_forgejo
from clientapi_forgejo.models.hook import Hook
from clientapi_forgejo.rest import ApiException
from pprint import pprint
# Defining the host is optional and defaults to /api/v1
# See configuration.py for a list of all supported configuration parameters.
configuration = clientapi_forgejo.Configuration(
host = "/api/v1"
)
# The client must configure the authentication and authorization parameters
# in accordance with the API server security policy.
# Examples for each auth method are provided below, use the example that
# satisfies your auth use case.
# Configure API key authorization: TOTPHeader
configuration.api_key['TOTPHeader'] = os.environ["API_KEY"]
# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
# configuration.api_key_prefix['TOTPHeader'] = 'Bearer'
# Configure API key authorization: AuthorizationHeaderToken
configuration.api_key['AuthorizationHeaderToken'] = os.environ["API_KEY"]
# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
# configuration.api_key_prefix['AuthorizationHeaderToken'] = 'Bearer'
# Configure API key authorization: SudoHeader
configuration.api_key['SudoHeader'] = os.environ["API_KEY"]
# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
# configuration.api_key_prefix['SudoHeader'] = 'Bearer'
# Configure HTTP basic authorization: BasicAuth
configuration = clientapi_forgejo.Configuration(
username = os.environ["USERNAME"],
password = os.environ["PASSWORD"]
)
# Configure API key authorization: AccessToken
configuration.api_key['AccessToken'] = os.environ["API_KEY"]
# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
# configuration.api_key_prefix['AccessToken'] = 'Bearer'
# Configure API key authorization: SudoParam
configuration.api_key['SudoParam'] = os.environ["API_KEY"]
# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
# configuration.api_key_prefix['SudoParam'] = 'Bearer'
# Configure API key authorization: Token
configuration.api_key['Token'] = os.environ["API_KEY"]
# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
# configuration.api_key_prefix['Token'] = 'Bearer'
# Enter a context with an instance of the API client
with clientapi_forgejo.ApiClient(configuration) as api_client:
# Create an instance of the API class
api_instance = clientapi_forgejo.AdminApi(api_client)
id = 56 # int | id of the hook to get
try:
# Get a hook
api_response = api_instance.admin_get_hook(id)
print("The response of AdminApi->admin_get_hook:\n")
pprint(api_response)
except Exception as e:
print("Exception when calling AdminApi->admin_get_hook: %s\n" % e)
Name | Type | Description | Notes |
---|---|---|---|
id | int | id of the hook to get |
TOTPHeader, AuthorizationHeaderToken, SudoHeader, BasicAuth, AccessToken, SudoParam, Token
- Content-Type: Not defined
- Accept: application/json
Status code | Description | Response headers |
---|---|---|
200 | Hook | - |
[Back to top] [Back to API list] [Back to Model list] [Back to README]
QuotaGroup admin_get_quota_group(quotagroup)
Get information about the quota group
- Api Key Authentication (TOTPHeader):
- Api Key Authentication (AuthorizationHeaderToken):
- Api Key Authentication (SudoHeader):
- Basic Authentication (BasicAuth):
- Api Key Authentication (AccessToken):
- Api Key Authentication (SudoParam):
- Api Key Authentication (Token):
import clientapi_forgejo
from clientapi_forgejo.models.quota_group import QuotaGroup
from clientapi_forgejo.rest import ApiException
from pprint import pprint
# Defining the host is optional and defaults to /api/v1
# See configuration.py for a list of all supported configuration parameters.
configuration = clientapi_forgejo.Configuration(
host = "/api/v1"
)
# The client must configure the authentication and authorization parameters
# in accordance with the API server security policy.
# Examples for each auth method are provided below, use the example that
# satisfies your auth use case.
# Configure API key authorization: TOTPHeader
configuration.api_key['TOTPHeader'] = os.environ["API_KEY"]
# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
# configuration.api_key_prefix['TOTPHeader'] = 'Bearer'
# Configure API key authorization: AuthorizationHeaderToken
configuration.api_key['AuthorizationHeaderToken'] = os.environ["API_KEY"]
# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
# configuration.api_key_prefix['AuthorizationHeaderToken'] = 'Bearer'
# Configure API key authorization: SudoHeader
configuration.api_key['SudoHeader'] = os.environ["API_KEY"]
# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
# configuration.api_key_prefix['SudoHeader'] = 'Bearer'
# Configure HTTP basic authorization: BasicAuth
configuration = clientapi_forgejo.Configuration(
username = os.environ["USERNAME"],
password = os.environ["PASSWORD"]
)
# Configure API key authorization: AccessToken
configuration.api_key['AccessToken'] = os.environ["API_KEY"]
# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
# configuration.api_key_prefix['AccessToken'] = 'Bearer'
# Configure API key authorization: SudoParam
configuration.api_key['SudoParam'] = os.environ["API_KEY"]
# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
# configuration.api_key_prefix['SudoParam'] = 'Bearer'
# Configure API key authorization: Token
configuration.api_key['Token'] = os.environ["API_KEY"]
# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
# configuration.api_key_prefix['Token'] = 'Bearer'
# Enter a context with an instance of the API client
with clientapi_forgejo.ApiClient(configuration) as api_client:
# Create an instance of the API class
api_instance = clientapi_forgejo.AdminApi(api_client)
quotagroup = 'quotagroup_example' # str | quota group to query
try:
# Get information about the quota group
api_response = api_instance.admin_get_quota_group(quotagroup)
print("The response of AdminApi->admin_get_quota_group:\n")
pprint(api_response)
except Exception as e:
print("Exception when calling AdminApi->admin_get_quota_group: %s\n" % e)
Name | Type | Description | Notes |
---|---|---|---|
quotagroup | str | quota group to query |
TOTPHeader, AuthorizationHeaderToken, SudoHeader, BasicAuth, AccessToken, SudoParam, Token
- Content-Type: Not defined
- Accept: application/json
Status code | Description | Response headers |
---|---|---|
200 | QuotaGroup | - |
400 | APIError is error format response | - |
403 | APIForbiddenError is a forbidden error response | - |
404 | APINotFound is a not found error response | - |
[Back to top] [Back to API list] [Back to Model list] [Back to README]
QuotaRuleInfo admin_get_quota_rule(quotarule)
Get information about a quota rule
- Api Key Authentication (TOTPHeader):
- Api Key Authentication (AuthorizationHeaderToken):
- Api Key Authentication (SudoHeader):
- Basic Authentication (BasicAuth):
- Api Key Authentication (AccessToken):
- Api Key Authentication (SudoParam):
- Api Key Authentication (Token):
import clientapi_forgejo
from clientapi_forgejo.models.quota_rule_info import QuotaRuleInfo
from clientapi_forgejo.rest import ApiException
from pprint import pprint
# Defining the host is optional and defaults to /api/v1
# See configuration.py for a list of all supported configuration parameters.
configuration = clientapi_forgejo.Configuration(
host = "/api/v1"
)
# The client must configure the authentication and authorization parameters
# in accordance with the API server security policy.
# Examples for each auth method are provided below, use the example that
# satisfies your auth use case.
# Configure API key authorization: TOTPHeader
configuration.api_key['TOTPHeader'] = os.environ["API_KEY"]
# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
# configuration.api_key_prefix['TOTPHeader'] = 'Bearer'
# Configure API key authorization: AuthorizationHeaderToken
configuration.api_key['AuthorizationHeaderToken'] = os.environ["API_KEY"]
# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
# configuration.api_key_prefix['AuthorizationHeaderToken'] = 'Bearer'
# Configure API key authorization: SudoHeader
configuration.api_key['SudoHeader'] = os.environ["API_KEY"]
# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
# configuration.api_key_prefix['SudoHeader'] = 'Bearer'
# Configure HTTP basic authorization: BasicAuth
configuration = clientapi_forgejo.Configuration(
username = os.environ["USERNAME"],
password = os.environ["PASSWORD"]
)
# Configure API key authorization: AccessToken
configuration.api_key['AccessToken'] = os.environ["API_KEY"]
# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
# configuration.api_key_prefix['AccessToken'] = 'Bearer'
# Configure API key authorization: SudoParam
configuration.api_key['SudoParam'] = os.environ["API_KEY"]
# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
# configuration.api_key_prefix['SudoParam'] = 'Bearer'
# Configure API key authorization: Token
configuration.api_key['Token'] = os.environ["API_KEY"]
# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
# configuration.api_key_prefix['Token'] = 'Bearer'
# Enter a context with an instance of the API client
with clientapi_forgejo.ApiClient(configuration) as api_client:
# Create an instance of the API class
api_instance = clientapi_forgejo.AdminApi(api_client)
quotarule = 'quotarule_example' # str | quota rule to query
try:
# Get information about a quota rule
api_response = api_instance.admin_get_quota_rule(quotarule)
print("The response of AdminApi->admin_get_quota_rule:\n")
pprint(api_response)
except Exception as e:
print("Exception when calling AdminApi->admin_get_quota_rule: %s\n" % e)
Name | Type | Description | Notes |
---|---|---|---|
quotarule | str | quota rule to query |
TOTPHeader, AuthorizationHeaderToken, SudoHeader, BasicAuth, AccessToken, SudoParam, Token
- Content-Type: Not defined
- Accept: application/json
Status code | Description | Response headers |
---|---|---|
200 | QuotaRuleInfo | - |
400 | APIError is error format response | - |
403 | APIForbiddenError is a forbidden error response | - |
404 | APINotFound is a not found error response | - |
[Back to top] [Back to API list] [Back to Model list] [Back to README]
admin_get_runner_registration_token()
Get an global actions runner registration token
- Api Key Authentication (TOTPHeader):
- Api Key Authentication (AuthorizationHeaderToken):
- Api Key Authentication (SudoHeader):
- Basic Authentication (BasicAuth):
- Api Key Authentication (AccessToken):
- Api Key Authentication (SudoParam):
- Api Key Authentication (Token):
import clientapi_forgejo
from clientapi_forgejo.rest import ApiException
from pprint import pprint
# Defining the host is optional and defaults to /api/v1
# See configuration.py for a list of all supported configuration parameters.
configuration = clientapi_forgejo.Configuration(
host = "/api/v1"
)
# The client must configure the authentication and authorization parameters
# in accordance with the API server security policy.
# Examples for each auth method are provided below, use the example that
# satisfies your auth use case.
# Configure API key authorization: TOTPHeader
configuration.api_key['TOTPHeader'] = os.environ["API_KEY"]
# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
# configuration.api_key_prefix['TOTPHeader'] = 'Bearer'
# Configure API key authorization: AuthorizationHeaderToken
configuration.api_key['AuthorizationHeaderToken'] = os.environ["API_KEY"]
# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
# configuration.api_key_prefix['AuthorizationHeaderToken'] = 'Bearer'
# Configure API key authorization: SudoHeader
configuration.api_key['SudoHeader'] = os.environ["API_KEY"]
# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
# configuration.api_key_prefix['SudoHeader'] = 'Bearer'
# Configure HTTP basic authorization: BasicAuth
configuration = clientapi_forgejo.Configuration(
username = os.environ["USERNAME"],
password = os.environ["PASSWORD"]
)
# Configure API key authorization: AccessToken
configuration.api_key['AccessToken'] = os.environ["API_KEY"]
# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
# configuration.api_key_prefix['AccessToken'] = 'Bearer'
# Configure API key authorization: SudoParam
configuration.api_key['SudoParam'] = os.environ["API_KEY"]
# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
# configuration.api_key_prefix['SudoParam'] = 'Bearer'
# Configure API key authorization: Token
configuration.api_key['Token'] = os.environ["API_KEY"]
# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
# configuration.api_key_prefix['Token'] = 'Bearer'
# Enter a context with an instance of the API client
with clientapi_forgejo.ApiClient(configuration) as api_client:
# Create an instance of the API class
api_instance = clientapi_forgejo.AdminApi(api_client)
try:
# Get an global actions runner registration token
api_instance.admin_get_runner_registration_token()
except Exception as e:
print("Exception when calling AdminApi->admin_get_runner_registration_token: %s\n" % e)
This endpoint does not need any parameter.
void (empty response body)
TOTPHeader, AuthorizationHeaderToken, SudoHeader, BasicAuth, AccessToken, SudoParam, Token
- Content-Type: Not defined
- Accept: Not defined
Status code | Description | Response headers |
---|---|---|
200 | RegistrationToken is a string used to register a runner with a server | * token - |
[Back to top] [Back to API list] [Back to Model list] [Back to README]
QuotaInfo admin_get_user_quota(username)
Get the user's quota info
- Api Key Authentication (TOTPHeader):
- Api Key Authentication (AuthorizationHeaderToken):
- Api Key Authentication (SudoHeader):
- Basic Authentication (BasicAuth):
- Api Key Authentication (AccessToken):
- Api Key Authentication (SudoParam):
- Api Key Authentication (Token):
import clientapi_forgejo
from clientapi_forgejo.models.quota_info import QuotaInfo
from clientapi_forgejo.rest import ApiException
from pprint import pprint
# Defining the host is optional and defaults to /api/v1
# See configuration.py for a list of all supported configuration parameters.
configuration = clientapi_forgejo.Configuration(
host = "/api/v1"
)
# The client must configure the authentication and authorization parameters
# in accordance with the API server security policy.
# Examples for each auth method are provided below, use the example that
# satisfies your auth use case.
# Configure API key authorization: TOTPHeader
configuration.api_key['TOTPHeader'] = os.environ["API_KEY"]
# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
# configuration.api_key_prefix['TOTPHeader'] = 'Bearer'
# Configure API key authorization: AuthorizationHeaderToken
configuration.api_key['AuthorizationHeaderToken'] = os.environ["API_KEY"]
# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
# configuration.api_key_prefix['AuthorizationHeaderToken'] = 'Bearer'
# Configure API key authorization: SudoHeader
configuration.api_key['SudoHeader'] = os.environ["API_KEY"]
# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
# configuration.api_key_prefix['SudoHeader'] = 'Bearer'
# Configure HTTP basic authorization: BasicAuth
configuration = clientapi_forgejo.Configuration(
username = os.environ["USERNAME"],
password = os.environ["PASSWORD"]
)
# Configure API key authorization: AccessToken
configuration.api_key['AccessToken'] = os.environ["API_KEY"]
# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
# configuration.api_key_prefix['AccessToken'] = 'Bearer'
# Configure API key authorization: SudoParam
configuration.api_key['SudoParam'] = os.environ["API_KEY"]
# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
# configuration.api_key_prefix['SudoParam'] = 'Bearer'
# Configure API key authorization: Token
configuration.api_key['Token'] = os.environ["API_KEY"]
# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
# configuration.api_key_prefix['Token'] = 'Bearer'
# Enter a context with an instance of the API client
with clientapi_forgejo.ApiClient(configuration) as api_client:
# Create an instance of the API class
api_instance = clientapi_forgejo.AdminApi(api_client)
username = 'username_example' # str | username of user to query
try:
# Get the user's quota info
api_response = api_instance.admin_get_user_quota(username)
print("The response of AdminApi->admin_get_user_quota:\n")
pprint(api_response)
except Exception as e:
print("Exception when calling AdminApi->admin_get_user_quota: %s\n" % e)
Name | Type | Description | Notes |
---|---|---|---|
username | str | username of user to query |
TOTPHeader, AuthorizationHeaderToken, SudoHeader, BasicAuth, AccessToken, SudoParam, Token
- Content-Type: Not defined
- Accept: application/json
Status code | Description | Response headers |
---|---|---|
200 | QuotaInfo | - |
400 | APIError is error format response | - |
403 | APIForbiddenError is a forbidden error response | - |
404 | APINotFound is a not found error response | - |
422 | APIValidationError is error format response related to input validation | - |
[Back to top] [Back to API list] [Back to Model list] [Back to README]
List[Hook] admin_list_hooks(page=page, limit=limit)
List system's webhooks
- Api Key Authentication (TOTPHeader):
- Api Key Authentication (AuthorizationHeaderToken):
- Api Key Authentication (SudoHeader):
- Basic Authentication (BasicAuth):
- Api Key Authentication (AccessToken):
- Api Key Authentication (SudoParam):
- Api Key Authentication (Token):
import clientapi_forgejo
from clientapi_forgejo.models.hook import Hook
from clientapi_forgejo.rest import ApiException
from pprint import pprint
# Defining the host is optional and defaults to /api/v1
# See configuration.py for a list of all supported configuration parameters.
configuration = clientapi_forgejo.Configuration(
host = "/api/v1"
)
# The client must configure the authentication and authorization parameters
# in accordance with the API server security policy.
# Examples for each auth method are provided below, use the example that
# satisfies your auth use case.
# Configure API key authorization: TOTPHeader
configuration.api_key['TOTPHeader'] = os.environ["API_KEY"]
# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
# configuration.api_key_prefix['TOTPHeader'] = 'Bearer'
# Configure API key authorization: AuthorizationHeaderToken
configuration.api_key['AuthorizationHeaderToken'] = os.environ["API_KEY"]
# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
# configuration.api_key_prefix['AuthorizationHeaderToken'] = 'Bearer'
# Configure API key authorization: SudoHeader
configuration.api_key['SudoHeader'] = os.environ["API_KEY"]
# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
# configuration.api_key_prefix['SudoHeader'] = 'Bearer'
# Configure HTTP basic authorization: BasicAuth
configuration = clientapi_forgejo.Configuration(
username = os.environ["USERNAME"],
password = os.environ["PASSWORD"]
)
# Configure API key authorization: AccessToken
configuration.api_key['AccessToken'] = os.environ["API_KEY"]
# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
# configuration.api_key_prefix['AccessToken'] = 'Bearer'
# Configure API key authorization: SudoParam
configuration.api_key['SudoParam'] = os.environ["API_KEY"]
# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
# configuration.api_key_prefix['SudoParam'] = 'Bearer'
# Configure API key authorization: Token
configuration.api_key['Token'] = os.environ["API_KEY"]
# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
# configuration.api_key_prefix['Token'] = 'Bearer'
# Enter a context with an instance of the API client
with clientapi_forgejo.ApiClient(configuration) as api_client:
# Create an instance of the API class
api_instance = clientapi_forgejo.AdminApi(api_client)
page = 56 # int | page number of results to return (1-based) (optional)
limit = 56 # int | page size of results (optional)
try:
# List system's webhooks
api_response = api_instance.admin_list_hooks(page=page, limit=limit)
print("The response of AdminApi->admin_list_hooks:\n")
pprint(api_response)
except Exception as e:
print("Exception when calling AdminApi->admin_list_hooks: %s\n" % e)
Name | Type | Description | Notes |
---|---|---|---|
page | int | page number of results to return (1-based) | [optional] |
limit | int | page size of results | [optional] |
TOTPHeader, AuthorizationHeaderToken, SudoHeader, BasicAuth, AccessToken, SudoParam, Token
- Content-Type: Not defined
- Accept: application/json
Status code | Description | Response headers |
---|---|---|
200 | HookList | - |
[Back to top] [Back to API list] [Back to Model list] [Back to README]
List[QuotaGroup] admin_list_quota_groups()
List the available quota groups
- Api Key Authentication (TOTPHeader):
- Api Key Authentication (AuthorizationHeaderToken):
- Api Key Authentication (SudoHeader):
- Basic Authentication (BasicAuth):
- Api Key Authentication (AccessToken):
- Api Key Authentication (SudoParam):
- Api Key Authentication (Token):
import clientapi_forgejo
from clientapi_forgejo.models.quota_group import QuotaGroup
from clientapi_forgejo.rest import ApiException
from pprint import pprint
# Defining the host is optional and defaults to /api/v1
# See configuration.py for a list of all supported configuration parameters.
configuration = clientapi_forgejo.Configuration(
host = "/api/v1"
)
# The client must configure the authentication and authorization parameters
# in accordance with the API server security policy.
# Examples for each auth method are provided below, use the example that
# satisfies your auth use case.
# Configure API key authorization: TOTPHeader
configuration.api_key['TOTPHeader'] = os.environ["API_KEY"]
# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
# configuration.api_key_prefix['TOTPHeader'] = 'Bearer'
# Configure API key authorization: AuthorizationHeaderToken
configuration.api_key['AuthorizationHeaderToken'] = os.environ["API_KEY"]
# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
# configuration.api_key_prefix['AuthorizationHeaderToken'] = 'Bearer'
# Configure API key authorization: SudoHeader
configuration.api_key['SudoHeader'] = os.environ["API_KEY"]
# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
# configuration.api_key_prefix['SudoHeader'] = 'Bearer'
# Configure HTTP basic authorization: BasicAuth
configuration = clientapi_forgejo.Configuration(
username = os.environ["USERNAME"],
password = os.environ["PASSWORD"]
)
# Configure API key authorization: AccessToken
configuration.api_key['AccessToken'] = os.environ["API_KEY"]
# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
# configuration.api_key_prefix['AccessToken'] = 'Bearer'
# Configure API key authorization: SudoParam
configuration.api_key['SudoParam'] = os.environ["API_KEY"]
# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
# configuration.api_key_prefix['SudoParam'] = 'Bearer'
# Configure API key authorization: Token
configuration.api_key['Token'] = os.environ["API_KEY"]
# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
# configuration.api_key_prefix['Token'] = 'Bearer'
# Enter a context with an instance of the API client
with clientapi_forgejo.ApiClient(configuration) as api_client:
# Create an instance of the API class
api_instance = clientapi_forgejo.AdminApi(api_client)
try:
# List the available quota groups
api_response = api_instance.admin_list_quota_groups()
print("The response of AdminApi->admin_list_quota_groups:\n")
pprint(api_response)
except Exception as e:
print("Exception when calling AdminApi->admin_list_quota_groups: %s\n" % e)
This endpoint does not need any parameter.
TOTPHeader, AuthorizationHeaderToken, SudoHeader, BasicAuth, AccessToken, SudoParam, Token
- Content-Type: Not defined
- Accept: application/json
Status code | Description | Response headers |
---|---|---|
200 | QuotaGroupList | - |
403 | APIForbiddenError is a forbidden error response | - |
[Back to top] [Back to API list] [Back to Model list] [Back to README]
List[QuotaRuleInfo] admin_list_quota_rules()
List the available quota rules
- Api Key Authentication (TOTPHeader):
- Api Key Authentication (AuthorizationHeaderToken):
- Api Key Authentication (SudoHeader):
- Basic Authentication (BasicAuth):
- Api Key Authentication (AccessToken):
- Api Key Authentication (SudoParam):
- Api Key Authentication (Token):
import clientapi_forgejo
from clientapi_forgejo.models.quota_rule_info import QuotaRuleInfo
from clientapi_forgejo.rest import ApiException
from pprint import pprint
# Defining the host is optional and defaults to /api/v1
# See configuration.py for a list of all supported configuration parameters.
configuration = clientapi_forgejo.Configuration(
host = "/api/v1"
)
# The client must configure the authentication and authorization parameters
# in accordance with the API server security policy.
# Examples for each auth method are provided below, use the example that
# satisfies your auth use case.
# Configure API key authorization: TOTPHeader
configuration.api_key['TOTPHeader'] = os.environ["API_KEY"]
# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
# configuration.api_key_prefix['TOTPHeader'] = 'Bearer'
# Configure API key authorization: AuthorizationHeaderToken
configuration.api_key['AuthorizationHeaderToken'] = os.environ["API_KEY"]
# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
# configuration.api_key_prefix['AuthorizationHeaderToken'] = 'Bearer'
# Configure API key authorization: SudoHeader
configuration.api_key['SudoHeader'] = os.environ["API_KEY"]
# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
# configuration.api_key_prefix['SudoHeader'] = 'Bearer'
# Configure HTTP basic authorization: BasicAuth
configuration = clientapi_forgejo.Configuration(
username = os.environ["USERNAME"],
password = os.environ["PASSWORD"]
)
# Configure API key authorization: AccessToken
configuration.api_key['AccessToken'] = os.environ["API_KEY"]
# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
# configuration.api_key_prefix['AccessToken'] = 'Bearer'
# Configure API key authorization: SudoParam
configuration.api_key['SudoParam'] = os.environ["API_KEY"]
# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
# configuration.api_key_prefix['SudoParam'] = 'Bearer'
# Configure API key authorization: Token
configuration.api_key['Token'] = os.environ["API_KEY"]
# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
# configuration.api_key_prefix['Token'] = 'Bearer'
# Enter a context with an instance of the API client
with clientapi_forgejo.ApiClient(configuration) as api_client:
# Create an instance of the API class
api_instance = clientapi_forgejo.AdminApi(api_client)
try:
# List the available quota rules
api_response = api_instance.admin_list_quota_rules()
print("The response of AdminApi->admin_list_quota_rules:\n")
pprint(api_response)
except Exception as e:
print("Exception when calling AdminApi->admin_list_quota_rules: %s\n" % e)
This endpoint does not need any parameter.
TOTPHeader, AuthorizationHeaderToken, SudoHeader, BasicAuth, AccessToken, SudoParam, Token
- Content-Type: Not defined
- Accept: application/json
Status code | Description | Response headers |
---|---|---|
200 | QuotaRuleInfoList | - |
403 | APIForbiddenError is a forbidden error response | - |
[Back to top] [Back to API list] [Back to Model list] [Back to README]
List[User] admin_list_users_in_quota_group(quotagroup)
List users in a quota group
- Api Key Authentication (TOTPHeader):
- Api Key Authentication (AuthorizationHeaderToken):
- Api Key Authentication (SudoHeader):
- Basic Authentication (BasicAuth):
- Api Key Authentication (AccessToken):
- Api Key Authentication (SudoParam):
- Api Key Authentication (Token):
import clientapi_forgejo
from clientapi_forgejo.models.user import User
from clientapi_forgejo.rest import ApiException
from pprint import pprint
# Defining the host is optional and defaults to /api/v1
# See configuration.py for a list of all supported configuration parameters.
configuration = clientapi_forgejo.Configuration(
host = "/api/v1"
)
# The client must configure the authentication and authorization parameters
# in accordance with the API server security policy.
# Examples for each auth method are provided below, use the example that
# satisfies your auth use case.
# Configure API key authorization: TOTPHeader
configuration.api_key['TOTPHeader'] = os.environ["API_KEY"]
# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
# configuration.api_key_prefix['TOTPHeader'] = 'Bearer'
# Configure API key authorization: AuthorizationHeaderToken
configuration.api_key['AuthorizationHeaderToken'] = os.environ["API_KEY"]
# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
# configuration.api_key_prefix['AuthorizationHeaderToken'] = 'Bearer'
# Configure API key authorization: SudoHeader
configuration.api_key['SudoHeader'] = os.environ["API_KEY"]
# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
# configuration.api_key_prefix['SudoHeader'] = 'Bearer'
# Configure HTTP basic authorization: BasicAuth
configuration = clientapi_forgejo.Configuration(
username = os.environ["USERNAME"],
password = os.environ["PASSWORD"]
)
# Configure API key authorization: AccessToken
configuration.api_key['AccessToken'] = os.environ["API_KEY"]
# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
# configuration.api_key_prefix['AccessToken'] = 'Bearer'
# Configure API key authorization: SudoParam
configuration.api_key['SudoParam'] = os.environ["API_KEY"]
# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
# configuration.api_key_prefix['SudoParam'] = 'Bearer'
# Configure API key authorization: Token
configuration.api_key['Token'] = os.environ["API_KEY"]
# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
# configuration.api_key_prefix['Token'] = 'Bearer'
# Enter a context with an instance of the API client
with clientapi_forgejo.ApiClient(configuration) as api_client:
# Create an instance of the API class
api_instance = clientapi_forgejo.AdminApi(api_client)
quotagroup = 'quotagroup_example' # str | quota group to list members of
try:
# List users in a quota group
api_response = api_instance.admin_list_users_in_quota_group(quotagroup)
print("The response of AdminApi->admin_list_users_in_quota_group:\n")
pprint(api_response)
except Exception as e:
print("Exception when calling AdminApi->admin_list_users_in_quota_group: %s\n" % e)
Name | Type | Description | Notes |
---|---|---|---|
quotagroup | str | quota group to list members of |
TOTPHeader, AuthorizationHeaderToken, SudoHeader, BasicAuth, AccessToken, SudoParam, Token
- Content-Type: Not defined
- Accept: application/json
Status code | Description | Response headers |
---|---|---|
200 | UserList | - |
400 | APIError is error format response | - |
403 | APIForbiddenError is a forbidden error response | - |
404 | APINotFound is a not found error response | - |
[Back to top] [Back to API list] [Back to Model list] [Back to README]
admin_remove_rule_from_quota_group(quotagroup, quotarule)
Removes a rule from a quota group
- Api Key Authentication (TOTPHeader):
- Api Key Authentication (AuthorizationHeaderToken):
- Api Key Authentication (SudoHeader):
- Basic Authentication (BasicAuth):
- Api Key Authentication (AccessToken):
- Api Key Authentication (SudoParam):
- Api Key Authentication (Token):
import clientapi_forgejo
from clientapi_forgejo.rest import ApiException
from pprint import pprint
# Defining the host is optional and defaults to /api/v1
# See configuration.py for a list of all supported configuration parameters.
configuration = clientapi_forgejo.Configuration(
host = "/api/v1"
)
# The client must configure the authentication and authorization parameters
# in accordance with the API server security policy.
# Examples for each auth method are provided below, use the example that
# satisfies your auth use case.
# Configure API key authorization: TOTPHeader
configuration.api_key['TOTPHeader'] = os.environ["API_KEY"]
# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
# configuration.api_key_prefix['TOTPHeader'] = 'Bearer'
# Configure API key authorization: AuthorizationHeaderToken
configuration.api_key['AuthorizationHeaderToken'] = os.environ["API_KEY"]
# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
# configuration.api_key_prefix['AuthorizationHeaderToken'] = 'Bearer'
# Configure API key authorization: SudoHeader
configuration.api_key['SudoHeader'] = os.environ["API_KEY"]
# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
# configuration.api_key_prefix['SudoHeader'] = 'Bearer'
# Configure HTTP basic authorization: BasicAuth
configuration = clientapi_forgejo.Configuration(
username = os.environ["USERNAME"],
password = os.environ["PASSWORD"]
)
# Configure API key authorization: AccessToken
configuration.api_key['AccessToken'] = os.environ["API_KEY"]
# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
# configuration.api_key_prefix['AccessToken'] = 'Bearer'
# Configure API key authorization: SudoParam
configuration.api_key['SudoParam'] = os.environ["API_KEY"]
# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
# configuration.api_key_prefix['SudoParam'] = 'Bearer'
# Configure API key authorization: Token
configuration.api_key['Token'] = os.environ["API_KEY"]
# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
# configuration.api_key_prefix['Token'] = 'Bearer'
# Enter a context with an instance of the API client
with clientapi_forgejo.ApiClient(configuration) as api_client:
# Create an instance of the API class
api_instance = clientapi_forgejo.AdminApi(api_client)
quotagroup = 'quotagroup_example' # str | quota group to remove a rule from
quotarule = 'quotarule_example' # str | the name of the quota rule to remove from the group
try:
# Removes a rule from a quota group
api_instance.admin_remove_rule_from_quota_group(quotagroup, quotarule)
except Exception as e:
print("Exception when calling AdminApi->admin_remove_rule_from_quota_group: %s\n" % e)
Name | Type | Description | Notes |
---|---|---|---|
quotagroup | str | quota group to remove a rule from | |
quotarule | str | the name of the quota rule to remove from the group |
void (empty response body)
TOTPHeader, AuthorizationHeaderToken, SudoHeader, BasicAuth, AccessToken, SudoParam, Token
- Content-Type: Not defined
- Accept: application/json
Status code | Description | Response headers |
---|---|---|
201 | APIEmpty is an empty response | - |
400 | APIError is error format response | - |
403 | APIForbiddenError is a forbidden error response | - |
404 | APINotFound is a not found error response | - |
[Back to top] [Back to API list] [Back to Model list] [Back to README]
admin_remove_user_from_quota_group(quotagroup, username)
Remove a user from a quota group
- Api Key Authentication (TOTPHeader):
- Api Key Authentication (AuthorizationHeaderToken):
- Api Key Authentication (SudoHeader):
- Basic Authentication (BasicAuth):
- Api Key Authentication (AccessToken):
- Api Key Authentication (SudoParam):
- Api Key Authentication (Token):
import clientapi_forgejo
from clientapi_forgejo.rest import ApiException
from pprint import pprint
# Defining the host is optional and defaults to /api/v1
# See configuration.py for a list of all supported configuration parameters.
configuration = clientapi_forgejo.Configuration(
host = "/api/v1"
)
# The client must configure the authentication and authorization parameters
# in accordance with the API server security policy.
# Examples for each auth method are provided below, use the example that
# satisfies your auth use case.
# Configure API key authorization: TOTPHeader
configuration.api_key['TOTPHeader'] = os.environ["API_KEY"]
# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
# configuration.api_key_prefix['TOTPHeader'] = 'Bearer'
# Configure API key authorization: AuthorizationHeaderToken
configuration.api_key['AuthorizationHeaderToken'] = os.environ["API_KEY"]
# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
# configuration.api_key_prefix['AuthorizationHeaderToken'] = 'Bearer'
# Configure API key authorization: SudoHeader
configuration.api_key['SudoHeader'] = os.environ["API_KEY"]
# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
# configuration.api_key_prefix['SudoHeader'] = 'Bearer'
# Configure HTTP basic authorization: BasicAuth
configuration = clientapi_forgejo.Configuration(
username = os.environ["USERNAME"],
password = os.environ["PASSWORD"]
)
# Configure API key authorization: AccessToken
configuration.api_key['AccessToken'] = os.environ["API_KEY"]
# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
# configuration.api_key_prefix['AccessToken'] = 'Bearer'
# Configure API key authorization: SudoParam
configuration.api_key['SudoParam'] = os.environ["API_KEY"]
# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
# configuration.api_key_prefix['SudoParam'] = 'Bearer'
# Configure API key authorization: Token
configuration.api_key['Token'] = os.environ["API_KEY"]
# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
# configuration.api_key_prefix['Token'] = 'Bearer'
# Enter a context with an instance of the API client
with clientapi_forgejo.ApiClient(configuration) as api_client:
# Create an instance of the API class
api_instance = clientapi_forgejo.AdminApi(api_client)
quotagroup = 'quotagroup_example' # str | quota group to remove a user from
username = 'username_example' # str | username of the user to remove from the quota group
try:
# Remove a user from a quota group
api_instance.admin_remove_user_from_quota_group(quotagroup, username)
except Exception as e:
print("Exception when calling AdminApi->admin_remove_user_from_quota_group: %s\n" % e)
Name | Type | Description | Notes |
---|---|---|---|
quotagroup | str | quota group to remove a user from | |
username | str | username of the user to remove from the quota group |
void (empty response body)
TOTPHeader, AuthorizationHeaderToken, SudoHeader, BasicAuth, AccessToken, SudoParam, Token
- Content-Type: Not defined
- Accept: application/json
Status code | Description | Response headers |
---|---|---|
204 | APIEmpty is an empty response | - |
400 | APIError is error format response | - |
403 | APIForbiddenError is a forbidden error response | - |
404 | APINotFound is a not found error response | - |
[Back to top] [Back to API list] [Back to Model list] [Back to README]
admin_rename_user(username, body)
Rename a user
- Api Key Authentication (TOTPHeader):
- Api Key Authentication (AuthorizationHeaderToken):
- Api Key Authentication (SudoHeader):
- Basic Authentication (BasicAuth):
- Api Key Authentication (AccessToken):
- Api Key Authentication (SudoParam):
- Api Key Authentication (Token):
import clientapi_forgejo
from clientapi_forgejo.models.rename_user_option import RenameUserOption
from clientapi_forgejo.rest import ApiException
from pprint import pprint
# Defining the host is optional and defaults to /api/v1
# See configuration.py for a list of all supported configuration parameters.
configuration = clientapi_forgejo.Configuration(
host = "/api/v1"
)
# The client must configure the authentication and authorization parameters
# in accordance with the API server security policy.
# Examples for each auth method are provided below, use the example that
# satisfies your auth use case.
# Configure API key authorization: TOTPHeader
configuration.api_key['TOTPHeader'] = os.environ["API_KEY"]
# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
# configuration.api_key_prefix['TOTPHeader'] = 'Bearer'
# Configure API key authorization: AuthorizationHeaderToken
configuration.api_key['AuthorizationHeaderToken'] = os.environ["API_KEY"]
# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
# configuration.api_key_prefix['AuthorizationHeaderToken'] = 'Bearer'
# Configure API key authorization: SudoHeader
configuration.api_key['SudoHeader'] = os.environ["API_KEY"]
# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
# configuration.api_key_prefix['SudoHeader'] = 'Bearer'
# Configure HTTP basic authorization: BasicAuth
configuration = clientapi_forgejo.Configuration(
username = os.environ["USERNAME"],
password = os.environ["PASSWORD"]
)
# Configure API key authorization: AccessToken
configuration.api_key['AccessToken'] = os.environ["API_KEY"]
# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
# configuration.api_key_prefix['AccessToken'] = 'Bearer'
# Configure API key authorization: SudoParam
configuration.api_key['SudoParam'] = os.environ["API_KEY"]
# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
# configuration.api_key_prefix['SudoParam'] = 'Bearer'
# Configure API key authorization: Token
configuration.api_key['Token'] = os.environ["API_KEY"]
# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
# configuration.api_key_prefix['Token'] = 'Bearer'
# Enter a context with an instance of the API client
with clientapi_forgejo.ApiClient(configuration) as api_client:
# Create an instance of the API class
api_instance = clientapi_forgejo.AdminApi(api_client)
username = 'username_example' # str | existing username of user
body = clientapi_forgejo.RenameUserOption() # RenameUserOption |
try:
# Rename a user
api_instance.admin_rename_user(username, body)
except Exception as e:
print("Exception when calling AdminApi->admin_rename_user: %s\n" % e)
Name | Type | Description | Notes |
---|---|---|---|
username | str | existing username of user | |
body | RenameUserOption |
void (empty response body)
TOTPHeader, AuthorizationHeaderToken, SudoHeader, BasicAuth, AccessToken, SudoParam, Token
- Content-Type: application/json, text/plain
- Accept: application/json
Status code | Description | Response headers |
---|---|---|
204 | APIEmpty is an empty response | - |
403 | APIForbiddenError is a forbidden error response | - |
422 | APIValidationError is error format response related to input validation | - |
[Back to top] [Back to API list] [Back to Model list] [Back to README]
List[Email] admin_search_emails(q=q, page=page, limit=limit)
Search all emails
- Api Key Authentication (TOTPHeader):
- Api Key Authentication (AuthorizationHeaderToken):
- Api Key Authentication (SudoHeader):
- Basic Authentication (BasicAuth):
- Api Key Authentication (AccessToken):
- Api Key Authentication (SudoParam):
- Api Key Authentication (Token):
import clientapi_forgejo
from clientapi_forgejo.models.email import Email
from clientapi_forgejo.rest import ApiException
from pprint import pprint
# Defining the host is optional and defaults to /api/v1
# See configuration.py for a list of all supported configuration parameters.
configuration = clientapi_forgejo.Configuration(
host = "/api/v1"
)
# The client must configure the authentication and authorization parameters
# in accordance with the API server security policy.
# Examples for each auth method are provided below, use the example that
# satisfies your auth use case.
# Configure API key authorization: TOTPHeader
configuration.api_key['TOTPHeader'] = os.environ["API_KEY"]
# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
# configuration.api_key_prefix['TOTPHeader'] = 'Bearer'
# Configure API key authorization: AuthorizationHeaderToken
configuration.api_key['AuthorizationHeaderToken'] = os.environ["API_KEY"]
# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
# configuration.api_key_prefix['AuthorizationHeaderToken'] = 'Bearer'
# Configure API key authorization: SudoHeader
configuration.api_key['SudoHeader'] = os.environ["API_KEY"]
# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
# configuration.api_key_prefix['SudoHeader'] = 'Bearer'
# Configure HTTP basic authorization: BasicAuth
configuration = clientapi_forgejo.Configuration(
username = os.environ["USERNAME"],
password = os.environ["PASSWORD"]
)
# Configure API key authorization: AccessToken
configuration.api_key['AccessToken'] = os.environ["API_KEY"]
# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
# configuration.api_key_prefix['AccessToken'] = 'Bearer'
# Configure API key authorization: SudoParam
configuration.api_key['SudoParam'] = os.environ["API_KEY"]
# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
# configuration.api_key_prefix['SudoParam'] = 'Bearer'
# Configure API key authorization: Token
configuration.api_key['Token'] = os.environ["API_KEY"]
# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
# configuration.api_key_prefix['Token'] = 'Bearer'
# Enter a context with an instance of the API client
with clientapi_forgejo.ApiClient(configuration) as api_client:
# Create an instance of the API class
api_instance = clientapi_forgejo.AdminApi(api_client)
q = 'q_example' # str | keyword (optional)
page = 56 # int | page number of results to return (1-based) (optional)
limit = 56 # int | page size of results (optional)
try:
# Search all emails
api_response = api_instance.admin_search_emails(q=q, page=page, limit=limit)
print("The response of AdminApi->admin_search_emails:\n")
pprint(api_response)
except Exception as e:
print("Exception when calling AdminApi->admin_search_emails: %s\n" % e)
Name | Type | Description | Notes |
---|---|---|---|
q | str | keyword | [optional] |
page | int | page number of results to return (1-based) | [optional] |
limit | int | page size of results | [optional] |
TOTPHeader, AuthorizationHeaderToken, SudoHeader, BasicAuth, AccessToken, SudoParam, Token
- Content-Type: Not defined
- Accept: application/json
Status code | Description | Response headers |
---|---|---|
200 | EmailList | - |
403 | APIForbiddenError is a forbidden error response | - |
[Back to top] [Back to API list] [Back to Model list] [Back to README]
List[User] admin_search_users(source_id=source_id, login_name=login_name, sort=sort, page=page, limit=limit)
Search users according filter conditions
- Api Key Authentication (TOTPHeader):
- Api Key Authentication (AuthorizationHeaderToken):
- Api Key Authentication (SudoHeader):
- Basic Authentication (BasicAuth):
- Api Key Authentication (AccessToken):
- Api Key Authentication (SudoParam):
- Api Key Authentication (Token):
import clientapi_forgejo
from clientapi_forgejo.models.user import User
from clientapi_forgejo.rest import ApiException
from pprint import pprint
# Defining the host is optional and defaults to /api/v1
# See configuration.py for a list of all supported configuration parameters.
configuration = clientapi_forgejo.Configuration(
host = "/api/v1"
)
# The client must configure the authentication and authorization parameters
# in accordance with the API server security policy.
# Examples for each auth method are provided below, use the example that
# satisfies your auth use case.
# Configure API key authorization: TOTPHeader
configuration.api_key['TOTPHeader'] = os.environ["API_KEY"]
# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
# configuration.api_key_prefix['TOTPHeader'] = 'Bearer'
# Configure API key authorization: AuthorizationHeaderToken
configuration.api_key['AuthorizationHeaderToken'] = os.environ["API_KEY"]
# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
# configuration.api_key_prefix['AuthorizationHeaderToken'] = 'Bearer'
# Configure API key authorization: SudoHeader
configuration.api_key['SudoHeader'] = os.environ["API_KEY"]
# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
# configuration.api_key_prefix['SudoHeader'] = 'Bearer'
# Configure HTTP basic authorization: BasicAuth
configuration = clientapi_forgejo.Configuration(
username = os.environ["USERNAME"],
password = os.environ["PASSWORD"]
)
# Configure API key authorization: AccessToken
configuration.api_key['AccessToken'] = os.environ["API_KEY"]
# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
# configuration.api_key_prefix['AccessToken'] = 'Bearer'
# Configure API key authorization: SudoParam
configuration.api_key['SudoParam'] = os.environ["API_KEY"]
# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
# configuration.api_key_prefix['SudoParam'] = 'Bearer'
# Configure API key authorization: Token
configuration.api_key['Token'] = os.environ["API_KEY"]
# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
# configuration.api_key_prefix['Token'] = 'Bearer'
# Enter a context with an instance of the API client
with clientapi_forgejo.ApiClient(configuration) as api_client:
# Create an instance of the API class
api_instance = clientapi_forgejo.AdminApi(api_client)
source_id = 56 # int | ID of the user's login source to search for (optional)
login_name = 'login_name_example' # str | user's login name to search for (optional)
sort = 'sort_example' # str | sort order of results (optional)
page = 56 # int | page number of results to return (1-based) (optional)
limit = 56 # int | page size of results (optional)
try:
# Search users according filter conditions
api_response = api_instance.admin_search_users(source_id=source_id, login_name=login_name, sort=sort, page=page, limit=limit)
print("The response of AdminApi->admin_search_users:\n")
pprint(api_response)
except Exception as e:
print("Exception when calling AdminApi->admin_search_users: %s\n" % e)
Name | Type | Description | Notes |
---|---|---|---|
source_id | int | ID of the user's login source to search for | [optional] |
login_name | str | user's login name to search for | [optional] |
sort | str | sort order of results | [optional] |
page | int | page number of results to return (1-based) | [optional] |
limit | int | page size of results | [optional] |
TOTPHeader, AuthorizationHeaderToken, SudoHeader, BasicAuth, AccessToken, SudoParam, Token
- Content-Type: Not defined
- Accept: application/json
Status code | Description | Response headers |
---|---|---|
200 | UserList | - |
403 | APIForbiddenError is a forbidden error response | - |
[Back to top] [Back to API list] [Back to Model list] [Back to README]
admin_set_user_quota_groups(username, groups)
Set the user's quota groups to a given list.
- Api Key Authentication (TOTPHeader):
- Api Key Authentication (AuthorizationHeaderToken):
- Api Key Authentication (SudoHeader):
- Basic Authentication (BasicAuth):
- Api Key Authentication (AccessToken):
- Api Key Authentication (SudoParam):
- Api Key Authentication (Token):
import clientapi_forgejo
from clientapi_forgejo.models.set_user_quota_groups_options import SetUserQuotaGroupsOptions
from clientapi_forgejo.rest import ApiException
from pprint import pprint
# Defining the host is optional and defaults to /api/v1
# See configuration.py for a list of all supported configuration parameters.
configuration = clientapi_forgejo.Configuration(
host = "/api/v1"
)
# The client must configure the authentication and authorization parameters
# in accordance with the API server security policy.
# Examples for each auth method are provided below, use the example that
# satisfies your auth use case.
# Configure API key authorization: TOTPHeader
configuration.api_key['TOTPHeader'] = os.environ["API_KEY"]
# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
# configuration.api_key_prefix['TOTPHeader'] = 'Bearer'
# Configure API key authorization: AuthorizationHeaderToken
configuration.api_key['AuthorizationHeaderToken'] = os.environ["API_KEY"]
# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
# configuration.api_key_prefix['AuthorizationHeaderToken'] = 'Bearer'
# Configure API key authorization: SudoHeader
configuration.api_key['SudoHeader'] = os.environ["API_KEY"]
# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
# configuration.api_key_prefix['SudoHeader'] = 'Bearer'
# Configure HTTP basic authorization: BasicAuth
configuration = clientapi_forgejo.Configuration(
username = os.environ["USERNAME"],
password = os.environ["PASSWORD"]
)
# Configure API key authorization: AccessToken
configuration.api_key['AccessToken'] = os.environ["API_KEY"]
# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
# configuration.api_key_prefix['AccessToken'] = 'Bearer'
# Configure API key authorization: SudoParam
configuration.api_key['SudoParam'] = os.environ["API_KEY"]
# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
# configuration.api_key_prefix['SudoParam'] = 'Bearer'
# Configure API key authorization: Token
configuration.api_key['Token'] = os.environ["API_KEY"]
# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
# configuration.api_key_prefix['Token'] = 'Bearer'
# Enter a context with an instance of the API client
with clientapi_forgejo.ApiClient(configuration) as api_client:
# Create an instance of the API class
api_instance = clientapi_forgejo.AdminApi(api_client)
username = 'username_example' # str | username of the user to modify the quota groups from
groups = clientapi_forgejo.SetUserQuotaGroupsOptions() # SetUserQuotaGroupsOptions | list of groups that the user should be a member of
try:
# Set the user's quota groups to a given list.
api_instance.admin_set_user_quota_groups(username, groups)
except Exception as e:
print("Exception when calling AdminApi->admin_set_user_quota_groups: %s\n" % e)
Name | Type | Description | Notes |
---|---|---|---|
username | str | username of the user to modify the quota groups from | |
groups | SetUserQuotaGroupsOptions | list of groups that the user should be a member of |
void (empty response body)
TOTPHeader, AuthorizationHeaderToken, SudoHeader, BasicAuth, AccessToken, SudoParam, Token
- Content-Type: application/json, text/plain
- Accept: application/json
Status code | Description | Response headers |
---|---|---|
204 | APIEmpty is an empty response | - |
400 | APIError is error format response | - |
403 | APIForbiddenError is a forbidden error response | - |
404 | APINotFound is a not found error response | - |
422 | APIValidationError is error format response related to input validation | - |
[Back to top] [Back to API list] [Back to Model list] [Back to README]
List[str] admin_unadopted_list(page=page, limit=limit, pattern=pattern)
List unadopted repositories
- Api Key Authentication (TOTPHeader):
- Api Key Authentication (AuthorizationHeaderToken):
- Api Key Authentication (SudoHeader):
- Basic Authentication (BasicAuth):
- Api Key Authentication (AccessToken):
- Api Key Authentication (SudoParam):
- Api Key Authentication (Token):
import clientapi_forgejo
from clientapi_forgejo.rest import ApiException
from pprint import pprint
# Defining the host is optional and defaults to /api/v1
# See configuration.py for a list of all supported configuration parameters.
configuration = clientapi_forgejo.Configuration(
host = "/api/v1"
)
# The client must configure the authentication and authorization parameters
# in accordance with the API server security policy.
# Examples for each auth method are provided below, use the example that
# satisfies your auth use case.
# Configure API key authorization: TOTPHeader
configuration.api_key['TOTPHeader'] = os.environ["API_KEY"]
# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
# configuration.api_key_prefix['TOTPHeader'] = 'Bearer'
# Configure API key authorization: AuthorizationHeaderToken
configuration.api_key['AuthorizationHeaderToken'] = os.environ["API_KEY"]
# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
# configuration.api_key_prefix['AuthorizationHeaderToken'] = 'Bearer'
# Configure API key authorization: SudoHeader
configuration.api_key['SudoHeader'] = os.environ["API_KEY"]
# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
# configuration.api_key_prefix['SudoHeader'] = 'Bearer'
# Configure HTTP basic authorization: BasicAuth
configuration = clientapi_forgejo.Configuration(
username = os.environ["USERNAME"],
password = os.environ["PASSWORD"]
)
# Configure API key authorization: AccessToken
configuration.api_key['AccessToken'] = os.environ["API_KEY"]
# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
# configuration.api_key_prefix['AccessToken'] = 'Bearer'
# Configure API key authorization: SudoParam
configuration.api_key['SudoParam'] = os.environ["API_KEY"]
# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
# configuration.api_key_prefix['SudoParam'] = 'Bearer'
# Configure API key authorization: Token
configuration.api_key['Token'] = os.environ["API_KEY"]
# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
# configuration.api_key_prefix['Token'] = 'Bearer'
# Enter a context with an instance of the API client
with clientapi_forgejo.ApiClient(configuration) as api_client:
# Create an instance of the API class
api_instance = clientapi_forgejo.AdminApi(api_client)
page = 56 # int | page number of results to return (1-based) (optional)
limit = 56 # int | page size of results (optional)
pattern = 'pattern_example' # str | pattern of repositories to search for (optional)
try:
# List unadopted repositories
api_response = api_instance.admin_unadopted_list(page=page, limit=limit, pattern=pattern)
print("The response of AdminApi->admin_unadopted_list:\n")
pprint(api_response)
except Exception as e:
print("Exception when calling AdminApi->admin_unadopted_list: %s\n" % e)
Name | Type | Description | Notes |
---|---|---|---|
page | int | page number of results to return (1-based) | [optional] |
limit | int | page size of results | [optional] |
pattern | str | pattern of repositories to search for | [optional] |
List[str]
TOTPHeader, AuthorizationHeaderToken, SudoHeader, BasicAuth, AccessToken, SudoParam, Token
- Content-Type: Not defined
- Accept: application/json
Status code | Description | Response headers |
---|---|---|
200 | StringSlice | - |
403 | APIForbiddenError is a forbidden error response | - |
[Back to top] [Back to API list] [Back to Model list] [Back to README]