0

I tried to use Rest API to get list items in Office 365, the list has 3 items in total.

When I visit the below URL:

http://sitename/_api/web/lists/getbytitle('List Name')/

It shows list information, but in the item count it has 0. These 3 items are there in the list for more than a week now. Rest API is working fine for other list items in the same site.

0

2 Answers 2

4

To get the list items using REST API you need to use the URL like below:

http://sitename/_api/web/lists/getbytitle('List Name')/items

To get the List Item Count using REST API you need to use:

http://sitename/_api/web/lists/getbytitle('List Name')?$select=ItemCount

Reference: Working with lists and list items with REST

1
  • Hi Vignesh, does this answers your question? If yes, Please Upvote(^) and accept as an Answer so that it will help others with same question to find the correct answer easily. It also removes the question from "Unanswered questions" list. Commented Feb 14, 2021 at 16:10
0

Should append items endpoint in the url, please check the official documentation as below:

enter image description here

Working with lists and list items with REST

Your Answer

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

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.