0
votes

I have several lists in SharePoint, and each list has a number of views

How can I get view list items with value in SharePoint using REST API? Can I get this data through CSOM?

When I use this method, I have this output :

http://win-lfl4bgulf29/_api/lists/getbytitle('EvertList')/views

Sharepoint view list output

But I'm looking for that

Sharepoint List

1
check this linkGautam Sheth
@GautamSheth ThanksAli varzeshi

1 Answers

0
votes

You can use the Endpoint like below to view list item data:

 _spPageContextInfo.siteAbsoluteUrl + "/_api/web/lists/getbyTitle('EvertList')/items"

Ajax call like this:

 $.ajax({
        url: _spPageContextInfo.siteAbsoluteUrl + "/_api/web/lists/getbyTitle('Cars')/items",
        type: "GET",
        contentType: "application/json;odata=verbose",
        headers: {
            "Accept": "application/json;odata=verbose"
        },
        success: function (data) {
         console.log(data.d.results);

        },
        error: function (data) {
            alert("Error");

        }
    });

Responsed Json in Console:

enter image description here