mirror of
https://codeberg.org/gitnex/tea4j-autodeploy
synced 2026-06-05 01:02:18 +00:00
2338 lines
94 KiB
Markdown
2338 lines
94 KiB
Markdown
# AdminApi
|
|
|
|
All URIs are relative to *https://{{AppSubUrl | JSEscape}}/api/v1*
|
|
|
|
Method | HTTP request | Description
|
|
------------- | ------------- | -------------
|
|
[**adminAddUserBadges**](AdminApi.md#adminAddUserBadges) | **POST** admin/users/{username}/badges | Add a badge to a user
|
|
[**adminAdoptRepository**](AdminApi.md#adminAdoptRepository) | **POST** admin/unadopted/{owner}/{repo} | Adopt unadopted files as a repository
|
|
[**adminCreateHook**](AdminApi.md#adminCreateHook) | **POST** admin/hooks | Create a hook
|
|
[**adminCreateOrg**](AdminApi.md#adminCreateOrg) | **POST** admin/users/{username}/orgs | Create an organization
|
|
[**adminCreatePublicKey**](AdminApi.md#adminCreatePublicKey) | **POST** admin/users/{username}/keys | Add a public key on behalf of a user
|
|
[**adminCreateRepo**](AdminApi.md#adminCreateRepo) | **POST** admin/users/{username}/repos | Create a repository on behalf of a user
|
|
[**adminCreateUser**](AdminApi.md#adminCreateUser) | **POST** admin/users | Create a user
|
|
[**adminCronList**](AdminApi.md#adminCronList) | **GET** admin/cron | List cron tasks
|
|
[**adminCronRun**](AdminApi.md#adminCronRun) | **POST** admin/cron/{task} | Run cron task
|
|
[**adminDeleteHook**](AdminApi.md#adminDeleteHook) | **DELETE** admin/hooks/{id} | Delete a hook
|
|
[**adminDeleteUnadoptedRepository**](AdminApi.md#adminDeleteUnadoptedRepository) | **DELETE** admin/unadopted/{owner}/{repo} | Delete unadopted files
|
|
[**adminDeleteUser**](AdminApi.md#adminDeleteUser) | **DELETE** admin/users/{username} | Delete a user
|
|
[**adminDeleteUserBadges**](AdminApi.md#adminDeleteUserBadges) | **DELETE** admin/users/{username}/badges | Remove a badge from a user
|
|
[**adminDeleteUserPublicKey**](AdminApi.md#adminDeleteUserPublicKey) | **DELETE** admin/users/{username}/keys/{id} | Delete a user's public key
|
|
[**adminEditHook**](AdminApi.md#adminEditHook) | **PATCH** admin/hooks/{id} | Update a hook
|
|
[**adminEditUser**](AdminApi.md#adminEditUser) | **PATCH** admin/users/{username} | Edit an existing user
|
|
[**adminGetAllEmails**](AdminApi.md#adminGetAllEmails) | **GET** admin/emails | List all emails
|
|
[**adminGetAllOrgs**](AdminApi.md#adminGetAllOrgs) | **GET** admin/orgs | List all organizations
|
|
[**adminGetHook**](AdminApi.md#adminGetHook) | **GET** admin/hooks/{id} | Get a hook
|
|
[**adminGetRunnerRegistrationToken**](AdminApi.md#adminGetRunnerRegistrationToken) | **GET** admin/runners/registration-token | Get an global actions runner registration token
|
|
[**adminListHooks**](AdminApi.md#adminListHooks) | **GET** admin/hooks | List system's webhooks
|
|
[**adminListUserBadges**](AdminApi.md#adminListUserBadges) | **GET** admin/users/{username}/badges | List a user's badges
|
|
[**adminRenameUser**](AdminApi.md#adminRenameUser) | **POST** admin/users/{username}/rename | Rename a user
|
|
[**adminSearchEmails**](AdminApi.md#adminSearchEmails) | **GET** admin/emails/search | Search all emails
|
|
[**adminSearchUsers**](AdminApi.md#adminSearchUsers) | **GET** admin/users | Search users according filter conditions
|
|
[**adminUnadoptedList**](AdminApi.md#adminUnadoptedList) | **GET** admin/unadopted | List unadopted repositories
|
|
|
|
<a name="adminAddUserBadges"></a>
|
|
# **adminAddUserBadges**
|
|
> Void adminAddUserBadges(username, body)
|
|
|
|
Add a badge to a user
|
|
|
|
### Example
|
|
```java
|
|
// Import classes:
|
|
//import org.gitnex.tea4j.v2.ApiClient;
|
|
//import org.gitnex.tea4j.v2.ApiException;
|
|
//import org.gitnex.tea4j.v2.Configuration;
|
|
//import org.gitnex.tea4j.v2.auth.*;
|
|
//import org.gitnex.tea4j.v2.apis.AdminApi;
|
|
|
|
ApiClient defaultClient = Configuration.getDefaultApiClient();
|
|
|
|
// 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");
|
|
|
|
AdminApi apiInstance = new AdminApi();
|
|
String username = "username_example"; // String | username of user
|
|
UserBadgeOption body = new UserBadgeOption(); // UserBadgeOption |
|
|
try {
|
|
Void result = apiInstance.adminAddUserBadges(username, body);
|
|
System.out.println(result);
|
|
} catch (ApiException e) {
|
|
System.err.println("Exception when calling AdminApi#adminAddUserBadges");
|
|
e.printStackTrace();
|
|
}
|
|
```
|
|
|
|
### Parameters
|
|
|
|
Name | Type | Description | Notes
|
|
------------- | ------------- | ------------- | -------------
|
|
**username** | **String**| username of user |
|
|
**body** | [**UserBadgeOption**](UserBadgeOption.md)| | [optional]
|
|
|
|
### Return type
|
|
|
|
[**Void**](.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**: application/json
|
|
- **Accept**: Not defined
|
|
|
|
<a name="adminAdoptRepository"></a>
|
|
# **adminAdoptRepository**
|
|
> Void adminAdoptRepository(owner, repo)
|
|
|
|
Adopt unadopted files as a repository
|
|
|
|
### Example
|
|
```java
|
|
// Import classes:
|
|
//import org.gitnex.tea4j.v2.ApiClient;
|
|
//import org.gitnex.tea4j.v2.ApiException;
|
|
//import org.gitnex.tea4j.v2.Configuration;
|
|
//import org.gitnex.tea4j.v2.auth.*;
|
|
//import org.gitnex.tea4j.v2.apis.AdminApi;
|
|
|
|
ApiClient defaultClient = Configuration.getDefaultApiClient();
|
|
|
|
// 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");
|
|
|
|
AdminApi apiInstance = new AdminApi();
|
|
String owner = "owner_example"; // String | owner of the repo
|
|
String repo = "repo_example"; // String | name of the repo
|
|
try {
|
|
Void result = apiInstance.adminAdoptRepository(owner, repo);
|
|
System.out.println(result);
|
|
} catch (ApiException e) {
|
|
System.err.println("Exception when calling AdminApi#adminAdoptRepository");
|
|
e.printStackTrace();
|
|
}
|
|
```
|
|
|
|
### Parameters
|
|
|
|
Name | Type | Description | Notes
|
|
------------- | ------------- | ------------- | -------------
|
|
**owner** | **String**| owner of the repo |
|
|
**repo** | **String**| name of the repo |
|
|
|
|
### Return type
|
|
|
|
[**Void**](.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**: Not defined
|
|
|
|
<a name="adminCreateHook"></a>
|
|
# **adminCreateHook**
|
|
> Hook adminCreateHook(body)
|
|
|
|
Create a hook
|
|
|
|
### Example
|
|
```java
|
|
// Import classes:
|
|
//import org.gitnex.tea4j.v2.ApiClient;
|
|
//import org.gitnex.tea4j.v2.ApiException;
|
|
//import org.gitnex.tea4j.v2.Configuration;
|
|
//import org.gitnex.tea4j.v2.auth.*;
|
|
//import org.gitnex.tea4j.v2.apis.AdminApi;
|
|
|
|
ApiClient defaultClient = Configuration.getDefaultApiClient();
|
|
|
|
// 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");
|
|
|
|
AdminApi apiInstance = new AdminApi();
|
|
CreateHookOption body = new CreateHookOption(); // CreateHookOption |
|
|
try {
|
|
Hook result = apiInstance.adminCreateHook(body);
|
|
System.out.println(result);
|
|
} catch (ApiException e) {
|
|
System.err.println("Exception when calling AdminApi#adminCreateHook");
|
|
e.printStackTrace();
|
|
}
|
|
```
|
|
|
|
### Parameters
|
|
|
|
Name | Type | Description | Notes
|
|
------------- | ------------- | ------------- | -------------
|
|
**body** | [**CreateHookOption**](CreateHookOption.md)| |
|
|
|
|
### Return type
|
|
|
|
[**Hook**](Hook.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**: application/json
|
|
- **Accept**: application/json
|
|
|
|
<a name="adminCreateOrg"></a>
|
|
# **adminCreateOrg**
|
|
> Organization adminCreateOrg(body, username)
|
|
|
|
Create an organization
|
|
|
|
### Example
|
|
```java
|
|
// Import classes:
|
|
//import org.gitnex.tea4j.v2.ApiClient;
|
|
//import org.gitnex.tea4j.v2.ApiException;
|
|
//import org.gitnex.tea4j.v2.Configuration;
|
|
//import org.gitnex.tea4j.v2.auth.*;
|
|
//import org.gitnex.tea4j.v2.apis.AdminApi;
|
|
|
|
ApiClient defaultClient = Configuration.getDefaultApiClient();
|
|
|
|
// 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");
|
|
|
|
AdminApi apiInstance = new AdminApi();
|
|
CreateOrgOption body = new CreateOrgOption(); // CreateOrgOption |
|
|
String username = "username_example"; // String | username of the user that will own the created organization
|
|
try {
|
|
Organization result = apiInstance.adminCreateOrg(body, username);
|
|
System.out.println(result);
|
|
} catch (ApiException e) {
|
|
System.err.println("Exception when calling AdminApi#adminCreateOrg");
|
|
e.printStackTrace();
|
|
}
|
|
```
|
|
|
|
### Parameters
|
|
|
|
Name | Type | Description | Notes
|
|
------------- | ------------- | ------------- | -------------
|
|
**body** | [**CreateOrgOption**](CreateOrgOption.md)| |
|
|
**username** | **String**| username of the user that will own the created organization |
|
|
|
|
### Return type
|
|
|
|
[**Organization**](Organization.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**: application/json
|
|
- **Accept**: application/json
|
|
|
|
<a name="adminCreatePublicKey"></a>
|
|
# **adminCreatePublicKey**
|
|
> PublicKey adminCreatePublicKey(username, body)
|
|
|
|
Add a public key on behalf of a user
|
|
|
|
### Example
|
|
```java
|
|
// Import classes:
|
|
//import org.gitnex.tea4j.v2.ApiClient;
|
|
//import org.gitnex.tea4j.v2.ApiException;
|
|
//import org.gitnex.tea4j.v2.Configuration;
|
|
//import org.gitnex.tea4j.v2.auth.*;
|
|
//import org.gitnex.tea4j.v2.apis.AdminApi;
|
|
|
|
ApiClient defaultClient = Configuration.getDefaultApiClient();
|
|
|
|
// 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");
|
|
|
|
AdminApi apiInstance = new AdminApi();
|
|
String username = "username_example"; // String | username of the user
|
|
CreateKeyOption body = new CreateKeyOption(); // CreateKeyOption |
|
|
try {
|
|
PublicKey result = apiInstance.adminCreatePublicKey(username, body);
|
|
System.out.println(result);
|
|
} catch (ApiException e) {
|
|
System.err.println("Exception when calling AdminApi#adminCreatePublicKey");
|
|
e.printStackTrace();
|
|
}
|
|
```
|
|
|
|
### Parameters
|
|
|
|
Name | Type | Description | Notes
|
|
------------- | ------------- | ------------- | -------------
|
|
**username** | **String**| username of the user |
|
|
**body** | [**CreateKeyOption**](CreateKeyOption.md)| | [optional]
|
|
|
|
### Return type
|
|
|
|
[**PublicKey**](PublicKey.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**: application/json
|
|
- **Accept**: application/json
|
|
|
|
<a name="adminCreateRepo"></a>
|
|
# **adminCreateRepo**
|
|
> Repository adminCreateRepo(body, username)
|
|
|
|
Create a repository on behalf of a user
|
|
|
|
### Example
|
|
```java
|
|
// Import classes:
|
|
//import org.gitnex.tea4j.v2.ApiClient;
|
|
//import org.gitnex.tea4j.v2.ApiException;
|
|
//import org.gitnex.tea4j.v2.Configuration;
|
|
//import org.gitnex.tea4j.v2.auth.*;
|
|
//import org.gitnex.tea4j.v2.apis.AdminApi;
|
|
|
|
ApiClient defaultClient = Configuration.getDefaultApiClient();
|
|
|
|
// 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");
|
|
|
|
AdminApi apiInstance = new AdminApi();
|
|
CreateRepoOption body = new CreateRepoOption(); // CreateRepoOption |
|
|
String username = "username_example"; // String | username of the user. This user will own the created repository
|
|
try {
|
|
Repository result = apiInstance.adminCreateRepo(body, username);
|
|
System.out.println(result);
|
|
} catch (ApiException e) {
|
|
System.err.println("Exception when calling AdminApi#adminCreateRepo");
|
|
e.printStackTrace();
|
|
}
|
|
```
|
|
|
|
### Parameters
|
|
|
|
Name | Type | Description | Notes
|
|
------------- | ------------- | ------------- | -------------
|
|
**body** | [**CreateRepoOption**](CreateRepoOption.md)| |
|
|
**username** | **String**| username of the user. This user will own the created repository |
|
|
|
|
### Return type
|
|
|
|
[**Repository**](Repository.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**: application/json
|
|
- **Accept**: application/json
|
|
|
|
<a name="adminCreateUser"></a>
|
|
# **adminCreateUser**
|
|
> User adminCreateUser(body)
|
|
|
|
Create a user
|
|
|
|
### Example
|
|
```java
|
|
// Import classes:
|
|
//import org.gitnex.tea4j.v2.ApiClient;
|
|
//import org.gitnex.tea4j.v2.ApiException;
|
|
//import org.gitnex.tea4j.v2.Configuration;
|
|
//import org.gitnex.tea4j.v2.auth.*;
|
|
//import org.gitnex.tea4j.v2.apis.AdminApi;
|
|
|
|
ApiClient defaultClient = Configuration.getDefaultApiClient();
|
|
|
|
// 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");
|
|
|
|
AdminApi apiInstance = new AdminApi();
|
|
CreateUserOption body = new CreateUserOption(); // CreateUserOption |
|
|
try {
|
|
User result = apiInstance.adminCreateUser(body);
|
|
System.out.println(result);
|
|
} catch (ApiException e) {
|
|
System.err.println("Exception when calling AdminApi#adminCreateUser");
|
|
e.printStackTrace();
|
|
}
|
|
```
|
|
|
|
### Parameters
|
|
|
|
Name | Type | Description | Notes
|
|
------------- | ------------- | ------------- | -------------
|
|
**body** | [**CreateUserOption**](CreateUserOption.md)| | [optional]
|
|
|
|
### Return type
|
|
|
|
[**User**](User.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**: application/json
|
|
- **Accept**: application/json
|
|
|
|
<a name="adminCronList"></a>
|
|
# **adminCronList**
|
|
> List<Cron> adminCronList(page, limit)
|
|
|
|
List cron tasks
|
|
|
|
### Example
|
|
```java
|
|
// Import classes:
|
|
//import org.gitnex.tea4j.v2.ApiClient;
|
|
//import org.gitnex.tea4j.v2.ApiException;
|
|
//import org.gitnex.tea4j.v2.Configuration;
|
|
//import org.gitnex.tea4j.v2.auth.*;
|
|
//import org.gitnex.tea4j.v2.apis.AdminApi;
|
|
|
|
ApiClient defaultClient = Configuration.getDefaultApiClient();
|
|
|
|
// 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");
|
|
|
|
AdminApi apiInstance = new AdminApi();
|
|
Integer page = 56; // Integer | page number of results to return (1-based)
|
|
Integer limit = 56; // Integer | page size of results
|
|
try {
|
|
List<Cron> result = apiInstance.adminCronList(page, limit);
|
|
System.out.println(result);
|
|
} catch (ApiException e) {
|
|
System.err.println("Exception when calling AdminApi#adminCronList");
|
|
e.printStackTrace();
|
|
}
|
|
```
|
|
|
|
### Parameters
|
|
|
|
Name | Type | Description | Notes
|
|
------------- | ------------- | ------------- | -------------
|
|
**page** | **Integer**| page number of results to return (1-based) | [optional]
|
|
**limit** | **Integer**| page size of results | [optional]
|
|
|
|
### Return type
|
|
|
|
[**List<Cron>**](Cron.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
|
|
|
|
<a name="adminCronRun"></a>
|
|
# **adminCronRun**
|
|
> Void adminCronRun(task)
|
|
|
|
Run cron task
|
|
|
|
### Example
|
|
```java
|
|
// Import classes:
|
|
//import org.gitnex.tea4j.v2.ApiClient;
|
|
//import org.gitnex.tea4j.v2.ApiException;
|
|
//import org.gitnex.tea4j.v2.Configuration;
|
|
//import org.gitnex.tea4j.v2.auth.*;
|
|
//import org.gitnex.tea4j.v2.apis.AdminApi;
|
|
|
|
ApiClient defaultClient = Configuration.getDefaultApiClient();
|
|
|
|
// 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");
|
|
|
|
AdminApi apiInstance = new AdminApi();
|
|
String task = "task_example"; // String | task to run
|
|
try {
|
|
Void result = apiInstance.adminCronRun(task);
|
|
System.out.println(result);
|
|
} catch (ApiException e) {
|
|
System.err.println("Exception when calling AdminApi#adminCronRun");
|
|
e.printStackTrace();
|
|
}
|
|
```
|
|
|
|
### Parameters
|
|
|
|
Name | Type | Description | Notes
|
|
------------- | ------------- | ------------- | -------------
|
|
**task** | **String**| task to run |
|
|
|
|
### Return type
|
|
|
|
[**Void**](.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**: Not defined
|
|
|
|
<a name="adminDeleteHook"></a>
|
|
# **adminDeleteHook**
|
|
> Void adminDeleteHook(id)
|
|
|
|
Delete a hook
|
|
|
|
### Example
|
|
```java
|
|
// Import classes:
|
|
//import org.gitnex.tea4j.v2.ApiClient;
|
|
//import org.gitnex.tea4j.v2.ApiException;
|
|
//import org.gitnex.tea4j.v2.Configuration;
|
|
//import org.gitnex.tea4j.v2.auth.*;
|
|
//import org.gitnex.tea4j.v2.apis.AdminApi;
|
|
|
|
ApiClient defaultClient = Configuration.getDefaultApiClient();
|
|
|
|
// 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");
|
|
|
|
AdminApi apiInstance = new AdminApi();
|
|
Long id = 789L; // Long | id of the hook to delete
|
|
try {
|
|
Void result = apiInstance.adminDeleteHook(id);
|
|
System.out.println(result);
|
|
} catch (ApiException e) {
|
|
System.err.println("Exception when calling AdminApi#adminDeleteHook");
|
|
e.printStackTrace();
|
|
}
|
|
```
|
|
|
|
### Parameters
|
|
|
|
Name | Type | Description | Notes
|
|
------------- | ------------- | ------------- | -------------
|
|
**id** | **Long**| id of the hook to delete |
|
|
|
|
### Return type
|
|
|
|
[**Void**](.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**: Not defined
|
|
|
|
<a name="adminDeleteUnadoptedRepository"></a>
|
|
# **adminDeleteUnadoptedRepository**
|
|
> Void adminDeleteUnadoptedRepository(owner, repo)
|
|
|
|
Delete unadopted files
|
|
|
|
### Example
|
|
```java
|
|
// Import classes:
|
|
//import org.gitnex.tea4j.v2.ApiClient;
|
|
//import org.gitnex.tea4j.v2.ApiException;
|
|
//import org.gitnex.tea4j.v2.Configuration;
|
|
//import org.gitnex.tea4j.v2.auth.*;
|
|
//import org.gitnex.tea4j.v2.apis.AdminApi;
|
|
|
|
ApiClient defaultClient = Configuration.getDefaultApiClient();
|
|
|
|
// 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");
|
|
|
|
AdminApi apiInstance = new AdminApi();
|
|
String owner = "owner_example"; // String | owner of the repo
|
|
String repo = "repo_example"; // String | name of the repo
|
|
try {
|
|
Void result = apiInstance.adminDeleteUnadoptedRepository(owner, repo);
|
|
System.out.println(result);
|
|
} catch (ApiException e) {
|
|
System.err.println("Exception when calling AdminApi#adminDeleteUnadoptedRepository");
|
|
e.printStackTrace();
|
|
}
|
|
```
|
|
|
|
### Parameters
|
|
|
|
Name | Type | Description | Notes
|
|
------------- | ------------- | ------------- | -------------
|
|
**owner** | **String**| owner of the repo |
|
|
**repo** | **String**| name of the repo |
|
|
|
|
### Return type
|
|
|
|
[**Void**](.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**: Not defined
|
|
|
|
<a name="adminDeleteUser"></a>
|
|
# **adminDeleteUser**
|
|
> Void adminDeleteUser(username, purge)
|
|
|
|
Delete a user
|
|
|
|
### Example
|
|
```java
|
|
// Import classes:
|
|
//import org.gitnex.tea4j.v2.ApiClient;
|
|
//import org.gitnex.tea4j.v2.ApiException;
|
|
//import org.gitnex.tea4j.v2.Configuration;
|
|
//import org.gitnex.tea4j.v2.auth.*;
|
|
//import org.gitnex.tea4j.v2.apis.AdminApi;
|
|
|
|
ApiClient defaultClient = Configuration.getDefaultApiClient();
|
|
|
|
// 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");
|
|
|
|
AdminApi apiInstance = new AdminApi();
|
|
String username = "username_example"; // String | username of user to delete
|
|
Boolean purge = true; // Boolean | purge the user from the system completely
|
|
try {
|
|
Void result = apiInstance.adminDeleteUser(username, purge);
|
|
System.out.println(result);
|
|
} catch (ApiException e) {
|
|
System.err.println("Exception when calling AdminApi#adminDeleteUser");
|
|
e.printStackTrace();
|
|
}
|
|
```
|
|
|
|
### Parameters
|
|
|
|
Name | Type | Description | Notes
|
|
------------- | ------------- | ------------- | -------------
|
|
**username** | **String**| username of user to delete |
|
|
**purge** | **Boolean**| purge the user from the system completely | [optional]
|
|
|
|
### Return type
|
|
|
|
[**Void**](.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**: Not defined
|
|
|
|
<a name="adminDeleteUserBadges"></a>
|
|
# **adminDeleteUserBadges**
|
|
> Void adminDeleteUserBadges(username, body)
|
|
|
|
Remove a badge from a user
|
|
|
|
### Example
|
|
```java
|
|
// Import classes:
|
|
//import org.gitnex.tea4j.v2.ApiClient;
|
|
//import org.gitnex.tea4j.v2.ApiException;
|
|
//import org.gitnex.tea4j.v2.Configuration;
|
|
//import org.gitnex.tea4j.v2.auth.*;
|
|
//import org.gitnex.tea4j.v2.apis.AdminApi;
|
|
|
|
ApiClient defaultClient = Configuration.getDefaultApiClient();
|
|
|
|
// 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");
|
|
|
|
AdminApi apiInstance = new AdminApi();
|
|
String username = "username_example"; // String | username of user
|
|
UserBadgeOption body = new UserBadgeOption(); // UserBadgeOption |
|
|
try {
|
|
Void result = apiInstance.adminDeleteUserBadges(username, body);
|
|
System.out.println(result);
|
|
} catch (ApiException e) {
|
|
System.err.println("Exception when calling AdminApi#adminDeleteUserBadges");
|
|
e.printStackTrace();
|
|
}
|
|
```
|
|
|
|
### Parameters
|
|
|
|
Name | Type | Description | Notes
|
|
------------- | ------------- | ------------- | -------------
|
|
**username** | **String**| username of user |
|
|
**body** | [**UserBadgeOption**](UserBadgeOption.md)| | [optional]
|
|
|
|
### Return type
|
|
|
|
[**Void**](.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**: application/json, text/plain
|
|
- **Accept**: Not defined
|
|
|
|
<a name="adminDeleteUserPublicKey"></a>
|
|
# **adminDeleteUserPublicKey**
|
|
> Void adminDeleteUserPublicKey(username, id)
|
|
|
|
Delete a user's public key
|
|
|
|
### Example
|
|
```java
|
|
// Import classes:
|
|
//import org.gitnex.tea4j.v2.ApiClient;
|
|
//import org.gitnex.tea4j.v2.ApiException;
|
|
//import org.gitnex.tea4j.v2.Configuration;
|
|
//import org.gitnex.tea4j.v2.auth.*;
|
|
//import org.gitnex.tea4j.v2.apis.AdminApi;
|
|
|
|
ApiClient defaultClient = Configuration.getDefaultApiClient();
|
|
|
|
// 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");
|
|
|
|
AdminApi apiInstance = new AdminApi();
|
|
String username = "username_example"; // String | username of user
|
|
Long id = 789L; // Long | id of the key to delete
|
|
try {
|
|
Void result = apiInstance.adminDeleteUserPublicKey(username, id);
|
|
System.out.println(result);
|
|
} catch (ApiException e) {
|
|
System.err.println("Exception when calling AdminApi#adminDeleteUserPublicKey");
|
|
e.printStackTrace();
|
|
}
|
|
```
|
|
|
|
### Parameters
|
|
|
|
Name | Type | Description | Notes
|
|
------------- | ------------- | ------------- | -------------
|
|
**username** | **String**| username of user |
|
|
**id** | **Long**| id of the key to delete |
|
|
|
|
### Return type
|
|
|
|
[**Void**](.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**: Not defined
|
|
|
|
<a name="adminEditHook"></a>
|
|
# **adminEditHook**
|
|
> Hook adminEditHook(id, body)
|
|
|
|
Update a hook
|
|
|
|
### Example
|
|
```java
|
|
// Import classes:
|
|
//import org.gitnex.tea4j.v2.ApiClient;
|
|
//import org.gitnex.tea4j.v2.ApiException;
|
|
//import org.gitnex.tea4j.v2.Configuration;
|
|
//import org.gitnex.tea4j.v2.auth.*;
|
|
//import org.gitnex.tea4j.v2.apis.AdminApi;
|
|
|
|
ApiClient defaultClient = Configuration.getDefaultApiClient();
|
|
|
|
// 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");
|
|
|
|
AdminApi apiInstance = new AdminApi();
|
|
Long id = 789L; // Long | id of the hook to update
|
|
EditHookOption body = new EditHookOption(); // EditHookOption |
|
|
try {
|
|
Hook result = apiInstance.adminEditHook(id, body);
|
|
System.out.println(result);
|
|
} catch (ApiException e) {
|
|
System.err.println("Exception when calling AdminApi#adminEditHook");
|
|
e.printStackTrace();
|
|
}
|
|
```
|
|
|
|
### Parameters
|
|
|
|
Name | Type | Description | Notes
|
|
------------- | ------------- | ------------- | -------------
|
|
**id** | **Long**| id of the hook to update |
|
|
**body** | [**EditHookOption**](EditHookOption.md)| | [optional]
|
|
|
|
### Return type
|
|
|
|
[**Hook**](Hook.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**: application/json
|
|
- **Accept**: application/json
|
|
|
|
<a name="adminEditUser"></a>
|
|
# **adminEditUser**
|
|
> User adminEditUser(username, body)
|
|
|
|
Edit an existing user
|
|
|
|
### Example
|
|
```java
|
|
// Import classes:
|
|
//import org.gitnex.tea4j.v2.ApiClient;
|
|
//import org.gitnex.tea4j.v2.ApiException;
|
|
//import org.gitnex.tea4j.v2.Configuration;
|
|
//import org.gitnex.tea4j.v2.auth.*;
|
|
//import org.gitnex.tea4j.v2.apis.AdminApi;
|
|
|
|
ApiClient defaultClient = Configuration.getDefaultApiClient();
|
|
|
|
// 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");
|
|
|
|
AdminApi apiInstance = new AdminApi();
|
|
String username = "username_example"; // String | username of user to edit
|
|
EditUserOption body = new EditUserOption(); // EditUserOption |
|
|
try {
|
|
User result = apiInstance.adminEditUser(username, body);
|
|
System.out.println(result);
|
|
} catch (ApiException e) {
|
|
System.err.println("Exception when calling AdminApi#adminEditUser");
|
|
e.printStackTrace();
|
|
}
|
|
```
|
|
|
|
### Parameters
|
|
|
|
Name | Type | Description | Notes
|
|
------------- | ------------- | ------------- | -------------
|
|
**username** | **String**| username of user to edit |
|
|
**body** | [**EditUserOption**](EditUserOption.md)| | [optional]
|
|
|
|
### Return type
|
|
|
|
[**User**](User.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**: application/json
|
|
- **Accept**: application/json
|
|
|
|
<a name="adminGetAllEmails"></a>
|
|
# **adminGetAllEmails**
|
|
> List<Email> adminGetAllEmails(page, limit)
|
|
|
|
List all emails
|
|
|
|
### Example
|
|
```java
|
|
// Import classes:
|
|
//import org.gitnex.tea4j.v2.ApiClient;
|
|
//import org.gitnex.tea4j.v2.ApiException;
|
|
//import org.gitnex.tea4j.v2.Configuration;
|
|
//import org.gitnex.tea4j.v2.auth.*;
|
|
//import org.gitnex.tea4j.v2.apis.AdminApi;
|
|
|
|
ApiClient defaultClient = Configuration.getDefaultApiClient();
|
|
|
|
// 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");
|
|
|
|
AdminApi apiInstance = new AdminApi();
|
|
Integer page = 56; // Integer | page number of results to return (1-based)
|
|
Integer limit = 56; // Integer | page size of results
|
|
try {
|
|
List<Email> result = apiInstance.adminGetAllEmails(page, limit);
|
|
System.out.println(result);
|
|
} catch (ApiException e) {
|
|
System.err.println("Exception when calling AdminApi#adminGetAllEmails");
|
|
e.printStackTrace();
|
|
}
|
|
```
|
|
|
|
### Parameters
|
|
|
|
Name | Type | Description | Notes
|
|
------------- | ------------- | ------------- | -------------
|
|
**page** | **Integer**| page number of results to return (1-based) | [optional]
|
|
**limit** | **Integer**| page size of results | [optional]
|
|
|
|
### Return type
|
|
|
|
[**List<Email>**](Email.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
|
|
|
|
<a name="adminGetAllOrgs"></a>
|
|
# **adminGetAllOrgs**
|
|
> List<Organization> adminGetAllOrgs(page, limit)
|
|
|
|
List all organizations
|
|
|
|
### Example
|
|
```java
|
|
// Import classes:
|
|
//import org.gitnex.tea4j.v2.ApiClient;
|
|
//import org.gitnex.tea4j.v2.ApiException;
|
|
//import org.gitnex.tea4j.v2.Configuration;
|
|
//import org.gitnex.tea4j.v2.auth.*;
|
|
//import org.gitnex.tea4j.v2.apis.AdminApi;
|
|
|
|
ApiClient defaultClient = Configuration.getDefaultApiClient();
|
|
|
|
// 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");
|
|
|
|
AdminApi apiInstance = new AdminApi();
|
|
Integer page = 56; // Integer | page number of results to return (1-based)
|
|
Integer limit = 56; // Integer | page size of results
|
|
try {
|
|
List<Organization> result = apiInstance.adminGetAllOrgs(page, limit);
|
|
System.out.println(result);
|
|
} catch (ApiException e) {
|
|
System.err.println("Exception when calling AdminApi#adminGetAllOrgs");
|
|
e.printStackTrace();
|
|
}
|
|
```
|
|
|
|
### Parameters
|
|
|
|
Name | Type | Description | Notes
|
|
------------- | ------------- | ------------- | -------------
|
|
**page** | **Integer**| page number of results to return (1-based) | [optional]
|
|
**limit** | **Integer**| page size of results | [optional]
|
|
|
|
### Return type
|
|
|
|
[**List<Organization>**](Organization.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
|
|
|
|
<a name="adminGetHook"></a>
|
|
# **adminGetHook**
|
|
> Hook adminGetHook(id)
|
|
|
|
Get a hook
|
|
|
|
### Example
|
|
```java
|
|
// Import classes:
|
|
//import org.gitnex.tea4j.v2.ApiClient;
|
|
//import org.gitnex.tea4j.v2.ApiException;
|
|
//import org.gitnex.tea4j.v2.Configuration;
|
|
//import org.gitnex.tea4j.v2.auth.*;
|
|
//import org.gitnex.tea4j.v2.apis.AdminApi;
|
|
|
|
ApiClient defaultClient = Configuration.getDefaultApiClient();
|
|
|
|
// 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");
|
|
|
|
AdminApi apiInstance = new AdminApi();
|
|
Long id = 789L; // Long | id of the hook to get
|
|
try {
|
|
Hook result = apiInstance.adminGetHook(id);
|
|
System.out.println(result);
|
|
} catch (ApiException e) {
|
|
System.err.println("Exception when calling AdminApi#adminGetHook");
|
|
e.printStackTrace();
|
|
}
|
|
```
|
|
|
|
### Parameters
|
|
|
|
Name | Type | Description | Notes
|
|
------------- | ------------- | ------------- | -------------
|
|
**id** | **Long**| id of the hook to get |
|
|
|
|
### Return type
|
|
|
|
[**Hook**](Hook.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
|
|
|
|
<a name="adminGetRunnerRegistrationToken"></a>
|
|
# **adminGetRunnerRegistrationToken**
|
|
> Void adminGetRunnerRegistrationToken()
|
|
|
|
Get an global actions runner registration token
|
|
|
|
### Example
|
|
```java
|
|
// Import classes:
|
|
//import org.gitnex.tea4j.v2.ApiClient;
|
|
//import org.gitnex.tea4j.v2.ApiException;
|
|
//import org.gitnex.tea4j.v2.Configuration;
|
|
//import org.gitnex.tea4j.v2.auth.*;
|
|
//import org.gitnex.tea4j.v2.apis.AdminApi;
|
|
|
|
ApiClient defaultClient = Configuration.getDefaultApiClient();
|
|
|
|
// 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");
|
|
|
|
AdminApi apiInstance = new AdminApi();
|
|
try {
|
|
Void result = apiInstance.adminGetRunnerRegistrationToken();
|
|
System.out.println(result);
|
|
} catch (ApiException e) {
|
|
System.err.println("Exception when calling AdminApi#adminGetRunnerRegistrationToken");
|
|
e.printStackTrace();
|
|
}
|
|
```
|
|
|
|
### Parameters
|
|
This endpoint does not need any parameter.
|
|
|
|
### Return type
|
|
|
|
[**Void**](.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**: Not defined
|
|
|
|
<a name="adminListHooks"></a>
|
|
# **adminListHooks**
|
|
> List<Hook> adminListHooks(page, limit)
|
|
|
|
List system's webhooks
|
|
|
|
### Example
|
|
```java
|
|
// Import classes:
|
|
//import org.gitnex.tea4j.v2.ApiClient;
|
|
//import org.gitnex.tea4j.v2.ApiException;
|
|
//import org.gitnex.tea4j.v2.Configuration;
|
|
//import org.gitnex.tea4j.v2.auth.*;
|
|
//import org.gitnex.tea4j.v2.apis.AdminApi;
|
|
|
|
ApiClient defaultClient = Configuration.getDefaultApiClient();
|
|
|
|
// 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");
|
|
|
|
AdminApi apiInstance = new AdminApi();
|
|
Integer page = 56; // Integer | page number of results to return (1-based)
|
|
Integer limit = 56; // Integer | page size of results
|
|
try {
|
|
List<Hook> result = apiInstance.adminListHooks(page, limit);
|
|
System.out.println(result);
|
|
} catch (ApiException e) {
|
|
System.err.println("Exception when calling AdminApi#adminListHooks");
|
|
e.printStackTrace();
|
|
}
|
|
```
|
|
|
|
### Parameters
|
|
|
|
Name | Type | Description | Notes
|
|
------------- | ------------- | ------------- | -------------
|
|
**page** | **Integer**| page number of results to return (1-based) | [optional]
|
|
**limit** | **Integer**| page size of results | [optional]
|
|
|
|
### Return type
|
|
|
|
[**List<Hook>**](Hook.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
|
|
|
|
<a name="adminListUserBadges"></a>
|
|
# **adminListUserBadges**
|
|
> List<Badge> adminListUserBadges(username)
|
|
|
|
List a user's badges
|
|
|
|
### Example
|
|
```java
|
|
// Import classes:
|
|
//import org.gitnex.tea4j.v2.ApiClient;
|
|
//import org.gitnex.tea4j.v2.ApiException;
|
|
//import org.gitnex.tea4j.v2.Configuration;
|
|
//import org.gitnex.tea4j.v2.auth.*;
|
|
//import org.gitnex.tea4j.v2.apis.AdminApi;
|
|
|
|
ApiClient defaultClient = Configuration.getDefaultApiClient();
|
|
|
|
// 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");
|
|
|
|
AdminApi apiInstance = new AdminApi();
|
|
String username = "username_example"; // String | username of user
|
|
try {
|
|
List<Badge> result = apiInstance.adminListUserBadges(username);
|
|
System.out.println(result);
|
|
} catch (ApiException e) {
|
|
System.err.println("Exception when calling AdminApi#adminListUserBadges");
|
|
e.printStackTrace();
|
|
}
|
|
```
|
|
|
|
### Parameters
|
|
|
|
Name | Type | Description | Notes
|
|
------------- | ------------- | ------------- | -------------
|
|
**username** | **String**| username of user |
|
|
|
|
### Return type
|
|
|
|
[**List<Badge>**](Badge.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
|
|
|
|
<a name="adminRenameUser"></a>
|
|
# **adminRenameUser**
|
|
> Void adminRenameUser(body, username)
|
|
|
|
Rename a user
|
|
|
|
### Example
|
|
```java
|
|
// Import classes:
|
|
//import org.gitnex.tea4j.v2.ApiClient;
|
|
//import org.gitnex.tea4j.v2.ApiException;
|
|
//import org.gitnex.tea4j.v2.Configuration;
|
|
//import org.gitnex.tea4j.v2.auth.*;
|
|
//import org.gitnex.tea4j.v2.apis.AdminApi;
|
|
|
|
ApiClient defaultClient = Configuration.getDefaultApiClient();
|
|
|
|
// 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");
|
|
|
|
AdminApi apiInstance = new AdminApi();
|
|
RenameUserOption body = new RenameUserOption(); // RenameUserOption |
|
|
String username = "username_example"; // String | existing username of user
|
|
try {
|
|
Void result = apiInstance.adminRenameUser(body, username);
|
|
System.out.println(result);
|
|
} catch (ApiException e) {
|
|
System.err.println("Exception when calling AdminApi#adminRenameUser");
|
|
e.printStackTrace();
|
|
}
|
|
```
|
|
|
|
### Parameters
|
|
|
|
Name | Type | Description | Notes
|
|
------------- | ------------- | ------------- | -------------
|
|
**body** | [**RenameUserOption**](RenameUserOption.md)| |
|
|
**username** | **String**| existing username of user |
|
|
|
|
### Return type
|
|
|
|
[**Void**](.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**: application/json, text/plain
|
|
- **Accept**: Not defined
|
|
|
|
<a name="adminSearchEmails"></a>
|
|
# **adminSearchEmails**
|
|
> List<Email> adminSearchEmails(q, page, limit)
|
|
|
|
Search all emails
|
|
|
|
### Example
|
|
```java
|
|
// Import classes:
|
|
//import org.gitnex.tea4j.v2.ApiClient;
|
|
//import org.gitnex.tea4j.v2.ApiException;
|
|
//import org.gitnex.tea4j.v2.Configuration;
|
|
//import org.gitnex.tea4j.v2.auth.*;
|
|
//import org.gitnex.tea4j.v2.apis.AdminApi;
|
|
|
|
ApiClient defaultClient = Configuration.getDefaultApiClient();
|
|
|
|
// 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");
|
|
|
|
AdminApi apiInstance = new AdminApi();
|
|
String q = "q_example"; // String | keyword
|
|
Integer page = 56; // Integer | page number of results to return (1-based)
|
|
Integer limit = 56; // Integer | page size of results
|
|
try {
|
|
List<Email> result = apiInstance.adminSearchEmails(q, page, limit);
|
|
System.out.println(result);
|
|
} catch (ApiException e) {
|
|
System.err.println("Exception when calling AdminApi#adminSearchEmails");
|
|
e.printStackTrace();
|
|
}
|
|
```
|
|
|
|
### Parameters
|
|
|
|
Name | Type | Description | Notes
|
|
------------- | ------------- | ------------- | -------------
|
|
**q** | **String**| keyword | [optional]
|
|
**page** | **Integer**| page number of results to return (1-based) | [optional]
|
|
**limit** | **Integer**| page size of results | [optional]
|
|
|
|
### Return type
|
|
|
|
[**List<Email>**](Email.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
|
|
|
|
<a name="adminSearchUsers"></a>
|
|
# **adminSearchUsers**
|
|
> List<User> adminSearchUsers(sourceId, loginName, page, limit)
|
|
|
|
Search users according filter conditions
|
|
|
|
### Example
|
|
```java
|
|
// Import classes:
|
|
//import org.gitnex.tea4j.v2.ApiClient;
|
|
//import org.gitnex.tea4j.v2.ApiException;
|
|
//import org.gitnex.tea4j.v2.Configuration;
|
|
//import org.gitnex.tea4j.v2.auth.*;
|
|
//import org.gitnex.tea4j.v2.apis.AdminApi;
|
|
|
|
ApiClient defaultClient = Configuration.getDefaultApiClient();
|
|
|
|
// 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");
|
|
|
|
AdminApi apiInstance = new AdminApi();
|
|
Long sourceId = 789L; // Long | ID of the user's login source to search for
|
|
String loginName = "loginName_example"; // String | user's login name to search for
|
|
Integer page = 56; // Integer | page number of results to return (1-based)
|
|
Integer limit = 56; // Integer | page size of results
|
|
try {
|
|
List<User> result = apiInstance.adminSearchUsers(sourceId, loginName, page, limit);
|
|
System.out.println(result);
|
|
} catch (ApiException e) {
|
|
System.err.println("Exception when calling AdminApi#adminSearchUsers");
|
|
e.printStackTrace();
|
|
}
|
|
```
|
|
|
|
### Parameters
|
|
|
|
Name | Type | Description | Notes
|
|
------------- | ------------- | ------------- | -------------
|
|
**sourceId** | **Long**| ID of the user's login source to search for | [optional]
|
|
**loginName** | **String**| user's login name to search for | [optional]
|
|
**page** | **Integer**| page number of results to return (1-based) | [optional]
|
|
**limit** | **Integer**| page size of results | [optional]
|
|
|
|
### Return type
|
|
|
|
[**List<User>**](User.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
|
|
|
|
<a name="adminUnadoptedList"></a>
|
|
# **adminUnadoptedList**
|
|
> List<String> adminUnadoptedList(page, limit, pattern)
|
|
|
|
List unadopted repositories
|
|
|
|
### Example
|
|
```java
|
|
// Import classes:
|
|
//import org.gitnex.tea4j.v2.ApiClient;
|
|
//import org.gitnex.tea4j.v2.ApiException;
|
|
//import org.gitnex.tea4j.v2.Configuration;
|
|
//import org.gitnex.tea4j.v2.auth.*;
|
|
//import org.gitnex.tea4j.v2.apis.AdminApi;
|
|
|
|
ApiClient defaultClient = Configuration.getDefaultApiClient();
|
|
|
|
// 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");
|
|
|
|
AdminApi apiInstance = new AdminApi();
|
|
Integer page = 56; // Integer | page number of results to return (1-based)
|
|
Integer limit = 56; // Integer | page size of results
|
|
String pattern = "pattern_example"; // String | pattern of repositories to search for
|
|
try {
|
|
List<String> result = apiInstance.adminUnadoptedList(page, limit, pattern);
|
|
System.out.println(result);
|
|
} catch (ApiException e) {
|
|
System.err.println("Exception when calling AdminApi#adminUnadoptedList");
|
|
e.printStackTrace();
|
|
}
|
|
```
|
|
|
|
### Parameters
|
|
|
|
Name | Type | Description | Notes
|
|
------------- | ------------- | ------------- | -------------
|
|
**page** | **Integer**| page number of results to return (1-based) | [optional]
|
|
**limit** | **Integer**| page size of results | [optional]
|
|
**pattern** | **String**| pattern of repositories to search for | [optional]
|
|
|
|
### Return type
|
|
|
|
**List<String>**
|
|
|
|
### 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
|
|
|