Skip to content

Filter by entity type when retrieving grants for a userID #1511

Open
@chrisgoddard

Description

@chrisgoddard

Add entity-type filter to /api/entity/grant/search

Problem

When retrieving all grants for a particular user, it is possible to get a very large number of results - most of them might not be relevant to the particular need. It would be very helpful if we could filter the search based on a specific entity type.

Solution

GET /api/entity/grant/search?entityId={uuid}&entityType={entityTypeId}

OR

POST /api/entity/grant/search
{
    "search": {
        "userId": "{uuid}",
        "entityType": "{entityTypeId}"
    }
}

Alternatives/workarounds

Alternatively, this could be an extension of the Entity Type endpoint:

POST /api/entity/type/{entityTypeId}/grants/search
{
   "userId": "{uuid}"
}

Related

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or requestpaid-featureTargeted for the paid editions of FusionAuth

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions