# OrganizationApi All URIs are relative to *http://localhost/api/v1* Method | HTTP request | Description ------------- | ------------- | ------------- [**createOrgRepo**](OrganizationApi.md#createOrgRepo) | **POST** /orgs/{org}/repos | Create a repository in an organization [**createOrgRepoDeprecated**](OrganizationApi.md#createOrgRepoDeprecated) | **POST** /org/{org}/repos | Create a repository in an organization [**orgAddTeamMember**](OrganizationApi.md#orgAddTeamMember) | **PUT** /teams/{id}/members/{username} | Add a team member [**orgAddTeamRepository**](OrganizationApi.md#orgAddTeamRepository) | **PUT** /teams/{id}/repos/{org}/{repo} | Add a repository to a team [**orgConcealMember**](OrganizationApi.md#orgConcealMember) | **DELETE** /orgs/{org}/public_members/{username} | Conceal a user's membership [**orgCreate**](OrganizationApi.md#orgCreate) | **POST** /orgs | Create an organization [**orgCreateHook**](OrganizationApi.md#orgCreateHook) | **POST** /orgs/{org}/hooks/ | Create a hook [**orgCreateLabel**](OrganizationApi.md#orgCreateLabel) | **POST** /orgs/{org}/labels | Create a label for an organization [**orgCreateTeam**](OrganizationApi.md#orgCreateTeam) | **POST** /orgs/{org}/teams | Create a team [**orgDelete**](OrganizationApi.md#orgDelete) | **DELETE** /orgs/{org} | Delete an organization [**orgDeleteHook**](OrganizationApi.md#orgDeleteHook) | **DELETE** /orgs/{org}/hooks/{id} | Delete a hook [**orgDeleteLabel**](OrganizationApi.md#orgDeleteLabel) | **DELETE** /orgs/{org}/labels/{id} | Delete a label [**orgDeleteMember**](OrganizationApi.md#orgDeleteMember) | **DELETE** /orgs/{org}/members/{username} | Remove a member from an organization [**orgDeleteTeam**](OrganizationApi.md#orgDeleteTeam) | **DELETE** /teams/{id} | Delete a team [**orgEdit**](OrganizationApi.md#orgEdit) | **PATCH** /orgs/{org} | Edit an organization [**orgEditHook**](OrganizationApi.md#orgEditHook) | **PATCH** /orgs/{org}/hooks/{id} | Update a hook [**orgEditLabel**](OrganizationApi.md#orgEditLabel) | **PATCH** /orgs/{org}/labels/{id} | Update a label [**orgEditTeam**](OrganizationApi.md#orgEditTeam) | **PATCH** /teams/{id} | Edit a team [**orgGet**](OrganizationApi.md#orgGet) | **GET** /orgs/{org} | Get an organization [**orgGetAll**](OrganizationApi.md#orgGetAll) | **GET** /orgs | Get list of organizations [**orgGetHook**](OrganizationApi.md#orgGetHook) | **GET** /orgs/{org}/hooks/{id} | Get a hook [**orgGetLabel**](OrganizationApi.md#orgGetLabel) | **GET** /orgs/{org}/labels/{id} | Get a single label [**orgGetTeam**](OrganizationApi.md#orgGetTeam) | **GET** /teams/{id} | Get a team [**orgIsMember**](OrganizationApi.md#orgIsMember) | **GET** /orgs/{org}/members/{username} | Check if a user is a member of an organization [**orgIsPublicMember**](OrganizationApi.md#orgIsPublicMember) | **GET** /orgs/{org}/public_members/{username} | Check if a user is a public member of an organization [**orgListCurrentUserOrgs**](OrganizationApi.md#orgListCurrentUserOrgs) | **GET** /user/orgs | List the current user's organizations [**orgListHooks**](OrganizationApi.md#orgListHooks) | **GET** /orgs/{org}/hooks | List an organization's webhooks [**orgListLabels**](OrganizationApi.md#orgListLabels) | **GET** /orgs/{org}/labels | List an organization's labels [**orgListMembers**](OrganizationApi.md#orgListMembers) | **GET** /orgs/{org}/members | List an organization's members [**orgListPublicMembers**](OrganizationApi.md#orgListPublicMembers) | **GET** /orgs/{org}/public_members | List an organization's public members [**orgListRepos**](OrganizationApi.md#orgListRepos) | **GET** /orgs/{org}/repos | List an organization's repos [**orgListTeamMember**](OrganizationApi.md#orgListTeamMember) | **GET** /teams/{id}/members/{username} | List a particular member of team [**orgListTeamMembers**](OrganizationApi.md#orgListTeamMembers) | **GET** /teams/{id}/members | List a team's members [**orgListTeamRepos**](OrganizationApi.md#orgListTeamRepos) | **GET** /teams/{id}/repos | List a team's repos [**orgListTeams**](OrganizationApi.md#orgListTeams) | **GET** /orgs/{org}/teams | List an organization's teams [**orgListUserOrgs**](OrganizationApi.md#orgListUserOrgs) | **GET** /users/{username}/orgs | List a user's organizations [**orgPublicizeMember**](OrganizationApi.md#orgPublicizeMember) | **PUT** /orgs/{org}/public_members/{username} | Publicize a user's membership [**orgRemoveTeamMember**](OrganizationApi.md#orgRemoveTeamMember) | **DELETE** /teams/{id}/members/{username} | Remove a team member [**orgRemoveTeamRepository**](OrganizationApi.md#orgRemoveTeamRepository) | **DELETE** /teams/{id}/repos/{org}/{repo} | Remove a repository from a team [**teamSearch**](OrganizationApi.md#teamSearch) | **GET** /orgs/{org}/teams/search | Search for teams within an organization # **createOrgRepo** > Repository createOrgRepo(org, body) Create a repository in an organization ### Example ```java // Import classes: import io.gitea.ApiClient; import io.gitea.ApiException; import io.gitea.Configuration; import io.gitea.auth.*; import io.gitea.models.*; import io.gitea.api.OrganizationApi; public class Example { public static void main(String[] args) { ApiClient defaultClient = Configuration.getDefaultApiClient(); defaultClient.setBasePath("http://localhost/api/v1"); // Configure API key authorization: AccessToken ApiKeyAuth AccessToken = (ApiKeyAuth) defaultClient.getAuthentication("AccessToken"); AccessToken.setApiKey("YOUR API KEY"); // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) //AccessToken.setApiKeyPrefix("Token"); // Configure API key authorization: AuthorizationHeaderToken ApiKeyAuth AuthorizationHeaderToken = (ApiKeyAuth) defaultClient.getAuthentication("AuthorizationHeaderToken"); AuthorizationHeaderToken.setApiKey("YOUR API KEY"); // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) //AuthorizationHeaderToken.setApiKeyPrefix("Token"); // Configure HTTP basic authorization: BasicAuth HttpBasicAuth BasicAuth = (HttpBasicAuth) defaultClient.getAuthentication("BasicAuth"); BasicAuth.setUsername("YOUR USERNAME"); BasicAuth.setPassword("YOUR PASSWORD"); // Configure API key authorization: SudoHeader ApiKeyAuth SudoHeader = (ApiKeyAuth) defaultClient.getAuthentication("SudoHeader"); SudoHeader.setApiKey("YOUR API KEY"); // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) //SudoHeader.setApiKeyPrefix("Token"); // Configure API key authorization: SudoParam ApiKeyAuth SudoParam = (ApiKeyAuth) defaultClient.getAuthentication("SudoParam"); SudoParam.setApiKey("YOUR API KEY"); // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) //SudoParam.setApiKeyPrefix("Token"); // Configure API key authorization: TOTPHeader ApiKeyAuth TOTPHeader = (ApiKeyAuth) defaultClient.getAuthentication("TOTPHeader"); TOTPHeader.setApiKey("YOUR API KEY"); // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) //TOTPHeader.setApiKeyPrefix("Token"); // Configure API key authorization: Token ApiKeyAuth Token = (ApiKeyAuth) defaultClient.getAuthentication("Token"); Token.setApiKey("YOUR API KEY"); // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) //Token.setApiKeyPrefix("Token"); OrganizationApi apiInstance = new OrganizationApi(defaultClient); String org = "org_example"; // String | name of organization CreateRepoOption body = new CreateRepoOption(); // CreateRepoOption | try { Repository result = apiInstance.createOrgRepo(org, body); System.out.println(result); } catch (ApiException e) { System.err.println("Exception when calling OrganizationApi#createOrgRepo"); System.err.println("Status code: " + e.getCode()); System.err.println("Reason: " + e.getResponseBody()); System.err.println("Response headers: " + e.getResponseHeaders()); e.printStackTrace(); } } } ``` ### Parameters Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- **org** | **String**| name of organization | **body** | [**CreateRepoOption**](CreateRepoOption.md)| | [optional] ### 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 ### HTTP response details | Status code | Description | Response headers | |-------------|-------------|------------------| **201** | Repository | - | **403** | APIForbiddenError is a forbidden error response | * message -
* url -
| **404** | APINotFound is a not found empty response | - | # **createOrgRepoDeprecated** > Repository createOrgRepoDeprecated(org, body) Create a repository in an organization ### Example ```java // Import classes: import io.gitea.ApiClient; import io.gitea.ApiException; import io.gitea.Configuration; import io.gitea.auth.*; import io.gitea.models.*; import io.gitea.api.OrganizationApi; public class Example { public static void main(String[] args) { ApiClient defaultClient = Configuration.getDefaultApiClient(); defaultClient.setBasePath("http://localhost/api/v1"); // Configure API key authorization: AccessToken ApiKeyAuth AccessToken = (ApiKeyAuth) defaultClient.getAuthentication("AccessToken"); AccessToken.setApiKey("YOUR API KEY"); // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) //AccessToken.setApiKeyPrefix("Token"); // Configure API key authorization: AuthorizationHeaderToken ApiKeyAuth AuthorizationHeaderToken = (ApiKeyAuth) defaultClient.getAuthentication("AuthorizationHeaderToken"); AuthorizationHeaderToken.setApiKey("YOUR API KEY"); // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) //AuthorizationHeaderToken.setApiKeyPrefix("Token"); // Configure HTTP basic authorization: BasicAuth HttpBasicAuth BasicAuth = (HttpBasicAuth) defaultClient.getAuthentication("BasicAuth"); BasicAuth.setUsername("YOUR USERNAME"); BasicAuth.setPassword("YOUR PASSWORD"); // Configure API key authorization: SudoHeader ApiKeyAuth SudoHeader = (ApiKeyAuth) defaultClient.getAuthentication("SudoHeader"); SudoHeader.setApiKey("YOUR API KEY"); // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) //SudoHeader.setApiKeyPrefix("Token"); // Configure API key authorization: SudoParam ApiKeyAuth SudoParam = (ApiKeyAuth) defaultClient.getAuthentication("SudoParam"); SudoParam.setApiKey("YOUR API KEY"); // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) //SudoParam.setApiKeyPrefix("Token"); // Configure API key authorization: TOTPHeader ApiKeyAuth TOTPHeader = (ApiKeyAuth) defaultClient.getAuthentication("TOTPHeader"); TOTPHeader.setApiKey("YOUR API KEY"); // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) //TOTPHeader.setApiKeyPrefix("Token"); // Configure API key authorization: Token ApiKeyAuth Token = (ApiKeyAuth) defaultClient.getAuthentication("Token"); Token.setApiKey("YOUR API KEY"); // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) //Token.setApiKeyPrefix("Token"); OrganizationApi apiInstance = new OrganizationApi(defaultClient); String org = "org_example"; // String | name of organization CreateRepoOption body = new CreateRepoOption(); // CreateRepoOption | try { Repository result = apiInstance.createOrgRepoDeprecated(org, body); System.out.println(result); } catch (ApiException e) { System.err.println("Exception when calling OrganizationApi#createOrgRepoDeprecated"); System.err.println("Status code: " + e.getCode()); System.err.println("Reason: " + e.getResponseBody()); System.err.println("Response headers: " + e.getResponseHeaders()); e.printStackTrace(); } } } ``` ### Parameters Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- **org** | **String**| name of organization | **body** | [**CreateRepoOption**](CreateRepoOption.md)| | [optional] ### 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 ### HTTP response details | Status code | Description | Response headers | |-------------|-------------|------------------| **201** | Repository | - | **403** | APIForbiddenError is a forbidden error response | * message -
* url -
| **422** | APIValidationError is error format response related to input validation | * message -
* url -
| # **orgAddTeamMember** > orgAddTeamMember(id, username) Add a team member ### Example ```java // Import classes: import io.gitea.ApiClient; import io.gitea.ApiException; import io.gitea.Configuration; import io.gitea.auth.*; import io.gitea.models.*; import io.gitea.api.OrganizationApi; public class Example { public static void main(String[] args) { ApiClient defaultClient = Configuration.getDefaultApiClient(); defaultClient.setBasePath("http://localhost/api/v1"); // Configure API key authorization: AccessToken ApiKeyAuth AccessToken = (ApiKeyAuth) defaultClient.getAuthentication("AccessToken"); AccessToken.setApiKey("YOUR API KEY"); // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) //AccessToken.setApiKeyPrefix("Token"); // Configure API key authorization: AuthorizationHeaderToken ApiKeyAuth AuthorizationHeaderToken = (ApiKeyAuth) defaultClient.getAuthentication("AuthorizationHeaderToken"); AuthorizationHeaderToken.setApiKey("YOUR API KEY"); // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) //AuthorizationHeaderToken.setApiKeyPrefix("Token"); // Configure HTTP basic authorization: BasicAuth HttpBasicAuth BasicAuth = (HttpBasicAuth) defaultClient.getAuthentication("BasicAuth"); BasicAuth.setUsername("YOUR USERNAME"); BasicAuth.setPassword("YOUR PASSWORD"); // Configure API key authorization: SudoHeader ApiKeyAuth SudoHeader = (ApiKeyAuth) defaultClient.getAuthentication("SudoHeader"); SudoHeader.setApiKey("YOUR API KEY"); // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) //SudoHeader.setApiKeyPrefix("Token"); // Configure API key authorization: SudoParam ApiKeyAuth SudoParam = (ApiKeyAuth) defaultClient.getAuthentication("SudoParam"); SudoParam.setApiKey("YOUR API KEY"); // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) //SudoParam.setApiKeyPrefix("Token"); // Configure API key authorization: TOTPHeader ApiKeyAuth TOTPHeader = (ApiKeyAuth) defaultClient.getAuthentication("TOTPHeader"); TOTPHeader.setApiKey("YOUR API KEY"); // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) //TOTPHeader.setApiKeyPrefix("Token"); // Configure API key authorization: Token ApiKeyAuth Token = (ApiKeyAuth) defaultClient.getAuthentication("Token"); Token.setApiKey("YOUR API KEY"); // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) //Token.setApiKeyPrefix("Token"); OrganizationApi apiInstance = new OrganizationApi(defaultClient); Long id = 56L; // Long | id of the team String username = "username_example"; // String | username of the user to add try { apiInstance.orgAddTeamMember(id, username); } catch (ApiException e) { System.err.println("Exception when calling OrganizationApi#orgAddTeamMember"); System.err.println("Status code: " + e.getCode()); System.err.println("Reason: " + e.getResponseBody()); System.err.println("Response headers: " + e.getResponseHeaders()); e.printStackTrace(); } } } ``` ### Parameters Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- **id** | **Long**| id of the team | **username** | **String**| username of the user to add | ### Return type null (empty response body) ### 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 ### HTTP response details | Status code | Description | Response headers | |-------------|-------------|------------------| **204** | APIEmpty is an empty response | - | **404** | APINotFound is a not found empty response | - | # **orgAddTeamRepository** > orgAddTeamRepository(id, org, repo) Add a repository to a team ### Example ```java // Import classes: import io.gitea.ApiClient; import io.gitea.ApiException; import io.gitea.Configuration; import io.gitea.auth.*; import io.gitea.models.*; import io.gitea.api.OrganizationApi; public class Example { public static void main(String[] args) { ApiClient defaultClient = Configuration.getDefaultApiClient(); defaultClient.setBasePath("http://localhost/api/v1"); // Configure API key authorization: AccessToken ApiKeyAuth AccessToken = (ApiKeyAuth) defaultClient.getAuthentication("AccessToken"); AccessToken.setApiKey("YOUR API KEY"); // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) //AccessToken.setApiKeyPrefix("Token"); // Configure API key authorization: AuthorizationHeaderToken ApiKeyAuth AuthorizationHeaderToken = (ApiKeyAuth) defaultClient.getAuthentication("AuthorizationHeaderToken"); AuthorizationHeaderToken.setApiKey("YOUR API KEY"); // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) //AuthorizationHeaderToken.setApiKeyPrefix("Token"); // Configure HTTP basic authorization: BasicAuth HttpBasicAuth BasicAuth = (HttpBasicAuth) defaultClient.getAuthentication("BasicAuth"); BasicAuth.setUsername("YOUR USERNAME"); BasicAuth.setPassword("YOUR PASSWORD"); // Configure API key authorization: SudoHeader ApiKeyAuth SudoHeader = (ApiKeyAuth) defaultClient.getAuthentication("SudoHeader"); SudoHeader.setApiKey("YOUR API KEY"); // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) //SudoHeader.setApiKeyPrefix("Token"); // Configure API key authorization: SudoParam ApiKeyAuth SudoParam = (ApiKeyAuth) defaultClient.getAuthentication("SudoParam"); SudoParam.setApiKey("YOUR API KEY"); // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) //SudoParam.setApiKeyPrefix("Token"); // Configure API key authorization: TOTPHeader ApiKeyAuth TOTPHeader = (ApiKeyAuth) defaultClient.getAuthentication("TOTPHeader"); TOTPHeader.setApiKey("YOUR API KEY"); // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) //TOTPHeader.setApiKeyPrefix("Token"); // Configure API key authorization: Token ApiKeyAuth Token = (ApiKeyAuth) defaultClient.getAuthentication("Token"); Token.setApiKey("YOUR API KEY"); // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) //Token.setApiKeyPrefix("Token"); OrganizationApi apiInstance = new OrganizationApi(defaultClient); Long id = 56L; // Long | id of the team String org = "org_example"; // String | organization that owns the repo to add String repo = "repo_example"; // String | name of the repo to add try { apiInstance.orgAddTeamRepository(id, org, repo); } catch (ApiException e) { System.err.println("Exception when calling OrganizationApi#orgAddTeamRepository"); System.err.println("Status code: " + e.getCode()); System.err.println("Reason: " + e.getResponseBody()); System.err.println("Response headers: " + e.getResponseHeaders()); e.printStackTrace(); } } } ``` ### Parameters Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- **id** | **Long**| id of the team | **org** | **String**| organization that owns the repo to add | **repo** | **String**| name of the repo to add | ### Return type null (empty response body) ### 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 ### HTTP response details | Status code | Description | Response headers | |-------------|-------------|------------------| **204** | APIEmpty is an empty response | - | **403** | APIForbiddenError is a forbidden error response | * message -
* url -
| # **orgConcealMember** > orgConcealMember(org, username) Conceal a user's membership ### Example ```java // Import classes: import io.gitea.ApiClient; import io.gitea.ApiException; import io.gitea.Configuration; import io.gitea.auth.*; import io.gitea.models.*; import io.gitea.api.OrganizationApi; public class Example { public static void main(String[] args) { ApiClient defaultClient = Configuration.getDefaultApiClient(); defaultClient.setBasePath("http://localhost/api/v1"); // Configure API key authorization: AccessToken ApiKeyAuth AccessToken = (ApiKeyAuth) defaultClient.getAuthentication("AccessToken"); AccessToken.setApiKey("YOUR API KEY"); // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) //AccessToken.setApiKeyPrefix("Token"); // Configure API key authorization: AuthorizationHeaderToken ApiKeyAuth AuthorizationHeaderToken = (ApiKeyAuth) defaultClient.getAuthentication("AuthorizationHeaderToken"); AuthorizationHeaderToken.setApiKey("YOUR API KEY"); // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) //AuthorizationHeaderToken.setApiKeyPrefix("Token"); // Configure HTTP basic authorization: BasicAuth HttpBasicAuth BasicAuth = (HttpBasicAuth) defaultClient.getAuthentication("BasicAuth"); BasicAuth.setUsername("YOUR USERNAME"); BasicAuth.setPassword("YOUR PASSWORD"); // Configure API key authorization: SudoHeader ApiKeyAuth SudoHeader = (ApiKeyAuth) defaultClient.getAuthentication("SudoHeader"); SudoHeader.setApiKey("YOUR API KEY"); // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) //SudoHeader.setApiKeyPrefix("Token"); // Configure API key authorization: SudoParam ApiKeyAuth SudoParam = (ApiKeyAuth) defaultClient.getAuthentication("SudoParam"); SudoParam.setApiKey("YOUR API KEY"); // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) //SudoParam.setApiKeyPrefix("Token"); // Configure API key authorization: TOTPHeader ApiKeyAuth TOTPHeader = (ApiKeyAuth) defaultClient.getAuthentication("TOTPHeader"); TOTPHeader.setApiKey("YOUR API KEY"); // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) //TOTPHeader.setApiKeyPrefix("Token"); // Configure API key authorization: Token ApiKeyAuth Token = (ApiKeyAuth) defaultClient.getAuthentication("Token"); Token.setApiKey("YOUR API KEY"); // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) //Token.setApiKeyPrefix("Token"); OrganizationApi apiInstance = new OrganizationApi(defaultClient); String org = "org_example"; // String | name of the organization String username = "username_example"; // String | username of the user try { apiInstance.orgConcealMember(org, username); } catch (ApiException e) { System.err.println("Exception when calling OrganizationApi#orgConcealMember"); System.err.println("Status code: " + e.getCode()); System.err.println("Reason: " + e.getResponseBody()); System.err.println("Response headers: " + e.getResponseHeaders()); e.printStackTrace(); } } } ``` ### Parameters Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- **org** | **String**| name of the organization | **username** | **String**| username of the user | ### Return type null (empty response body) ### 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 ### HTTP response details | Status code | Description | Response headers | |-------------|-------------|------------------| **204** | APIEmpty is an empty response | - | **403** | APIForbiddenError is a forbidden error response | * message -
* url -
| # **orgCreate** > Organization orgCreate(organization) Create an organization ### Example ```java // Import classes: import io.gitea.ApiClient; import io.gitea.ApiException; import io.gitea.Configuration; import io.gitea.auth.*; import io.gitea.models.*; import io.gitea.api.OrganizationApi; public class Example { public static void main(String[] args) { ApiClient defaultClient = Configuration.getDefaultApiClient(); defaultClient.setBasePath("http://localhost/api/v1"); // Configure API key authorization: AccessToken ApiKeyAuth AccessToken = (ApiKeyAuth) defaultClient.getAuthentication("AccessToken"); AccessToken.setApiKey("YOUR API KEY"); // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) //AccessToken.setApiKeyPrefix("Token"); // Configure API key authorization: AuthorizationHeaderToken ApiKeyAuth AuthorizationHeaderToken = (ApiKeyAuth) defaultClient.getAuthentication("AuthorizationHeaderToken"); AuthorizationHeaderToken.setApiKey("YOUR API KEY"); // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) //AuthorizationHeaderToken.setApiKeyPrefix("Token"); // Configure HTTP basic authorization: BasicAuth HttpBasicAuth BasicAuth = (HttpBasicAuth) defaultClient.getAuthentication("BasicAuth"); BasicAuth.setUsername("YOUR USERNAME"); BasicAuth.setPassword("YOUR PASSWORD"); // Configure API key authorization: SudoHeader ApiKeyAuth SudoHeader = (ApiKeyAuth) defaultClient.getAuthentication("SudoHeader"); SudoHeader.setApiKey("YOUR API KEY"); // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) //SudoHeader.setApiKeyPrefix("Token"); // Configure API key authorization: SudoParam ApiKeyAuth SudoParam = (ApiKeyAuth) defaultClient.getAuthentication("SudoParam"); SudoParam.setApiKey("YOUR API KEY"); // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) //SudoParam.setApiKeyPrefix("Token"); // Configure API key authorization: TOTPHeader ApiKeyAuth TOTPHeader = (ApiKeyAuth) defaultClient.getAuthentication("TOTPHeader"); TOTPHeader.setApiKey("YOUR API KEY"); // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) //TOTPHeader.setApiKeyPrefix("Token"); // Configure API key authorization: Token ApiKeyAuth Token = (ApiKeyAuth) defaultClient.getAuthentication("Token"); Token.setApiKey("YOUR API KEY"); // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) //Token.setApiKeyPrefix("Token"); OrganizationApi apiInstance = new OrganizationApi(defaultClient); CreateOrgOption organization = new CreateOrgOption(); // CreateOrgOption | try { Organization result = apiInstance.orgCreate(organization); System.out.println(result); } catch (ApiException e) { System.err.println("Exception when calling OrganizationApi#orgCreate"); System.err.println("Status code: " + e.getCode()); System.err.println("Reason: " + e.getResponseBody()); System.err.println("Response headers: " + e.getResponseHeaders()); e.printStackTrace(); } } } ``` ### Parameters Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- **organization** | [**CreateOrgOption**](CreateOrgOption.md)| | ### 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 ### HTTP response details | Status code | Description | Response headers | |-------------|-------------|------------------| **201** | Organization | - | **403** | APIForbiddenError is a forbidden error response | * message -
* url -
| **422** | APIValidationError is error format response related to input validation | * message -
* url -
| # **orgCreateHook** > Hook orgCreateHook(org, body) Create a hook ### Example ```java // Import classes: import io.gitea.ApiClient; import io.gitea.ApiException; import io.gitea.Configuration; import io.gitea.auth.*; import io.gitea.models.*; import io.gitea.api.OrganizationApi; public class Example { public static void main(String[] args) { ApiClient defaultClient = Configuration.getDefaultApiClient(); defaultClient.setBasePath("http://localhost/api/v1"); // Configure API key authorization: AccessToken ApiKeyAuth AccessToken = (ApiKeyAuth) defaultClient.getAuthentication("AccessToken"); AccessToken.setApiKey("YOUR API KEY"); // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) //AccessToken.setApiKeyPrefix("Token"); // Configure API key authorization: AuthorizationHeaderToken ApiKeyAuth AuthorizationHeaderToken = (ApiKeyAuth) defaultClient.getAuthentication("AuthorizationHeaderToken"); AuthorizationHeaderToken.setApiKey("YOUR API KEY"); // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) //AuthorizationHeaderToken.setApiKeyPrefix("Token"); // Configure HTTP basic authorization: BasicAuth HttpBasicAuth BasicAuth = (HttpBasicAuth) defaultClient.getAuthentication("BasicAuth"); BasicAuth.setUsername("YOUR USERNAME"); BasicAuth.setPassword("YOUR PASSWORD"); // Configure API key authorization: SudoHeader ApiKeyAuth SudoHeader = (ApiKeyAuth) defaultClient.getAuthentication("SudoHeader"); SudoHeader.setApiKey("YOUR API KEY"); // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) //SudoHeader.setApiKeyPrefix("Token"); // Configure API key authorization: SudoParam ApiKeyAuth SudoParam = (ApiKeyAuth) defaultClient.getAuthentication("SudoParam"); SudoParam.setApiKey("YOUR API KEY"); // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) //SudoParam.setApiKeyPrefix("Token"); // Configure API key authorization: TOTPHeader ApiKeyAuth TOTPHeader = (ApiKeyAuth) defaultClient.getAuthentication("TOTPHeader"); TOTPHeader.setApiKey("YOUR API KEY"); // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) //TOTPHeader.setApiKeyPrefix("Token"); // Configure API key authorization: Token ApiKeyAuth Token = (ApiKeyAuth) defaultClient.getAuthentication("Token"); Token.setApiKey("YOUR API KEY"); // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) //Token.setApiKeyPrefix("Token"); OrganizationApi apiInstance = new OrganizationApi(defaultClient); String org = "org_example"; // String | name of the organization CreateHookOption body = new CreateHookOption(); // CreateHookOption | try { Hook result = apiInstance.orgCreateHook(org, body); System.out.println(result); } catch (ApiException e) { System.err.println("Exception when calling OrganizationApi#orgCreateHook"); System.err.println("Status code: " + e.getCode()); System.err.println("Reason: " + e.getResponseBody()); System.err.println("Response headers: " + e.getResponseHeaders()); e.printStackTrace(); } } } ``` ### Parameters Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- **org** | **String**| name of the organization | **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 ### HTTP response details | Status code | Description | Response headers | |-------------|-------------|------------------| **201** | Hook | - | # **orgCreateLabel** > Label orgCreateLabel(org, body) Create a label for an organization ### Example ```java // Import classes: import io.gitea.ApiClient; import io.gitea.ApiException; import io.gitea.Configuration; import io.gitea.auth.*; import io.gitea.models.*; import io.gitea.api.OrganizationApi; public class Example { public static void main(String[] args) { ApiClient defaultClient = Configuration.getDefaultApiClient(); defaultClient.setBasePath("http://localhost/api/v1"); // Configure API key authorization: AccessToken ApiKeyAuth AccessToken = (ApiKeyAuth) defaultClient.getAuthentication("AccessToken"); AccessToken.setApiKey("YOUR API KEY"); // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) //AccessToken.setApiKeyPrefix("Token"); // Configure API key authorization: AuthorizationHeaderToken ApiKeyAuth AuthorizationHeaderToken = (ApiKeyAuth) defaultClient.getAuthentication("AuthorizationHeaderToken"); AuthorizationHeaderToken.setApiKey("YOUR API KEY"); // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) //AuthorizationHeaderToken.setApiKeyPrefix("Token"); // Configure HTTP basic authorization: BasicAuth HttpBasicAuth BasicAuth = (HttpBasicAuth) defaultClient.getAuthentication("BasicAuth"); BasicAuth.setUsername("YOUR USERNAME"); BasicAuth.setPassword("YOUR PASSWORD"); // Configure API key authorization: SudoHeader ApiKeyAuth SudoHeader = (ApiKeyAuth) defaultClient.getAuthentication("SudoHeader"); SudoHeader.setApiKey("YOUR API KEY"); // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) //SudoHeader.setApiKeyPrefix("Token"); // Configure API key authorization: SudoParam ApiKeyAuth SudoParam = (ApiKeyAuth) defaultClient.getAuthentication("SudoParam"); SudoParam.setApiKey("YOUR API KEY"); // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) //SudoParam.setApiKeyPrefix("Token"); // Configure API key authorization: TOTPHeader ApiKeyAuth TOTPHeader = (ApiKeyAuth) defaultClient.getAuthentication("TOTPHeader"); TOTPHeader.setApiKey("YOUR API KEY"); // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) //TOTPHeader.setApiKeyPrefix("Token"); // Configure API key authorization: Token ApiKeyAuth Token = (ApiKeyAuth) defaultClient.getAuthentication("Token"); Token.setApiKey("YOUR API KEY"); // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) //Token.setApiKeyPrefix("Token"); OrganizationApi apiInstance = new OrganizationApi(defaultClient); String org = "org_example"; // String | name of the organization CreateLabelOption body = new CreateLabelOption(); // CreateLabelOption | try { Label result = apiInstance.orgCreateLabel(org, body); System.out.println(result); } catch (ApiException e) { System.err.println("Exception when calling OrganizationApi#orgCreateLabel"); System.err.println("Status code: " + e.getCode()); System.err.println("Reason: " + e.getResponseBody()); System.err.println("Response headers: " + e.getResponseHeaders()); e.printStackTrace(); } } } ``` ### Parameters Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- **org** | **String**| name of the organization | **body** | [**CreateLabelOption**](CreateLabelOption.md)| | [optional] ### Return type [**Label**](Label.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 ### HTTP response details | Status code | Description | Response headers | |-------------|-------------|------------------| **201** | Label | - | **422** | APIValidationError is error format response related to input validation | * message -
* url -
| # **orgCreateTeam** > Team orgCreateTeam(org, body) Create a team ### Example ```java // Import classes: import io.gitea.ApiClient; import io.gitea.ApiException; import io.gitea.Configuration; import io.gitea.auth.*; import io.gitea.models.*; import io.gitea.api.OrganizationApi; public class Example { public static void main(String[] args) { ApiClient defaultClient = Configuration.getDefaultApiClient(); defaultClient.setBasePath("http://localhost/api/v1"); // Configure API key authorization: AccessToken ApiKeyAuth AccessToken = (ApiKeyAuth) defaultClient.getAuthentication("AccessToken"); AccessToken.setApiKey("YOUR API KEY"); // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) //AccessToken.setApiKeyPrefix("Token"); // Configure API key authorization: AuthorizationHeaderToken ApiKeyAuth AuthorizationHeaderToken = (ApiKeyAuth) defaultClient.getAuthentication("AuthorizationHeaderToken"); AuthorizationHeaderToken.setApiKey("YOUR API KEY"); // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) //AuthorizationHeaderToken.setApiKeyPrefix("Token"); // Configure HTTP basic authorization: BasicAuth HttpBasicAuth BasicAuth = (HttpBasicAuth) defaultClient.getAuthentication("BasicAuth"); BasicAuth.setUsername("YOUR USERNAME"); BasicAuth.setPassword("YOUR PASSWORD"); // Configure API key authorization: SudoHeader ApiKeyAuth SudoHeader = (ApiKeyAuth) defaultClient.getAuthentication("SudoHeader"); SudoHeader.setApiKey("YOUR API KEY"); // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) //SudoHeader.setApiKeyPrefix("Token"); // Configure API key authorization: SudoParam ApiKeyAuth SudoParam = (ApiKeyAuth) defaultClient.getAuthentication("SudoParam"); SudoParam.setApiKey("YOUR API KEY"); // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) //SudoParam.setApiKeyPrefix("Token"); // Configure API key authorization: TOTPHeader ApiKeyAuth TOTPHeader = (ApiKeyAuth) defaultClient.getAuthentication("TOTPHeader"); TOTPHeader.setApiKey("YOUR API KEY"); // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) //TOTPHeader.setApiKeyPrefix("Token"); // Configure API key authorization: Token ApiKeyAuth Token = (ApiKeyAuth) defaultClient.getAuthentication("Token"); Token.setApiKey("YOUR API KEY"); // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) //Token.setApiKeyPrefix("Token"); OrganizationApi apiInstance = new OrganizationApi(defaultClient); String org = "org_example"; // String | name of the organization CreateTeamOption body = new CreateTeamOption(); // CreateTeamOption | try { Team result = apiInstance.orgCreateTeam(org, body); System.out.println(result); } catch (ApiException e) { System.err.println("Exception when calling OrganizationApi#orgCreateTeam"); System.err.println("Status code: " + e.getCode()); System.err.println("Reason: " + e.getResponseBody()); System.err.println("Response headers: " + e.getResponseHeaders()); e.printStackTrace(); } } } ``` ### Parameters Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- **org** | **String**| name of the organization | **body** | [**CreateTeamOption**](CreateTeamOption.md)| | [optional] ### Return type [**Team**](Team.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 ### HTTP response details | Status code | Description | Response headers | |-------------|-------------|------------------| **201** | Team | - | **422** | APIValidationError is error format response related to input validation | * message -
* url -
| # **orgDelete** > orgDelete(org) Delete an organization ### Example ```java // Import classes: import io.gitea.ApiClient; import io.gitea.ApiException; import io.gitea.Configuration; import io.gitea.auth.*; import io.gitea.models.*; import io.gitea.api.OrganizationApi; public class Example { public static void main(String[] args) { ApiClient defaultClient = Configuration.getDefaultApiClient(); defaultClient.setBasePath("http://localhost/api/v1"); // Configure API key authorization: AccessToken ApiKeyAuth AccessToken = (ApiKeyAuth) defaultClient.getAuthentication("AccessToken"); AccessToken.setApiKey("YOUR API KEY"); // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) //AccessToken.setApiKeyPrefix("Token"); // Configure API key authorization: AuthorizationHeaderToken ApiKeyAuth AuthorizationHeaderToken = (ApiKeyAuth) defaultClient.getAuthentication("AuthorizationHeaderToken"); AuthorizationHeaderToken.setApiKey("YOUR API KEY"); // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) //AuthorizationHeaderToken.setApiKeyPrefix("Token"); // Configure HTTP basic authorization: BasicAuth HttpBasicAuth BasicAuth = (HttpBasicAuth) defaultClient.getAuthentication("BasicAuth"); BasicAuth.setUsername("YOUR USERNAME"); BasicAuth.setPassword("YOUR PASSWORD"); // Configure API key authorization: SudoHeader ApiKeyAuth SudoHeader = (ApiKeyAuth) defaultClient.getAuthentication("SudoHeader"); SudoHeader.setApiKey("YOUR API KEY"); // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) //SudoHeader.setApiKeyPrefix("Token"); // Configure API key authorization: SudoParam ApiKeyAuth SudoParam = (ApiKeyAuth) defaultClient.getAuthentication("SudoParam"); SudoParam.setApiKey("YOUR API KEY"); // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) //SudoParam.setApiKeyPrefix("Token"); // Configure API key authorization: TOTPHeader ApiKeyAuth TOTPHeader = (ApiKeyAuth) defaultClient.getAuthentication("TOTPHeader"); TOTPHeader.setApiKey("YOUR API KEY"); // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) //TOTPHeader.setApiKeyPrefix("Token"); // Configure API key authorization: Token ApiKeyAuth Token = (ApiKeyAuth) defaultClient.getAuthentication("Token"); Token.setApiKey("YOUR API KEY"); // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) //Token.setApiKeyPrefix("Token"); OrganizationApi apiInstance = new OrganizationApi(defaultClient); String org = "org_example"; // String | organization that is to be deleted try { apiInstance.orgDelete(org); } catch (ApiException e) { System.err.println("Exception when calling OrganizationApi#orgDelete"); System.err.println("Status code: " + e.getCode()); System.err.println("Reason: " + e.getResponseBody()); System.err.println("Response headers: " + e.getResponseHeaders()); e.printStackTrace(); } } } ``` ### Parameters Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- **org** | **String**| organization that is to be deleted | ### Return type null (empty response body) ### 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 ### HTTP response details | Status code | Description | Response headers | |-------------|-------------|------------------| **204** | APIEmpty is an empty response | - | # **orgDeleteHook** > orgDeleteHook(org, id) Delete a hook ### Example ```java // Import classes: import io.gitea.ApiClient; import io.gitea.ApiException; import io.gitea.Configuration; import io.gitea.auth.*; import io.gitea.models.*; import io.gitea.api.OrganizationApi; public class Example { public static void main(String[] args) { ApiClient defaultClient = Configuration.getDefaultApiClient(); defaultClient.setBasePath("http://localhost/api/v1"); // Configure API key authorization: AccessToken ApiKeyAuth AccessToken = (ApiKeyAuth) defaultClient.getAuthentication("AccessToken"); AccessToken.setApiKey("YOUR API KEY"); // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) //AccessToken.setApiKeyPrefix("Token"); // Configure API key authorization: AuthorizationHeaderToken ApiKeyAuth AuthorizationHeaderToken = (ApiKeyAuth) defaultClient.getAuthentication("AuthorizationHeaderToken"); AuthorizationHeaderToken.setApiKey("YOUR API KEY"); // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) //AuthorizationHeaderToken.setApiKeyPrefix("Token"); // Configure HTTP basic authorization: BasicAuth HttpBasicAuth BasicAuth = (HttpBasicAuth) defaultClient.getAuthentication("BasicAuth"); BasicAuth.setUsername("YOUR USERNAME"); BasicAuth.setPassword("YOUR PASSWORD"); // Configure API key authorization: SudoHeader ApiKeyAuth SudoHeader = (ApiKeyAuth) defaultClient.getAuthentication("SudoHeader"); SudoHeader.setApiKey("YOUR API KEY"); // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) //SudoHeader.setApiKeyPrefix("Token"); // Configure API key authorization: SudoParam ApiKeyAuth SudoParam = (ApiKeyAuth) defaultClient.getAuthentication("SudoParam"); SudoParam.setApiKey("YOUR API KEY"); // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) //SudoParam.setApiKeyPrefix("Token"); // Configure API key authorization: TOTPHeader ApiKeyAuth TOTPHeader = (ApiKeyAuth) defaultClient.getAuthentication("TOTPHeader"); TOTPHeader.setApiKey("YOUR API KEY"); // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) //TOTPHeader.setApiKeyPrefix("Token"); // Configure API key authorization: Token ApiKeyAuth Token = (ApiKeyAuth) defaultClient.getAuthentication("Token"); Token.setApiKey("YOUR API KEY"); // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) //Token.setApiKeyPrefix("Token"); OrganizationApi apiInstance = new OrganizationApi(defaultClient); String org = "org_example"; // String | name of the organization Long id = 56L; // Long | id of the hook to delete try { apiInstance.orgDeleteHook(org, id); } catch (ApiException e) { System.err.println("Exception when calling OrganizationApi#orgDeleteHook"); System.err.println("Status code: " + e.getCode()); System.err.println("Reason: " + e.getResponseBody()); System.err.println("Response headers: " + e.getResponseHeaders()); e.printStackTrace(); } } } ``` ### Parameters Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- **org** | **String**| name of the organization | **id** | **Long**| id of the hook to delete | ### Return type null (empty response body) ### 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 ### HTTP response details | Status code | Description | Response headers | |-------------|-------------|------------------| **204** | APIEmpty is an empty response | - | # **orgDeleteLabel** > orgDeleteLabel(org, id) Delete a label ### Example ```java // Import classes: import io.gitea.ApiClient; import io.gitea.ApiException; import io.gitea.Configuration; import io.gitea.auth.*; import io.gitea.models.*; import io.gitea.api.OrganizationApi; public class Example { public static void main(String[] args) { ApiClient defaultClient = Configuration.getDefaultApiClient(); defaultClient.setBasePath("http://localhost/api/v1"); // Configure API key authorization: AccessToken ApiKeyAuth AccessToken = (ApiKeyAuth) defaultClient.getAuthentication("AccessToken"); AccessToken.setApiKey("YOUR API KEY"); // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) //AccessToken.setApiKeyPrefix("Token"); // Configure API key authorization: AuthorizationHeaderToken ApiKeyAuth AuthorizationHeaderToken = (ApiKeyAuth) defaultClient.getAuthentication("AuthorizationHeaderToken"); AuthorizationHeaderToken.setApiKey("YOUR API KEY"); // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) //AuthorizationHeaderToken.setApiKeyPrefix("Token"); // Configure HTTP basic authorization: BasicAuth HttpBasicAuth BasicAuth = (HttpBasicAuth) defaultClient.getAuthentication("BasicAuth"); BasicAuth.setUsername("YOUR USERNAME"); BasicAuth.setPassword("YOUR PASSWORD"); // Configure API key authorization: SudoHeader ApiKeyAuth SudoHeader = (ApiKeyAuth) defaultClient.getAuthentication("SudoHeader"); SudoHeader.setApiKey("YOUR API KEY"); // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) //SudoHeader.setApiKeyPrefix("Token"); // Configure API key authorization: SudoParam ApiKeyAuth SudoParam = (ApiKeyAuth) defaultClient.getAuthentication("SudoParam"); SudoParam.setApiKey("YOUR API KEY"); // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) //SudoParam.setApiKeyPrefix("Token"); // Configure API key authorization: TOTPHeader ApiKeyAuth TOTPHeader = (ApiKeyAuth) defaultClient.getAuthentication("TOTPHeader"); TOTPHeader.setApiKey("YOUR API KEY"); // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) //TOTPHeader.setApiKeyPrefix("Token"); // Configure API key authorization: Token ApiKeyAuth Token = (ApiKeyAuth) defaultClient.getAuthentication("Token"); Token.setApiKey("YOUR API KEY"); // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) //Token.setApiKeyPrefix("Token"); OrganizationApi apiInstance = new OrganizationApi(defaultClient); String org = "org_example"; // String | name of the organization Long id = 56L; // Long | id of the label to delete try { apiInstance.orgDeleteLabel(org, id); } catch (ApiException e) { System.err.println("Exception when calling OrganizationApi#orgDeleteLabel"); System.err.println("Status code: " + e.getCode()); System.err.println("Reason: " + e.getResponseBody()); System.err.println("Response headers: " + e.getResponseHeaders()); e.printStackTrace(); } } } ``` ### Parameters Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- **org** | **String**| name of the organization | **id** | **Long**| id of the label to delete | ### Return type null (empty response body) ### 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 ### HTTP response details | Status code | Description | Response headers | |-------------|-------------|------------------| **204** | APIEmpty is an empty response | - | # **orgDeleteMember** > orgDeleteMember(org, username) Remove a member from an organization ### Example ```java // Import classes: import io.gitea.ApiClient; import io.gitea.ApiException; import io.gitea.Configuration; import io.gitea.auth.*; import io.gitea.models.*; import io.gitea.api.OrganizationApi; public class Example { public static void main(String[] args) { ApiClient defaultClient = Configuration.getDefaultApiClient(); defaultClient.setBasePath("http://localhost/api/v1"); // Configure API key authorization: AccessToken ApiKeyAuth AccessToken = (ApiKeyAuth) defaultClient.getAuthentication("AccessToken"); AccessToken.setApiKey("YOUR API KEY"); // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) //AccessToken.setApiKeyPrefix("Token"); // Configure API key authorization: AuthorizationHeaderToken ApiKeyAuth AuthorizationHeaderToken = (ApiKeyAuth) defaultClient.getAuthentication("AuthorizationHeaderToken"); AuthorizationHeaderToken.setApiKey("YOUR API KEY"); // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) //AuthorizationHeaderToken.setApiKeyPrefix("Token"); // Configure HTTP basic authorization: BasicAuth HttpBasicAuth BasicAuth = (HttpBasicAuth) defaultClient.getAuthentication("BasicAuth"); BasicAuth.setUsername("YOUR USERNAME"); BasicAuth.setPassword("YOUR PASSWORD"); // Configure API key authorization: SudoHeader ApiKeyAuth SudoHeader = (ApiKeyAuth) defaultClient.getAuthentication("SudoHeader"); SudoHeader.setApiKey("YOUR API KEY"); // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) //SudoHeader.setApiKeyPrefix("Token"); // Configure API key authorization: SudoParam ApiKeyAuth SudoParam = (ApiKeyAuth) defaultClient.getAuthentication("SudoParam"); SudoParam.setApiKey("YOUR API KEY"); // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) //SudoParam.setApiKeyPrefix("Token"); // Configure API key authorization: TOTPHeader ApiKeyAuth TOTPHeader = (ApiKeyAuth) defaultClient.getAuthentication("TOTPHeader"); TOTPHeader.setApiKey("YOUR API KEY"); // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) //TOTPHeader.setApiKeyPrefix("Token"); // Configure API key authorization: Token ApiKeyAuth Token = (ApiKeyAuth) defaultClient.getAuthentication("Token"); Token.setApiKey("YOUR API KEY"); // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) //Token.setApiKeyPrefix("Token"); OrganizationApi apiInstance = new OrganizationApi(defaultClient); String org = "org_example"; // String | name of the organization String username = "username_example"; // String | username of the user try { apiInstance.orgDeleteMember(org, username); } catch (ApiException e) { System.err.println("Exception when calling OrganizationApi#orgDeleteMember"); System.err.println("Status code: " + e.getCode()); System.err.println("Reason: " + e.getResponseBody()); System.err.println("Response headers: " + e.getResponseHeaders()); e.printStackTrace(); } } } ``` ### Parameters Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- **org** | **String**| name of the organization | **username** | **String**| username of the user | ### Return type null (empty response body) ### 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 ### HTTP response details | Status code | Description | Response headers | |-------------|-------------|------------------| **204** | member removed | - | # **orgDeleteTeam** > orgDeleteTeam(id) Delete a team ### Example ```java // Import classes: import io.gitea.ApiClient; import io.gitea.ApiException; import io.gitea.Configuration; import io.gitea.auth.*; import io.gitea.models.*; import io.gitea.api.OrganizationApi; public class Example { public static void main(String[] args) { ApiClient defaultClient = Configuration.getDefaultApiClient(); defaultClient.setBasePath("http://localhost/api/v1"); // Configure API key authorization: AccessToken ApiKeyAuth AccessToken = (ApiKeyAuth) defaultClient.getAuthentication("AccessToken"); AccessToken.setApiKey("YOUR API KEY"); // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) //AccessToken.setApiKeyPrefix("Token"); // Configure API key authorization: AuthorizationHeaderToken ApiKeyAuth AuthorizationHeaderToken = (ApiKeyAuth) defaultClient.getAuthentication("AuthorizationHeaderToken"); AuthorizationHeaderToken.setApiKey("YOUR API KEY"); // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) //AuthorizationHeaderToken.setApiKeyPrefix("Token"); // Configure HTTP basic authorization: BasicAuth HttpBasicAuth BasicAuth = (HttpBasicAuth) defaultClient.getAuthentication("BasicAuth"); BasicAuth.setUsername("YOUR USERNAME"); BasicAuth.setPassword("YOUR PASSWORD"); // Configure API key authorization: SudoHeader ApiKeyAuth SudoHeader = (ApiKeyAuth) defaultClient.getAuthentication("SudoHeader"); SudoHeader.setApiKey("YOUR API KEY"); // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) //SudoHeader.setApiKeyPrefix("Token"); // Configure API key authorization: SudoParam ApiKeyAuth SudoParam = (ApiKeyAuth) defaultClient.getAuthentication("SudoParam"); SudoParam.setApiKey("YOUR API KEY"); // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) //SudoParam.setApiKeyPrefix("Token"); // Configure API key authorization: TOTPHeader ApiKeyAuth TOTPHeader = (ApiKeyAuth) defaultClient.getAuthentication("TOTPHeader"); TOTPHeader.setApiKey("YOUR API KEY"); // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) //TOTPHeader.setApiKeyPrefix("Token"); // Configure API key authorization: Token ApiKeyAuth Token = (ApiKeyAuth) defaultClient.getAuthentication("Token"); Token.setApiKey("YOUR API KEY"); // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) //Token.setApiKeyPrefix("Token"); OrganizationApi apiInstance = new OrganizationApi(defaultClient); Long id = 56L; // Long | id of the team to delete try { apiInstance.orgDeleteTeam(id); } catch (ApiException e) { System.err.println("Exception when calling OrganizationApi#orgDeleteTeam"); System.err.println("Status code: " + e.getCode()); System.err.println("Reason: " + e.getResponseBody()); System.err.println("Response headers: " + e.getResponseHeaders()); e.printStackTrace(); } } } ``` ### Parameters Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- **id** | **Long**| id of the team to delete | ### Return type null (empty response body) ### 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 ### HTTP response details | Status code | Description | Response headers | |-------------|-------------|------------------| **204** | team deleted | - | # **orgEdit** > Organization orgEdit(org, body) Edit an organization ### Example ```java // Import classes: import io.gitea.ApiClient; import io.gitea.ApiException; import io.gitea.Configuration; import io.gitea.auth.*; import io.gitea.models.*; import io.gitea.api.OrganizationApi; public class Example { public static void main(String[] args) { ApiClient defaultClient = Configuration.getDefaultApiClient(); defaultClient.setBasePath("http://localhost/api/v1"); // Configure API key authorization: AccessToken ApiKeyAuth AccessToken = (ApiKeyAuth) defaultClient.getAuthentication("AccessToken"); AccessToken.setApiKey("YOUR API KEY"); // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) //AccessToken.setApiKeyPrefix("Token"); // Configure API key authorization: AuthorizationHeaderToken ApiKeyAuth AuthorizationHeaderToken = (ApiKeyAuth) defaultClient.getAuthentication("AuthorizationHeaderToken"); AuthorizationHeaderToken.setApiKey("YOUR API KEY"); // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) //AuthorizationHeaderToken.setApiKeyPrefix("Token"); // Configure HTTP basic authorization: BasicAuth HttpBasicAuth BasicAuth = (HttpBasicAuth) defaultClient.getAuthentication("BasicAuth"); BasicAuth.setUsername("YOUR USERNAME"); BasicAuth.setPassword("YOUR PASSWORD"); // Configure API key authorization: SudoHeader ApiKeyAuth SudoHeader = (ApiKeyAuth) defaultClient.getAuthentication("SudoHeader"); SudoHeader.setApiKey("YOUR API KEY"); // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) //SudoHeader.setApiKeyPrefix("Token"); // Configure API key authorization: SudoParam ApiKeyAuth SudoParam = (ApiKeyAuth) defaultClient.getAuthentication("SudoParam"); SudoParam.setApiKey("YOUR API KEY"); // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) //SudoParam.setApiKeyPrefix("Token"); // Configure API key authorization: TOTPHeader ApiKeyAuth TOTPHeader = (ApiKeyAuth) defaultClient.getAuthentication("TOTPHeader"); TOTPHeader.setApiKey("YOUR API KEY"); // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) //TOTPHeader.setApiKeyPrefix("Token"); // Configure API key authorization: Token ApiKeyAuth Token = (ApiKeyAuth) defaultClient.getAuthentication("Token"); Token.setApiKey("YOUR API KEY"); // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) //Token.setApiKeyPrefix("Token"); OrganizationApi apiInstance = new OrganizationApi(defaultClient); String org = "org_example"; // String | name of the organization to edit EditOrgOption body = new EditOrgOption(); // EditOrgOption | try { Organization result = apiInstance.orgEdit(org, body); System.out.println(result); } catch (ApiException e) { System.err.println("Exception when calling OrganizationApi#orgEdit"); System.err.println("Status code: " + e.getCode()); System.err.println("Reason: " + e.getResponseBody()); System.err.println("Response headers: " + e.getResponseHeaders()); e.printStackTrace(); } } } ``` ### Parameters Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- **org** | **String**| name of the organization to edit | **body** | [**EditOrgOption**](EditOrgOption.md)| | ### 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 ### HTTP response details | Status code | Description | Response headers | |-------------|-------------|------------------| **200** | Organization | - | # **orgEditHook** > Hook orgEditHook(org, id, body) Update a hook ### Example ```java // Import classes: import io.gitea.ApiClient; import io.gitea.ApiException; import io.gitea.Configuration; import io.gitea.auth.*; import io.gitea.models.*; import io.gitea.api.OrganizationApi; public class Example { public static void main(String[] args) { ApiClient defaultClient = Configuration.getDefaultApiClient(); defaultClient.setBasePath("http://localhost/api/v1"); // Configure API key authorization: AccessToken ApiKeyAuth AccessToken = (ApiKeyAuth) defaultClient.getAuthentication("AccessToken"); AccessToken.setApiKey("YOUR API KEY"); // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) //AccessToken.setApiKeyPrefix("Token"); // Configure API key authorization: AuthorizationHeaderToken ApiKeyAuth AuthorizationHeaderToken = (ApiKeyAuth) defaultClient.getAuthentication("AuthorizationHeaderToken"); AuthorizationHeaderToken.setApiKey("YOUR API KEY"); // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) //AuthorizationHeaderToken.setApiKeyPrefix("Token"); // Configure HTTP basic authorization: BasicAuth HttpBasicAuth BasicAuth = (HttpBasicAuth) defaultClient.getAuthentication("BasicAuth"); BasicAuth.setUsername("YOUR USERNAME"); BasicAuth.setPassword("YOUR PASSWORD"); // Configure API key authorization: SudoHeader ApiKeyAuth SudoHeader = (ApiKeyAuth) defaultClient.getAuthentication("SudoHeader"); SudoHeader.setApiKey("YOUR API KEY"); // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) //SudoHeader.setApiKeyPrefix("Token"); // Configure API key authorization: SudoParam ApiKeyAuth SudoParam = (ApiKeyAuth) defaultClient.getAuthentication("SudoParam"); SudoParam.setApiKey("YOUR API KEY"); // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) //SudoParam.setApiKeyPrefix("Token"); // Configure API key authorization: TOTPHeader ApiKeyAuth TOTPHeader = (ApiKeyAuth) defaultClient.getAuthentication("TOTPHeader"); TOTPHeader.setApiKey("YOUR API KEY"); // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) //TOTPHeader.setApiKeyPrefix("Token"); // Configure API key authorization: Token ApiKeyAuth Token = (ApiKeyAuth) defaultClient.getAuthentication("Token"); Token.setApiKey("YOUR API KEY"); // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) //Token.setApiKeyPrefix("Token"); OrganizationApi apiInstance = new OrganizationApi(defaultClient); String org = "org_example"; // String | name of the organization Long id = 56L; // Long | id of the hook to update EditHookOption body = new EditHookOption(); // EditHookOption | try { Hook result = apiInstance.orgEditHook(org, id, body); System.out.println(result); } catch (ApiException e) { System.err.println("Exception when calling OrganizationApi#orgEditHook"); System.err.println("Status code: " + e.getCode()); System.err.println("Reason: " + e.getResponseBody()); System.err.println("Response headers: " + e.getResponseHeaders()); e.printStackTrace(); } } } ``` ### Parameters Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- **org** | **String**| name of the organization | **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 ### HTTP response details | Status code | Description | Response headers | |-------------|-------------|------------------| **200** | Hook | - | # **orgEditLabel** > Label orgEditLabel(org, id, body) Update a label ### Example ```java // Import classes: import io.gitea.ApiClient; import io.gitea.ApiException; import io.gitea.Configuration; import io.gitea.auth.*; import io.gitea.models.*; import io.gitea.api.OrganizationApi; public class Example { public static void main(String[] args) { ApiClient defaultClient = Configuration.getDefaultApiClient(); defaultClient.setBasePath("http://localhost/api/v1"); // Configure API key authorization: AccessToken ApiKeyAuth AccessToken = (ApiKeyAuth) defaultClient.getAuthentication("AccessToken"); AccessToken.setApiKey("YOUR API KEY"); // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) //AccessToken.setApiKeyPrefix("Token"); // Configure API key authorization: AuthorizationHeaderToken ApiKeyAuth AuthorizationHeaderToken = (ApiKeyAuth) defaultClient.getAuthentication("AuthorizationHeaderToken"); AuthorizationHeaderToken.setApiKey("YOUR API KEY"); // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) //AuthorizationHeaderToken.setApiKeyPrefix("Token"); // Configure HTTP basic authorization: BasicAuth HttpBasicAuth BasicAuth = (HttpBasicAuth) defaultClient.getAuthentication("BasicAuth"); BasicAuth.setUsername("YOUR USERNAME"); BasicAuth.setPassword("YOUR PASSWORD"); // Configure API key authorization: SudoHeader ApiKeyAuth SudoHeader = (ApiKeyAuth) defaultClient.getAuthentication("SudoHeader"); SudoHeader.setApiKey("YOUR API KEY"); // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) //SudoHeader.setApiKeyPrefix("Token"); // Configure API key authorization: SudoParam ApiKeyAuth SudoParam = (ApiKeyAuth) defaultClient.getAuthentication("SudoParam"); SudoParam.setApiKey("YOUR API KEY"); // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) //SudoParam.setApiKeyPrefix("Token"); // Configure API key authorization: TOTPHeader ApiKeyAuth TOTPHeader = (ApiKeyAuth) defaultClient.getAuthentication("TOTPHeader"); TOTPHeader.setApiKey("YOUR API KEY"); // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) //TOTPHeader.setApiKeyPrefix("Token"); // Configure API key authorization: Token ApiKeyAuth Token = (ApiKeyAuth) defaultClient.getAuthentication("Token"); Token.setApiKey("YOUR API KEY"); // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) //Token.setApiKeyPrefix("Token"); OrganizationApi apiInstance = new OrganizationApi(defaultClient); String org = "org_example"; // String | name of the organization Long id = 56L; // Long | id of the label to edit EditLabelOption body = new EditLabelOption(); // EditLabelOption | try { Label result = apiInstance.orgEditLabel(org, id, body); System.out.println(result); } catch (ApiException e) { System.err.println("Exception when calling OrganizationApi#orgEditLabel"); System.err.println("Status code: " + e.getCode()); System.err.println("Reason: " + e.getResponseBody()); System.err.println("Response headers: " + e.getResponseHeaders()); e.printStackTrace(); } } } ``` ### Parameters Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- **org** | **String**| name of the organization | **id** | **Long**| id of the label to edit | **body** | [**EditLabelOption**](EditLabelOption.md)| | [optional] ### Return type [**Label**](Label.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 ### HTTP response details | Status code | Description | Response headers | |-------------|-------------|------------------| **200** | Label | - | **422** | APIValidationError is error format response related to input validation | * message -
* url -
| # **orgEditTeam** > Team orgEditTeam(id, body) Edit a team ### Example ```java // Import classes: import io.gitea.ApiClient; import io.gitea.ApiException; import io.gitea.Configuration; import io.gitea.auth.*; import io.gitea.models.*; import io.gitea.api.OrganizationApi; public class Example { public static void main(String[] args) { ApiClient defaultClient = Configuration.getDefaultApiClient(); defaultClient.setBasePath("http://localhost/api/v1"); // Configure API key authorization: AccessToken ApiKeyAuth AccessToken = (ApiKeyAuth) defaultClient.getAuthentication("AccessToken"); AccessToken.setApiKey("YOUR API KEY"); // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) //AccessToken.setApiKeyPrefix("Token"); // Configure API key authorization: AuthorizationHeaderToken ApiKeyAuth AuthorizationHeaderToken = (ApiKeyAuth) defaultClient.getAuthentication("AuthorizationHeaderToken"); AuthorizationHeaderToken.setApiKey("YOUR API KEY"); // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) //AuthorizationHeaderToken.setApiKeyPrefix("Token"); // Configure HTTP basic authorization: BasicAuth HttpBasicAuth BasicAuth = (HttpBasicAuth) defaultClient.getAuthentication("BasicAuth"); BasicAuth.setUsername("YOUR USERNAME"); BasicAuth.setPassword("YOUR PASSWORD"); // Configure API key authorization: SudoHeader ApiKeyAuth SudoHeader = (ApiKeyAuth) defaultClient.getAuthentication("SudoHeader"); SudoHeader.setApiKey("YOUR API KEY"); // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) //SudoHeader.setApiKeyPrefix("Token"); // Configure API key authorization: SudoParam ApiKeyAuth SudoParam = (ApiKeyAuth) defaultClient.getAuthentication("SudoParam"); SudoParam.setApiKey("YOUR API KEY"); // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) //SudoParam.setApiKeyPrefix("Token"); // Configure API key authorization: TOTPHeader ApiKeyAuth TOTPHeader = (ApiKeyAuth) defaultClient.getAuthentication("TOTPHeader"); TOTPHeader.setApiKey("YOUR API KEY"); // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) //TOTPHeader.setApiKeyPrefix("Token"); // Configure API key authorization: Token ApiKeyAuth Token = (ApiKeyAuth) defaultClient.getAuthentication("Token"); Token.setApiKey("YOUR API KEY"); // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) //Token.setApiKeyPrefix("Token"); OrganizationApi apiInstance = new OrganizationApi(defaultClient); Integer id = 56; // Integer | id of the team to edit EditTeamOption body = new EditTeamOption(); // EditTeamOption | try { Team result = apiInstance.orgEditTeam(id, body); System.out.println(result); } catch (ApiException e) { System.err.println("Exception when calling OrganizationApi#orgEditTeam"); System.err.println("Status code: " + e.getCode()); System.err.println("Reason: " + e.getResponseBody()); System.err.println("Response headers: " + e.getResponseHeaders()); e.printStackTrace(); } } } ``` ### Parameters Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- **id** | **Integer**| id of the team to edit | **body** | [**EditTeamOption**](EditTeamOption.md)| | [optional] ### Return type [**Team**](Team.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 ### HTTP response details | Status code | Description | Response headers | |-------------|-------------|------------------| **200** | Team | - | # **orgGet** > Organization orgGet(org) Get an organization ### Example ```java // Import classes: import io.gitea.ApiClient; import io.gitea.ApiException; import io.gitea.Configuration; import io.gitea.auth.*; import io.gitea.models.*; import io.gitea.api.OrganizationApi; public class Example { public static void main(String[] args) { ApiClient defaultClient = Configuration.getDefaultApiClient(); defaultClient.setBasePath("http://localhost/api/v1"); // Configure API key authorization: AccessToken ApiKeyAuth AccessToken = (ApiKeyAuth) defaultClient.getAuthentication("AccessToken"); AccessToken.setApiKey("YOUR API KEY"); // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) //AccessToken.setApiKeyPrefix("Token"); // Configure API key authorization: AuthorizationHeaderToken ApiKeyAuth AuthorizationHeaderToken = (ApiKeyAuth) defaultClient.getAuthentication("AuthorizationHeaderToken"); AuthorizationHeaderToken.setApiKey("YOUR API KEY"); // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) //AuthorizationHeaderToken.setApiKeyPrefix("Token"); // Configure HTTP basic authorization: BasicAuth HttpBasicAuth BasicAuth = (HttpBasicAuth) defaultClient.getAuthentication("BasicAuth"); BasicAuth.setUsername("YOUR USERNAME"); BasicAuth.setPassword("YOUR PASSWORD"); // Configure API key authorization: SudoHeader ApiKeyAuth SudoHeader = (ApiKeyAuth) defaultClient.getAuthentication("SudoHeader"); SudoHeader.setApiKey("YOUR API KEY"); // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) //SudoHeader.setApiKeyPrefix("Token"); // Configure API key authorization: SudoParam ApiKeyAuth SudoParam = (ApiKeyAuth) defaultClient.getAuthentication("SudoParam"); SudoParam.setApiKey("YOUR API KEY"); // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) //SudoParam.setApiKeyPrefix("Token"); // Configure API key authorization: TOTPHeader ApiKeyAuth TOTPHeader = (ApiKeyAuth) defaultClient.getAuthentication("TOTPHeader"); TOTPHeader.setApiKey("YOUR API KEY"); // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) //TOTPHeader.setApiKeyPrefix("Token"); // Configure API key authorization: Token ApiKeyAuth Token = (ApiKeyAuth) defaultClient.getAuthentication("Token"); Token.setApiKey("YOUR API KEY"); // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) //Token.setApiKeyPrefix("Token"); OrganizationApi apiInstance = new OrganizationApi(defaultClient); String org = "org_example"; // String | name of the organization to get try { Organization result = apiInstance.orgGet(org); System.out.println(result); } catch (ApiException e) { System.err.println("Exception when calling OrganizationApi#orgGet"); System.err.println("Status code: " + e.getCode()); System.err.println("Reason: " + e.getResponseBody()); System.err.println("Response headers: " + e.getResponseHeaders()); e.printStackTrace(); } } } ``` ### Parameters Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- **org** | **String**| name of the organization to get | ### 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**: Not defined - **Accept**: application/json ### HTTP response details | Status code | Description | Response headers | |-------------|-------------|------------------| **200** | Organization | - | # **orgGetAll** > List<Organization> orgGetAll(page, limit) Get list of organizations ### Example ```java // Import classes: import io.gitea.ApiClient; import io.gitea.ApiException; import io.gitea.Configuration; import io.gitea.auth.*; import io.gitea.models.*; import io.gitea.api.OrganizationApi; public class Example { public static void main(String[] args) { ApiClient defaultClient = Configuration.getDefaultApiClient(); defaultClient.setBasePath("http://localhost/api/v1"); // Configure API key authorization: AccessToken ApiKeyAuth AccessToken = (ApiKeyAuth) defaultClient.getAuthentication("AccessToken"); AccessToken.setApiKey("YOUR API KEY"); // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) //AccessToken.setApiKeyPrefix("Token"); // Configure API key authorization: AuthorizationHeaderToken ApiKeyAuth AuthorizationHeaderToken = (ApiKeyAuth) defaultClient.getAuthentication("AuthorizationHeaderToken"); AuthorizationHeaderToken.setApiKey("YOUR API KEY"); // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) //AuthorizationHeaderToken.setApiKeyPrefix("Token"); // Configure HTTP basic authorization: BasicAuth HttpBasicAuth BasicAuth = (HttpBasicAuth) defaultClient.getAuthentication("BasicAuth"); BasicAuth.setUsername("YOUR USERNAME"); BasicAuth.setPassword("YOUR PASSWORD"); // Configure API key authorization: SudoHeader ApiKeyAuth SudoHeader = (ApiKeyAuth) defaultClient.getAuthentication("SudoHeader"); SudoHeader.setApiKey("YOUR API KEY"); // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) //SudoHeader.setApiKeyPrefix("Token"); // Configure API key authorization: SudoParam ApiKeyAuth SudoParam = (ApiKeyAuth) defaultClient.getAuthentication("SudoParam"); SudoParam.setApiKey("YOUR API KEY"); // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) //SudoParam.setApiKeyPrefix("Token"); // Configure API key authorization: TOTPHeader ApiKeyAuth TOTPHeader = (ApiKeyAuth) defaultClient.getAuthentication("TOTPHeader"); TOTPHeader.setApiKey("YOUR API KEY"); // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) //TOTPHeader.setApiKeyPrefix("Token"); // Configure API key authorization: Token ApiKeyAuth Token = (ApiKeyAuth) defaultClient.getAuthentication("Token"); Token.setApiKey("YOUR API KEY"); // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) //Token.setApiKeyPrefix("Token"); OrganizationApi apiInstance = new OrganizationApi(defaultClient); Integer page = 56; // Integer | page number of results to return (1-based) Integer limit = 56; // Integer | page size of results try { List result = apiInstance.orgGetAll(page, limit); System.out.println(result); } catch (ApiException e) { System.err.println("Exception when calling OrganizationApi#orgGetAll"); System.err.println("Status code: " + e.getCode()); System.err.println("Reason: " + e.getResponseBody()); System.err.println("Response headers: " + e.getResponseHeaders()); 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 ### HTTP response details | Status code | Description | Response headers | |-------------|-------------|------------------| **200** | OrganizationList | - | # **orgGetHook** > Hook orgGetHook(org, id) Get a hook ### Example ```java // Import classes: import io.gitea.ApiClient; import io.gitea.ApiException; import io.gitea.Configuration; import io.gitea.auth.*; import io.gitea.models.*; import io.gitea.api.OrganizationApi; public class Example { public static void main(String[] args) { ApiClient defaultClient = Configuration.getDefaultApiClient(); defaultClient.setBasePath("http://localhost/api/v1"); // Configure API key authorization: AccessToken ApiKeyAuth AccessToken = (ApiKeyAuth) defaultClient.getAuthentication("AccessToken"); AccessToken.setApiKey("YOUR API KEY"); // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) //AccessToken.setApiKeyPrefix("Token"); // Configure API key authorization: AuthorizationHeaderToken ApiKeyAuth AuthorizationHeaderToken = (ApiKeyAuth) defaultClient.getAuthentication("AuthorizationHeaderToken"); AuthorizationHeaderToken.setApiKey("YOUR API KEY"); // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) //AuthorizationHeaderToken.setApiKeyPrefix("Token"); // Configure HTTP basic authorization: BasicAuth HttpBasicAuth BasicAuth = (HttpBasicAuth) defaultClient.getAuthentication("BasicAuth"); BasicAuth.setUsername("YOUR USERNAME"); BasicAuth.setPassword("YOUR PASSWORD"); // Configure API key authorization: SudoHeader ApiKeyAuth SudoHeader = (ApiKeyAuth) defaultClient.getAuthentication("SudoHeader"); SudoHeader.setApiKey("YOUR API KEY"); // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) //SudoHeader.setApiKeyPrefix("Token"); // Configure API key authorization: SudoParam ApiKeyAuth SudoParam = (ApiKeyAuth) defaultClient.getAuthentication("SudoParam"); SudoParam.setApiKey("YOUR API KEY"); // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) //SudoParam.setApiKeyPrefix("Token"); // Configure API key authorization: TOTPHeader ApiKeyAuth TOTPHeader = (ApiKeyAuth) defaultClient.getAuthentication("TOTPHeader"); TOTPHeader.setApiKey("YOUR API KEY"); // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) //TOTPHeader.setApiKeyPrefix("Token"); // Configure API key authorization: Token ApiKeyAuth Token = (ApiKeyAuth) defaultClient.getAuthentication("Token"); Token.setApiKey("YOUR API KEY"); // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) //Token.setApiKeyPrefix("Token"); OrganizationApi apiInstance = new OrganizationApi(defaultClient); String org = "org_example"; // String | name of the organization Long id = 56L; // Long | id of the hook to get try { Hook result = apiInstance.orgGetHook(org, id); System.out.println(result); } catch (ApiException e) { System.err.println("Exception when calling OrganizationApi#orgGetHook"); System.err.println("Status code: " + e.getCode()); System.err.println("Reason: " + e.getResponseBody()); System.err.println("Response headers: " + e.getResponseHeaders()); e.printStackTrace(); } } } ``` ### Parameters Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- **org** | **String**| name of the organization | **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 ### HTTP response details | Status code | Description | Response headers | |-------------|-------------|------------------| **200** | Hook | - | # **orgGetLabel** > Label orgGetLabel(org, id) Get a single label ### Example ```java // Import classes: import io.gitea.ApiClient; import io.gitea.ApiException; import io.gitea.Configuration; import io.gitea.auth.*; import io.gitea.models.*; import io.gitea.api.OrganizationApi; public class Example { public static void main(String[] args) { ApiClient defaultClient = Configuration.getDefaultApiClient(); defaultClient.setBasePath("http://localhost/api/v1"); // Configure API key authorization: AccessToken ApiKeyAuth AccessToken = (ApiKeyAuth) defaultClient.getAuthentication("AccessToken"); AccessToken.setApiKey("YOUR API KEY"); // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) //AccessToken.setApiKeyPrefix("Token"); // Configure API key authorization: AuthorizationHeaderToken ApiKeyAuth AuthorizationHeaderToken = (ApiKeyAuth) defaultClient.getAuthentication("AuthorizationHeaderToken"); AuthorizationHeaderToken.setApiKey("YOUR API KEY"); // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) //AuthorizationHeaderToken.setApiKeyPrefix("Token"); // Configure HTTP basic authorization: BasicAuth HttpBasicAuth BasicAuth = (HttpBasicAuth) defaultClient.getAuthentication("BasicAuth"); BasicAuth.setUsername("YOUR USERNAME"); BasicAuth.setPassword("YOUR PASSWORD"); // Configure API key authorization: SudoHeader ApiKeyAuth SudoHeader = (ApiKeyAuth) defaultClient.getAuthentication("SudoHeader"); SudoHeader.setApiKey("YOUR API KEY"); // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) //SudoHeader.setApiKeyPrefix("Token"); // Configure API key authorization: SudoParam ApiKeyAuth SudoParam = (ApiKeyAuth) defaultClient.getAuthentication("SudoParam"); SudoParam.setApiKey("YOUR API KEY"); // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) //SudoParam.setApiKeyPrefix("Token"); // Configure API key authorization: TOTPHeader ApiKeyAuth TOTPHeader = (ApiKeyAuth) defaultClient.getAuthentication("TOTPHeader"); TOTPHeader.setApiKey("YOUR API KEY"); // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) //TOTPHeader.setApiKeyPrefix("Token"); // Configure API key authorization: Token ApiKeyAuth Token = (ApiKeyAuth) defaultClient.getAuthentication("Token"); Token.setApiKey("YOUR API KEY"); // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) //Token.setApiKeyPrefix("Token"); OrganizationApi apiInstance = new OrganizationApi(defaultClient); String org = "org_example"; // String | name of the organization Long id = 56L; // Long | id of the label to get try { Label result = apiInstance.orgGetLabel(org, id); System.out.println(result); } catch (ApiException e) { System.err.println("Exception when calling OrganizationApi#orgGetLabel"); System.err.println("Status code: " + e.getCode()); System.err.println("Reason: " + e.getResponseBody()); System.err.println("Response headers: " + e.getResponseHeaders()); e.printStackTrace(); } } } ``` ### Parameters Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- **org** | **String**| name of the organization | **id** | **Long**| id of the label to get | ### Return type [**Label**](Label.md) ### Authorization [AccessToken](../README.md#AccessToken), [AuthorizationHeaderToken](../README.md#AuthorizationHeaderToken), [BasicAuth](../README.md#BasicAuth), [SudoHeader](../README.md#SudoHeader), [SudoParam](../README.md#SudoParam), [TOTPHeader](../README.md#TOTPHeader), [Token](../README.md#Token) ### HTTP request headers - **Content-Type**: Not defined - **Accept**: application/json ### HTTP response details | Status code | Description | Response headers | |-------------|-------------|------------------| **200** | Label | - | # **orgGetTeam** > Team orgGetTeam(id) Get a team ### Example ```java // Import classes: import io.gitea.ApiClient; import io.gitea.ApiException; import io.gitea.Configuration; import io.gitea.auth.*; import io.gitea.models.*; import io.gitea.api.OrganizationApi; public class Example { public static void main(String[] args) { ApiClient defaultClient = Configuration.getDefaultApiClient(); defaultClient.setBasePath("http://localhost/api/v1"); // Configure API key authorization: AccessToken ApiKeyAuth AccessToken = (ApiKeyAuth) defaultClient.getAuthentication("AccessToken"); AccessToken.setApiKey("YOUR API KEY"); // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) //AccessToken.setApiKeyPrefix("Token"); // Configure API key authorization: AuthorizationHeaderToken ApiKeyAuth AuthorizationHeaderToken = (ApiKeyAuth) defaultClient.getAuthentication("AuthorizationHeaderToken"); AuthorizationHeaderToken.setApiKey("YOUR API KEY"); // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) //AuthorizationHeaderToken.setApiKeyPrefix("Token"); // Configure HTTP basic authorization: BasicAuth HttpBasicAuth BasicAuth = (HttpBasicAuth) defaultClient.getAuthentication("BasicAuth"); BasicAuth.setUsername("YOUR USERNAME"); BasicAuth.setPassword("YOUR PASSWORD"); // Configure API key authorization: SudoHeader ApiKeyAuth SudoHeader = (ApiKeyAuth) defaultClient.getAuthentication("SudoHeader"); SudoHeader.setApiKey("YOUR API KEY"); // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) //SudoHeader.setApiKeyPrefix("Token"); // Configure API key authorization: SudoParam ApiKeyAuth SudoParam = (ApiKeyAuth) defaultClient.getAuthentication("SudoParam"); SudoParam.setApiKey("YOUR API KEY"); // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) //SudoParam.setApiKeyPrefix("Token"); // Configure API key authorization: TOTPHeader ApiKeyAuth TOTPHeader = (ApiKeyAuth) defaultClient.getAuthentication("TOTPHeader"); TOTPHeader.setApiKey("YOUR API KEY"); // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) //TOTPHeader.setApiKeyPrefix("Token"); // Configure API key authorization: Token ApiKeyAuth Token = (ApiKeyAuth) defaultClient.getAuthentication("Token"); Token.setApiKey("YOUR API KEY"); // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) //Token.setApiKeyPrefix("Token"); OrganizationApi apiInstance = new OrganizationApi(defaultClient); Long id = 56L; // Long | id of the team to get try { Team result = apiInstance.orgGetTeam(id); System.out.println(result); } catch (ApiException e) { System.err.println("Exception when calling OrganizationApi#orgGetTeam"); System.err.println("Status code: " + e.getCode()); System.err.println("Reason: " + e.getResponseBody()); System.err.println("Response headers: " + e.getResponseHeaders()); e.printStackTrace(); } } } ``` ### Parameters Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- **id** | **Long**| id of the team to get | ### Return type [**Team**](Team.md) ### Authorization [AccessToken](../README.md#AccessToken), [AuthorizationHeaderToken](../README.md#AuthorizationHeaderToken), [BasicAuth](../README.md#BasicAuth), [SudoHeader](../README.md#SudoHeader), [SudoParam](../README.md#SudoParam), [TOTPHeader](../README.md#TOTPHeader), [Token](../README.md#Token) ### HTTP request headers - **Content-Type**: Not defined - **Accept**: application/json ### HTTP response details | Status code | Description | Response headers | |-------------|-------------|------------------| **200** | Team | - | # **orgIsMember** > orgIsMember(org, username) Check if a user is a member of an organization ### Example ```java // Import classes: import io.gitea.ApiClient; import io.gitea.ApiException; import io.gitea.Configuration; import io.gitea.auth.*; import io.gitea.models.*; import io.gitea.api.OrganizationApi; public class Example { public static void main(String[] args) { ApiClient defaultClient = Configuration.getDefaultApiClient(); defaultClient.setBasePath("http://localhost/api/v1"); // Configure API key authorization: AccessToken ApiKeyAuth AccessToken = (ApiKeyAuth) defaultClient.getAuthentication("AccessToken"); AccessToken.setApiKey("YOUR API KEY"); // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) //AccessToken.setApiKeyPrefix("Token"); // Configure API key authorization: AuthorizationHeaderToken ApiKeyAuth AuthorizationHeaderToken = (ApiKeyAuth) defaultClient.getAuthentication("AuthorizationHeaderToken"); AuthorizationHeaderToken.setApiKey("YOUR API KEY"); // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) //AuthorizationHeaderToken.setApiKeyPrefix("Token"); // Configure HTTP basic authorization: BasicAuth HttpBasicAuth BasicAuth = (HttpBasicAuth) defaultClient.getAuthentication("BasicAuth"); BasicAuth.setUsername("YOUR USERNAME"); BasicAuth.setPassword("YOUR PASSWORD"); // Configure API key authorization: SudoHeader ApiKeyAuth SudoHeader = (ApiKeyAuth) defaultClient.getAuthentication("SudoHeader"); SudoHeader.setApiKey("YOUR API KEY"); // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) //SudoHeader.setApiKeyPrefix("Token"); // Configure API key authorization: SudoParam ApiKeyAuth SudoParam = (ApiKeyAuth) defaultClient.getAuthentication("SudoParam"); SudoParam.setApiKey("YOUR API KEY"); // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) //SudoParam.setApiKeyPrefix("Token"); // Configure API key authorization: TOTPHeader ApiKeyAuth TOTPHeader = (ApiKeyAuth) defaultClient.getAuthentication("TOTPHeader"); TOTPHeader.setApiKey("YOUR API KEY"); // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) //TOTPHeader.setApiKeyPrefix("Token"); // Configure API key authorization: Token ApiKeyAuth Token = (ApiKeyAuth) defaultClient.getAuthentication("Token"); Token.setApiKey("YOUR API KEY"); // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) //Token.setApiKeyPrefix("Token"); OrganizationApi apiInstance = new OrganizationApi(defaultClient); String org = "org_example"; // String | name of the organization String username = "username_example"; // String | username of the user try { apiInstance.orgIsMember(org, username); } catch (ApiException e) { System.err.println("Exception when calling OrganizationApi#orgIsMember"); System.err.println("Status code: " + e.getCode()); System.err.println("Reason: " + e.getResponseBody()); System.err.println("Response headers: " + e.getResponseHeaders()); e.printStackTrace(); } } } ``` ### Parameters Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- **org** | **String**| name of the organization | **username** | **String**| username of the user | ### Return type null (empty response body) ### 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 ### HTTP response details | Status code | Description | Response headers | |-------------|-------------|------------------| **204** | user is a member | - | **302** | redirection to /orgs/{org}/public_members/{username} | - | **404** | user is not a member | - | # **orgIsPublicMember** > orgIsPublicMember(org, username) Check if a user is a public member of an organization ### Example ```java // Import classes: import io.gitea.ApiClient; import io.gitea.ApiException; import io.gitea.Configuration; import io.gitea.auth.*; import io.gitea.models.*; import io.gitea.api.OrganizationApi; public class Example { public static void main(String[] args) { ApiClient defaultClient = Configuration.getDefaultApiClient(); defaultClient.setBasePath("http://localhost/api/v1"); // Configure API key authorization: AccessToken ApiKeyAuth AccessToken = (ApiKeyAuth) defaultClient.getAuthentication("AccessToken"); AccessToken.setApiKey("YOUR API KEY"); // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) //AccessToken.setApiKeyPrefix("Token"); // Configure API key authorization: AuthorizationHeaderToken ApiKeyAuth AuthorizationHeaderToken = (ApiKeyAuth) defaultClient.getAuthentication("AuthorizationHeaderToken"); AuthorizationHeaderToken.setApiKey("YOUR API KEY"); // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) //AuthorizationHeaderToken.setApiKeyPrefix("Token"); // Configure HTTP basic authorization: BasicAuth HttpBasicAuth BasicAuth = (HttpBasicAuth) defaultClient.getAuthentication("BasicAuth"); BasicAuth.setUsername("YOUR USERNAME"); BasicAuth.setPassword("YOUR PASSWORD"); // Configure API key authorization: SudoHeader ApiKeyAuth SudoHeader = (ApiKeyAuth) defaultClient.getAuthentication("SudoHeader"); SudoHeader.setApiKey("YOUR API KEY"); // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) //SudoHeader.setApiKeyPrefix("Token"); // Configure API key authorization: SudoParam ApiKeyAuth SudoParam = (ApiKeyAuth) defaultClient.getAuthentication("SudoParam"); SudoParam.setApiKey("YOUR API KEY"); // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) //SudoParam.setApiKeyPrefix("Token"); // Configure API key authorization: TOTPHeader ApiKeyAuth TOTPHeader = (ApiKeyAuth) defaultClient.getAuthentication("TOTPHeader"); TOTPHeader.setApiKey("YOUR API KEY"); // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) //TOTPHeader.setApiKeyPrefix("Token"); // Configure API key authorization: Token ApiKeyAuth Token = (ApiKeyAuth) defaultClient.getAuthentication("Token"); Token.setApiKey("YOUR API KEY"); // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) //Token.setApiKeyPrefix("Token"); OrganizationApi apiInstance = new OrganizationApi(defaultClient); String org = "org_example"; // String | name of the organization String username = "username_example"; // String | username of the user try { apiInstance.orgIsPublicMember(org, username); } catch (ApiException e) { System.err.println("Exception when calling OrganizationApi#orgIsPublicMember"); System.err.println("Status code: " + e.getCode()); System.err.println("Reason: " + e.getResponseBody()); System.err.println("Response headers: " + e.getResponseHeaders()); e.printStackTrace(); } } } ``` ### Parameters Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- **org** | **String**| name of the organization | **username** | **String**| username of the user | ### Return type null (empty response body) ### 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 ### HTTP response details | Status code | Description | Response headers | |-------------|-------------|------------------| **204** | user is a public member | - | **404** | user is not a public member | - | # **orgListCurrentUserOrgs** > List<Organization> orgListCurrentUserOrgs(page, limit) List the current user's organizations ### Example ```java // Import classes: import io.gitea.ApiClient; import io.gitea.ApiException; import io.gitea.Configuration; import io.gitea.auth.*; import io.gitea.models.*; import io.gitea.api.OrganizationApi; public class Example { public static void main(String[] args) { ApiClient defaultClient = Configuration.getDefaultApiClient(); defaultClient.setBasePath("http://localhost/api/v1"); // Configure API key authorization: AccessToken ApiKeyAuth AccessToken = (ApiKeyAuth) defaultClient.getAuthentication("AccessToken"); AccessToken.setApiKey("YOUR API KEY"); // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) //AccessToken.setApiKeyPrefix("Token"); // Configure API key authorization: AuthorizationHeaderToken ApiKeyAuth AuthorizationHeaderToken = (ApiKeyAuth) defaultClient.getAuthentication("AuthorizationHeaderToken"); AuthorizationHeaderToken.setApiKey("YOUR API KEY"); // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) //AuthorizationHeaderToken.setApiKeyPrefix("Token"); // Configure HTTP basic authorization: BasicAuth HttpBasicAuth BasicAuth = (HttpBasicAuth) defaultClient.getAuthentication("BasicAuth"); BasicAuth.setUsername("YOUR USERNAME"); BasicAuth.setPassword("YOUR PASSWORD"); // Configure API key authorization: SudoHeader ApiKeyAuth SudoHeader = (ApiKeyAuth) defaultClient.getAuthentication("SudoHeader"); SudoHeader.setApiKey("YOUR API KEY"); // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) //SudoHeader.setApiKeyPrefix("Token"); // Configure API key authorization: SudoParam ApiKeyAuth SudoParam = (ApiKeyAuth) defaultClient.getAuthentication("SudoParam"); SudoParam.setApiKey("YOUR API KEY"); // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) //SudoParam.setApiKeyPrefix("Token"); // Configure API key authorization: TOTPHeader ApiKeyAuth TOTPHeader = (ApiKeyAuth) defaultClient.getAuthentication("TOTPHeader"); TOTPHeader.setApiKey("YOUR API KEY"); // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) //TOTPHeader.setApiKeyPrefix("Token"); // Configure API key authorization: Token ApiKeyAuth Token = (ApiKeyAuth) defaultClient.getAuthentication("Token"); Token.setApiKey("YOUR API KEY"); // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) //Token.setApiKeyPrefix("Token"); OrganizationApi apiInstance = new OrganizationApi(defaultClient); Integer page = 56; // Integer | page number of results to return (1-based) Integer limit = 56; // Integer | page size of results try { List result = apiInstance.orgListCurrentUserOrgs(page, limit); System.out.println(result); } catch (ApiException e) { System.err.println("Exception when calling OrganizationApi#orgListCurrentUserOrgs"); System.err.println("Status code: " + e.getCode()); System.err.println("Reason: " + e.getResponseBody()); System.err.println("Response headers: " + e.getResponseHeaders()); 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 ### HTTP response details | Status code | Description | Response headers | |-------------|-------------|------------------| **200** | OrganizationList | - | # **orgListHooks** > List<Hook> orgListHooks(org, page, limit) List an organization's webhooks ### Example ```java // Import classes: import io.gitea.ApiClient; import io.gitea.ApiException; import io.gitea.Configuration; import io.gitea.auth.*; import io.gitea.models.*; import io.gitea.api.OrganizationApi; public class Example { public static void main(String[] args) { ApiClient defaultClient = Configuration.getDefaultApiClient(); defaultClient.setBasePath("http://localhost/api/v1"); // Configure API key authorization: AccessToken ApiKeyAuth AccessToken = (ApiKeyAuth) defaultClient.getAuthentication("AccessToken"); AccessToken.setApiKey("YOUR API KEY"); // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) //AccessToken.setApiKeyPrefix("Token"); // Configure API key authorization: AuthorizationHeaderToken ApiKeyAuth AuthorizationHeaderToken = (ApiKeyAuth) defaultClient.getAuthentication("AuthorizationHeaderToken"); AuthorizationHeaderToken.setApiKey("YOUR API KEY"); // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) //AuthorizationHeaderToken.setApiKeyPrefix("Token"); // Configure HTTP basic authorization: BasicAuth HttpBasicAuth BasicAuth = (HttpBasicAuth) defaultClient.getAuthentication("BasicAuth"); BasicAuth.setUsername("YOUR USERNAME"); BasicAuth.setPassword("YOUR PASSWORD"); // Configure API key authorization: SudoHeader ApiKeyAuth SudoHeader = (ApiKeyAuth) defaultClient.getAuthentication("SudoHeader"); SudoHeader.setApiKey("YOUR API KEY"); // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) //SudoHeader.setApiKeyPrefix("Token"); // Configure API key authorization: SudoParam ApiKeyAuth SudoParam = (ApiKeyAuth) defaultClient.getAuthentication("SudoParam"); SudoParam.setApiKey("YOUR API KEY"); // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) //SudoParam.setApiKeyPrefix("Token"); // Configure API key authorization: TOTPHeader ApiKeyAuth TOTPHeader = (ApiKeyAuth) defaultClient.getAuthentication("TOTPHeader"); TOTPHeader.setApiKey("YOUR API KEY"); // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) //TOTPHeader.setApiKeyPrefix("Token"); // Configure API key authorization: Token ApiKeyAuth Token = (ApiKeyAuth) defaultClient.getAuthentication("Token"); Token.setApiKey("YOUR API KEY"); // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) //Token.setApiKeyPrefix("Token"); OrganizationApi apiInstance = new OrganizationApi(defaultClient); String org = "org_example"; // String | name of the organization Integer page = 56; // Integer | page number of results to return (1-based) Integer limit = 56; // Integer | page size of results try { List result = apiInstance.orgListHooks(org, page, limit); System.out.println(result); } catch (ApiException e) { System.err.println("Exception when calling OrganizationApi#orgListHooks"); System.err.println("Status code: " + e.getCode()); System.err.println("Reason: " + e.getResponseBody()); System.err.println("Response headers: " + e.getResponseHeaders()); e.printStackTrace(); } } } ``` ### Parameters Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- **org** | **String**| name of the organization | **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 ### HTTP response details | Status code | Description | Response headers | |-------------|-------------|------------------| **200** | HookList | - | # **orgListLabels** > List<Label> orgListLabels(org, page, limit) List an organization's labels ### Example ```java // Import classes: import io.gitea.ApiClient; import io.gitea.ApiException; import io.gitea.Configuration; import io.gitea.auth.*; import io.gitea.models.*; import io.gitea.api.OrganizationApi; public class Example { public static void main(String[] args) { ApiClient defaultClient = Configuration.getDefaultApiClient(); defaultClient.setBasePath("http://localhost/api/v1"); // Configure API key authorization: AccessToken ApiKeyAuth AccessToken = (ApiKeyAuth) defaultClient.getAuthentication("AccessToken"); AccessToken.setApiKey("YOUR API KEY"); // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) //AccessToken.setApiKeyPrefix("Token"); // Configure API key authorization: AuthorizationHeaderToken ApiKeyAuth AuthorizationHeaderToken = (ApiKeyAuth) defaultClient.getAuthentication("AuthorizationHeaderToken"); AuthorizationHeaderToken.setApiKey("YOUR API KEY"); // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) //AuthorizationHeaderToken.setApiKeyPrefix("Token"); // Configure HTTP basic authorization: BasicAuth HttpBasicAuth BasicAuth = (HttpBasicAuth) defaultClient.getAuthentication("BasicAuth"); BasicAuth.setUsername("YOUR USERNAME"); BasicAuth.setPassword("YOUR PASSWORD"); // Configure API key authorization: SudoHeader ApiKeyAuth SudoHeader = (ApiKeyAuth) defaultClient.getAuthentication("SudoHeader"); SudoHeader.setApiKey("YOUR API KEY"); // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) //SudoHeader.setApiKeyPrefix("Token"); // Configure API key authorization: SudoParam ApiKeyAuth SudoParam = (ApiKeyAuth) defaultClient.getAuthentication("SudoParam"); SudoParam.setApiKey("YOUR API KEY"); // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) //SudoParam.setApiKeyPrefix("Token"); // Configure API key authorization: TOTPHeader ApiKeyAuth TOTPHeader = (ApiKeyAuth) defaultClient.getAuthentication("TOTPHeader"); TOTPHeader.setApiKey("YOUR API KEY"); // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) //TOTPHeader.setApiKeyPrefix("Token"); // Configure API key authorization: Token ApiKeyAuth Token = (ApiKeyAuth) defaultClient.getAuthentication("Token"); Token.setApiKey("YOUR API KEY"); // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) //Token.setApiKeyPrefix("Token"); OrganizationApi apiInstance = new OrganizationApi(defaultClient); String org = "org_example"; // String | name of the organization Integer page = 56; // Integer | page number of results to return (1-based) Integer limit = 56; // Integer | page size of results try { List