Create List Item using REST API

Hi All
  I try create list item using REST in SharePoint 2013.  when code is try add new item in list , getting error :
A node of type 'EndOfInput' was read from the JSON reader when trying to read the start of an entry. A 'StartObject' node was expected.
Please help me
function addData() {
var title = $('#txtTitile').val();
//alert(title);
var items = {
__metadata: { "Type": "SP.Data.OrderDetailsListItem"},
Title:title
var exec = new SP.RequestExecutor(appweburl);
exec.executeAsync(
url: appweburl + "/_api/SP.AppContextSite(@target)/web/lists/getbytitle('OrderDetails')/Items?@target='" + hostweburl + "'",
method: "POST",
data: JSON.stringify(items),
headers: {
Accept: "application/json;odata=verbose",
"Content-Type": "application/json;odata=verbose",
"X-RequestDigest": $("#__REQUESTDIGEST").val()
success: function (data) { alert(JSON.parse(data)); },
error: function (error)
{ alert(JSON.stringify(error)); }
with Regards Sivam

Hi,                                                             
Here is a demo which works in my environment for your reference:
<script type="text/javascript" src="http://code.jquery.com/jquery-1.10.2.min.js"></script>
<script type="text/javascript">
$(document).ready(function()
$("#Button1").click(function(){
createListItemWithDetails("list2", "http://sp2013sps", "item1");
// Getting the item type for the list
function GetItemTypeForListName(name) {
//alert("GetItemTypeForListName: "+name);
return"SP.Data." + name.charAt(0).toUpperCase() + name.slice(1) + "ListItem";
// CREATE Operation
// listName: The name of the list you want to get items from
// siteurl: The url of the site that the list is in. // title: The value of the title field for the new item
// success: The function to execute if the call is sucesfull
// failure: The function to execute if the call fails
function createListItemWithDetails(listName, siteUrl, title) {
var itemType = GetItemTypeForListName(listName);
//alert("itemType :"+itemType);
var item = {
"__metadata": { "type": itemType },
"Title": title
$.ajax({
url: siteUrl + "/_api/web/lists/getbytitle('" + listName + "')/items",
type: "POST",
contentType: "application/json;odata=verbose",
data: JSON.stringify(item),
headers: {
"Accept": "application/json;odata=verbose",
"X-RequestDigest": $("#__REQUESTDIGEST").val()
success: function (data) {
location.href=location.href;
//success(data);
error: function (data) {
alert("error");
//failure(data);
</script>
<input id="Button1" type="button" value="Run Code"/>
Best regards
Patrick Liang
TechNet Community Support

Similar Messages

  • How to update 500 list items using Rest API

    Hi All,
    i have requirement that is "required to update 500 list items using rest Api".
    how can i do it,please share your thoughts with me.
    Thanks,
    Madhu.

    Didn't get you correctly, if you asking reference for REST API to update list items please refer below links
    http://msdn.microsoft.com/en-us/library/office/jj164022(v=office.15).aspx
    Destin -MCPD: SharePoint Developer 2010, MCTS:SharePoint 2007 Application Development

  • Update List Items using REST API - Keep Getting 400 Bad Request

    I am using code from the following answer:
    http://social.msdn.microsoft.com/Forums/sharepoint/en-US/40833576-5853-4ca4-95cf-b5b1d69f465f/sharepoint-rest-and-c-sample-to-update-list-item?forum=sharepointdevelopment
    I am having a tough time figuring out the issue though.  I have been able to retrieve list items, but now I want to update those items.  This is the following code just to get the digest information with passing in credentials:
    public static string GetFormDigest(System.Net.NetworkCredential cred)
    string formDigest = null;
    string resourceUrl = "https://SITEURL/_api/contextinfo";
    HttpWebRequest wreq = HttpWebRequest.Create(resourceUrl) as HttpWebRequest;
    wreq.Credentials = cred;
    wreq.Method = "POST";
    wreq.Accept = "application/json;odata=verbose";
    wreq.ContentLength = 0;
    wreq.ContentType = "application/json";
    string result;
    WebResponse wresp = wreq.GetResponse();
    using (StreamReader sr = new StreamReader(wresp.GetResponseStream()))
    result = sr.ReadToEnd();
    var jss = new JavaScriptSerializer();
    var val = jss.Deserialize<Dictionary<string, object>>(result);
    var d = val["d"] as Dictionary<string, object>;
    var wi = d["GetContextWebInformation"] as Dictionary<string, object>;
    formDigest = wi["FormDigestValue"].ToString();
    Console.WriteLine(formDigest);
    return formDigest;
    Then the following code is used:
    string result = string.Empty;
    Uri uri = new Uri(sharepointUrl.ToString() + "/_api/Web/lists/getByTitle('DemoList')/items(1)");
    HttpWebRequest wreq = (HttpWebRequest)WebRequest.Create(uri);
    wreq.Credentials = cred;
    wreq.Method = "POST";
    wreq.Accept = "application/json; odata=verbose";
    wreq.ContentType = "application/json; odata=verbose";
    wreq.Headers.Add( "X-HTTP-Method","MERGE");
    wreq.Headers.Add( "IF-MATCH", "*");
    wreq.Headers.Add("X-RequestDigest", GetFormDigest(cred));
    string stringData = "{'__metadata': { 'type': 'SP.Data.DemoListListItem' }, 'Title': 'updated!'}";
    wreq.ContentLength = stringData.Length;
    StreamWriter writer = new StreamWriter(wreq.GetRequestStream());
    writer.Write(stringData);
    writer.Flush();
    try {
    WebResponse wresp2 = wreq.GetResponse();
    using (StreamReader sr = new StreamReader(wresp2.GetResponseStream()))
    result = sr.ReadToEnd();
    catch (Exception e) { Console.WriteLine("An error occurred: '{0}'", e); }
    It errors out when it tries to send the command to Sharepoint.  I am NOT using a sharepoint hosted app.  I just wanted to directly contact sharepoint and update items.  Any help or suggestions would be greatly appreciated!
    Thanks,
    Priyank
     

    I just found some other code that seemed to work on editing a title and edited it kind of guessing it would work and it did!
    This is the code that ended working using the same digest code from above:
    Console.WriteLine("\n Newer Fancier Code \n");
    Uri uri = new Uri("https://SHAREPOINTURL/_api/web/lists/GetByTitle('Demo')/items(1)");
    HttpWebRequest request = (HttpWebRequest)WebRequest.Create(uri);
    request.ContentType = "application/json;odata=verbose";
    request.Headers["X-RequestDigest"] = GetFormDigest(cred);
    request.Headers["X-HTTP-Method"] = "MERGE";
    request.Headers["IF-MATCH"] = "*";
    request.Credentials = cred;
    request.Accept = "application/json;odata=verbose";
    request.Method = "POST";
    string stringData = "{ '__metadata': { 'type': 'SP.ListItem' }, 'Location': 'updatedinfo' }";
    request.ContentLength = stringData.Length;
    StreamWriter writer = new StreamWriter(request.GetRequestStream());
    writer.Write(stringData);
    writer.Flush();
    HttpWebResponse response = (HttpWebResponse)request.GetResponse();
    StreamReader reader = new StreamReader(response.GetResponseStream());
    Just fyi if anyone was wondering.  Next, I'm going to be trying to update multiple fields, possibly multiple items if possible if anyone knows how to do that.

  • [Application Insights] Fail to create new application using REST API

    Hi,
    I'm trying to create new application in Application Insights using the REST API.
    I followed the instructions on
    this page, but keep getting '404 Not Found', with the following error stream:
    "{"error":{"code":"InvalidResourceType","message":"The resource type could not be found in the namespace 'microsoft.insights' for api version '2014-04-01'."}}"
    The http method I'm using is: PUT
    The request URI is:
    "https://management.azure.com/subscriptions/some_real_subscription_id/resourceGroups/yonisha-new-rg/providers/microsoft.insights/component/yonisha-new-app?api-version=2014-04-01".
    Can you please advice what am I doing wrong?
    Few things:
    I tried both with existing/non-existing resource group.
    I set the Content-Length header to '0' (otherwise the server returns an error the the length is required).

    Try the API Version "2014-08-01" and also make sure you are sending a location of "Central US" (its the only location available right now).  An example of a PowerShell call that works is below.  I would also suggest checking
    out the new https://resources.azure.com/ which can help you construct the REST call.
    New-AzureResource -Name TestAppInsights -ResourceGroupName TestRG -ResourceType "Microsoft.Insights/Components" -Location "Central US" -ApiVersion "2014-08-01"

  • Create List Item using SharePoint 2010 Workflow

    Hello everyone.
    I found in youtube video using SP Employee Onboarding Web Part, idea is quite simple and powerful. But this web part available only in SP 2013, and I use 2010. So I wanted to develop my own version.
    Questions is:
    I have 2 lists Employee OnBoards (list contains data about new employee) and Employee OnBoards Tasks (list contains approval task). Where field Employee Name from Employee OnBoards list is lookup field in Employee OnBoards Tasks list.
    I need emplement next:
    When new Item created in Employee OnBoards list, it should copy Employee Name value to the Name field of the Employee OnBoards Tasks list.
    I hope I explained understandable.
    Thanks.

    Hi Azamat,
    This you can do by using SharePoint Designer workflow.
    Create a sharepoint designer workflow and invoke that when new item will create in the list Employee
    OnBoards.
    then use Copy List item action to copy employee name to employee on board task list.
    Below link will help you how to use copy list item action in a workflow.
    http://blogs.salmanghani.info/copy-item-workflow-using-sharepoint-designer-2010/
    Hope this will help you.
    Regards
    Soni K

  • Update item in list using rest api - failed when browsing in juniper session

    this issue is about browsing to an on premises sharepoint 2013 inside a LAN using Juniper session
    the user can see everything and can create new list items with rest api but
    cannot update existing items using the function below.
    we've got this function which we use to update list items in rest
    it works like a charm when browsing inside the LAN
    function updateListItem(itemIdentityField, itemIdentity, listName, siteUrl, item, success, failure) {
    getListItemWithId(itemIdentityField, itemIdentity, listName, siteUrl, function (data) {
    $.ajax({
    url: data.__metadata.uri,
    type: "POST",
    contentType: "application/json;odata=verbose",
    data: JSON.stringify(item),
    headers: {
    "Accept": "application/json;odata=verbose",
    "X-RequestDigest": $("#__REQUESTDIGEST").val(),
    "X-HTTP-Method": "MERGE",
    "If-Match": data.__metadata.etag
    success: function (data) { success(data, callBackIndex, null) },
    error: function (data) {
    getError(data);
    }, function (data) {
    failure(data);
    the error i get in ULS log is:
    Original error: Microsoft.SharePoint.Client.InvalidClientQueryException: The parameter __metadata does not exist in method GetItemByStringId.
    at Microsoft.SharePoint.Client.MethodInformation.GetParameter(String parameterName)
    at Microsoft.SharePoint.Client.ClientCallableEdmModelBuilder.CreateFunctionImportForMethodBodyParser(MethodInformation clientMethod, List`1 parameterNames, ProxyContext proxyContext)
    at Microsoft.SharePoint.Client.Rest.RestRequestProcessor.ParseParametersFromBody(MethodInformation methodInfo, Boolean allowPostBodyAccess, Boolean isLeafSegment, ClientValueCollection args)
    at Microsoft.SharePoint.Client.Rest.RestRequestProcessor.ParseParametersFromBodyOrQueryString(MethodInformation methodInfo, Boolean allowPostBodyAccess, Boolean isLeafSegment, ClientValueCollection args)
    at Microsoft.SharePoint.Client.Rest.RestRequestProcessor.CreateMethodArgumentsUsingNamedParameters(MethodInformation methodInfo, IList`1 parameterList, Boolean isLeafSegment, Boolean allowPostBodyAccess)
    at Microsoft.SharePoint.Client.Rest.RestRequestProcessor.InvokeMethod(Boolean mainRequestPath, Object value, ServerStub serverProxy, EdmParserNode node, Boolean resourceEndpoint, MethodInformation methodInfo, Boolean isExtensionMethod, Boolean isIndexerMethod)
    at Microsoft.SharePoint.Client.Rest.RestRequestProcessor.GetObjectFromPathMember(Boolean mainRequestPath, String path, Object value, EdmParserNode node, Boolean resourceEndpoint, MethodInformation& methodInfo)
    at Microsoft.SharePoint.Client.Rest.RestRequestProcessor.GetObjectFromPath(Boolean mainRequestPath, String path, String pathForErrorMessage)
    at Microsoft.SharePoint.Client.Rest.RestRequestProcessor.Process()
    at Microsoft.SharePoint.Client.Rest.RestRequestProcessor.ProcessRequest()
    at Microsoft.SharePoint.Client.Rest.RestService.ProcessQuery(Stream inputStream, IList`1 pendingDisposableContainer)
    Any help?
    Somebody?
    Thanks

    Hi patrik
    Really appreciate your replying.
    Could you try and refer to the issues below:
     this error occurs even with site collection administrator (i tested it with three different
    users)
    there isnt any difference between items in list - all have same permissions
    it occurs in several lists in site (all lists have same permissions)
    if browsing inside the LAN everything works just fine
    updating from the UI works fine in all means
    It really seems like a Rest related problem(is there anyone from the Microsoft REST team who can take look at this error?)
    Thanks
    Hushay

  • Using REST API: Query search box to return list items

    Hey,
    My goal is to create a search box which returns the items (matching to the name) from a list.
    Bonus: The return would happen without requiring user to click a
    Search button or such.
    To achieve this I assume the SharePoint 2013's REST API should be used. I'm completely inexperienced in using the REST API so all kind of suggestions are available.

    Hi,
    Here are some articles about SharePoint 2013 REST API for your reference:
    Get started with the SharePoint 2013 REST service
    http://msdn.microsoft.com/en-us/library/office/fp142380(v=office.15).aspx
    How to: Complete basic operations using SharePoint 2013 REST endpoints
    http://msdn.microsoft.com/en-us/library/office/jj164022.aspx
    SharePoint 2013 – CRUD on List Items Using REST Services & jQuery
    http://www.plusconsulting.com/blog/2013/05/crud-on-list-items-using-rest-services-jquery/
    Working with SharePoint list data - OData, REST and JavaScript
    http://blogs.technet.com/b/fromthefield/archive/2013/09/05/working-with-sharepoint-list-data-odata-rest-and-javascript.aspx
    Best regards
    Dennis Guo
    TechNet Community Support

  • Reading list items using JQeury

    Hi All,
    I am new to JQuery. Please help me on reading the ListItems(for eg., title, name, location etc.,) using JQeury & wanted to display this data in a site page.
    Let me know if you have any queries.
    Thanks,
    Kumar.

    check this article on using REST and Jquery to get list items
    http://www.plusconsulting.com/blog/2013/05/crud-on-list-items-using-rest-services-jquery/
    you can use JSOM as well
    http://social.msdn.microsoft.com/Forums/sharepoint/en-US/8dda0580-c632-4c1b-92f0-59e1a3f29e5b/jquery-fetch-data-from-sharepoint-list-in-a-webpart
    My Blog- http://www.sharepoint-journey.com|
    If a post answers your question, please click Mark As Answer on that post and Vote as Helpful

  • How to create list items with multiple attachment files using rest api javascript

    In one of user form I am using javascript rest api to create a list item with multiple attachment files. So far I am able to create list item and once created uploading an attachment file. But this is two step process first create an item and then upload
    a file.
    It create an additional version of the item which is not desired. Also I am not able find a way to attach multiple files in a go. Following is the code I am using.
    createitem.executeAsync({
                    url: "/_api/web/lists/GetByTitle('UserForm')/items(1)/AttachmentFiles/add(FileName='" + aFile.name + "')",
                    method: "POST",
                    contentType: "application/json;odata=verbose",
                    headers: {
                        "Accept": "application/json;odata=verbose",
                        "X-RequestDigest": $("#__REQUESTDIGEST").val()
                    binaryStringRequestBody: true,
                    body: fileContent,
                    success: fnsuccess,
                    error: fnerror
    So somehow I need to combine item attributes along with attachment files in body: param. I visited https://msdn.microsoft.com/en-us/library/office/dn531433.aspx#bk_ListItem but no success.
    Appreciate any help.

    Thanks Mahesh for the reply and post you share it was useful.
    But this does not solve the core of the issue. You are uploading attachments after creation of item and multiple files are being attached in loop. This is kind of iterative update to an existing item with attachments. This will end up creating multiple versions. 
    What I am trying to achieve is to create an item along with multiple attachments in a go. No item updates further to attach a file.
    Please suggest how this can be done in one go. SharePoint does it when one creates an item with multiple attachment.
    Thanks for your reply.

  • How to get permission of a sharepoint list for a user using REST api

    Hi there,
    I have a requirement where i need to check the access permission of a user against a List or Library only using REST api from my remote salesforce app. [I already have access token and I am able to view list, add item etc..]
    Say for example, I have to send the list name and user name, and get the result as Read, Write, Contribute(Manage), None. I need to display what permission does that user have for that List.
    How do I achieve this. Please help me.
    Thanks in advance.

    Hi,
    For High and low bits, we can create a new SP.BasePermissions object to use like below:
    function success(data){
    var permissions = new SP.BasePermissions();
    permissions.set(SP.PermissionKind.manageLists);
    var hasPermission = permissions.hasPermissions(data.d.EffectiveBasePermissions.High, data.d.EffectiveBasePermissions.Low);
    Here is a detailed article for your reference:
    http://www.lifeonplanetgroove.com/checking-user-permissions-from-the-sharepoint-2013-rest-api/
    Thanks
    Best Regards
    Jerry Guo
    TechNet Community Support

  • How to update list item using client object model without changing created/modified dates?

    Hello All,
    I want to update list item using the SharePoint Client Object
    Model without updating the created / modified date. Is it possible?
    Please help.
    Thanks.

    Using the SystemUpdate method should do the trick, according
    to its literature.
    Additionally, would something like this be of any use for you?  Taken from this
    Stack Exchange thread: -
    public static class SPListItemExtensions
    /// <summary>
    /// Provides ability to update list item without firing event receiver.
    /// </summary>
    /// <param name="item"></param>
    /// <param name="doNotFireEvents">Disables firing event receiver while updating item.</param>
    public static void Update(this SPListItem item, bool doNotFireEvents)
    SPItemEventReceiverHandling rh = new SPItemEventReceiverHandling();
    if (doNotFireEvents)
    try
    rh.DisableEventFiring();
    item.Update();
    finally
    rh.EnableEventFiring();
    else
    item.Update();
    /// <summary>
    /// Provides ability to update list item without firing event receiver.
    /// </summary>
    /// <param name="item"></param>
    /// <param name="incrementListItemVersion"></param>
    /// <param name="doNotFireEvents">Disables firing event receiver while updating item.</param>
    public static void SystemUpdate(this SPListItem item, bool incrementListItemVersion, bool doNotFireEvents)
    SPItemEventReceiverHandling rh = new SPItemEventReceiverHandling();
    if (doNotFireEvents)
    try
    rh.DisableEventFiring();
    item.SystemUpdate(incrementListItemVersion);
    finally
    rh.EnableEventFiring();
    else
    item.SystemUpdate(incrementListItemVersion);
    /// <summary>
    /// Provides ability to update list item without firing event receiver.
    /// </summary>
    /// <param name="item"></param>
    /// <param name="doNotFireEvents">Disables firing event receiver while updating item.</param>
    public static void SystemUpdate(this SPListItem item, bool doNotFireEvents)
    SPItemEventReceiverHandling rh = new SPItemEventReceiverHandling();
    if (doNotFireEvents)
    try
    rh.DisableEventFiring();
    item.SystemUpdate();
    finally
    rh.EnableEventFiring();
    else
    item.SystemUpdate();
    private class SPItemEventReceiverHandling : SPItemEventReceiver
    public SPItemEventReceiverHandling() { }
    new public void DisableEventFiring()
    base.DisableEventFiring();
    new public void EnableEventFiring()
    base.EnableEventFiring();
    Steven Andrews
    SharePoint Business Analyst: LiveNation Entertainment
    Blog: baron72.wordpress.com
    Twitter: Follow @backpackerd00d
    My Wiki Articles:
    CodePlex Corner Series
    Please remember to mark your question as "answered" if this solves (or helps) your problem.

  • Document Set Creation in document library using REST API in Sharepoint 2013

    Hi,
    I want to create the document set using REST API call. Currently i am able to create the folder and able to upload the files using REST API's in the document library. Is there any way we can pass the contentype name or Id and create the document set using
    REST API call. We need to create the document set along with metadata and upload the files inside the document set.
    I need to create the document set along with meta data column values using REST API. Please let me know how we can achieve this through REST API.
    Thank you,
    Mylsamy

    Hi,
    According to your post, my understanding is that you wanted to create document set along with managed metadata fields.
    The REST API does not currently support working with Managed Metadata or Taxonomy fields.
    As a workaround, we can use the JavaScript Client Object Model.
    Create document set using JavaScript Client Object Model.
    http://blogs.msdn.com/b/mittals/archive/2013/04/03/how-to-create-a-document-set-in-sharepoint-2013-using-javascript-client-side-object-model-jsom.aspx
    http://social.technet.microsoft.com/Forums/sharepoint/en-US/aacd96dc-0fb2-4f0d-ab4c-f94ce819e3ed/create-document-sets-with-javascript-com-sharepoint-2010
    Set managed metadata field with JavaScript Client Object Model.
    http://sharepoint.stackexchange.com/questions/95933/add-list-item-with-managed-metadata-field-through-jsom
    http://sharepointfieldnotes.blogspot.com/2013/06/sharepoint-2013-code-tips-setting.html
    Thanks,
    Jason
    Forum 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
    [email protected]
    Jason Guo
    TechNet Community Support

  • Problem when selecting PublishingRollupImage using REST API using Javascript ?

    Hii Guys,
    I am developing  a listing page of News using REST, the custom list contains Title, PublishingRollupImage, and other fields which is provided in the $select
    http://xyz/_api/web/lists/getbytitle('News')/Items?$select=Title,Link,PublishingRollupImage
    the column "PublishingRollupImage" is there and i can return the result by using normal JavaScript API with CAML query.
    but REST calling while specifying this column is failing with this error
    The field or property 'PublishingRollupImage' does not exist
    Microsoft.SharePoint.Client.InvalidClientQueryException
    please note that this is not the (hyperlink/image) field,
    its an existing site columns (publishing image)

    Hi,
    According to your post, my understanding is that you want to get Rollup Image data using REST API.
    Per my knowledge, we can’t get it using REST API.
    We can use Client Object Model to achieve it, the following code snippet for your reference:
    var ctx = new SP.ClientContext();
    var items = ctx.get_web().get_lists().getByTitle('Pages').getItems(new SP.CamlQuery());
    ctx.load(items);
    ctx.executeQueryAsync(function() {
    // Get the first items rollup image, just as an example
    var rollupImage = items.getItemAtIndex(0).get_item('PublishingRollupImage');
    console.log(rollupImage);
    If you still want to use the REST API, we can customize a We Service to achieve it.
    http://sharepointlearningcurve.blogspot.in/2013/08/creating-wcf-rest-service-for.html
    Here is a similar thread for you to take a look:
    http://sharepoint.stackexchange.com/questions/46844/how-to-get-publishingrollupimage-for-page-in-page-library-with-rest-and-jquery
    Best Regards
    Dennis Guo
    TechNet Community Support

  • Add Item using REST and populate People field (SharePoint 2010)

    I am trying to add an item to a list that has a People type field using REST API.  For some reason, I am getting 400 (Bad Request) error.  Can anyone show me how to add a list item and populate the user field?
    Here's the code snippet I am using -
    var url = 'https://mytestsite/_vti_bin/listdata.svc/mylist';
    var item = {};
    item.Title = 'my REST item';
    item.User = 'contoso\user1';
    var jsonObj = Sys.Serialization.JavaScriptSerializer.serialize(item);
    $.ajax({
             type: 'POST',
             url: url,
             contentType: 'application/json',
             processData: false,
             data: jsonObj,
             success: function ()
               console.log('item updated');
    Thanks!

    Hi,
    To update the People field, we will need to make a reference to the user information list.
    Here are two links will provide more information:
    http://sharepoint.stackexchange.com/questions/65650/rest-api-update-a-muli-value-user-field
    http://charliedigital.com/2011/04/23/updating-user-fields-via-listdata-svc/
    You can view the User Information list in this way:
    http://zimmergren.net/technical/sharepoints-hidden-user-list-user-information-list
    Best regards
    Patrick Liang
    TechNet Community Support

  • 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?
    Thanks,
    techie

    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 SharePoint’s 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
    [email protected]
    Dennis Guo
    TechNet Community Support

Maybe you are looking for