Write to a SharePoint list from an html page that is not located within the SharePoint site -


i have website not located within sharepoint site. want collect user data website , save in sharepoint list. possible?

you can perform list operations including add, update, , delete using built-in sharepoint rest api.

microsoft provides pretty documentation using rest api.

note: api endpoints , features noticeably different sharepoint 2010 , 2013.

there many variations use rest api. here snippet of sample rest call might add item existing list using javascript:

    function addlistitem() {                var mylisturl= "mysite.sharepoint.com/_vti_bin/listdata.svc/mylist";                    var item= {};                item.title = "adding item using 2010 rest api";                 var itementry= json.stringify(item);                 $.ajax({                    type: "post",                    url: mylisturl,                    data: itementry,                    contenttype: "application/json; charset=utf-8",                    success: function () {                        //do stuff here                     },                    error: function() {                      //do error handling here                   }                 });            } 

Comments

Popular posts from this blog

java - nested exception is org.hibernate.exception.SQLGrammarException: could not extract ResultSet Hibernate+SpringMVC -

sql - Postgresql tables exists, but getting "relation does not exist" when querying -

asp.net mvc - breakpoint on javascript in CSHTML? -