Skip to content

Missing API endpoints for user OAuth applications #3451

Open

Description

@spanezz

Description of the problem, including code/CLI snippet

User OAuth applications are not currently mapped in the Python API.

In other words, this works:

curl --request GET --header "PRIVATE-TOKEN: …" --url "https://salsa.debian.org/api/v4/user/applications"

but there seems to be no way of accessing that endpoint from Python.

I'm trying this as a crude workaround, although I'm not yet sure the Python API would map correctly to the REST one:

    def user_applications(
        self,
    ) -> gitlab.v4.objects.applications.ApplicationManager:
        """Return the remote GitLab user applications API."""

        # TODO: This is not yet mapped in python3-gitlab

        class UserApplication(gitlab.v4.objects.applications.Application):
            _url = "/user/applications"

        class UserApplicationManager(
            gitlab.v4.objects.applications.ApplicationManager
        ):
            _path = "/user/applications"
            _obj_cls = UserApplication

        return UserApplicationManager(self.gl)
  • python-gitlab version: 1:8.5.0-1 from Debian sid, although I could not find mention of this endpoint also in the online documentation
  • Gitlab server version (or gitlab.com): salsa.debian.org

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions