1

I am trying to enumerate all of the list names which are available in my site collection. I have tried multiple combinations of the URL but still i am not able to get the List's name. even below URL also doesn't help:

_api/web/lists?$select=Title&$filter=BaseTemplate eq 100
1
  • Please refer to my answer, hope it helps! Commented Oct 24, 2018 at 16:38

2 Answers 2

1

The REST URL is working perfect as it returns only the generic lists. If you want to get the list title then iterate the JSON results into a for loop as follows:

Store the JSON result as: var results = data.d.results;

Then iterate and get the list name under the "Title" property.

for (var i = 0; i < results.length; i++) 
    {  
        var listName = results[i].Title;   
    }
0

A GET call to that REST endpoint will return all of the data you're looking for and you should be able to access the Title attribute off of the returned data. Just make sure the data is returned in your expected format (JSON for instance). You can use Fiddler or your browser debug console to verify what is coming back.

(confirmed against my own instance)

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

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