REST API to filter Document Library based on people and groups column

I have the custom document library with a people and groups columns.So, whenever the user uploads a doc in the library, manual they will specify any SharePoint group name in the people and group column.Now I would like to filter the document library files based on the groups.Below end point, i tried in my scenario, but no luck

End Point URL :"/_api/web/lists/getbytitle('DocName')/files?$filter=groupNameId eq 2" here "groupName" is original column name(People and Groups).Since I am trying to filter doc based on the group id, I used "groupNameId" and Here "2" is the group Name ID. 1 Answer You can do it as below "_api/web/lists/getbytitle('DocName')/files?$expand=groupName&\$filter=groupName/Id eq 2"

• I tried your end point.But no luck,its throwing "<m:message xml:lang="en-US">Specified method is not supported.</m:message>" – user52682 Jul 7 '16 at 6:36