using REST API to promote Document Properties into SharePoint document library

Hi,

Is it possible to extract Document properties of a file and update library column using REST API?

T

January 29th, 2015 10:54pm

Hi,

We can use the following REST endpoint to get document property:

http://site/_api/web/getfilebyserverrelativeurl('/Shared Documents/filename.docx')/<property name>

https://msdn.microsoft.com/en-us/library/office/dn450841(v=office.15).aspx#bk_File

If you want to update document library column, the following blog for your reference:

Updating SharePoint List items with SharePoints REST API in JavaScript

http://community.rightpoint.com/blogs/viewpoint/archive/2014/10/23/updating-sharepoint-list-items-with-sharepoint-s-rest-api-in-javascript.aspx

Thanks,
Dennis Guo
TechNet Community Support
Please remember to mark the replies as answers if they help and unmark them if they provide no help. If you have feedback for TechNet Subscriber Support, contact tnmff@microsoft.com.

Free Windows Admin Tool Kit Click here and download it now
January 30th, 2015 12:12pm

yes its possible

try https://server/web/_api/getfilebyserverrelativeurl('URL with file name')/property name

try below links for reference:

http://community.rightpoint.com/blogs/viewpoint/archive/2014/10/23/updating-sharepoint-list-items-with-sharepoint-s-rest-api-in-javascript.aspx

https://msdn.microsoft.com/en-us/library/office/dn292553%28v=office.15%29.aspx

http://blogs.msdn.com/b/uksharepoint/archive/2013/04/20/uploading-files-using-the-rest-api-and-client-side-techniques.aspx

--------------------------------------------------------------------------------------------------------------------------------------

Please mark answer as correct if it is correct else vote for it if you find it useful Happy SharePointing

January 30th, 2015 5:44pm

So with this URI, is it possible to get File Last Modified Property? I am looking for a time stamp when the file itself was modified not necessarily the time stamp in sharepoint.
Free Windows Admin Tool Kit Click here and download it now
January 31st, 2015 3:44am

Hi,

We can use this:

http://site/_api/web/getfilebyserverrelativeurl('/Shared Documents/filename.docx')/TimeLastModified

Thanks,
Dennis Guo
TechNet Community Support
Please remember to mark the replies as answers if they help and unmark them if they provide no help. If you have feedback for TechNet Subscriber Support, contact tnmff@microsoft.com.

February 1st, 2015 10:44pm

try this and please mark previous one as ansower since you have modified scope of answer:

https://server/web/_api/getfilebyserverrelativeurl('URL with file name')/TimeLastModifed

try these links as your reference:

http://sharepoint.stackexchange.com/questions/100658/spo-rest-api-changing-timelastmodified

https://msdn.microsoft.com/en-us/library/office/jj246749%28v=office.15%29.aspx

--------------------------------------------------------------------------------------------------------------------------------------

Please mark answer as correct if it is correct else vote for it if you find it useful Happy SharePointing

Free Windows Admin Tool Kit Click here and download it now
February 2nd, 2015 2:32am

This topic is archived. No further replies will be accepted.

Other recent topics Other recent topics