Skip to content

Add UUID field to API user response #6941

@horego

Description

@horego

Hey there. I have a "feature" request to Authentik. The /core/users endpoint has a couple of filtering options like name, path and for me more important the uuid.
Since we have the ability to filter the uuid there is no way to retreive it via the API. My suggestion is to add the uuid in the user response of the api.

Would you like to do that? We achived that by adding the uuid to the user Meta class of users.py file.
https://github.com/goauthentik/authentik/blob/main/authentik/core/api/users.py


    class Meta:
        model = User
        fields = [
            "pk",
            "username",
            "name",
            ....
            "uuid",
        ]
        extra_kwargs = {
            "name": {"allow_blank": True},
        }

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions