Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

REST API #1692

Open
1 of 3 tasks
nasali opened this issue Sep 25, 2015 · 51 comments
Open
1 of 3 tasks

REST API #1692

nasali opened this issue Sep 25, 2015 · 51 comments
Labels
⛔ do not send pull request Don't ever think about it! 🎯 feature Categorizes as related to a new feature

Comments

@nasali
Copy link

nasali commented Sep 25, 2015

Currently, the REST API exposed by Gogs, at /api/v1/, is limited. Please provide CRUD (Create, Read, Update, and Delete) methods to manipulate the following models:

  • User
  • Org
  • Repo
  • ?Access

Thank you so much in advance!

@unknwon unknwon added the 🎯 feature Categorizes as related to a new feature label Sep 25, 2015
@unknwon unknwon added this to the 0.7.0 milestone Sep 25, 2015
@matrixise
Copy link

When do you think to release 0.7.0 ?

@unknwon
Copy link
Member

unknwon commented Oct 9, 2015

@matrixise fairly a long time from now...

@marticardus
Copy link

i am very interested on these options, basically create users and repos by Rest API, for if more comments on this issue sums more points to make this changes :)

@jpiontek
Copy link

This would be really useful.

@mcumello
Copy link

+1 thank you

@techzilla
Copy link

Definitely would be a huge benefit to have the administrative parts of the v3. I'm working on getting a lot of teams migrated to using gogs, and away from old-school manual git on file-system.

@chasinglogic
Copy link

+1

Is the current rest api documented anywhere?

@unknwon
Copy link
Member

unknwon commented Oct 29, 2015

@unknwon unknwon modified the milestones: 0.7.x, 0.8.0 Nov 8, 2015
@kernel164
Copy link

+1

@unknwon unknwon modified the milestones: 0.7.x, 0.8.0 Nov 21, 2015
@kernel164
Copy link

These are the apis that we currently need. (we use phantomjs to script the gogs, but if its available as api it would be cool)

all apis are done by admin (using api token)

  • [-] add auth source (we use pam)
  • create user under the auth source
  • add ssh key to user
  • create org
  • create repo under the org (I believe this is already there)
  • create team under the org
  • add user to team
  • remove user from team
  • add repo to team
  • remove repo from team

This one is for easy config manage gogs from ansible.

  • api for /install (we config manage app.ini so most of the fields shown in /install page is from app.ini except admin user name & password)

@rogeriolino
Copy link

Are plan to implement issues management routes?

@unknwon
Copy link
Member

unknwon commented Nov 26, 2015

@rogeriolino Those should come with #809

@rogeriolino
Copy link

Thanks for reply me @unknwon

This migration will include issues API too?

I'm already using Gogs in my work and I'm intending to code a frontend that integrate to gogs issues via API. Providing to my app users a way to report bugs without create a account into Gogs.

Regards.

@unknwon
Copy link
Member

unknwon commented Nov 26, 2015

@renatoaquino

This migration will include issues API too?

I'm planning do migration with APIs, that's more flexible.

I'm already using Gogs in my work and I'm intending to code a frontend that integrate to gogs issues via API. Providing to my app users a way to report bugs without create a account into Gogs.

Though you still need an account to call APIs, just make sure you know this...

@rogeriolino
Copy link

@unknwon

Though you still need an account to call APIs, just make sure you know this...

Right. Internally I'll use an account to do it (make API requests).

This was referenced Dec 3, 2015
@unknwon
Copy link
Member

unknwon commented Dec 5, 2015

@kernel164 https://github.com/gogits/go-gogs-client/wiki/Administration-Users

BTW, I'll try to make an other mirror update release before 0.8, other org-related APIs need to wait until 0.8.x releases. 😓

@unknwon unknwon modified the milestones: 0.8.x, 0.8.0 Dec 6, 2015
@iwanbk
Copy link
Contributor

iwanbk commented Apr 12, 2016

@yurivict @unknwon
PRs submitted:

@unknwon unknwon modified the milestones: 0.10.0, 0.11.0 Jul 16, 2016
@lstahlman
Copy link
Contributor

I would like to assist with this as well.

I started working on extra labels support before I saw @iwanbk's list, so hopefully my work is not overlapping.

@iwanbk
Copy link
Contributor

iwanbk commented Aug 26, 2016

@unknwon i will work on issue's assignee support, it seems there is no one working on it.

@unknwon
Copy link
Member

unknwon commented Aug 26, 2016

@iwanbk isn't API already supports issue assignee?

@iwanbk
Copy link
Contributor

iwanbk commented Aug 26, 2016

@iwanbk isn't API already supports issue assignee?

Yes, issue already has assignee.
But there is also assignee API, see https://developer.github.com/v3/issues/assignees/

@unknwon
Copy link
Member

unknwon commented Aug 26, 2016

@iwanbk Gogs only supports single assignee right now, so I don't think we need that list of APIs at current stage.

@iwanbk
Copy link
Contributor

iwanbk commented Aug 26, 2016

Gogs only supports single assignee right now

If you talk about List assignees, it actually list a repo's assigness, not an issue's assignee.

GET /repos/:owner/:repo/assignees

If you think this API is not important right now, i offer my help to other APIs.

How about the Administration API? Organizations and Repositories API seems still not complete.

@iwanbk
Copy link
Contributor

iwanbk commented Aug 26, 2016

Another thing to do related REST API is testing code, i don't see any test in the API code.

I think we should write common test code first that the API contributors can use it.

@unknwon
Copy link
Member

unknwon commented Aug 26, 2016

If you talk about List assignees, it actually list a repo's assigness, not an issue's assignee.

@iwanbk oh you're right, I mislead by the page title. Yes, you can implement ones for repository.

@einarf
Copy link

einarf commented Sep 3, 2016

This might be the wrong place, but I'll add a few cents. (I can create a separate issue if needed)

It would be fantastic if the organization could also return its owners so we remotely can know what users are allowed to create repos in the organization. At least for the users that are allowed to see this information.

{
  "id": 6,
  "username": "gogs",
  "full_name": "Gogs",
  "avatar_url": "/avatars/6",
  "description": "Gogs(Go Git Service) is a painless self-hosted Git Service.",
  "website": "https://gogs.io",
  "location": "USA"
  "owners": [{"id": 9, "username": "foo",. ..}, {"id": 10, "username": "bar", ...}, ...]
}

.. or at least for an admin endpoint that can fetch info from any organization info. That way we can know remotely what users can create repositories in the organization.. or maybe this is something that should be queried through teams.

Right now when looking at existing repos, I don't know if it's possible to separate a team admin and an owner.

@pyhedgehog
Copy link

Please add API for POST /api/v1/repos/:owner/:repo/forks. It's very important feature.

@unknwon unknwon removed this from the 0.11.0 milestone Feb 18, 2017
@unknwon unknwon added the ⛔ do not send pull request Don't ever think about it! label Feb 18, 2017
@psaavedra
Copy link
Contributor

is there any chance to collaborate and contribute with this feature?

@estan
Copy link

estan commented May 11, 2017

Since I haven't seen it mentioned here, I'd like to add:

  • Releases

That is, I'd like to be able to draft a release, including file attachments, using the API. It would be very convenient (e.g. as part of a CI job that builds packages (windows .exe, macOS .dmg et.c.)) to create a draft release using the REST API and attach those files.

@jannishuebl
Copy link

Hello, are there plans to add support for the https://developer.github.com/v3/git/ api?

We would really love to see support for querying our repositories.

Thank you so much for gogs btw. :)

@IssueHuntBot
Copy link

@0maxxam0 has funded $20.00 to this issue.


@achilleas-k
Copy link
Contributor

Org and team management endpoints are currently available only for site admins (under the /admin path). I think these should be made available for all org owners.

I can prepare a PR if you agree.

@grogorick
Copy link

grogorick commented Nov 1, 2022

@achilleas-k this would be great.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
⛔ do not send pull request Don't ever think about it! 🎯 feature Categorizes as related to a new feature
Projects
None yet
Development

No branches or pull requests