Alcune query JavaScript per SharePoint che possono tornare utili per debug da incollare direttamente nella developer console del Browser

Elenco Liste

JavaScript

fetch('{eventuale path del sito}/_api/web/lists?$select=Is,Title,Hidden,ItemCount,Created&$orderby=Title',
  {headers:
    {
      accept: 'application/json;odata=nometadata'
    }
  })
  .then((response) => response.json())
  .then(data => console.log(data.value))

Elenco Campi (Fields)

JavaScript

var url = '{eventuale path del sito}/_api/web/fields?$select=Id,Title,InternalName,TypeAsString,Hidden,Group,Scope&$orderby=Title';

var response = await fetch(url, { headers: { accept: 'application/json;odata=nometadata' } } );
var data = await response.json();
console.log(data.value)

Elenco Content Types

JavaScript

var url = '{eventuale path del sito}/_api/web/contenttypes?$select=StringId,Name,Group,Hidden&$orderby=Name';

var response = await fetch(url, { headers: { accept: 'application/json;odata=nometadata' } } );
var data = await response.json();
console.log(data.value)
Tags:
SharePoint498 JavaScript184 SharePoint 201668 SharePoint Online75
Potrebbe interessarti anche: