How AI is applied across API Evangelist and APIs.io. Read my AI disclosure →
API Evangelist API Evangelist
Discovery
Learnings
Guidance
Toolbox
Alignment
API Evangelist LLC

Forgejo repository API

The repository API from Forgejo — 126 operation(s) for repository.

Forgejo repository API is one of 10 APIs that Forgejo publishes on the APIs.io network, described by a machine-readable OpenAPI specification.

Tagged areas include Repository. The published artifact set on APIs.io includes an OpenAPI specification and API documentation.

This API exposes 198 operations across 126 paths, and defines 151 schemas. It is described by OpenAPI 2.0, at version 16.0.0-dev-465-4b83448b7d+gitea-1.22.0.

Requests are made against the base URL https://code.forgejo.org/api/v1.

198 operations 126 paths 151 schemas 31 DELETE105 GET10 PATCH42 POST10 PUT

Metadata

The identity and technical contract details declared by the specification.

Specification
OpenAPI 2.0
API Version
16.0.0-dev-465-4b83448b7d+gitea-1.22.0
Base URL
https://code.forgejo.org/api/v1
Authentication
API Key, basic, API Key, API Key, API Key
Resource Areas
1

Authentication & Security 5

Forgejo repository API declares 5 security schemes for authenticating requests. An API key is passed in the header as Authorization (AuthorizationHeaderToken). It defines a basic scheme (BasicAuth). An API key is passed in the header as Sudo (SudoHeader). An API key is passed in the query as sudo (SudoParam). An API key is passed in the header as X-FORGEJO-OTP (TOTPHeader). By default, every request must be authenticated.

  • AuthorizationHeaderToken — API tokens must be prepended with "token" followed by a space.
  • SudoHeader — Sudo API request as the user provided as the key. Admin privileges are required.
  • SudoParam — Sudo API request as the user provided as the key. Admin privileges are required.
  • TOTPHeader — Must be used in combination with BasicAuth if two-factor authentication is enabled.

Paths & Operations 198

Across 126 paths, the API surfaces 198 operations — 31 DELETE, 105 GET, 10 PATCH, 42 POST, 10 PUT. Each is listed below with its method, path, parameters, and response codes.

