# API/SDK/Tea/HelmChart/Terraform

**URL:** https://forum.gitea.com/c/tea-sdk-usages/12.md

[Latest](https://forum.gitea.com/latest.md) · [Categories](https://forum.gitea.com/categories.md)

---

## [About the API/SDK/Tea/HelmChart/Terraform category](https://forum.gitea.com/t/about-the-api-sdk-tea-helmchart-terraform-category/7878)

<div class="topic-metadata">

**Author:** [@lunny](https://forum.gitea.com/u/lunny)\
**Replies:** 0

</div>

For Tea tool, Official SDKs usages

---

## [Gitea Rest API to create a new admin user](https://forum.gitea.com/t/gitea-rest-api-to-create-a-new-admin-user/2310)

<div class="topic-metadata">

**Author:** [@BagaSiva](https://forum.gitea.com/u/BagaSiva)\
**Replies:** 8\
**Last updated:** [September 22, 2026, 11:22am UTC](https://forum.gitea.com/t/gitea-rest-api-to-create-a-new-admin-user/2310 "2026-09-22T11:22:15Z")

</div>

I am using gitea latest image. It used Postgres DB (using the latest postgress image). As part of automation, I need to create an admin account using Gitea rest API. I have tried the below API. But It is not working. h…

---

## [HTTP 403 trying to download the tea CLI](https://forum.gitea.com/t/http-403-trying-to-download-the-tea-cli/12255)

<div class="topic-metadata">

**Author:** [@barabo](https://forum.gitea.com/u/barabo)\
**Replies:** 0\
**Last updated:** [June 9, 2026, 6:43pm UTC](https://forum.gitea.com/t/http-403-trying-to-download-the-tea-cli/12255 "2026-06-09T18:43:43Z")

</div>

We use a packer build process to prepare VM images, and we include the tea CLI as part of it. We typically build 1-10 new images per day, but during active development cycles we may build 20-30 per day. Each of these w…

---

## [How to get all linked issues of a PR?](https://forum.gitea.com/t/how-to-get-all-linked-issues-of-a-pr/12001)

<div class="topic-metadata">

**Author:** [@k82cn](https://forum.gitea.com/u/k82cn)\
**Replies:** 0\
**Last updated:** [March 10, 2026, 6:21am UTC](https://forum.gitea.com/t/how-to-get-all-linked-issues-of-a-pr/12001 "2026-03-10T06:21:37Z")

</div>

Hi team, I’m using a self-hosted gitea to work with my agent, and I’d like to get the linked issues of my PR. Is that possible to get that info via rest api? – Klaus

---

## [Unable to update repo via API due to repo ownership](https://forum.gitea.com/t/unable-to-update-repo-via-api-due-to-repo-ownership/11858)

<div class="topic-metadata">

**Author:** [@reddeth](https://forum.gitea.com/u/reddeth)\
**Replies:** 1\
**Last updated:** [December 17, 2025, 2:13pm UTC](https://forum.gitea.com/t/unable-to-update-repo-via-api-due-to-repo-ownership/11858 "2025-12-17T14:13:56Z")

</div>

Good day, friends! tl;dr: When trying to update a repo via the API I receive an error back: {"message":"user should be an owner or a collaborator with admin write of a repository","url":"https://gitea.mydomain.com/api/…

---

## [How to find all SHA1 repositories](https://forum.gitea.com/t/how-to-find-all-sha1-repositories/11792)

<div class="topic-metadata">

**Author:** [@Matej\_Cepl](https://forum.gitea.com/u/Matej_Cepl)\
**Replies:** 0\
**Last updated:** [November 11, 2025, 1:57pm UTC](https://forum.gitea.com/t/how-to-find-all-sha1-repositories/11792 "2025-11-11T13:57:33Z")

</div>

Looking at Gitea API I can see that there are multiple ways how to search for a repository on Gitea. However, I cannot find a way how to find all repositories which are (still) with object-format of sha1. Is it possible? …

---

## [Go package for webhook receiver](https://forum.gitea.com/t/go-package-for-webhook-receiver/11560)

<div class="topic-metadata">

**Author:** [@rdmcguire](https://forum.gitea.com/u/rdmcguire)\
**Replies:** 1\
**Last updated:** [July 26, 2025, 5:51pm UTC](https://forum.gitea.com/t/go-package-for-webhook-receiver/11560 "2025-07-26T17:51:03Z")

</div>

I’m implementing a go workload that takes webhook events from GItea and does different things. I’ve been digging around the SDK, Gitea code, etc.. and I’ve struggled to find a clear way to handle this. What’s the shorte…

---

## [API support for get a file's metadata without content](https://forum.gitea.com/t/api-support-for-get-a-files-metadata-without-content/5853)

<div class="topic-metadata">

**Author:** [@gzh](https://forum.gitea.com/u/gzh)\
**Replies:** 2\
**Last updated:** [June 18, 2025, 5:34pm UTC](https://forum.gitea.com/t/api-support-for-get-a-files-metadata-without-content/5853 "2025-06-18T17:34:02Z")

</div>

we are moving from gitlab to gitea, but gitee does’t support some api method which gitlab already supported. such as ‘get a file’s metadata without content’, is there any plan for the API improvement?

---

## [Trying to update an organization's repo external wiki](https://forum.gitea.com/t/trying-to-update-an-organizations-repo-external-wiki/11358)

<div class="topic-metadata">

**Author:** [@awestwell](https://forum.gitea.com/u/awestwell)\
**Replies:** 0\
**Last updated:** [June 4, 2025, 1:46am UTC](https://forum.gitea.com/t/trying-to-update-an-organizations-repo-external-wiki/11358 "2025-06-04T01:46:02Z")

</div>

With Gitea version 1.23.8 I am trying to update an organization’s repo to use an external wiki URL. Can anyone else confirm if they’ve got this working? I’ve seen one post on the forum that says it was broken in a previ…

---

## [API not returning results for user](https://forum.gitea.com/t/api-not-returning-results-for-user/10922)

<div class="topic-metadata">

**Author:** [@jsraz](https://forum.gitea.com/u/jsraz)\
**Replies:** 0\
**Last updated:** [March 11, 2025, 5:58pm UTC](https://forum.gitea.com/t/api-not-returning-results-for-user/10922 "2025-03-11T17:58:19Z")

</div>

Hello, I set up a personal token with all public, read access for every drop-down. It works for me (my user is administrator) but doesn’t work for another user when he sets it up the very same way. I’m confused because …

---

## [Error 404 Trying to Retrieve List of Wiki Pages via API](https://forum.gitea.com/t/error-404-trying-to-retrieve-list-of-wiki-pages-via-api/10338)

<div class="topic-metadata">

**Author:** [@supssk](https://forum.gitea.com/u/supssk)\
**Replies:** 0\
**Last updated:** [December 28, 2024, 7:16am UTC](https://forum.gitea.com/t/error-404-trying-to-retrieve-list-of-wiki-pages-via-api/10338 "2024-12-28T07:16:23Z")

</div>

I had a docker instance setup where I could retrieve the list of Wiki pages for an owner/repo and it worked fine. The key was I needed the user permission to be set to read. I also had repo set to r/w and issues set to r…

---

## [List private repos of an organisation](https://forum.gitea.com/t/list-private-repos-of-an-organisation/10228)

<div class="topic-metadata">

**Author:** [@gitea-noob](https://forum.gitea.com/u/gitea-noob)\
**Replies:** 0\
**Last updated:** [December 10, 2024, 6:52pm UTC](https://forum.gitea.com/t/list-private-repos-of-an-organisation/10228 "2024-12-10T18:52:52Z")

</div>

I need to list all repos of an organisation including private ones. I am the owner of that org and therefor of all repos in that org. I tried curl -H "Authorization: Bearer THEACCESSTOKEN" \\ "https://try.gitea.com/api/…

---

## [API: Problem with POST /repos/{owner}/{repo}/issues/{index}/assets](https://forum.gitea.com/t/api-problem-with-post-repos-owner-repo-issues-index-assets/10100)

<div class="topic-metadata">

**Author:** [@philipp](https://forum.gitea.com/u/philipp)\
**Replies:** 1\
**Last updated:** [November 26, 2024, 10:04am UTC](https://forum.gitea.com/t/api-problem-with-post-repos-owner-repo-issues-index-assets/10100 "2024-11-26T10:04:39Z")

</div>

Hi, I have a self-hosted gitea-server on a Windows machine. I’m trying to post files as attachment to an issue: curl -X "POST" -u "\*\*\*" "http://\*\*\*/api/v1/repos/\*\*\*/\*\*\*/issues/comments/43/assets" -H "accept: applicati…

---

## [Howto create repository using api](https://forum.gitea.com/t/howto-create-repository-using-api/3821)

<div class="topic-metadata">

**Author:** [@cmonty14](https://forum.gitea.com/u/cmonty14)\
**Replies:** 17\
**Last updated:** [October 12, 2023, 5:38am UTC](https://forum.gitea.com/t/howto-create-repository-using-api/3821 "2023-10-12T05:38:47Z")

</div>

Hello, can you please advise how to create a repository from any server that is not hosting gitea? I have found this but I’m not sure how this should be applied with gitea. curl -H "Authorization: token ACCESS\_TOKEN" …

---

## [\[solved\] Oauth2 access\_token api - user not exist](https://forum.gitea.com/t/solved-oauth2-access-token-api-user-not-exist/7693)

<div class="topic-metadata">

**Author:** [@davama](https://forum.gitea.com/u/davama)\
**Replies:** 2\
**Last updated:** [October 23, 2024, 3:30pm UTC](https://forum.gitea.com/t/solved-oauth2-access-token-api-user-not-exist/7693 "2024-10-23T15:30:06Z")

</div>

Hello, Testing oauth2\_client authentication with gitea, using OIDC as the provider. It works very well on the UI and im also able to map scope groups to org/teams, which is great! I want to see if the api side accepts …

---

## [Npm publish E404 File Not Found](https://forum.gitea.com/t/npm-publish-e404-file-not-found/9850)

<div class="topic-metadata">

**Author:** [@jeff-heine](https://forum.gitea.com/u/jeff-heine)\
**Replies:** 1\
**Last updated:** [October 14, 2024, 1:16pm UTC](https://forum.gitea.com/t/npm-publish-e404-file-not-found/9850 "2024-10-14T13:16:18Z")

</div>

I am trying to set up an npm repository and trying to publish a new package to it. I have read the documentation at https://docs.gitea.com/usage/packages/npm and have configured the new package source and set up an acce…

---

## [How to remove requirement for keyword 'token' in Authorization?](https://forum.gitea.com/t/how-to-remove-requirement-for-keyword-token-in-authorization/9812)

<div class="topic-metadata">

**Author:** [@aenagy](https://forum.gitea.com/u/aenagy)\
**Replies:** 0\
**Last updated:** [September 30, 2024, 6:02pm UTC](https://forum.gitea.com/t/how-to-remove-requirement-for-keyword-token-in-authorization/9812 "2024-09-30T18:02:42Z")

</div>

The API Usage page documentation (API Usage | Gitea Documentation) makes it clear that the keyword ‘token’ is required for authentication for historical reasons. Is there a way to remove this requirement with a configura…

---

## [Update mirror API](https://forum.gitea.com/t/update-mirror-api/9481)

<div class="topic-metadata">

**Author:** [@oscarenzo](https://forum.gitea.com/u/oscarenzo)\
**Replies:** 0\
**Last updated:** [July 20, 2024, 10:18am UTC](https://forum.gitea.com/t/update-mirror-api/9481 "2024-07-20T10:18:04Z")

</div>

Hello, I’m using gitea over docker using the follow version: Powered by Gitea Version: v1.15.11 I was checking in the API options but I could not found how can I update this option: Is possible using the API or ju…

---

## [Get Branch Protection information](https://forum.gitea.com/t/get-branch-protection-information/9455)

<div class="topic-metadata">

**Author:** [@vtlamore1](https://forum.gitea.com/u/vtlamore1)\
**Replies:** 1\
**Last updated:** [July 17, 2024, 1:49pm UTC](https://forum.gitea.com/t/get-branch-protection-information/9455 "2024-07-17T13:49:39Z")

</div>

Gitea: 1.21.4 I am attempting to use the /repos/{owner}/{repo}/branch\_protections API. I have tried every combination of owner and repo that I can think of, but it is still not working. Passing user id for {owner} yie…

---

## [API Token not Given](https://forum.gitea.com/t/api-token-not-given/9182)

<div class="topic-metadata">

**Author:** [@kr6994e](https://forum.gitea.com/u/kr6994e)\
**Replies:** 1\
**Last updated:** [May 23, 2024, 3:04am UTC](https://forum.gitea.com/t/api-token-not-given/9182 "2024-05-23T03:04:51Z")

</div>

I am running a gitea instance in docker container and using nginx reverse proxy to access web GUI. When I am trying to create a API token via the web GUI it creates just fine but does not show me the token anywhere. am …

---

## [Verify SSH key via API](https://forum.gitea.com/t/verify-ssh-key-via-api/9132)

<div class="topic-metadata">

**Author:** [@droidX](https://forum.gitea.com/u/droidX)\
**Replies:** 0\
**Last updated:** [May 9, 2024, 12:36pm UTC](https://forum.gitea.com/t/verify-ssh-key-via-api/9132 "2024-05-09T12:36:32Z")

</div>

Is there any way to get a token and verify an SSH key strictly through the API instead of the web interface? I see in the API docs they provide a way for GPG keys but not for SSH…

---

## [Usage of AuthorizationHeaderToken with Python API](https://forum.gitea.com/t/usage-of-authorizationheadertoken-with-python-api/9060)

<div class="topic-metadata">

**Author:** [@heiko](https://forum.gitea.com/u/heiko)\
**Replies:** 0\
**Last updated:** [April 30, 2024, 6:37am UTC](https://forum.gitea.com/t/usage-of-authorizationheadertoken-with-python-api/9060 "2024-04-30T06:37:49Z")

</div>

Hi, I am currently using the ‘AccessToken’ option for authorization via swagger generated Python API version 1.21.10 as follows: gitea\_config = giteapy.Configuration() gitea\_config.host = f'{self.\_\_gitea\_url}/api/v1' gi…

---

## [Get tag and branch related to a commit id](https://forum.gitea.com/t/get-tag-and-branch-related-to-a-commit-id/8597)

<div class="topic-metadata">

**Author:** [@Masber](https://forum.gitea.com/u/Masber)\
**Replies:** 0\
**Last updated:** [February 19, 2024, 3:35pm UTC](https://forum.gitea.com/t/get-tag-and-branch-related-to-a-commit-id/8597 "2024-02-19T15:35:30Z")

</div>

Dear Gitea community, I am learning about the Gitea APIs and could not find which endpoint should I use to find a branch name and/or a tag (if exists) related to a commit id. If this is not possible with a single API e…

---

## [API: How to convert a pull mirror repo into a normal repo using the API](https://forum.gitea.com/t/api-how-to-convert-a-pull-mirror-repo-into-a-normal-repo-using-the-api/8446)

<div class="topic-metadata">

**Author:** [@andrew.dearborn](https://forum.gitea.com/u/andrew.dearborn)\
**Replies:** 0\
**Last updated:** [January 17, 2024, 1:14am UTC](https://forum.gitea.com/t/api-how-to-convert-a-pull-mirror-repo-into-a-normal-repo-using-the-api/8446 "2024-01-17T01:14:31Z")

</div>

Hi, Version: Gitea version 1.21.0 I have effectively replicated an older Gitea instance that was hosted in a docker container into a VM hosted in our data center and have 170 “pull mirrored” repos that need to be conv…

---

## [Tea command and unformatted output](https://forum.gitea.com/t/tea-command-and-unformatted-output/5605)

<div class="topic-metadata">

**Author:** [@eeyrjmr](https://forum.gitea.com/u/eeyrjmr)\
**Replies:** 0\
**Last updated:** [July 30, 2022, 10:31am UTC](https://forum.gitea.com/t/tea-command-and-unformatted-output/5605 "2022-07-30T10:31:25Z")

</div>

The tea command looks really interesting, not just because of of a cli-base interaction but it offers the ability to display a problem. However, I cannot seem to display an issue in simple text. tea issue --repo ORG/RE…

---

## [Pushing a file to a gitea using apis](https://forum.gitea.com/t/pushing-a-file-to-a-gitea-using-apis/7382)

<div class="topic-metadata">

**Author:** [@akkrish](https://forum.gitea.com/u/akkrish)\
**Replies:** 1\
**Last updated:** [June 8, 2023, 7:31am UTC](https://forum.gitea.com/t/pushing-a-file-to-a-gitea-using-apis/7382 "2023-06-08T07:31:56Z")

</div>

I have a zip which i need to push it to a repo in gitea.I am using the below curl to push the zip file from local to the repo in gitea,but when i am trying to push it the repo it is uploading as a empty text file.I am us…

---

## [Gitea API 1.20.0+dev-833-g040970c32 failed on create repository](https://forum.gitea.com/t/gitea-api-1-20-0-dev-833-g040970c32-failed-on-create-repository/7302)

<div class="topic-metadata">

**Author:** [@docnao](https://forum.gitea.com/u/docnao)\
**Replies:** 2\
**Last updated:** [May 21, 2023, 1:48am UTC](https://forum.gitea.com/t/gitea-api-1-20-0-dev-833-g040970c32-failed-on-create-repository/7302 "2023-05-21T01:48:38Z")

</div>

https://gitea.com/api/v1/user/repos?token=xxxxx { "message": "token does not have required scope: repo", "url": "https://gitea.com/api/swagger" } So I tried https://gitea.com/api/v1/users/user\_name/repos?token=xxxx …

---

## [API and reverse proxy authentication](https://forum.gitea.com/t/api-and-reverse-proxy-authentication/7284)

<div class="topic-metadata">

**Author:** [@sed](https://forum.gitea.com/u/sed)\
**Replies:** 2\
**Last updated:** [May 16, 2023, 3:41pm UTC](https://forum.gitea.com/t/api-and-reverse-proxy-authentication/7284 "2023-05-16T15:41:02Z")

</div>

My gitea sever is configured to delegate the authentication to a reverse proxy using ENABLE\_REVERSE\_PROXY\_AUTHENTICATION. However, it seems that it is not compatible with the Basic Authentication which is used by the ap…

---

## [Create new Release via API with attachment](https://forum.gitea.com/t/create-new-release-via-api-with-attachment/7258)

<div class="topic-metadata">

**Author:** [@reinos\_nl](https://forum.gitea.com/u/reinos_nl)\
**Replies:** 2\
**Last updated:** [May 14, 2023, 7:50pm UTC](https://forum.gitea.com/t/create-new-release-via-api-with-attachment/7258 "2023-05-14T19:50:50Z")

</div>

Hi there, Perhaps it’s the wrong way, but im looking for a way to automate (via api) the release. My setup I have a repo called “test\_repo” for example With Jenkins I build a new version, where it can grap the correc…

---

## [How to deactivate the mirroring of a repository with the api](https://forum.gitea.com/t/how-to-deactivate-the-mirroring-of-a-repository-with-the-api/6870)

<div class="topic-metadata">

**Author:** [@Hello7498](https://forum.gitea.com/u/Hello7498)\
**Replies:** 2\
**Last updated:** [March 15, 2023, 9:08am UTC](https://forum.gitea.com/t/how-to-deactivate-the-mirroring-of-a-repository-with-the-api/6870 "2023-03-15T09:08:55Z")

</div>

Hello, following a migration I cloned all my repositories from an old Gitea to the new one with the api. Each of these repo are mirrored with its counterpart on the old Gitea. I would now like to remove this link via th…

[Next page](https://forum.gitea.com/c/tea-sdk-usages/12.md?page=1)
