mirror of
https://github.com/go-gitea/gitea.git
synced 2026-03-09 12:46:42 -05:00
API documentation for endpoint #67
Closed
opened 2025-11-02 03:07:16 -06:00 by GiteaMirror
·
33 comments
No Branch/Tag Specified
main
release/v1.25
release/v1.24
release/v1.23
release/v1.22
release/v1.21
release/v1.20
release/v1.19
release/v1.18
release/v1.17
release/v1.16
release/v1.15
release/v1.14
release/v1.13
release/v1.12
release/v1.11
release/v1.10
release/v1.9
release/v1.8
v1.25.3
v1.25.2
v1.25.1
v1.25.0
v1.24.7
v1.25.0-rc0
v1.26.0-dev
v1.24.6
v1.24.5
v1.24.4
v1.24.3
v1.24.2
v1.24.1
v1.24.0
v1.23.8
v1.24.0-rc0
v1.25.0-dev
v1.23.7
v1.23.6
v1.23.5
v1.23.4
v1.23.3
v1.23.2
v1.23.1
v1.23.0
v1.23.0-rc0
v1.24.0-dev
v1.22.6
v1.22.5
v1.22.4
v1.22.3
v1.22.2
v1.22.1
v1.22.0
v1.23.0-dev
v1.22.0-rc1
v1.21.11
v1.22.0-rc0
v1.21.10
v1.21.9
v1.21.8
v1.21.7
v1.21.6
v1.21.5
v1.21.4
v1.21.3
v1.21.2
v1.20.6
v1.21.1
v1.21.0
v1.21.0-rc2
v1.21.0-rc1
v1.20.5
v1.22.0-dev
v1.21.0-rc0
v1.20.4
v1.20.3
v1.20.2
v1.20.1
v1.20.0
v1.19.4
v1.21.0-dev
v1.20.0-rc2
v1.20.0-rc1
v1.20.0-rc0
v1.19.3
v1.19.2
v1.19.1
v1.19.0
v1.19.0-rc1
v1.20.0-dev
v1.19.0-rc0
v1.18.5
v1.18.4
v1.18.3
v1.18.2
v1.18.1
v1.18.0
v1.17.4
v1.18.0-rc1
v1.19.0-dev
v1.18.0-rc0
v1.17.3
v1.17.2
v1.17.1
v1.17.0
v1.17.0-rc2
v1.16.9
v1.17.0-rc1
v1.18.0-dev
v1.16.8
v1.16.7
v1.16.6
v1.16.5
v1.16.4
v1.16.3
v1.16.2
v1.16.1
v1.16.0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3.2
v1.3.1
v1.3.0
v1.3.0-rc2
v1.3.0-rc1
v1.2.3
v1.2.2
v1.2.1
v1.2.0
v1.2.0-rc3
v1.2.0-rc2
v1.1.4
v1.2.0-rc1
v1.1.3
v1.1.2
v1.1.1
v1.1.0
v1.0.2
v1.0.1
v1.0.0
v0.9.99
Labels
Clear labels
$20
$250
$50
$500
backport/done
💎 Bounty
docs-update-needed
good first issue
hacktoberfest
issue/bounty
issue/confirmed
issue/critical
issue/duplicate
issue/needs-feedback
issue/not-a-bug
issue/regression
issue/stale
issue/workaround
lgtm/need 2
modifies/api
modifies/translation
outdated/backport/v1.18
outdated/theme/markdown
outdated/theme/timetracker
performance/bigrepo
performance/cpu
performance/memory
performance/speed
pr/breaking
proposal/accepted
proposal/rejected
pr/wip
pull-request
reviewed/wontfix
💰 Rewarded
skip-changelog
status/blocked
topic/accessibility
topic/api
topic/authentication
topic/build
topic/code-linting
topic/commit-signing
topic/content-rendering
topic/deployment
topic/distribution
topic/federation
topic/gitea-actions
topic/issues
topic/lfs
topic/mobile
topic/moderation
topic/packages
topic/pr
topic/projects
topic/repo
topic/repo-migration
topic/security
topic/theme
topic/ui
topic/ui-interaction
topic/ux
topic/webhooks
topic/wiki
type/bug
type/deprecation
type/docs
type/enhancement
type/feature
type/miscellaneous
type/proposal
type/question
type/refactoring
type/summary
type/testing
type/upstream
Mirrored from GitHub Pull Request
No Label
type/docs
Milestone
No items
No Milestone
Projects
Clear projects
No project
No Assignees
Notifications
Due Date
No due date set.
Dependencies
No dependencies set.
Reference: github-starred/gitea#67
Reference in New Issue
Block a user
Blocking a user prevents them from interacting with repositories, such as opening or commenting on pull requests or issues. Learn more about blocking a user.
Delete Branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Originally created by @joubertredrat on GitHub (Nov 18, 2016).
Hi guys,
I think that a important thing on Gitea is have a API endpoint documentation on application or on site documentation like Swagger or Apidoc.
With this will be more easy to see all methods (or operations) and all information about each one of them.
Today on Gogs, this documentation is on github wiki and isn't easy to learn and work with this.
Want to back this issue? Post a bounty on it! We accept bounties via Bountysource.
@tboerger commented on GitHub (Nov 24, 2016):
I also dislike the Wiki approach, the docs have to be bundled with the code and also exported automatically to the docs website.
@bkcsoft commented on GitHub (Dec 26, 2016):
I started to play around with swagger[1] today, IMO it would be the best solution (even though I personally prefer ApiDoc...). I'm just not entirely sure how/where we should present it, @tboerger had the idea of integrating the docs in Gitea itself (e.g.
try.gitea.io/docs/api) though I'm not sure that is a good idea[1] https://github.com/yvasiyarov/swagger
@tboerger commented on GitHub (Dec 26, 2016):
We can enable or disable that via config flag. Additionally to that we can extract this documentation from every branch and provide all of this within our docs or at a separate page.
@joubertredrat commented on GitHub (Dec 26, 2016):
For first I think that is good idea to documentation manually on https://api.gitea.io/ as example because today doesn't exists anything about API documentation
After this we can view automated tools like Swagger
@tboerger commented on GitHub (Dec 26, 2016):
Nobody wants to do it twice, so we should directly provide something generated out of swagger annotations
@lunny commented on GitHub (Dec 27, 2016):
Yes, we need an API document ASAP.
@sapk commented on GitHub (Mar 28, 2017):
We could use : https://goswagger.io/generate/spec.html ?
@ralphtheninja commented on GitHub (Apr 24, 2017):
Until there is a proper API documentation available. Where can I dig around to find out how to call the api?
@sapk commented on GitHub (Apr 24, 2017):
You could find all api url in code here : https://github.com/go-gitea/gitea/blob/master/routers/api/v1/api.go#L230
You could copy-paste : https://github.com/sapk-fork/gitea/blob/generate-swagger/public/swagger.v1.json in http://editor.swagger.io for viewing incoming documentation.
You could also look at https://github.com/go-gitea/go-sdk that is a go package to access the api (all url are not implemented)
@SeanFarrow commented on GitHub (Jul 18, 2017):
Hi,
Is there a swagger document available as of now? I need to generate a client in c#.
@lafriks commented on GitHub (Jul 18, 2017):
@SeanFarrow it is still WIP - https://try.gitea.io/swagger
@SeanFarrow commented on GitHub (Jul 18, 2017):
Hi,
Thanks, is there a test gitea server anywaere?
From: Lauris BH [mailto:notifications@github.com]
Sent: Tuesday, July 18, 2017 20:28
To: go-gitea/gitea gitea@noreply.github.com
Cc: Sean Farrow sean.farrow@seanfarrow.co.uk; Mention mention@noreply.github.com
Subject: Re: [go-gitea/gitea] API documentation for endpoint (#194)
@SeanFarrowhttps://github.com/seanfarrow it is still WIP - https://try.gitea.io/swagger
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHubhttps://github.com/go-gitea/gitea/issues/194#issuecomment-316171521, or mute the threadhttps://github.com/notifications/unsubscribe-auth/ABY1fqOf-5_8u9n6dXk95j61V3MqdiGQks5sPQdJgaJpZM4K2yRe.
@SeanFarrow commented on GitHub (Jul 19, 2017):
Thanks, Do you know whether there are any test servers available, or alternatively a vagrant/packer base box. I'm tryingot write integration tests against the API.
@lafriks commented on GitHub (Jul 19, 2017):
There is https://try.gitea.io but integration tests for api are run localy from development environment (see https://github.com/go-gitea/gitea/tree/master/integrations)
@SeanFarrow commented on GitHub (Jul 19, 2017):
How are the integration environments spun up?
From: Lauris BH [mailto:notifications@github.com]
Sent: Wednesday, July 19, 2017 11:34
To: go-gitea/gitea gitea@noreply.github.com
Cc: Sean Farrow sean.farrow@seanfarrow.co.uk; Mention mention@noreply.github.com
Subject: Re: [go-gitea/gitea] API documentation for endpoint (#194)
There is https://try.gitea.io but integration tests for api are run localy from development environment (see https://github.com/go-gitea/gitea/tree/master/integrations)
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHubhttps://github.com/go-gitea/gitea/issues/194#issuecomment-316343901, or mute the threadhttps://github.com/notifications/unsubscribe-auth/ABY1fiXOvYvCT72JttXyaB_fUltjwC_Lks5sPduGgaJpZM4K2yRe.
@lafriks commented on GitHub (Jul 19, 2017):
On linux you need to run
make test-pgsqlormake test-mysqlbut you need postgresql or mysql set up correctly@SeanFarrow commented on GitHub (Jul 19, 2017):
Ok, it would be nice if there were boxes so that this could be run from a windows box for testing—maybe a separate issue!
From: Lauris BH [mailto:notifications@github.com]
Sent: Wednesday, July 19, 2017 12:50
To: go-gitea/gitea gitea@noreply.github.com
Cc: Sean Farrow sean.farrow@seanfarrow.co.uk; Mention mention@noreply.github.com
Subject: Re: [go-gitea/gitea] API documentation for endpoint (#194)
On linux you need to run make test-pgsql or make test-mysql but you need postgresql or mysql set up correctly
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHubhttps://github.com/go-gitea/gitea/issues/194#issuecomment-316360870, or mute the threadhttps://github.com/notifications/unsubscribe-auth/ABY1fsDY0goiyI8EsdxE556llg_MDK5gks5sPe1QgaJpZM4K2yRe.
@SeanFarrow commented on GitHub (Jul 25, 2017):
Hi,
Assuming I have a url for a server, what is the uri for the api?
I've had a look at api.go and only see gitea.io url's.
Help appreciated.
Kind regards
Sean.
@sapk commented on GitHub (Jul 25, 2017):
You could try to go to
/swaggeron your instance to view documentation and you could use integration test has an example for url, like :f1adaef458/integrations/api_issue_test.go (L25)@SeanFarrow commented on GitHub (Jul 25, 2017):
Strange, the swagger url doesn’t seem present on that server.
Cheers
Sean.
Kino r
From: Antoine GIRARD [mailto:notifications@github.com]
Sent: Tuesday, July 25, 2017 14:11
To: go-gitea/gitea gitea@noreply.github.com
Cc: Sean Farrow sean.farrow@seanfarrow.co.uk; Mention mention@noreply.github.com
Subject: Re: [go-gitea/gitea] API documentation for endpoint (#194)
You could try to go to /swagger on your instance to view documentation and you could use integration test has an example like for url
f1adaef458/integrations/api_issue_test.go (L25)—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHubhttps://github.com/go-gitea/gitea/issues/194#issuecomment-317732366, or mute the threadhttps://github.com/notifications/unsubscribe-auth/ABY1fgfx_HKG-mikZXVdpBZXw3Q9lEr3ks5sRelwgaJpZM4K2yRe.
@SeanFarrow commented on GitHub (Jul 27, 2017):
Hi,
I’m trying to go to url:
http://server:port/api/v1/orgs/MeasurementSystems
it can’t seem to find the page, as I keep getting an http404, what would be the correct uri to look an organizations repos?
This is for gitea v1.1.0.
Kind regards
Sean.
From: Antoine GIRARD [mailto:notifications@github.com]
Sent: Tuesday, July 25, 2017 14:11
To: go-gitea/gitea gitea@noreply.github.com
Cc: Sean Farrow sean.farrow@seanfarrow.co.uk; Mention mention@noreply.github.com
Subject: Re: [go-gitea/gitea] API documentation for endpoint (#194)
You could try to go to /swagger on your instance to view documentation and you could use integration test has an example like for url
f1adaef458/integrations/api_issue_test.go (L25)—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHubhttps://github.com/go-gitea/gitea/issues/194#issuecomment-317732366, or mute the threadhttps://github.com/notifications/unsubscribe-auth/ABY1fgfx_HKG-mikZXVdpBZXw3Q9lEr3ks5sRelwgaJpZM4K2yRe.
@SeanFarrow commented on GitHub (Aug 1, 2017):
Hi all,
What is the minimum version of Gitea that the api works with, with v1.1.0, the API doesn't seem to exist, I'm only getting 404's and no swagger document exists at /swagger as noted above.
Any help appreciated.
Cheers
Sean.
@lunny commented on GitHub (Aug 1, 2017):
@SeanFarrow /swagger is the document which is on v1.2. But the APIs works well on v1.1.0
@SeanFarrow commented on GitHub (Aug 1, 2017):
Ok, can you give me a sample uri please, I can’t seem to get this to work what ever uri I use!
Do I need to enable the api?
From: Lunny Xiao [mailto:notifications@github.com]
Sent: Tuesday, August 01, 2017 04:35
To: go-gitea/gitea gitea@noreply.github.com
Cc: Sean Farrow sean.farrow@seanfarrow.co.uk; Mention mention@noreply.github.com
Subject: Re: [go-gitea/gitea] API documentation for endpoint (#194)
@SeanFarrowhttps://github.com/seanfarrow /swagger is the document which is on v1.2. But the APIs works well on v1.1.0
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHubhttps://github.com/go-gitea/gitea/issues/194#issuecomment-319258451, or mute the threadhttps://github.com/notifications/unsubscribe-auth/ABY1ftoK39PjkTzk_mzT3dCCxJEghLK6ks5sTpzYgaJpZM4K2yRe.
@cez81 commented on GitHub (Sep 11, 2017):
@SeanFarrow If you haven't got this to work yet, here's an example https://try.gitea.io/api/v1/repos/search?q=gitea
@sapk commented on GitHub (Dec 15, 2017):
This one could be close
@lunny commented on GitHub (Dec 15, 2017):
@sapk I think yes.
@marbetschar commented on GitHub (Mar 14, 2018):
@sapk https://try.gitea.io/ seems to be down
@lunny commented on GitHub (Mar 14, 2018):
@marbetschar yes, we are changing to a new plan for bigger disk space.
@marbetschar commented on GitHub (Mar 15, 2018):
@lunny meanwhile, is there any documentation for the api available? We are working on a Gitea integration, but its not so easy getting things right by solely read the code in the repo.
@sapk commented on GitHub (Mar 15, 2018):
@marbetschar I just uploaded at https://app.swaggerhub.com/apis/gitea/gitea-api/1.1.1 you can see it there for the moment. I will need to auto-update that if we keep it.
You can always copy https://raw.githubusercontent.com/go-gitea/gitea/master/public/swagger.v1.json to https://editor.swagger.io/ (File -> Import URL)
@marbetschar commented on GitHub (Mar 15, 2018):
@sapk thanks for this! I can see a bunch of errors there (screenshot attached), but I guess I can ignore them for now?
@sapk commented on GitHub (Mar 15, 2018):
@marbetschar yes, we need to fill security schema and maybe other spec to be fully compliant with swagger and the editor seems to be more exigent than the swagger-ui we use in gitea. But with all the definitions allready done you should get enough information to get started with api. You can dismiss error and hide them even.