SP.ListItem.id property (sp.js)
Gets a value that specifies the list item identifier.
Applies to: apps for SharePoint | SharePoint Foundation 2013 | SharePoint Server 2013
var value = SP.ListItem.get_id ()
Return value
Type: Int32
Remarks
It must be 0 for a list item in an external list. It must be -1 for list items that have not yet been added to a list.
REST resource endpoint
See ListItem resource for more information.
Endpoint URI structure
http://<sitecollection>/<site>/_api/web/lists(listid)/items(itemid)/id
HTTP requests
This resource supports the following HTTP commands:
- POST
POST syntax
POST http://<sitecollection>/<site>/_api/web/lists(listid)/items(itemid)/id
GET syntax
GET http://<sitecollection>/<site>/_api/web/lists(listid)/items(itemid)/id