I am Insert Data in Sharepoint list using REST API.
Its inserted Successfully but I want in Response that inserted Record ID.
Is there any way to get it.?
I don't want to call request again.
Any Help greatly Appreciated.
Whenever you are creating Item using REST API it will give you a JSON response in returned. If you parse your JSON using JSON Parser you can see all the details regarding created item is visible. So you can parse JSON response and get whatever you want. See attached snap.
Yes It returns a
ID and also
Id in the response. You can access like
yourResponse.d.ID // OR yourResponse.d.Id
yourResponse.d is the item you have just inserted.
Id both are the same thing.