repository 198
POST
/repos/migrate
Migrate a remote git repository
repoMigrate 1 param → 201403409413422
GET
/repos/search
Search for repositories
repoSearch 17 params → 200422
GET
/repos/{owner}/{repo}
Get a repository
repoGet 2 params → 200404
DELETE
/repos/{owner}/{repo}
Delete a repository
repoDelete 2 params → 204403404
PATCH
/repos/{owner}/{repo}
Edit a repository's properties. Only fields that are set will be changed.
repoEdit 3 params → 200403404422
GET
/repos/{owner}/{repo}/actions/artifacts
List a repository's artifacts
ListActionArtifacts 5 params → 200400403
GET
/repos/{owner}/{repo}/actions/artifacts/{artifact_id}
Get an artifact by ID
GetActionArtifact 3 params → 200400403404
DELETE
/repos/{owner}/{repo}/actions/artifacts/{artifact_id}
Mark an artifact for deletion
DeleteActionArtifact 3 params → 204400403404
GET
/repos/{owner}/{repo}/actions/artifacts/{artifact_id}/zip
Download an artifact
DownloadActionArtifact 3 params → 200400403404
GET
/repos/{owner}/{repo}/actions/jobs/{job_id}/logs
Download the plaintext logs of an action job
repoGetActionJobLogs 4 params → 200206401403404
GET
/repos/{owner}/{repo}/actions/runners
Get runners belonging to the repository
getRepoRunners 5 params → 200400404
POST
/repos/{owner}/{repo}/actions/runners
Register a new repository-level runner
registerRepoRunner 3 params → 201400401404
GET
/repos/{owner}/{repo}/actions/runners/jobs
Search for repository's action jobs according filter conditions
repoSearchRunJobs 3 params → 200403
GET
/repos/{owner}/{repo}/actions/runners/registration-tokendeprecated
Get a repository's runner registration token
repoGetRunnerRegistrationToken 2 params → 200
GET
/repos/{owner}/{repo}/actions/runners/{runner_id}
Get a particular runner that belongs to the repository
getRepoRunner 3 params → 200400404
DELETE
/repos/{owner}/{repo}/actions/runners/{runner_id}
Delete a particular runner that belongs to a repository
deleteRepoRunner 3 params → 204400404
GET
/repos/{owner}/{repo}/actions/runs
List a repository's action runs
ListActionRuns 10 params → 200400403
GET
/repos/{owner}/{repo}/actions/runs/{run_id}
Get an action run
ActionRun 3 params → 200400403404
DELETE
/repos/{owner}/{repo}/actions/runs/{run_id}
Delete a completed workflow run.
DeleteActionRun 3 params → 204400403404
GET
/repos/{owner}/{repo}/actions/runs/{run_id}/artifacts
List artifacts of a workflow run
ListActionRunArtifacts 6 params → 200400403404
POST
/repos/{owner}/{repo}/actions/runs/{run_id}/cancel
Cancel a pending or running workflow run.
CancelActionRun 3 params → 204403404
GET
/repos/{owner}/{repo}/actions/runs/{run_id}/jobs
List jobs of a workflow run
ListActionRunJobs 3 params → 200400403404
GET
/repos/{owner}/{repo}/actions/runs/{run_id}/logs
Download a ZIP of plaintext logs for every job in an action run
repoGetActionRunLogs 3 params → 200401403404
GET
/repos/{owner}/{repo}/actions/secrets
List an repo's actions secrets
repoListActionsSecrets 4 params → 200404
PUT
/repos/{owner}/{repo}/actions/secrets/{secretname}
Create or Update a secret value in a repository
updateRepoSecret 4 params → 201204400404
DELETE
/repos/{owner}/{repo}/actions/secrets/{secretname}
Delete a secret in a repository
deleteRepoSecret 3 params → 204400404
GET
/repos/{owner}/{repo}/actions/tasks
List a repository's action tasks
ListActionTasks 5 params → 200400403404409422
GET
/repos/{owner}/{repo}/actions/variables
Get repo-level variables list
getRepoVariablesList 4 params → 200400404
GET
/repos/{owner}/{repo}/actions/variables/{variablename}
Get a repo-level variable
getRepoVariable 3 params → 200400404
PUT
/repos/{owner}/{repo}/actions/variables/{variablename}
Update a repo-level variable
updateRepoVariable 4 params → 201204400404
POST
/repos/{owner}/{repo}/actions/variables/{variablename}
Create a repo-level variable
createRepoVariable 4 params → 201204400404
DELETE
/repos/{owner}/{repo}/actions/variables/{variablename}
Delete a repo-level variable
deleteRepoVariable 3 params → 204400404
POST
/repos/{owner}/{repo}/actions/workflows/{workflowfilename}/dispatches
Dispatches a workflow
DispatchWorkflow 4 params → 201204404
GET
/repos/{owner}/{repo}/activities/feeds
List a repository's activity feeds
repoListActivityFeeds 5 params → 200404
GET
/repos/{owner}/{repo}/archive/{archive}
Get an archive of a repository
repoGetArchive 3 params → 200404
GET
/repos/{owner}/{repo}/assignees
Return all users that have write access and can be assigned to issues
repoGetAssignees 2 params → 200404
POST
/repos/{owner}/{repo}/avatar
Update a repository's avatar
repoUpdateAvatar 3 params → 204404
DELETE
/repos/{owner}/{repo}/avatar
Delete a repository's avatar
repoDeleteAvatar 2 params → 204404
GET
/repos/{owner}/{repo}/branch_protections
List branch protections for a repository
repoListBranchProtection 2 params → 200
POST
/repos/{owner}/{repo}/branch_protections
Create a branch protections for a repository
repoCreateBranchProtection 3 params → 201403404422423
GET
/repos/{owner}/{repo}/branch_protections/{name}
Get a specific branch protection for the repository
repoGetBranchProtection 3 params → 200404
DELETE
/repos/{owner}/{repo}/branch_protections/{name}
Delete a specific branch protection for the repository
repoDeleteBranchProtection 3 params → 204404
PATCH
/repos/{owner}/{repo}/branch_protections/{name}
Edit a branch protections for a repository. Only fields that are set will be changed
repoEditBranchProtection 4 params → 200404422423
GET
/repos/{owner}/{repo}/branches
List a repository's branches
repoListBranches 4 params → 200
POST
/repos/{owner}/{repo}/branches
Create a branch
repoCreateBranch 3 params → 201403404409413423
GET
/repos/{owner}/{repo}/branches/{branch}
Retrieve a specific branch from a repository, including its effective branch protection
repoGetBranch 3 params → 200404
DELETE
/repos/{owner}/{repo}/branches/{branch}
Delete a specific branch from a repository
repoDeleteBranch 3 params → 204403404423
PATCH
/repos/{owner}/{repo}/branches/{branch}
Update a branch
repoUpdateBranch 4 params → 204403404422
GET
/repos/{owner}/{repo}/collaborators
List a repository's collaborators
repoListCollaborators 4 params → 200404
GET
/repos/{owner}/{repo}/collaborators/{collaborator}
Check if a user is a collaborator of a repository
repoCheckCollaborator 3 params → 204404422
PUT
/repos/{owner}/{repo}/collaborators/{collaborator}
Add a collaborator to a repository
repoAddCollaborator 4 params → 204403404422
DELETE
/repos/{owner}/{repo}/collaborators/{collaborator}
Delete a collaborator from a repository
repoDeleteCollaborator 3 params → 204404422
GET
/repos/{owner}/{repo}/collaborators/{collaborator}/permission
Get repository permissions for a user
repoGetRepoPermissions 3 params → 200403404
GET
/repos/{owner}/{repo}/commits
Get a list of all commits from a repository
repoGetAllCommits 10 params → 200404409
GET
/repos/{owner}/{repo}/commits/{ref}/status
Get a commit's combined status, by branch/tag/commit reference
repoGetCombinedStatusByRef 5 params → 200400404
GET
/repos/{owner}/{repo}/commits/{ref}/statuses
Get a commit's statuses, by branch/tag/commit reference
repoListStatusesByRef 7 params → 200400404
GET
/repos/{owner}/{repo}/commits/{sha}/pull
Get the pull request of the commit
repoGetCommitPullRequest 3 params → 200404
GET
/repos/{owner}/{repo}/compare/{basehead}
Get commit comparison information
repoCompareDiff 3 params → 200404
GET
/repos/{owner}/{repo}/contents
Gets the metadata of all the entries of the root dir
repoGetContentsList 3 params → 200404
POST
/repos/{owner}/{repo}/contents
Modify multiple files in a repository
repoChangeFiles 3 params → 201403404409413422423
GET
/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
repoGetContents 4 params → 200404
PUT
/repos/{owner}/{repo}/contents/{filepath}
Update a file in a repository
repoUpdateFile 4 params → 200403404409413422423
POST
/repos/{owner}/{repo}/contents/{filepath}
Create a file in a repository
repoCreateFile 4 params → 201403404409413422423
DELETE
/repos/{owner}/{repo}/contents/{filepath}
Delete a file in a repository
repoDeleteFile 4 params → 200400403404413423
POST
/repos/{owner}/{repo}/convert
Convert a mirror repo to a normal repo.
repoConvert 2 params → 200403404422
POST
/repos/{owner}/{repo}/diffpatch
Apply diff patch to repository
repoApplyDiffPatch 3 params → 200404413423
GET
/repos/{owner}/{repo}/editorconfig/{filepath}
Get the EditorConfig definitions of a file in a repository
repoGetEditorConfig 4 params → 200404
GET
/repos/{owner}/{repo}/flags
List a repository's flags
repoListFlags 2 params → 200403404
PUT
/repos/{owner}/{repo}/flags
Replace all flags of a repository
repoReplaceAllFlags 3 params → 204403404
DELETE
/repos/{owner}/{repo}/flags
Remove all flags from a repository
repoDeleteAllFlags 2 params → 204403404
GET
/repos/{owner}/{repo}/flags/{flag}
Check if a repository has a given flag
repoCheckFlag 3 params → 204403404
PUT
/repos/{owner}/{repo}/flags/{flag}
Add a flag to a repository
repoAddFlag 3 params → 204403404
DELETE
/repos/{owner}/{repo}/flags/{flag}
Remove a flag from a repository
repoDeleteFlag 3 params → 204403404
GET
/repos/{owner}/{repo}/forks
List a repository's forks
listForks 4 params → 200404
POST
/repos/{owner}/{repo}/forks
Fork a repository
createFork 3 params → 202403404409413422
GET
/repos/{owner}/{repo}/git/blobs
Gets multiple blobs of a repository.
GetBlobs 3 params → 200400
GET
/repos/{owner}/{repo}/git/blobs/{sha}
Gets the blob of a repository.
GetBlob 3 params → 200400404
GET
/repos/{owner}/{repo}/git/commits/{sha}
Get a single commit from a repository
repoGetSingleCommit 6 params → 200404422
GET
/repos/{owner}/{repo}/git/commits/{sha}.{diffType}
Get a commit's diff or patch
repoDownloadCommitDiffOrPatch 4 params → 200404
GET
/repos/{owner}/{repo}/git/notes/{sha}
Get a note corresponding to a single commit from a repository
repoGetNote 5 params → 200404422
POST
/repos/{owner}/{repo}/git/notes/{sha}
Set a note corresponding to a single commit from a repository
repoSetNote 4 params → 200404422
DELETE
/repos/{owner}/{repo}/git/notes/{sha}
Removes a note corresponding to a single commit from a repository
repoRemoveNote 3 params → 204404422
GET
/repos/{owner}/{repo}/git/refs
Get specified ref or filtered repository's refs
repoListAllGitRefs 2 params → 200404
GET
/repos/{owner}/{repo}/git/refs/{ref}
Get specified ref or filtered repository's refs
repoListGitRefs 3 params → 200404
GET
/repos/{owner}/{repo}/git/tags/{sha}
Gets the tag object of an annotated tag (not lightweight tags)
GetAnnotatedTag 3 params → 200400404
GET
/repos/{owner}/{repo}/git/trees/{sha}
Gets the tree of a repository.
GetTree 6 params → 200400404
GET
/repos/{owner}/{repo}/hooks
List the hooks in a repository
repoListHooks 4 params → 200404
POST
/repos/{owner}/{repo}/hooks
Create a hook
repoCreateHook 3 params → 201404
GET
/repos/{owner}/{repo}/hooks/git
List the Git hooks in a repository
repoListGitHooks 2 params → 200404
GET
/repos/{owner}/{repo}/hooks/git/{id}
Get a Git hook
repoGetGitHook 3 params → 200404
DELETE
/repos/{owner}/{repo}/hooks/git/{id}
Delete a Git hook in a repository
repoDeleteGitHook 3 params → 204404
PATCH
/repos/{owner}/{repo}/hooks/git/{id}
Edit a Git hook in a repository
repoEditGitHook 4 params → 200404
GET
/repos/{owner}/{repo}/hooks/{id}
Get a hook
repoGetHook 3 params → 200404
DELETE
/repos/{owner}/{repo}/hooks/{id}
Delete a hook in a repository
repoDeleteHook 3 params → 204404
PATCH
/repos/{owner}/{repo}/hooks/{id}
Edit a hook in a repository
repoEditHook 4 params → 200404
POST
/repos/{owner}/{repo}/hooks/{id}/tests
Test a push webhook
repoTestHook 4 params → 204404
GET
/repos/{owner}/{repo}/issue_config
Returns the issue config for a repo
repoGetIssueConfig 2 params → 200404
GET
/repos/{owner}/{repo}/issue_config/validate
Returns the validation information for a issue config
repoValidateIssueConfig 2 params → 200404
GET
/repos/{owner}/{repo}/issue_templates
Get available issue templates for a repository
repoGetIssueTemplates 2 params → 200404
GET
/repos/{owner}/{repo}/issues/pinned
List a repo's pinned issues
repoListPinnedIssues 2 params → 200404
GET
/repos/{owner}/{repo}/keys
List a repository's keys
repoListKeys 6 params → 200404
POST
/repos/{owner}/{repo}/keys
Add a key to a repository
repoCreateKey 3 params → 201404422
GET
/repos/{owner}/{repo}/keys/{id}
Get a repository's key by id
repoGetKey 3 params → 200404
DELETE
/repos/{owner}/{repo}/keys/{id}
Delete a key from a repository
repoDeleteKey 3 params → 204403404
GET
/repos/{owner}/{repo}/languages
Get languages and number of bytes of code written
repoGetLanguages 2 params → 200404
GET
/repos/{owner}/{repo}/media/{filepath}
Get a file or it's LFS object from a repository
repoGetRawFileOrLFS 4 params → 200404
POST
/repos/{owner}/{repo}/mirror-sync
Sync a mirrored repository
repoMirrorSync 2 params → 200403404413
GET
/repos/{owner}/{repo}/new_pin_allowed
Returns if new Issue Pins are allowed
repoNewPinAllowed 2 params → 200404
GET
/repos/{owner}/{repo}/pulls
List a repo's pull requests. If a pull request is selected but fails to be retrieved for any reason, it will be a null value in the list of results.
repoListPullRequests 11 params → 200400404500
POST
/repos/{owner}/{repo}/pulls
Create a pull request
repoCreatePullRequest 3 params → 201404409413422423
GET
/repos/{owner}/{repo}/pulls/pinned
List a repo's pinned pull requests
repoListPinnedPullRequests 2 params → 200404
GET
/repos/{owner}/{repo}/pulls/{base}/{head}
Get a pull request by base and head
repoGetPullRequestByBaseHead 4 params → 200404
GET
/repos/{owner}/{repo}/pulls/{index}
Get a pull request
repoGetPullRequest 3 params → 200404
PATCH
/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.
repoEditPullRequest 4 params → 201403404409412422
GET
/repos/{owner}/{repo}/pulls/{index}.{diffType}
Get a pull request diff or patch
repoDownloadPullDiffOrPatch 5 params → 200404
GET
/repos/{owner}/{repo}/pulls/{index}/commits
Get commits for a pull request
repoGetPullRequestCommits 7 params → 200404
GET
/repos/{owner}/{repo}/pulls/{index}/files
Get changed files for a pull request
repoGetPullRequestFiles 7 params → 200404
GET
/repos/{owner}/{repo}/pulls/{index}/merge
Check if a pull request has been merged
repoPullRequestIsMerged 3 params → 204404
POST
/repos/{owner}/{repo}/pulls/{index}/merge
Merge a pull request
repoMergePullRequest 4 params → 200404405409413423
DELETE
/repos/{owner}/{repo}/pulls/{index}/merge
Cancel the scheduled auto merge for the given pull request
repoCancelScheduledAutoMerge 3 params → 204403404423
POST
/repos/{owner}/{repo}/pulls/{index}/requested_reviewers
Create review requests for a pull request
repoCreatePullReviewRequests 4 params → 201403404422
DELETE
/repos/{owner}/{repo}/pulls/{index}/requested_reviewers
Cancel review requests for a pull request
repoDeletePullReviewRequests 4 params → 204403404422
GET
/repos/{owner}/{repo}/pulls/{index}/reviews
List all reviews for a pull request
repoListPullReviews 5 params → 200404
POST
/repos/{owner}/{repo}/pulls/{index}/reviews
Create a review to an pull request
repoCreatePullReview 4 params → 200404422
GET
/repos/{owner}/{repo}/pulls/{index}/reviews/{id}
Get a specific review for a pull request
repoGetPullReview 4 params → 200404
POST
/repos/{owner}/{repo}/pulls/{index}/reviews/{id}
Submit a pending review to an pull request
repoSubmitPullReview 5 params → 200404422
DELETE
/repos/{owner}/{repo}/pulls/{index}/reviews/{id}
Delete a specific review from a pull request
repoDeletePullReview 4 params → 204403404
GET
/repos/{owner}/{repo}/pulls/{index}/reviews/{id}/comments
Get a specific review for a pull request
repoGetPullReviewComments 4 params → 200404
POST
/repos/{owner}/{repo}/pulls/{index}/reviews/{id}/comments
Add a new comment to a pull request review
repoCreatePullReviewComment 5 params → 200404422
GET
/repos/{owner}/{repo}/pulls/{index}/reviews/{id}/comments/{comment}
Get a pull review comment
repoGetPullReviewComment 5 params → 200403404
DELETE
/repos/{owner}/{repo}/pulls/{index}/reviews/{id}/comments/{comment}
Delete a pull review comment
repoDeletePullReviewComment 5 params → 204403404
POST
/repos/{owner}/{repo}/pulls/{index}/reviews/{id}/dismissals
Dismiss a review for a pull request
repoDismissPullReview 5 params → 200403404422
POST
/repos/{owner}/{repo}/pulls/{index}/reviews/{id}/undismissals
Cancel to dismiss a review for a pull request
repoUnDismissPullReview 4 params → 200403404422
POST
/repos/{owner}/{repo}/pulls/{index}/update
Merge PR's baseBranch into headBranch
repoUpdatePullRequest 4 params → 200403404409413422
GET
/repos/{owner}/{repo}/push_mirrors
Get all push mirrors of the repository
repoListPushMirrors 4 params → 200400403404
POST
/repos/{owner}/{repo}/push_mirrors
Set up a new push mirror in a repository
repoAddPushMirror 3 params → 200400403404413
POST
/repos/{owner}/{repo}/push_mirrors-sync
Sync all push mirrored repository
repoPushMirrorSync 2 params → 200400403404413
GET
/repos/{owner}/{repo}/push_mirrors/{name}
Get push mirror of the repository by remoteName
repoGetPushMirrorByRemoteName 3 params → 200400403404
DELETE
/repos/{owner}/{repo}/push_mirrors/{name}
Remove a push mirror from a repository by remoteName
repoDeletePushMirror 3 params → 204400404
GET
/repos/{owner}/{repo}/raw/{filepath}
Get a file from a repository
repoGetRawFile 4 params → 200404
GET
/repos/{owner}/{repo}/releases
List a repo's releases
repoListReleases 7 params → 200404
POST
/repos/{owner}/{repo}/releases
Create a release
repoCreateRelease 3 params → 201404409422
GET
/repos/{owner}/{repo}/releases/latest
Gets the most recent non-prerelease, non-draft release of a repository, sorted by createdat
repoGetLatestRelease 2 params → 200404
GET
/repos/{owner}/{repo}/releases/tags/{tag}
Get a release by tag name
repoGetReleaseByTag 3 params → 200404
DELETE
/repos/{owner}/{repo}/releases/tags/{tag}
Delete a release by tag name
repoDeleteReleaseByTag 3 params → 204404422
GET
/repos/{owner}/{repo}/releases/{id}
Get a release
repoGetRelease 3 params → 200404
DELETE
/repos/{owner}/{repo}/releases/{id}
Delete a release
repoDeleteRelease 3 params → 204404422
PATCH
/repos/{owner}/{repo}/releases/{id}
Update a release
repoEditRelease 4 params → 200404
GET
/repos/{owner}/{repo}/releases/{id}/assets
List release's attachments
repoListReleaseAttachments 3 params → 200404
POST
/repos/{owner}/{repo}/releases/{id}/assets
Create a release attachment
repoCreateReleaseAttachment 6 params → 201400404413
GET
/repos/{owner}/{repo}/releases/{id}/assets/{attachment_id}
Get a release attachment
repoGetReleaseAttachment 4 params → 200404
DELETE
/repos/{owner}/{repo}/releases/{id}/assets/{attachment_id}
Delete a release attachment
repoDeleteReleaseAttachment 4 params → 204404
PATCH
/repos/{owner}/{repo}/releases/{id}/assets/{attachment_id}
Edit a release attachment
repoEditReleaseAttachment 5 params → 201404413
GET
/repos/{owner}/{repo}/reviewers
Return all users that can be requested to review in this repo
repoGetReviewers 2 params → 200404
GET
/repos/{owner}/{repo}/signing-key.gpg
Get signing-key.gpg for given repository
repoSigningKey 2 params → 200
GET
/repos/{owner}/{repo}/stargazers
List a repo's stargazers
repoListStargazers 4 params → 200404
GET
/repos/{owner}/{repo}/statuses/{sha}
Get a commit's statuses
repoListStatuses 7 params → 200400404
POST
/repos/{owner}/{repo}/statuses/{sha}
Create a commit status
repoCreateStatus 4 params → 201400404
GET
/repos/{owner}/{repo}/subscribers
List a repo's watchers
repoListSubscribers 4 params → 200404
GET
/repos/{owner}/{repo}/subscription
Check if the current user is watching a repo
userCurrentCheckSubscription 2 params → 200404
PUT
/repos/{owner}/{repo}/subscription
Watch a repo
userCurrentPutSubscription 2 params → 200404
DELETE
/repos/{owner}/{repo}/subscription
Unwatch a repo
userCurrentDeleteSubscription 2 params → 204404
GET
/repos/{owner}/{repo}/sync_fork
Gets information about syncing the fork default branch with the base branch
repoSyncForkDefaultInfo 2 params → 200400404
POST
/repos/{owner}/{repo}/sync_fork
Syncs the default branch of a fork with the base branch
repoSyncForkDefault 2 params → 204400404
GET
/repos/{owner}/{repo}/sync_fork/{branch}
Gets information about syncing a fork branch with the base branch
repoSyncForkBranchInfo 3 params → 200400404
POST
/repos/{owner}/{repo}/sync_fork/{branch}
Syncs a fork branch with the base branch
repoSyncForkBranch 3 params → 204400404
GET
/repos/{owner}/{repo}/tag_protections
List tag protections for a repository
repoListTagProtection 2 params → 200
POST
/repos/{owner}/{repo}/tag_protections
Create a tag protections for a repository
repoCreateTagProtection 3 params → 201403404422423
GET
/repos/{owner}/{repo}/tag_protections/{id}
Get a specific tag protection for the repository
repoGetTagProtection 3 params → 200404
DELETE
/repos/{owner}/{repo}/tag_protections/{id}
Delete a specific tag protection for the repository
repoDeleteTagProtection 3 params → 204404
PATCH
/repos/{owner}/{repo}/tag_protections/{id}
Edit a tag protections for a repository. Only fields that are set will be changed
repoEditTagProtection 4 params → 200404422423
GET
/repos/{owner}/{repo}/tags
List a repository's tags
repoListTags 4 params → 200404
POST
/repos/{owner}/{repo}/tags
Create a new git tag in a repository
repoCreateTag 3 params → 201404405409413422423
GET
/repos/{owner}/{repo}/tags/{tag}
Get the tag of a repository by tag name
repoGetTag 3 params → 200404
DELETE
/repos/{owner}/{repo}/tags/{tag}
Delete a repository's tag by name
repoDeleteTag 3 params → 204404405409422423
GET
/repos/{owner}/{repo}/teams
List a repository's teams
repoListTeams 2 params → 200404405
GET
/repos/{owner}/{repo}/teams/{team}
Check if a team is assigned to a repository
repoCheckTeam 3 params → 200404405
PUT
/repos/{owner}/{repo}/teams/{team}
Add a team to a repository
repoAddTeam 3 params → 204404405422
DELETE
/repos/{owner}/{repo}/teams/{team}
Delete a team from a repository
repoDeleteTeam 3 params → 204404405422
GET
/repos/{owner}/{repo}/times
List a repo's tracked times
repoTrackedTimes 7 params → 200400403404422
GET
/repos/{owner}/{repo}/times/{user}deprecated
List a user's tracked times in a repo
userTrackedTimes 3 params → 200400403404
GET
/repos/{owner}/{repo}/topics
Get list of topics that a repository has
repoListTopics 4 params → 200404
PUT
/repos/{owner}/{repo}/topics
Replace list of topics for a repository
repoUpdateTopics 3 params → 204404422
PUT
/repos/{owner}/{repo}/topics/{topic}
Add a topic to a repository
repoAddTopic 3 params → 204404422
DELETE
/repos/{owner}/{repo}/topics/{topic}
Delete a topic from a repository
repoDeleteTopic 3 params → 204404422
POST
/repos/{owner}/{repo}/transfer
Transfer a repo ownership
repoTransfer 3 params → 202403404413422
POST
/repos/{owner}/{repo}/transfer/accept
Accept a repo transfer
acceptRepoTransfer 2 params → 202403404413
POST
/repos/{owner}/{repo}/transfer/reject
Reject a repo transfer
rejectRepoTransfer 2 params → 200403404
POST
/repos/{owner}/{repo}/wiki/new
Create a wiki page
repoCreateWikiPage 3 params → 201400403404413423
GET
/repos/{owner}/{repo}/wiki/page/{pageName}
Get a wiki page
repoGetWikiPage 3 params → 200404
DELETE
/repos/{owner}/{repo}/wiki/page/{pageName}
Delete a wiki page
repoDeleteWikiPage 3 params → 204403404423
PATCH
/repos/{owner}/{repo}/wiki/page/{pageName}
Edit a wiki page
repoEditWikiPage 4 params → 200400403404413423
GET
/repos/{owner}/{repo}/wiki/pages
Get all wiki pages
repoGetWikiPages 4 params → 200404
GET
/repos/{owner}/{repo}/wiki/revisions/{pageName}
Get revisions of a wiki page
repoGetWikiPageRevisions 4 params → 200404
POST
/repos/{template_owner}/{template_repo}/generate
Create a repository using a template
generateRepo 3 params → 201403404409413422
GET
/repositories/{id}
Get a repository by id
repoGetByID 1 param → 200404
GET
/topics/search
Search for topics by keyword
topicSearch 3 params → 200403404
POST
/user/repos
Create a repository
createCurrentUserRepo 1 param → 201400401403409413422

