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.
SharePoint Stack Exchange is a question and answer site for SharePoint enthusiasts. It only takes a minute to sign up.
Sign up to join this communityI 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
and Id
both are the same thing.