I am from Bangalore, India. Exploring SharePoint since 2008. Have designed and developed variety of solutions including intranet portals for collaboration, Web Content Management system, Business Intelligence, Search, Social Computing, Records Management, Tracking Systems, Wiki based bespoke solution, Project Management system, MOSS 2007 to SharePoint 2010 migration, SharePoint-Project Server integration, and SharePoint-SSRS integration. Sharing my knowledge and learning through my blog.
Sometimes, you would need List or Library GUID to use that in some operation. In such cases, how do you get hold of GUID using REST API? There is a straight-forward end point which you can use: /_api/web/lists/getByTitle('ListTitle')/Id This will return the GUID of a List or Library. There is also another approach. However this approach works only if a List or Library contains at least one item. /_api/web/lists/getByTitle('ListTitle')/items This is a familiar end point which we use to fetch items of a List or Library. To get the GUID from the response, you would do: var listIDTemp = response.data.d.results.__metadata.id; var listID = listIDTemp.substring(listIDTemp.lastIndexOf("guid") + 5).split('\''); As you can see, we are doing string operations to fetch GUID from metadata.id. This contains information only if the response has at least one item.