#228  RESTful API
Robin Shen opened 4 months ago

RESTful api to interact with OneDev server for instant to access project information

Referenced from other issue 4 months ago
Michael Weimann commented 3 months ago

Funny thing. I thought about that in the past days as well.
This could enable coding integrations and apps.

If you want I could so some research if there is an api where to "borrow" some ideas from (e.g. GitLab, GitHub, Gitea, BitBucket/JIRA). In my opinion a versioned endpoint is mandatory, e.g. starting with /api/v1. It should follow semantic versioning. Often coupled software breaks because APIs change. Let's prevent that from the beginning.

Is there a special use-case the original reporter (Yu) wants to solve at the beginning?

Robin Shen commented 3 months ago

Thanks for willing to help. The user originally asking for this functionality wants to get git clone address of all projects. @rechardwang @aaronuu please correct me if I am wrong.

OneDev currently has a draft api skeleton based on Jersey:


Currently restful resource endpoints convert OneDev model (project, build etc) from/to json via Jackson serialization. This has the benefit of almost zero maintenance as api input/output will be changed automatic upon model change (adding/removing/renaming field etc). However the api is currently not be versioned. I am thinking of versioning the api automatically and get api input migrated automatically to latest version something like what I have done in DataMigrator.java for database backup/restore to minimize api maintainance overhead.

YU ZHANG commented 2 months ago

@robin 感谢作者辛苦开源,RESTful API 还有其他扩展作用,比如可以根据API去扩展统计数据(自定义统计所有用户的代码提交数据,根据提交数据定位分支等等)。

Robin Shen changed milestone 2 months ago
Previous Value Current Value
empty 5.0.0
hackerdom commented 3 weeks ago

When will this function be released?

Robin Shen commented 3 weeks ago

I plan to get it out before end of this year

issue 1 of 1
New Feature
5.0.0 Open
Issue Votes (2)
Watchers (6)
issue onedev-server#228
Please wait...
Page is in error, reload to recover