In a new document library, when I am creating a new DocumentSet, it is having ID as 2. Is there any reason for it ? Is it not that first item in a document library should have ID as 1 and this values gets incremented for new item created ? Thanks.
I haven't worked with document sets much, but this is my theory.
Document sets are a beefed up version of a folder. When a folder (or document set in this case) is created the folder has a list item id as well and is presumably created first before any of the files. That's why you'd see the first document in the set with an ID of 2 rather than 1 as the document set folder is actually id 1.