Skip to content

Instantly share code, notes, and snippets.

What would you like to do?
Getting SP.List properties using SharePoint REST
function getJson(url)
return $.ajax({
url: url,
type: "GET",
contentType: "application/json;odata=verbose",
headers: {
"Accept": "application/json;odata=verbose"
function getListProperties(listTitle) {
var listEndpointUrl = _spPageContextInfo.webAbsoluteUrl + "/_api/web/lists/getbytitle('" + listTitle + "')/SchemaXml";
return getJson(listEndpointUrl).then(
var schemaXml = data.d.SchemaXml;
return schemaXml2Json(schemaXml);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment