Read a SharePoint list using SharePoint API

Pavithra E (CLEARWATER GROUP LLC) 0 Reputation points Microsoft Vendor
2023-12-07T09:59:35.4566667+00:00

Read a SharePoint list using SharePoint API

SharePoint
SharePoint
A group of Microsoft Products and technologies used for sharing and managing content, knowledge, and applications.
11,110 questions
0 comments No comments
{count} votes

1 answer

Sort by: Most helpful
  1. RaytheonXie_MSFT 38,111 Reputation points Microsoft Vendor
    2023-12-08T02:04:07.9033333+00:00

    Hi @Pavithra E (CLEARWATER GROUP LLC),

    There are two different api to get list items. Please refer to the following samples

    1.Rest api

    GET 
    https://{site_url}/_api/web/lists/GetByTitle('Test')/items 
    Authorization: "Bearer " + accessToken 
    Accept: "application/json;odata=verbose"
    

    Please refer to the document for more details

    https://learn.microsoft.com/en-us/sharepoint/dev/sp-add-ins/working-with-lists-and-list-items-with-rest#working-with-list-items-by-using-rest

    2.Graph api

    GET /sites/{site-id}/lists/{list-id}/items
    

    For reference

    https://learn.microsoft.com/en-us/graph/api/listitem-list?view=graph-rest-1.0&tabs=http


    If the answer is helpful, please click "Accept Answer" and kindly upvote it. If you have extra questions about this answer, please click "Comment".

    Note: Please follow the steps in our documentation to enable e-mail notifications if you want to receive the related email notification for this thread.


Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.