You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@ranger.apache.org by "Ramachandran (Jira)" <ji...@apache.org> on 2022/09/13 16:52:00 UTC
[jira] [Commented] (RANGER-3885) User REST API /users/firstnames returns only null with status code 204
[ https://issues.apache.org/jira/browse/RANGER-3885?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17603670#comment-17603670 ]
Ramachandran commented on RANGER-3885:
--------------------------------------
[~madhan] / [~rmani] :As part of the below api, we are supporting the first name as part of the filtering
[https://ranger.apache.org/apidocs/resource_UserREST.html#resource_UserREST_searchUsers_GET]
The below API it does not make any sense [resource_UserREST_suggestUserFirstName_GET |https://ranger.apache.org/apidocs/resource_UserREST.html#resource_UserREST_suggestUserFirstName_GET]
It just returns the firstName based on query parameter letters .
@GET
@Path("/firstnames")
@Produces({ "application/json", "application/xml" }) public String suggestUserFirstName(@QueryParam("letters") String letters,
@Context HttpServletRequest req) { return null;
}
if that's the case we can achieve it from [https://ranger.apache.org/apidocs/resource_UserREST.html#resource_UserREST_searchUsers_GET]
So we can remove [resource_UserREST_suggestUserFirstName_GET |https://ranger.apache.org/apidocs/resource_UserREST.html#resource_UserREST_suggestUserFirstName_GET] from our code base .
This is my thought.I will appreciate your input to proceed further.
> User REST API /users/firstnames returns only null with status code 204
> ----------------------------------------------------------------------
>
> Key: RANGER-3885
> URL: https://issues.apache.org/jira/browse/RANGER-3885
> Project: Ranger
> Issue Type: Bug
> Components: Ranger
> Reporter: Abhishek
> Priority: Major
>
> According to the documentation, the API [resource_UserREST_suggestUserFirstName_GET|https://ranger.apache.org/apidocs/resource_UserREST.html#resource_UserREST_suggestUserFirstName_GET] should return status code 200 when a request is made, but the API always returns a status code 204 No Content.
> From the code, it is clear that the API call just returns null without performing any operations.
> {code:java|bgColor=#f4f5f7}
> @GET
> @Path("/firstnames")
> @Produces({ "application/json", "application/xml" })
> public String suggestUserFirstName(@QueryParam("letters") String letters,
> @Context HttpServletRequest req) {
> return null;
> }
> {code}
> If this API is used by the customers, then this API has to be fixed, otherwise this API has to be removed from the code file and from
> the documentation
--
This message was sent by Atlassian Jira
(v8.20.10#820010)