The code snippet I have below is retrieving all documents in one document library inside one site.

I want to be able to retrieve all documents inside all document library's inside all my sites/tenancy.

  public getDocuments() {
            { params:{},
              headers: { 'accept': 'application/json;odata=verbose' }
    .then(response => {
        documents: response.data.d.results
    .catch(error => {

Any idea how to update my endpoint to do so?


you can use search to get all document by contentTypeId


| improve this answer | |
  • This does not seem to return the documents I have in the document librarys. Such as .csv or .txt files? – BennKingy Nov 21 '19 at 13:48

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.