405 lines
16 KiB
Markdown
Executable File
405 lines
16 KiB
Markdown
Executable File
# SettingsApi
|
|
|
|
All URIs are relative to *http://localhost/api/v1*
|
|
|
|
Method | HTTP request | Description
|
|
------------- | ------------- | -------------
|
|
[**getGeneralAPISettings**](SettingsApi.md#getGeneralAPISettings) | **GET** /settings/api | Get instance's global settings for api
|
|
[**getGeneralAttachmentSettings**](SettingsApi.md#getGeneralAttachmentSettings) | **GET** /settings/attachment | Get instance's global settings for Attachment
|
|
[**getGeneralRepositorySettings**](SettingsApi.md#getGeneralRepositorySettings) | **GET** /settings/repository | Get instance's global settings for repositories
|
|
[**getGeneralUISettings**](SettingsApi.md#getGeneralUISettings) | **GET** /settings/ui | Get instance's global settings for ui
|
|
|
|
|
|
<a name="getGeneralAPISettings"></a>
|
|
# **getGeneralAPISettings**
|
|
> GeneralAPISettings getGeneralAPISettings()
|
|
|
|
Get instance's global settings for api
|
|
|
|
### Example
|
|
```java
|
|
// Import classes:
|
|
import io.gitea.ApiClient;
|
|
import io.gitea.ApiException;
|
|
import io.gitea.Configuration;
|
|
import io.gitea.auth.*;
|
|
import io.gitea.models.*;
|
|
import io.gitea.api.SettingsApi;
|
|
|
|
public class Example {
|
|
public static void main(String[] args) {
|
|
ApiClient defaultClient = Configuration.getDefaultApiClient();
|
|
defaultClient.setBasePath("http://localhost/api/v1");
|
|
|
|
// Configure API key authorization: AccessToken
|
|
ApiKeyAuth AccessToken = (ApiKeyAuth) defaultClient.getAuthentication("AccessToken");
|
|
AccessToken.setApiKey("YOUR API KEY");
|
|
// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
|
|
//AccessToken.setApiKeyPrefix("Token");
|
|
|
|
// Configure API key authorization: AuthorizationHeaderToken
|
|
ApiKeyAuth AuthorizationHeaderToken = (ApiKeyAuth) defaultClient.getAuthentication("AuthorizationHeaderToken");
|
|
AuthorizationHeaderToken.setApiKey("YOUR API KEY");
|
|
// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
|
|
//AuthorizationHeaderToken.setApiKeyPrefix("Token");
|
|
|
|
// Configure HTTP basic authorization: BasicAuth
|
|
HttpBasicAuth BasicAuth = (HttpBasicAuth) defaultClient.getAuthentication("BasicAuth");
|
|
BasicAuth.setUsername("YOUR USERNAME");
|
|
BasicAuth.setPassword("YOUR PASSWORD");
|
|
|
|
// Configure API key authorization: SudoHeader
|
|
ApiKeyAuth SudoHeader = (ApiKeyAuth) defaultClient.getAuthentication("SudoHeader");
|
|
SudoHeader.setApiKey("YOUR API KEY");
|
|
// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
|
|
//SudoHeader.setApiKeyPrefix("Token");
|
|
|
|
// Configure API key authorization: SudoParam
|
|
ApiKeyAuth SudoParam = (ApiKeyAuth) defaultClient.getAuthentication("SudoParam");
|
|
SudoParam.setApiKey("YOUR API KEY");
|
|
// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
|
|
//SudoParam.setApiKeyPrefix("Token");
|
|
|
|
// Configure API key authorization: TOTPHeader
|
|
ApiKeyAuth TOTPHeader = (ApiKeyAuth) defaultClient.getAuthentication("TOTPHeader");
|
|
TOTPHeader.setApiKey("YOUR API KEY");
|
|
// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
|
|
//TOTPHeader.setApiKeyPrefix("Token");
|
|
|
|
// Configure API key authorization: Token
|
|
ApiKeyAuth Token = (ApiKeyAuth) defaultClient.getAuthentication("Token");
|
|
Token.setApiKey("YOUR API KEY");
|
|
// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
|
|
//Token.setApiKeyPrefix("Token");
|
|
|
|
SettingsApi apiInstance = new SettingsApi(defaultClient);
|
|
try {
|
|
GeneralAPISettings result = apiInstance.getGeneralAPISettings();
|
|
System.out.println(result);
|
|
} catch (ApiException e) {
|
|
System.err.println("Exception when calling SettingsApi#getGeneralAPISettings");
|
|
System.err.println("Status code: " + e.getCode());
|
|
System.err.println("Reason: " + e.getResponseBody());
|
|
System.err.println("Response headers: " + e.getResponseHeaders());
|
|
e.printStackTrace();
|
|
}
|
|
}
|
|
}
|
|
```
|
|
|
|
### Parameters
|
|
This endpoint does not need any parameter.
|
|
|
|
### Return type
|
|
|
|
[**GeneralAPISettings**](GeneralAPISettings.md)
|
|
|
|
### Authorization
|
|
|
|
[AccessToken](../README.md#AccessToken), [AuthorizationHeaderToken](../README.md#AuthorizationHeaderToken), [BasicAuth](../README.md#BasicAuth), [SudoHeader](../README.md#SudoHeader), [SudoParam](../README.md#SudoParam), [TOTPHeader](../README.md#TOTPHeader), [Token](../README.md#Token)
|
|
|
|
### HTTP request headers
|
|
|
|
- **Content-Type**: Not defined
|
|
- **Accept**: application/json
|
|
|
|
### HTTP response details
|
|
| Status code | Description | Response headers |
|
|
|-------------|-------------|------------------|
|
|
**200** | GeneralAPISettings | - |
|
|
|
|
<a name="getGeneralAttachmentSettings"></a>
|
|
# **getGeneralAttachmentSettings**
|
|
> GeneralAttachmentSettings getGeneralAttachmentSettings()
|
|
|
|
Get instance's global settings for Attachment
|
|
|
|
### Example
|
|
```java
|
|
// Import classes:
|
|
import io.gitea.ApiClient;
|
|
import io.gitea.ApiException;
|
|
import io.gitea.Configuration;
|
|
import io.gitea.auth.*;
|
|
import io.gitea.models.*;
|
|
import io.gitea.api.SettingsApi;
|
|
|
|
public class Example {
|
|
public static void main(String[] args) {
|
|
ApiClient defaultClient = Configuration.getDefaultApiClient();
|
|
defaultClient.setBasePath("http://localhost/api/v1");
|
|
|
|
// Configure API key authorization: AccessToken
|
|
ApiKeyAuth AccessToken = (ApiKeyAuth) defaultClient.getAuthentication("AccessToken");
|
|
AccessToken.setApiKey("YOUR API KEY");
|
|
// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
|
|
//AccessToken.setApiKeyPrefix("Token");
|
|
|
|
// Configure API key authorization: AuthorizationHeaderToken
|
|
ApiKeyAuth AuthorizationHeaderToken = (ApiKeyAuth) defaultClient.getAuthentication("AuthorizationHeaderToken");
|
|
AuthorizationHeaderToken.setApiKey("YOUR API KEY");
|
|
// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
|
|
//AuthorizationHeaderToken.setApiKeyPrefix("Token");
|
|
|
|
// Configure HTTP basic authorization: BasicAuth
|
|
HttpBasicAuth BasicAuth = (HttpBasicAuth) defaultClient.getAuthentication("BasicAuth");
|
|
BasicAuth.setUsername("YOUR USERNAME");
|
|
BasicAuth.setPassword("YOUR PASSWORD");
|
|
|
|
// Configure API key authorization: SudoHeader
|
|
ApiKeyAuth SudoHeader = (ApiKeyAuth) defaultClient.getAuthentication("SudoHeader");
|
|
SudoHeader.setApiKey("YOUR API KEY");
|
|
// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
|
|
//SudoHeader.setApiKeyPrefix("Token");
|
|
|
|
// Configure API key authorization: SudoParam
|
|
ApiKeyAuth SudoParam = (ApiKeyAuth) defaultClient.getAuthentication("SudoParam");
|
|
SudoParam.setApiKey("YOUR API KEY");
|
|
// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
|
|
//SudoParam.setApiKeyPrefix("Token");
|
|
|
|
// Configure API key authorization: TOTPHeader
|
|
ApiKeyAuth TOTPHeader = (ApiKeyAuth) defaultClient.getAuthentication("TOTPHeader");
|
|
TOTPHeader.setApiKey("YOUR API KEY");
|
|
// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
|
|
//TOTPHeader.setApiKeyPrefix("Token");
|
|
|
|
// Configure API key authorization: Token
|
|
ApiKeyAuth Token = (ApiKeyAuth) defaultClient.getAuthentication("Token");
|
|
Token.setApiKey("YOUR API KEY");
|
|
// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
|
|
//Token.setApiKeyPrefix("Token");
|
|
|
|
SettingsApi apiInstance = new SettingsApi(defaultClient);
|
|
try {
|
|
GeneralAttachmentSettings result = apiInstance.getGeneralAttachmentSettings();
|
|
System.out.println(result);
|
|
} catch (ApiException e) {
|
|
System.err.println("Exception when calling SettingsApi#getGeneralAttachmentSettings");
|
|
System.err.println("Status code: " + e.getCode());
|
|
System.err.println("Reason: " + e.getResponseBody());
|
|
System.err.println("Response headers: " + e.getResponseHeaders());
|
|
e.printStackTrace();
|
|
}
|
|
}
|
|
}
|
|
```
|
|
|
|
### Parameters
|
|
This endpoint does not need any parameter.
|
|
|
|
### Return type
|
|
|
|
[**GeneralAttachmentSettings**](GeneralAttachmentSettings.md)
|
|
|
|
### Authorization
|
|
|
|
[AccessToken](../README.md#AccessToken), [AuthorizationHeaderToken](../README.md#AuthorizationHeaderToken), [BasicAuth](../README.md#BasicAuth), [SudoHeader](../README.md#SudoHeader), [SudoParam](../README.md#SudoParam), [TOTPHeader](../README.md#TOTPHeader), [Token](../README.md#Token)
|
|
|
|
### HTTP request headers
|
|
|
|
- **Content-Type**: Not defined
|
|
- **Accept**: application/json
|
|
|
|
### HTTP response details
|
|
| Status code | Description | Response headers |
|
|
|-------------|-------------|------------------|
|
|
**200** | GeneralAttachmentSettings | - |
|
|
|
|
<a name="getGeneralRepositorySettings"></a>
|
|
# **getGeneralRepositorySettings**
|
|
> GeneralRepoSettings getGeneralRepositorySettings()
|
|
|
|
Get instance's global settings for repositories
|
|
|
|
### Example
|
|
```java
|
|
// Import classes:
|
|
import io.gitea.ApiClient;
|
|
import io.gitea.ApiException;
|
|
import io.gitea.Configuration;
|
|
import io.gitea.auth.*;
|
|
import io.gitea.models.*;
|
|
import io.gitea.api.SettingsApi;
|
|
|
|
public class Example {
|
|
public static void main(String[] args) {
|
|
ApiClient defaultClient = Configuration.getDefaultApiClient();
|
|
defaultClient.setBasePath("http://localhost/api/v1");
|
|
|
|
// Configure API key authorization: AccessToken
|
|
ApiKeyAuth AccessToken = (ApiKeyAuth) defaultClient.getAuthentication("AccessToken");
|
|
AccessToken.setApiKey("YOUR API KEY");
|
|
// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
|
|
//AccessToken.setApiKeyPrefix("Token");
|
|
|
|
// Configure API key authorization: AuthorizationHeaderToken
|
|
ApiKeyAuth AuthorizationHeaderToken = (ApiKeyAuth) defaultClient.getAuthentication("AuthorizationHeaderToken");
|
|
AuthorizationHeaderToken.setApiKey("YOUR API KEY");
|
|
// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
|
|
//AuthorizationHeaderToken.setApiKeyPrefix("Token");
|
|
|
|
// Configure HTTP basic authorization: BasicAuth
|
|
HttpBasicAuth BasicAuth = (HttpBasicAuth) defaultClient.getAuthentication("BasicAuth");
|
|
BasicAuth.setUsername("YOUR USERNAME");
|
|
BasicAuth.setPassword("YOUR PASSWORD");
|
|
|
|
// Configure API key authorization: SudoHeader
|
|
ApiKeyAuth SudoHeader = (ApiKeyAuth) defaultClient.getAuthentication("SudoHeader");
|
|
SudoHeader.setApiKey("YOUR API KEY");
|
|
// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
|
|
//SudoHeader.setApiKeyPrefix("Token");
|
|
|
|
// Configure API key authorization: SudoParam
|
|
ApiKeyAuth SudoParam = (ApiKeyAuth) defaultClient.getAuthentication("SudoParam");
|
|
SudoParam.setApiKey("YOUR API KEY");
|
|
// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
|
|
//SudoParam.setApiKeyPrefix("Token");
|
|
|
|
// Configure API key authorization: TOTPHeader
|
|
ApiKeyAuth TOTPHeader = (ApiKeyAuth) defaultClient.getAuthentication("TOTPHeader");
|
|
TOTPHeader.setApiKey("YOUR API KEY");
|
|
// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
|
|
//TOTPHeader.setApiKeyPrefix("Token");
|
|
|
|
// Configure API key authorization: Token
|
|
ApiKeyAuth Token = (ApiKeyAuth) defaultClient.getAuthentication("Token");
|
|
Token.setApiKey("YOUR API KEY");
|
|
// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
|
|
//Token.setApiKeyPrefix("Token");
|
|
|
|
SettingsApi apiInstance = new SettingsApi(defaultClient);
|
|
try {
|
|
GeneralRepoSettings result = apiInstance.getGeneralRepositorySettings();
|
|
System.out.println(result);
|
|
} catch (ApiException e) {
|
|
System.err.println("Exception when calling SettingsApi#getGeneralRepositorySettings");
|
|
System.err.println("Status code: " + e.getCode());
|
|
System.err.println("Reason: " + e.getResponseBody());
|
|
System.err.println("Response headers: " + e.getResponseHeaders());
|
|
e.printStackTrace();
|
|
}
|
|
}
|
|
}
|
|
```
|
|
|
|
### Parameters
|
|
This endpoint does not need any parameter.
|
|
|
|
### Return type
|
|
|
|
[**GeneralRepoSettings**](GeneralRepoSettings.md)
|
|
|
|
### Authorization
|
|
|
|
[AccessToken](../README.md#AccessToken), [AuthorizationHeaderToken](../README.md#AuthorizationHeaderToken), [BasicAuth](../README.md#BasicAuth), [SudoHeader](../README.md#SudoHeader), [SudoParam](../README.md#SudoParam), [TOTPHeader](../README.md#TOTPHeader), [Token](../README.md#Token)
|
|
|
|
### HTTP request headers
|
|
|
|
- **Content-Type**: Not defined
|
|
- **Accept**: application/json
|
|
|
|
### HTTP response details
|
|
| Status code | Description | Response headers |
|
|
|-------------|-------------|------------------|
|
|
**200** | GeneralRepoSettings | - |
|
|
|
|
<a name="getGeneralUISettings"></a>
|
|
# **getGeneralUISettings**
|
|
> GeneralUISettings getGeneralUISettings()
|
|
|
|
Get instance's global settings for ui
|
|
|
|
### Example
|
|
```java
|
|
// Import classes:
|
|
import io.gitea.ApiClient;
|
|
import io.gitea.ApiException;
|
|
import io.gitea.Configuration;
|
|
import io.gitea.auth.*;
|
|
import io.gitea.models.*;
|
|
import io.gitea.api.SettingsApi;
|
|
|
|
public class Example {
|
|
public static void main(String[] args) {
|
|
ApiClient defaultClient = Configuration.getDefaultApiClient();
|
|
defaultClient.setBasePath("http://localhost/api/v1");
|
|
|
|
// Configure API key authorization: AccessToken
|
|
ApiKeyAuth AccessToken = (ApiKeyAuth) defaultClient.getAuthentication("AccessToken");
|
|
AccessToken.setApiKey("YOUR API KEY");
|
|
// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
|
|
//AccessToken.setApiKeyPrefix("Token");
|
|
|
|
// Configure API key authorization: AuthorizationHeaderToken
|
|
ApiKeyAuth AuthorizationHeaderToken = (ApiKeyAuth) defaultClient.getAuthentication("AuthorizationHeaderToken");
|
|
AuthorizationHeaderToken.setApiKey("YOUR API KEY");
|
|
// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
|
|
//AuthorizationHeaderToken.setApiKeyPrefix("Token");
|
|
|
|
// Configure HTTP basic authorization: BasicAuth
|
|
HttpBasicAuth BasicAuth = (HttpBasicAuth) defaultClient.getAuthentication("BasicAuth");
|
|
BasicAuth.setUsername("YOUR USERNAME");
|
|
BasicAuth.setPassword("YOUR PASSWORD");
|
|
|
|
// Configure API key authorization: SudoHeader
|
|
ApiKeyAuth SudoHeader = (ApiKeyAuth) defaultClient.getAuthentication("SudoHeader");
|
|
SudoHeader.setApiKey("YOUR API KEY");
|
|
// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
|
|
//SudoHeader.setApiKeyPrefix("Token");
|
|
|
|
// Configure API key authorization: SudoParam
|
|
ApiKeyAuth SudoParam = (ApiKeyAuth) defaultClient.getAuthentication("SudoParam");
|
|
SudoParam.setApiKey("YOUR API KEY");
|
|
// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
|
|
//SudoParam.setApiKeyPrefix("Token");
|
|
|
|
// Configure API key authorization: TOTPHeader
|
|
ApiKeyAuth TOTPHeader = (ApiKeyAuth) defaultClient.getAuthentication("TOTPHeader");
|
|
TOTPHeader.setApiKey("YOUR API KEY");
|
|
// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
|
|
//TOTPHeader.setApiKeyPrefix("Token");
|
|
|
|
// Configure API key authorization: Token
|
|
ApiKeyAuth Token = (ApiKeyAuth) defaultClient.getAuthentication("Token");
|
|
Token.setApiKey("YOUR API KEY");
|
|
// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
|
|
//Token.setApiKeyPrefix("Token");
|
|
|
|
SettingsApi apiInstance = new SettingsApi(defaultClient);
|
|
try {
|
|
GeneralUISettings result = apiInstance.getGeneralUISettings();
|
|
System.out.println(result);
|
|
} catch (ApiException e) {
|
|
System.err.println("Exception when calling SettingsApi#getGeneralUISettings");
|
|
System.err.println("Status code: " + e.getCode());
|
|
System.err.println("Reason: " + e.getResponseBody());
|
|
System.err.println("Response headers: " + e.getResponseHeaders());
|
|
e.printStackTrace();
|
|
}
|
|
}
|
|
}
|
|
```
|
|
|
|
### Parameters
|
|
This endpoint does not need any parameter.
|
|
|
|
### Return type
|
|
|
|
[**GeneralUISettings**](GeneralUISettings.md)
|
|
|
|
### Authorization
|
|
|
|
[AccessToken](../README.md#AccessToken), [AuthorizationHeaderToken](../README.md#AuthorizationHeaderToken), [BasicAuth](../README.md#BasicAuth), [SudoHeader](../README.md#SudoHeader), [SudoParam](../README.md#SudoParam), [TOTPHeader](../README.md#TOTPHeader), [Token](../README.md#Token)
|
|
|
|
### HTTP request headers
|
|
|
|
- **Content-Type**: Not defined
|
|
- **Accept**: application/json
|
|
|
|
### HTTP response details
|
|
| Status code | Description | Response headers |
|
|
|-------------|-------------|------------------|
|
|
**200** | GeneralUISettings | - |
|
|
|