Schemas 151

The contract defines 151 schemas that model the data the API accepts and returns. The most detailed are Repository (66 properties), PullRequest (38 properties), EditRepoOption (34 properties), BranchProtection (27 properties). Each schema is shown below with its type and property counts.

Team
object
Team represents a team in an organization
9 properties
ChangeFilesOptions
object
ChangeFilesOptions options for creating, updating or deleting multiple files Note: author and committer are optional (if only one is given, it will be used for…
9 properties 1 required
CommitMeta
object
3 properties
APIUnauthorizedError
object
2 properties
Commit
object
10 properties
APIValidationError
object
2 properties
TopicName
object
TopicName a list of repo topic names
1 property
CreateStatusOption
object
CreateStatusOption holds the information needed to create a new CommitStatus for a Commit
4 properties
Release
object
Release represents a repository release
18 properties
EditAttachmentOptions
object
EditAttachmentOptions options for editing attachments
2 properties
Issue
object
Issue represents an issue in a repository
25 properties
EditGitHookOption
object
EditGitHookOption options when modifying one Git hook
1 property
ExternalWiki
object
ExternalWiki represents setting for external wiki
1 property
PushMirror
object
PushMirror represents information of a push mirror
10 properties
UpdateRepoAvatarOption
object
UpdateRepoAvatarUserOption options when updating the repo avatar
1 property
FileCommitResponse
object
9 properties
TagArchiveDownloadCount
object
TagArchiveDownloadCount counts how many times a archive was downloaded
2 properties
InternalTracker
object
InternalTracker represents settings for internal tracker
3 properties
CommitStatus
object
CommitStatus holds a single status of a single Commit
9 properties
CreateOrUpdateSecretOption
object
1 property 1 required
SyncForkInfo
object
SyncForkInfo information about syncing a fork
4 properties
PullReview
object
PullReview represents a pull request review
14 properties
ActionTask
object
ActionTask represents a ActionTask
13 properties
CommitStatusState
string
CommitStatusState holds the state of a CommitStatus It can be "pending", "success", "error", "failure", "warning", or "skipped"
ActionArtifact
object
ActionArtifact represents an artifact of a workflow run
9 properties
WikiCommit
object
WikiCommit page commit/revision
4 properties
DispatchWorkflowRun
object
DispatchWorkflowRun represents a workflow run
3 properties
CreateHookOption
object
CreateHookOption options when create a hook
6 properties 2 required
ChangedFile
object
ChangedFile store information about files affected by the pull request
9 properties
IssueFormFieldType
string
CreateHookOptionConfig
object
CreateHookOptionConfig has all config options in it required are "contenttype" and "url" Required
WatchInfo
object
WatchInfo represents an API watch status of one repository
6 properties
PRBranchInfo
object
PRBranchInfo information about a branch
5 properties
FilesResponse
object
FilesResponse contains information about multiple files from a repo
3 properties
EditTagProtectionOption
object
EditTagProtectionOption options for editing a tag protection
3 properties
PullReviewRequestOptions
object
PullReviewRequestOptions are options to add or remove pull review requests
2 properties
CreateKeyOption
object
CreateKeyOption options when creating a key
3 properties 2 required
PullRequestMeta
object
PullRequestMeta PR info if an issue is a PR
4 properties
CreateTagProtectionOption
object
CreateTagProtectionOption options for creating a tag protection
3 properties
AddCollaboratorOption
object
AddCollaboratorOption options when adding a user as a collaborator of a repository
1 property
Repository
object
Repository represents a repository
66 properties
IssueTemplateLabels
array
CreatePullRequestOption
object
CreatePullRequestOption options when creating a pull request
9 properties
User
object
User represents a user
23 properties
CreateWikiPageOptions
object
CreateWikiPageOptions form for creating wiki
3 properties
ReviewStateType
string
ReviewStateType review state type
Activity
object
13 properties
DeleteFileOptions
object
DeleteFileOptions options for deleting files (used for other File structs below) Note: author and committer are optional (if only one is given, it will be used…
9 properties 1 required
WikiPageMetaData
object
WikiPageMetaData wiki page meta information
4 properties
APINotFound
object
3 properties
ActionRunner
object
ActionRunner represents a runner
10 properties
RepoTopicOptions
object
RepoTopicOptions a collection of repo topic names
1 property
GitTreeResponse
object
GitTreeResponse returns a git tree
6 properties
EditRepoOption
object
EditRepoOption options when editing a repository's properties
34 properties
FileLinksResponse
object
FileLinksResponse contains the links for a repo's file
3 properties
RepoCommit
object
6 properties
GitObject
object
3 properties
ActionRun
object
ActionRun represents an action run
23 properties
RegisterRunnerOptions
object
3 properties 1 required
CreateVariableOption
object
1 property 1 required
NoteOptions
object
1 property
CreateBranchRepoOption
object
CreateBranchRepoOption options when creating a branch in a repository
3 properties 1 required
ContentsResponse
object
ContentsResponse contains information about a repo's entry's (dir, file, symlink, submodule) metadata and content
16 properties
DeployKey
object
DeployKey a deploy key
9 properties
WikiCommitList
object
WikiCommitList commit/revision list
2 properties
GitBlob
object
GitBlob represents a git blob
5 properties
ListActionRunResponse
object
ListActionRunResponse return a list of ActionRun
2 properties
Hook
object
Hook a hook is a web hook when one repository changed
12 properties
GitEntry
object
GitEntry represents a git tree
6 properties
FileResponse
object
FileResponse contains information about a repo's file
3 properties
DispatchWorkflowOption
object
DispatchWorkflowOption options when dispatching a workflow
3 properties 1 required
TopicResponse
object
TopicResponse for returning topics
5 properties
CommitStats
object
CommitStats is statistics for a RepoCommit
3 properties
GenerateRepoOption
object
GenerateRepoOption options when creating repository using a template
12 properties 2 required
APIRepoArchivedError
object
2 properties
RegistrationToken
object
RegistrationToken is a string used to register a runner with a server
1 property
EditHookOption
object
EditHookOption options when modify one hook
5 properties
CreatePullReviewCommentOptions
Branch
object
Branch represents a repository branch
9 properties
ChangeFileOperation
object
ChangeFileOperation for creating, updating or deleting a file
5 properties 2 required
TagProtection
object
TagProtection represents a tag protection
6 properties
WikiPage
object
WikiPage a wiki page
8 properties
UpdateBranchRepoOption
object
UpdateBranchRepoOption options when updating a branch in a repository
1 property 1 required
Organization
object
Organization represents an organization
12 properties
APIInvalidTopicsError
object
2 properties
IssueConfigValidation
object
2 properties
DismissPullReviewOptions
object
DismissPullReviewOptions are options to dismiss a pull review
2 properties
UpdateFileOptions
object
UpdateFileOptions options for updating files Note: author and committer are optional (if only one is given, it will be used for the other, otherwise the authen…
11 properties 2 required
PullRequest
object
PullRequest represents a pull request
38 properties
NewIssuePinsAllowed
object
NewIssuePinsAllowed represents an API response that says if new Issue Pins are allowed
2 properties
Reference
object
3 properties
Duration
integer
A Duration represents the elapsed time between two instants as an int64 nanosecond count. The representation limits the largest representable duration to appro…
MergePullRequestOption
object
MergePullRequestForm form for merging Pull Request
8 properties 1 required
CreateForkOption
object
CreateForkOption options for creating a fork
2 properties
CreateBranchProtectionOption
object
CreateBranchProtectionOption options for creating a branch protection
25 properties
AnnotatedTagObject
object
AnnotatedTagObject contains meta information of the tag object
3 properties
RepositoryMeta
object
RepositoryMeta basic repository information
4 properties
Attachment
object
Attachment a generic attachment
8 properties
TransferRepoOption
object
TransferRepoOption options when transfer a repository's ownership
2 properties 1 required
RepoCollaboratorPermission
object
RepoCollaboratorPermission to get repository permission for a collaborator
3 properties
CombinedStatus
object
CombinedStatus holds the combined state of several statuses for a single commit
7 properties
PayloadUser
object
PayloadUser represents the author or committer of a commit
3 properties
CreateRepoOption
object
CreateRepoOption options when creating repository
12 properties 1 required
CreateFileOptions
object
CreateFileOptions options for creating files Note: author and committer are optional (if only one is given, it will be used for the other, otherwise the authen…
9 properties 1 required
SubmitPullReviewOptions
object
SubmitPullReviewOptions are options to submit a pending pull review
2 properties
EditPullRequestOption
object
EditPullRequestOption options when modify pull request
11 properties
Secret
object
Secret represents a secret
2 properties
ActionTaskResponse
object
ActionTaskResponse returns a ActionTask
2 properties
RepoTransfer
object
RepoTransfer represents a pending repo transfer
3 properties
StateType
string
StateType issue state type
Identity
object
Identity for a person's identity like an author or committer
2 properties
MigrateRepoOptions
object
MigrateRepoOptions options for migrating repository's this is used to interact with api v1
20 properties 2 required
FileDeleteResponse
object
FileDeleteResponse contains information about a repo's file that was deleted
3 properties
CommitUser
object
3 properties
IssueTemplate
object
IssueTemplate represents an issue template for a repository
8 properties
SearchResults
object
SearchResults results of a successful search
2 properties
BranchProtection
object
BranchProtection represents a branch protection for a repository
27 properties
Permission
object
Permission represents a set of permissions
3 properties
Note
object
Note contains information related to a git note
2 properties
APIForbiddenError
object
2 properties
Compare
object
3 properties
CreateReleaseOption
object
CreateReleaseOption options when creating a release
7 properties 1 required
ActionRunJob
object
ActionRunJob represents a job of a run
11 properties
IssueFormFieldVisible
string
IssueFormFieldVisible defines issue form field visible
GitHook
object
GitHook represents a Git repository hook
3 properties
TrackedTime
object
TrackedTime worked time for an issue / pr
7 properties
CreatePullReviewOptions
object
CreatePullReviewOptions are options to create a pull review
4 properties
ReplaceFlagsOption
object
ReplaceFlagsOption options when replacing the flags of a repository
1 property
CreatePushMirrorOption
object
7 properties
ActionVariable
object
ActionVariable return value of the query API
4 properties
CreateTagOption
object
CreateTagOption options when creating a tag
3 properties 1 required
CreatePullReviewComment
object
CreatePullReviewComment represent a review comment for creation api
5 properties
IssueConfigContactLink
object
3 properties
AnnotatedTag
object
AnnotatedTag represents an annotated tag
8 properties
CommitAffectedFiles
object
CommitAffectedFiles store information about files affected by the commit
2 properties
RegisterRunnerResponse
object
3 properties
IssueFormField
object
IssueFormField represents a form field
5 properties
Label
object
Label a label to an issue or a pr
7 properties
EditBranchProtectionOption
object
EditBranchProtectionOption options for editing a branch protection
23 properties
ExternalTracker
object
ExternalTracker represents settings for external tracker
4 properties
EditReleaseOption
object
EditReleaseOption options when editing a release
7 properties
Tag
object
Tag represents a repository tag
7 properties
PullReviewComment
object
PullReviewComment represents a comment on a pull request review
16 properties
Comment
object
Comment represents a comment on a commit or issue
11 properties
IssueConfig
object
2 properties
UpdateVariableOption
object
2 properties 1 required
APIError
object
APIError is an api error with a message
2 properties
PayloadCommitVerification
object
PayloadCommitVerification represents the GPG verification of a commit
5 properties
PayloadCommit
object
PayloadCommit represents a commit
10 properties
Milestone
object
Milestone milestone is a collection of issues on one repository
10 properties
CommitDateOptions
object
CommitDateOptions store dates for GITAUTHORDATE and GITCOMMITTERDATE
2 properties

Specification

The full machine-readable OpenAPI contract behind this narrative.

Source

forgejo-repository-api-openapi.yml Raw ↑

Other APIs Forgejo publishes across the network.

Forgejo activitypub API
Forgejo admin API
Forgejo issue API
Forgejo miscellaneous API
Forgejo notification API
Forgejo organization API
Forgejo package API
Forgejo settings API
Forgejo user API
Where this information came from

This is an independent, third-party profile of Forgejo repository API, published by API Evangelist. We do not operate, host, resell, or support these APIs, and we are not affiliated with or endorsed by the company unless stated above. Everything here is built from publicly available information — the company's own site, developer portal, documentation, public repositories, and the specifications it publishes for public use. Nothing is obtained by breaching a system, defeating an access control, or using credentials.

The Kin Score and Agent Readiness rating are independently calculated assessments of a company's public API artifacts, scored against a published rubric. They are not certifications, endorsements, security assessments, or audits.

Corrections, re-scores, and removal are free — no partnership or purchase required, and you do not need to justify the request. A removed company is recorded as unrated, never scored zero for having asked. Acknowledgement within one business day; removal within two.

info@apievangelist.com · Read the full data-sourcing policy →
On a security or compliance team? Put security in the subject line and you will get a person, not a form — we will tell you exactly which public URLs this profile was built from.