Skip to content

Repository files navigation

java-gitea-api

Gitea API.

  • API version: 1.18.0

This documentation describes the Gitea API.

Automatically generated by the Swagger Codegen

Requirements

Building the API client library requires:

  1. Java 1.7+
  2. Maven/Gradle

Installation

To install the API client library to your local Maven repository, simply execute:

mvn clean install

To deploy it to a remote Maven repository instead, configure the settings of the repository and execute:

mvn clean deploy

Refer to the OSSRH Guide for more information.

Maven users

Add this dependency to your project's POM:

<dependency>
<groupId>com.github.zeripath</groupId>
<artifactId>java-gitea-api</artifactId>
<version>1.18.0</version>
<scope>compile</scope>
</dependency>

Gradle users

Add this dependency to your project's build file:

compile "com.github.zeripath:java-gitea-api:1.18.0"

Others

At first generate the JAR by executing:

mvn clean package

Then manually install the following JARs:

  • target/java-gitea-api-1.18.0.jar
  • target/lib/*.jar

Getting Started

Please follow the installation instruction and execute the following Java code:

importio.gitea.*;
importio.gitea.auth.*;
importio.gitea.model.*;
importio.gitea.api.AdminApi;
importjava.io.File;
importjava.util.*;
publicclassAdminApiExample {
publicstaticvoidmain(String[] args) {
ApiClientdefaultClient = Configuration.getDefaultApiClient();
defaultClient.setBasePath("https://your-gitea-url/");
// Configure API key authorization: AccessTokenApiKeyAuthAccessToken = (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: AuthorizationHeaderTokenApiKeyAuthAuthorizationHeaderToken = (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: BasicAuthHttpBasicAuthBasicAuth = (HttpBasicAuth) defaultClient.getAuthentication("BasicAuth");
BasicAuth.setUsername("YOUR USERNAME");
BasicAuth.setPassword("YOUR PASSWORD");
// Configure API key authorization: SudoHeaderApiKeyAuthSudoHeader = (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: SudoParamApiKeyAuthSudoParam = (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: TOTPHeaderApiKeyAuthTOTPHeader = (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: TokenApiKeyAuthToken = (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");AdminApiapiInstance = newAdminApi();
Stringowner = "owner_example"; // String | owner of the repoStringrepo = "repo_example"; // String | name of the repotry {
apiInstance.adminAdoptRepository(owner, repo);
} catch (ApiExceptione) {
System.err.println("Exception when calling AdminApi#adminAdoptRepository");
e.printStackTrace();
}
}
}

Documentation for API Endpoints

All URIs are relative to http://localhost/api/v1

ClassMethodHTTP requestDescription
AdminApiadminAdoptRepositoryPOST /admin/unadopted/{owner}/{repo}Adopt unadopted files as a repository
AdminApiadminCreateOrgPOST /admin/users/{username}/orgsCreate an organization
AdminApiadminCreatePublicKeyPOST /admin/users/{username}/keysAdd a public key on behalf of a user
AdminApiadminCreateRepoPOST /admin/users/{username}/reposCreate a repository on behalf of a user
AdminApiadminCreateUserPOST /admin/usersCreate a user
AdminApiadminCronListGET /admin/cronList cron tasks
AdminApiadminCronRunPOST /admin/cron/{task}Run cron task
AdminApiadminDeleteUnadoptedRepositoryDELETE /admin/unadopted/{owner}/{repo}Delete unadopted files
AdminApiadminDeleteUserDELETE /admin/users/{username}Delete a user
AdminApiadminDeleteUserPublicKeyDELETE /admin/users/{username}/keys/{id}Delete a user's public key
AdminApiadminEditUserPATCH /admin/users/{username}Edit an existing user
AdminApiadminGetAllOrgsGET /admin/orgsList all organizations
AdminApiadminGetAllUsersGET /admin/usersList all users
AdminApiadminUnadoptedListGET /admin/unadoptedList unadopted repositories
IssueApiissueAddLabelPOST /repos/{owner}/{repo}/issues/{index}/labelsAdd a label to an issue
IssueApiissueAddSubscriptionPUT /repos/{owner}/{repo}/issues/{index}/subscriptions/{user}Subscribe user to issue
IssueApiissueAddTimePOST /repos/{owner}/{repo}/issues/{index}/timesAdd tracked time to a issue
IssueApiissueCheckSubscriptionGET /repos/{owner}/{repo}/issues/{index}/subscriptions/checkCheck if user is subscribed to an issue
IssueApiissueClearLabelsDELETE /repos/{owner}/{repo}/issues/{index}/labelsRemove all labels from an issue
IssueApiissueCreateCommentPOST /repos/{owner}/{repo}/issues/{index}/commentsAdd a comment to an issue
IssueApiissueCreateIssuePOST /repos/{owner}/{repo}/issuesCreate an issue. If using deadline only the date will be taken into account, and time of day ignored.
IssueApiissueCreateLabelPOST /repos/{owner}/{repo}/labelsCreate a label
IssueApiissueCreateMilestonePOST /repos/{owner}/{repo}/milestonesCreate a milestone
IssueApiissueDeleteCommentDELETE /repos/{owner}/{repo}/issues/comments/{id}Delete a comment
IssueApiissueDeleteCommentDeprecatedDELETE /repos/{owner}/{repo}/issues/{index}/comments/{id}Delete a comment
IssueApiissueDeleteCommentReactionDELETE /repos/{owner}/{repo}/issues/comments/{id}/reactionsRemove a reaction from a comment of an issue
IssueApiissueDeleteIssueReactionDELETE /repos/{owner}/{repo}/issues/{index}/reactionsRemove a reaction from an issue
IssueApiissueDeleteLabelDELETE /repos/{owner}/{repo}/labels/{id}Delete a label
IssueApiissueDeleteMilestoneDELETE /repos/{owner}/{repo}/milestones/{id}Delete a milestone
IssueApiissueDeleteStopWatchDELETE /repos/{owner}/{repo}/issues/{index}/stopwatch/deleteDelete an issue's existing stopwatch.
IssueApiissueDeleteSubscriptionDELETE /repos/{owner}/{repo}/issues/{index}/subscriptions/{user}Unsubscribe user from issue
IssueApiissueDeleteTimeDELETE /repos/{owner}/{repo}/issues/{index}/times/{id}Delete specific tracked time
IssueApiissueEditCommentPATCH /repos/{owner}/{repo}/issues/comments/{id}Edit a comment
IssueApiissueEditCommentDeprecatedPATCH /repos/{owner}/{repo}/issues/{index}/comments/{id}Edit a comment
IssueApiissueEditIssuePATCH /repos/{owner}/{repo}/issues/{index}Edit an issue. If using deadline only the date will be taken into account, and time of day ignored.
IssueApiissueEditIssueDeadlinePOST /repos/{owner}/{repo}/issues/{index}/deadlineSet an issue deadline. If set to null, the deadline is deleted. If using deadline only the date will be taken into account, and time of day ignored.
IssueApiissueEditLabelPATCH /repos/{owner}/{repo}/labels/{id}Update a label
IssueApiissueEditMilestonePATCH /repos/{owner}/{repo}/milestones/{id}Update a milestone
IssueApiissueGetCommentGET /repos/{owner}/{repo}/issues/comments/{id}Get a comment
IssueApiissueGetCommentReactionsGET /repos/{owner}/{repo}/issues/comments/{id}/reactionsGet a list of reactions from a comment of an issue
IssueApiissueGetCommentsGET /repos/{owner}/{repo}/issues/{index}/commentsList all comments on an issue
IssueApiissueGetIssueGET /repos/{owner}/{repo}/issues/{index}Get an issue
IssueApiissueGetIssueReactionsGET /repos/{owner}/{repo}/issues/{index}/reactionsGet a list reactions of an issue
IssueApiissueGetLabelGET /repos/{owner}/{repo}/labels/{id}Get a single label
IssueApiissueGetLabelsGET /repos/{owner}/{repo}/issues/{index}/labelsGet an issue's labels
IssueApiissueGetMilestoneGET /repos/{owner}/{repo}/milestones/{id}Get a milestone
IssueApiissueGetMilestonesListGET /repos/{owner}/{repo}/milestonesGet all of a repository's opened milestones
IssueApiissueGetRepoCommentsGET /repos/{owner}/{repo}/issues/commentsList all comments in a repository
IssueApiissueListIssuesGET /repos/{owner}/{repo}/issuesList a repository's issues
IssueApiissueListLabelsGET /repos/{owner}/{repo}/labelsGet all of a repository's labels
IssueApiissuePostCommentReactionPOST /repos/{owner}/{repo}/issues/comments/{id}/reactionsAdd a reaction to a comment of an issue
IssueApiissuePostIssueReactionPOST /repos/{owner}/{repo}/issues/{index}/reactionsAdd a reaction to an issue
IssueApiissueRemoveLabelDELETE /repos/{owner}/{repo}/issues/{index}/labels/{id}Remove a label from an issue
IssueApiissueReplaceLabelsPUT /repos/{owner}/{repo}/issues/{index}/labelsReplace an issue's labels
IssueApiissueResetTimeDELETE /repos/{owner}/{repo}/issues/{index}/timesReset a tracked time of an issue
IssueApiissueSearchIssuesGET /repos/issues/searchSearch for issues across the repositories that the user has access to
IssueApiissueStartStopWatchPOST /repos/{owner}/{repo}/issues/{index}/stopwatch/startStart stopwatch on an issue.
IssueApiissueStopStopWatchPOST /repos/{owner}/{repo}/issues/{index}/stopwatch/stopStop an issue's existing stopwatch.
IssueApiissueSubscriptionsGET /repos/{owner}/{repo}/issues/{index}/subscriptionsGet users who subscribed on an issue.
IssueApiissueTrackedTimesGET /repos/{owner}/{repo}/issues/{index}/timesList an issue's tracked times
MiscellaneousApigetSigningKeyGET /signing-key.gpgGet default signing-key.gpg
MiscellaneousApigetVersionGET /versionReturns the version of the Gitea application
MiscellaneousApirenderMarkdownPOST /markdownRender a markdown document as HTML
MiscellaneousApirenderMarkdownRawPOST /markdown/rawRender raw markdown as HTML
NotificationApinotifyGetListGET /notificationsList users's notification threads
NotificationApinotifyGetRepoListGET /repos/{owner}/{repo}/notificationsList users's notification threads on a specific repo
NotificationApinotifyGetThreadGET /notifications/threads/{id}Get notification thread by ID
NotificationApinotifyNewAvailableGET /notifications/newCheck if unread notifications exist
NotificationApinotifyReadListPUT /notificationsMark notification threads as read, pinned or unread
NotificationApinotifyReadRepoListPUT /repos/{owner}/{repo}/notificationsMark notification threads as read, pinned or unread on a specific repo
NotificationApinotifyReadThreadPATCH /notifications/threads/{id}Mark notification thread as read by ID
OrganizationApicreateOrgRepoPOST /orgs/{org}/reposCreate a repository in an organization
OrganizationApicreateOrgRepoDeprecatedPOST /org/{org}/reposCreate a repository in an organization
OrganizationApiorgAddTeamMemberPUT /teams/{id}/members/{username}Add a team member
OrganizationApiorgAddTeamRepositoryPUT /teams/{id}/repos/{org}/{repo}Add a repository to a team
OrganizationApiorgConcealMemberDELETE /orgs/{org}/public_members/{username}Conceal a user's membership
OrganizationApiorgCreatePOST /orgsCreate an organization
OrganizationApiorgCreateHookPOST /orgs/{org}/hooks/Create a hook
OrganizationApiorgCreateLabelPOST /orgs/{org}/labelsCreate a label for an organization
OrganizationApiorgCreateTeamPOST /orgs/{org}/teamsCreate a team
OrganizationApiorgDeleteDELETE /orgs/{org}Delete an organization
OrganizationApiorgDeleteHookDELETE /orgs/{org}/hooks/{id}Delete a hook
OrganizationApiorgDeleteLabelDELETE /orgs/{org}/labels/{id}Delete a label
OrganizationApiorgDeleteMemberDELETE /orgs/{org}/members/{username}Remove a member from an organization
OrganizationApiorgDeleteTeamDELETE /teams/{id}Delete a team
OrganizationApiorgEditPATCH /orgs/{org}Edit an organization
OrganizationApiorgEditHookPATCH /orgs/{org}/hooks/{id}Update a hook
OrganizationApiorgEditLabelPATCH /orgs/{org}/labels/{id}Update a label
OrganizationApiorgEditTeamPATCH /teams/{id}Edit a team
OrganizationApiorgGetGET /orgs/{org}Get an organization
OrganizationApiorgGetAllGET /orgsGet list of organizations
OrganizationApiorgGetHookGET /orgs/{org}/hooks/{id}Get a hook
OrganizationApiorgGetLabelGET /orgs/{org}/labels/{id}Get a single label
OrganizationApiorgGetTeamGET /teams/{id}Get a team
OrganizationApiorgIsMemberGET /orgs/{org}/members/{username}Check if a user is a member of an organization
OrganizationApiorgIsPublicMemberGET /orgs/{org}/public_members/{username}Check if a user is a public member of an organization
OrganizationApiorgListCurrentUserOrgsGET /user/orgsList the current user's organizations
OrganizationApiorgListHooksGET /orgs/{org}/hooksList an organization's webhooks
OrganizationApiorgListLabelsGET /orgs/{org}/labelsList an organization's labels
OrganizationApiorgListMembersGET /orgs/{org}/membersList an organization's members
OrganizationApiorgListPublicMembersGET /orgs/{org}/public_membersList an organization's public members
OrganizationApiorgListReposGET /orgs/{org}/reposList an organization's repos
OrganizationApiorgListTeamMemberGET /teams/{id}/members/{username}List a particular member of team
OrganizationApiorgListTeamMembersGET /teams/{id}/membersList a team's members
OrganizationApiorgListTeamReposGET /teams/{id}/reposList a team's repos
OrganizationApiorgListTeamsGET /orgs/{org}/teamsList an organization's teams
OrganizationApiorgListUserOrgsGET /users/{username}/orgsList a user's organizations
OrganizationApiorgPublicizeMemberPUT /orgs/{org}/public_members/{username}Publicize a user's membership
OrganizationApiorgRemoveTeamMemberDELETE /teams/{id}/members/{username}Remove a team member
OrganizationApiorgRemoveTeamRepositoryDELETE /teams/{id}/repos/{org}/{repo}Remove a repository from a team
OrganizationApiteamSearchGET /orgs/{org}/teams/searchSearch for teams within an organization
RepositoryApicreateCurrentUserRepoPOST /user/reposCreate a repository
RepositoryApicreateForkPOST /repos/{owner}/{repo}/forksFork a repository
RepositoryApigenerateRepoPOST /repos/{template_owner}/{template_repo}/generateCreate a repository using a template
RepositoryApigetAnnotatedTagGET /repos/{owner}/{repo}/git/tags/{sha}Gets the tag object of an annotated tag (not lightweight tags)
RepositoryApigetBlobGET /repos/{owner}/{repo}/git/blobs/{sha}Gets the blob of a repository.
RepositoryApigetTreeGET /repos/{owner}/{repo}/git/trees/{sha}Gets the tree of a repository.
RepositoryApilistForksGET /repos/{owner}/{repo}/forksList a repository's forks
RepositoryApirepoAddCollaboratorPUT /repos/{owner}/{repo}/collaborators/{collaborator}Add a collaborator to a repository
RepositoryApirepoAddTeamPUT /repos/{owner}/{repo}/teams/{team}Add a team to a repository
RepositoryApirepoAddTopicPUT /repos/{owner}/{repo}/topics/{topic}Add a topic to a repository
RepositoryApirepoCheckCollaboratorGET /repos/{owner}/{repo}/collaborators/{collaborator}Check if a user is a collaborator of a repository
RepositoryApirepoCheckTeamGET /repos/{owner}/{repo}/teams/{team}Check if a team is assigned to a repository
RepositoryApirepoCreateBranchPOST /repos/{owner}/{repo}/branchesCreate a branch
RepositoryApirepoCreateBranchProtectionPOST /repos/{owner}/{repo}/branch_protectionsCreate a branch protections for a repository
RepositoryApirepoCreateFilePOST /repos/{owner}/{repo}/contents/{filepath}Create a file in a repository
RepositoryApirepoCreateHookPOST /repos/{owner}/{repo}/hooksCreate a hook
RepositoryApirepoCreateKeyPOST /repos/{owner}/{repo}/keysAdd a key to a repository
RepositoryApirepoCreatePullRequestPOST /repos/{owner}/{repo}/pullsCreate a pull request
RepositoryApirepoCreatePullReviewPOST /repos/{owner}/{repo}/pulls/{index}/reviewsCreate a review to an pull request
RepositoryApirepoCreatePullReviewRequestsPOST /repos/{owner}/{repo}/pulls/{index}/requested_reviewerscreate review requests for a pull request
RepositoryApirepoCreateReleasePOST /repos/{owner}/{repo}/releasesCreate a release
RepositoryApirepoCreateReleaseAttachmentPOST /repos/{owner}/{repo}/releases/{id}/assetsCreate a release attachment
RepositoryApirepoCreateStatusPOST /repos/{owner}/{repo}/statuses/{sha}Create a commit status
RepositoryApirepoCreateTagPOST /repos/{owner}/{repo}/tagsCreate a new git tag in a repository
RepositoryApirepoDeleteDELETE /repos/{owner}/{repo}Delete a repository
RepositoryApirepoDeleteBranchDELETE /repos/{owner}/{repo}/branches/{branch}Delete a specific branch from a repository
RepositoryApirepoDeleteBranchProtectionDELETE /repos/{owner}/{repo}/branch_protections/{name}Delete a specific branch protection for the repository
RepositoryApirepoDeleteCollaboratorDELETE /repos/{owner}/{repo}/collaborators/{collaborator}Delete a collaborator from a repository
RepositoryApirepoDeleteFileDELETE /repos/{owner}/{repo}/contents/{filepath}Delete a file in a repository
RepositoryApirepoDeleteGitHookDELETE /repos/{owner}/{repo}/hooks/git/{id}Delete a Git hook in a repository
RepositoryApirepoDeleteHookDELETE /repos/{owner}/{repo}/hooks/{id}Delete a hook in a repository
RepositoryApirepoDeleteKeyDELETE /repos/{owner}/{repo}/keys/{id}Delete a key from a repository
RepositoryApirepoDeletePullReviewDELETE /repos/{owner}/{repo}/pulls/{index}/reviews/{id}Delete a specific review from a pull request
RepositoryApirepoDeletePullReviewRequestsDELETE /repos/{owner}/{repo}/pulls/{index}/requested_reviewerscancel review requests for a pull request
RepositoryApirepoDeleteReleaseDELETE /repos/{owner}/{repo}/releases/{id}Delete a release
RepositoryApirepoDeleteReleaseAttachmentDELETE /repos/{owner}/{repo}/releases/{id}/assets/{attachment_id}Delete a release attachment
RepositoryApirepoDeleteReleaseByTagDELETE /repos/{owner}/{repo}/releases/tags/{tag}Delete a release by tag name
RepositoryApirepoDeleteTagDELETE /repos/{owner}/{repo}/tags/{tag}Delete a repository's tag by name
RepositoryApirepoDeleteTeamDELETE /repos/{owner}/{repo}/teams/{team}Delete a team from a repository
RepositoryApirepoDeleteTopicDELETE /repos/{owner}/{repo}/topics/{topic}Delete a topic from a repository
RepositoryApirepoDismissPullReviewPOST /repos/{owner}/{repo}/pulls/{index}/reviews/{id}/dismissalsDismiss a review for a pull request
RepositoryApirepoDownloadPullDiffGET /repos/{owner}/{repo}/pulls/{index}.diffGet a pull request diff
RepositoryApirepoDownloadPullPatchGET /repos/{owner}/{repo}/pulls/{index}.patchGet a pull request patch file
RepositoryApirepoEditPATCH /repos/{owner}/{repo}Edit a repository's properties. Only fields that are set will be changed.
RepositoryApirepoEditBranchProtectionPATCH /repos/{owner}/{repo}/branch_protections/{name}Edit a branch protections for a repository. Only fields that are set will be changed
RepositoryApirepoEditGitHookPATCH /repos/{owner}/{repo}/hooks/git/{id}Edit a Git hook in a repository
RepositoryApirepoEditHookPATCH /repos/{owner}/{repo}/hooks/{id}Edit a hook in a repository
RepositoryApirepoEditPullRequestPATCH /repos/{owner}/{repo}/pulls/{index}Update a pull request. If using deadline only the date will be taken into account, and time of day ignored.
RepositoryApirepoEditReleasePATCH /repos/{owner}/{repo}/releases/{id}Update a release
RepositoryApirepoEditReleaseAttachmentPATCH /repos/{owner}/{repo}/releases/{id}/assets/{attachment_id}Edit a release attachment
RepositoryApirepoGetGET /repos/{owner}/{repo}Get a repository
RepositoryApirepoGetAllCommitsGET /repos/{owner}/{repo}/commitsGet a list of all commits from a repository
RepositoryApirepoGetArchiveGET /repos/{owner}/{repo}/archive/{archive}Get an archive of a repository
RepositoryApirepoGetAssigneesGET /repos/{owner}/{repo}/assigneesReturn all users that have write access and can be assigned to issues
RepositoryApirepoGetBranchGET /repos/{owner}/{repo}/branches/{branch}Retrieve a specific branch from a repository, including its effective branch protection
RepositoryApirepoGetBranchProtectionGET /repos/{owner}/{repo}/branch_protections/{name}Get a specific branch protection for the repository
RepositoryApirepoGetByIDGET /repositories/{id}Get a repository by id
RepositoryApirepoGetCombinedStatusByRefGET /repos/{owner}/{repo}/commits/{ref}/statusGet a commit's combined status, by branch/tag/commit reference
RepositoryApirepoGetContentsGET /repos/{owner}/{repo}/contents/{filepath}Gets the metadata and contents (if a file) of an entry in a repository, or a list of entries if a dir
RepositoryApirepoGetContentsListGET /repos/{owner}/{repo}/contentsGets the metadata of all the entries of the root dir
RepositoryApirepoGetEditorConfigGET /repos/{owner}/{repo}/editorconfig/{filepath}Get the EditorConfig definitions of a file in a repository
RepositoryApirepoGetGitHookGET /repos/{owner}/{repo}/hooks/git/{id}Get a Git hook
RepositoryApirepoGetHookGET /repos/{owner}/{repo}/hooks/{id}Get a hook
RepositoryApirepoGetIssueTemplatesGET /repos/{owner}/{repo}/issue_templatesGet available issue templates for a repository
RepositoryApirepoGetKeyGET /repos/{owner}/{repo}/keys/{id}Get a repository's key by id
RepositoryApirepoGetLanguagesGET /repos/{owner}/{repo}/languagesGet languages and number of bytes of code written
RepositoryApirepoGetNoteGET /repos/{owner}/{repo}/git/notes/{sha}Get a note corresponding to a single commit from a repository
RepositoryApirepoGetPullRequestGET /repos/{owner}/{repo}/pulls/{index}Get a pull request
RepositoryApirepoGetPullRequestCommitsGET /repos/{owner}/{repo}/pulls/{index}/commitsGet commits for a pull request
RepositoryApirepoGetPullReviewGET /repos/{owner}/{repo}/pulls/{index}/reviews/{id}Get a specific review for a pull request
RepositoryApirepoGetPullReviewCommentsGET /repos/{owner}/{repo}/pulls/{index}/reviews/{id}/commentsGet a specific review for a pull request
RepositoryApirepoGetRawFileGET /repos/{owner}/{repo}/raw/{filepath}Get a file from a repository
RepositoryApirepoGetReleaseGET /repos/{owner}/{repo}/releases/{id}Get a release
RepositoryApirepoGetReleaseAttachmentGET /repos/{owner}/{repo}/releases/{id}/assets/{attachment_id}Get a release attachment
RepositoryApirepoGetReleaseByTagGET /repos/{owner}/{repo}/releases/tags/{tag}Get a release by tag name
RepositoryApirepoGetReviewersGET /repos/{owner}/{repo}/reviewersReturn all users that can be requested to review in this repo
RepositoryApirepoGetSingleCommitGET /repos/{owner}/{repo}/git/commits/{sha}Get a single commit from a repository
RepositoryApirepoGetTagGET /repos/{owner}/{repo}/tags/{tag}Get the tag of a repository by tag name
RepositoryApirepoListAllGitRefsGET /repos/{owner}/{repo}/git/refsGet specified ref or filtered repository's refs
RepositoryApirepoListBranchProtectionGET /repos/{owner}/{repo}/branch_protectionsList branch protections for a repository
RepositoryApirepoListBranchesGET /repos/{owner}/{repo}/branchesList a repository's branches
RepositoryApirepoListCollaboratorsGET /repos/{owner}/{repo}/collaboratorsList a repository's collaborators
RepositoryApirepoListGitHooksGET /repos/{owner}/{repo}/hooks/gitList the Git hooks in a repository
RepositoryApirepoListGitRefsGET /repos/{owner}/{repo}/git/refs/{ref}Get specified ref or filtered repository's refs
RepositoryApirepoListHooksGET /repos/{owner}/{repo}/hooksList the hooks in a repository
RepositoryApirepoListKeysGET /repos/{owner}/{repo}/keysList a repository's keys
RepositoryApirepoListPullRequestsGET /repos/{owner}/{repo}/pullsList a repo's pull requests
RepositoryApirepoListPullReviewsGET /repos/{owner}/{repo}/pulls/{index}/reviewsList all reviews for a pull request
RepositoryApirepoListReleaseAttachmentsGET /repos/{owner}/{repo}/releases/{id}/assetsList release's attachments
RepositoryApirepoListReleasesGET /repos/{owner}/{repo}/releasesList a repo's releases
RepositoryApirepoListStargazersGET /repos/{owner}/{repo}/stargazersList a repo's stargazers
RepositoryApirepoListStatusesGET /repos/{owner}/{repo}/statuses/{sha}Get a commit's statuses
RepositoryApirepoListStatusesByRefGET /repos/{owner}/{repo}/commits/{ref}/statusesGet a commit's statuses, by branch/tag/commit reference
RepositoryApirepoListSubscribersGET /repos/{owner}/{repo}/subscribersList a repo's watchers
RepositoryApirepoListTagsGET /repos/{owner}/{repo}/tagsList a repository's tags
RepositoryApirepoListTeamsGET /repos/{owner}/{repo}/teamsList a repository's teams
RepositoryApirepoListTopicsGET /repos/{owner}/{repo}/topicsGet list of topics that a repository has
RepositoryApirepoMergePullRequestPOST /repos/{owner}/{repo}/pulls/{index}/mergeMerge a pull request
RepositoryApirepoMigratePOST /repos/migrateMigrate a remote git repository
RepositoryApirepoMirrorSyncPOST /repos/{owner}/{repo}/mirror-syncSync a mirrored repository
RepositoryApirepoPullRequestIsMergedGET /repos/{owner}/{repo}/pulls/{index}/mergeCheck if a pull request has been merged
RepositoryApirepoSearchGET /repos/searchSearch for repositories
RepositoryApirepoSigningKeyGET /repos/{owner}/{repo}/signing-key.gpgGet signing-key.gpg for given repository
RepositoryApirepoSubmitPullReviewPOST /repos/{owner}/{repo}/pulls/{index}/reviews/{id}Submit a pending review to an pull request
RepositoryApirepoTestHookPOST /repos/{owner}/{repo}/hooks/{id}/testsTest a push webhook
RepositoryApirepoTrackedTimesGET /repos/{owner}/{repo}/timesList a repo's tracked times
RepositoryApirepoTransferPOST /repos/{owner}/{repo}/transferTransfer a repo ownership
RepositoryApirepoUnDismissPullReviewPOST /repos/{owner}/{repo}/pulls/{index}/reviews/{id}/undismissalsCancel to dismiss a review for a pull request
RepositoryApirepoUpdateFilePUT /repos/{owner}/{repo}/contents/{filepath}Update a file in a repository
RepositoryApirepoUpdatePullRequestPOST /repos/{owner}/{repo}/pulls/{index}/updateMerge PR's baseBranch into headBranch
RepositoryApirepoUpdateTopicsPUT /repos/{owner}/{repo}/topicsReplace list of topics for a repository
RepositoryApitopicSearchGET /topics/searchsearch topics via keyword
RepositoryApiuserCurrentCheckSubscriptionGET /repos/{owner}/{repo}/subscriptionCheck if the current user is watching a repo
RepositoryApiuserCurrentDeleteSubscriptionDELETE /repos/{owner}/{repo}/subscriptionUnwatch a repo
RepositoryApiuserCurrentPutSubscriptionPUT /repos/{owner}/{repo}/subscriptionWatch a repo
RepositoryApiuserTrackedTimesGET /repos/{owner}/{repo}/times/{user}List a user's tracked times in a repo
SettingsApigetGeneralAPISettingsGET /settings/apiGet instance's global settings for api
SettingsApigetGeneralAttachmentSettingsGET /settings/attachmentGet instance's global settings for Attachment
SettingsApigetGeneralRepositorySettingsGET /settings/repositoryGet instance's global settings for repositories
SettingsApigetGeneralUISettingsGET /settings/uiGet instance's global settings for ui
UserApicreateCurrentUserRepoPOST /user/reposCreate a repository
UserApigetUserSettingsGET /user/settingsGet user settings
UserApigetVerificationTokenGET /user/gpg_key_tokenGet a Token to verify
UserApiupdateUserSettingsPATCH /user/settingsUpdate user settings
UserApiuserAddEmailPOST /user/emailsAdd email addresses
UserApiuserCheckFollowingGET /users/{follower}/following/{followee}Check if one user is following another user
UserApiuserCreateOAuth2ApplicationPOST /user/applications/oauth2creates a new OAuth2 application
UserApiuserCreateTokenPOST /users/{username}/tokensCreate an access token
UserApiuserCurrentCheckFollowingGET /user/following/{username}Check whether a user is followed by the authenticated user
UserApiuserCurrentCheckStarringGET /user/starred/{owner}/{repo}Whether the authenticated is starring the repo
UserApiuserCurrentDeleteFollowDELETE /user/following/{username}Unfollow a user
UserApiuserCurrentDeleteGPGKeyDELETE /user/gpg_keys/{id}Remove a GPG key
UserApiuserCurrentDeleteKeyDELETE /user/keys/{id}Delete a public key
UserApiuserCurrentDeleteStarDELETE /user/starred/{owner}/{repo}Unstar the given repo
UserApiuserCurrentGetGPGKeyGET /user/gpg_keys/{id}Get a GPG key
UserApiuserCurrentGetKeyGET /user/keys/{id}Get a public key
UserApiuserCurrentListFollowersGET /user/followersList the authenticated user's followers
UserApiuserCurrentListFollowingGET /user/followingList the users that the authenticated user is following
UserApiuserCurrentListGPGKeysGET /user/gpg_keysList the authenticated user's GPG keys
UserApiuserCurrentListKeysGET /user/keysList the authenticated user's public keys
UserApiuserCurrentListReposGET /user/reposList the repos that the authenticated user owns
UserApiuserCurrentListStarredGET /user/starredThe repos that the authenticated user has starred
UserApiuserCurrentListSubscriptionsGET /user/subscriptionsList repositories watched by the authenticated user
UserApiuserCurrentPostGPGKeyPOST /user/gpg_keysCreate a GPG key
UserApiuserCurrentPostKeyPOST /user/keysCreate a public key
UserApiuserCurrentPutFollowPUT /user/following/{username}Follow a user
UserApiuserCurrentPutStarPUT /user/starred/{owner}/{repo}Star the given repo
UserApiuserCurrentTrackedTimesGET /user/timesList the current user's tracked times
UserApiuserDeleteAccessTokenDELETE /users/{username}/tokens/{token}delete an access token
UserApiuserDeleteEmailDELETE /user/emailsDelete email addresses
UserApiuserDeleteOAuth2ApplicationDELETE /user/applications/oauth2/{id}delete an OAuth2 Application
UserApiuserGetGET /users/{username}Get a user
UserApiuserGetCurrentGET /userGet the authenticated user
UserApiuserGetHeatmapDataGET /users/{username}/heatmapGet a user's heatmap
UserApiuserGetOAuth2ApplicationGET /user/applications/oauth2/{id}get an OAuth2 Application
UserApiuserGetOauth2ApplicationGET /user/applications/oauth2List the authenticated user's oauth2 applications
UserApiuserGetStopWatchesGET /user/stopwatchesGet list of all existing stopwatches
UserApiuserGetTokensGET /users/{username}/tokensList the authenticated user's access tokens
UserApiuserListEmailsGET /user/emailsList the authenticated user's email addresses
UserApiuserListFollowersGET /users/{username}/followersList the given user's followers
UserApiuserListFollowingGET /users/{username}/followingList the users that the given user is following
UserApiuserListGPGKeysGET /users/{username}/gpg_keysList the given user's GPG keys
UserApiuserListKeysGET /users/{username}/keysList the given user's public keys
UserApiuserListReposGET /users/{username}/reposList the repos owned by the given user
UserApiuserListStarredGET /users/{username}/starredThe repos that the given user has starred
UserApiuserListSubscriptionsGET /users/{username}/subscriptionsList the repositories watched by a user
UserApiuserListTeamsGET /user/teamsList all the teams a user belongs to
UserApiuserSearchGET /users/searchSearch for users
UserApiuserUpdateOAuth2ApplicationPATCH /user/applications/oauth2/{id}update an OAuth2 Application, this includes regenerating the client secret
UserApiuserVerifyGPGKeyPOST /user/gpg_key_verifyVerify a GPG key

Documentation for Models

Documentation for Authorization

Authentication schemes defined for the API:

AccessToken

  • Type: API key
  • API key parameter name: access_token
  • Location: URL query string

AuthorizationHeaderToken

  • Type: API key
  • API key parameter name: Authorization
  • Location: HTTP header

BasicAuth

  • Type: HTTP basic authentication

SudoHeader

  • Type: API key
  • API key parameter name: Sudo
  • Location: HTTP header

SudoParam

  • Type: API key
  • API key parameter name: sudo
  • Location: URL query string

TOTPHeader

  • Type: API key
  • API key parameter name: X-GITEA-OTP
  • Location: HTTP header

Token

  • Type: API key
  • API key parameter name: token
  • Location: URL query string

Recommendation

It's recommended to create an instance of ApiClient per thread in a multithreaded environment to avoid any potential issues.

Author

About

Swagger generated api for Gitea

Resources

Stars

39 stars

Watchers

4 watching

Forks

Releases

Packages

Used by

Contributors

Languages