SharePoint REST API is not able to get an item

john john Pter 1,040 Reputation points
2024-10-17T17:13:03.9433333+00:00

I have this list inside SharePoint online:-

User's image

Now when i write this REST API I will not get the item:-

DestinationItemID2 eq '​b!B_cp4O1z3UWJZwD0nLlCD30PN0T59jBInsAjZKgerapT_CbZ-9oRS7oTEHC0zg-T.01DZCLQ3ZMKDHIM6B27ZHK2POEGQXSSXGX' and ListName eq 'Zoho' and ReadCount eq 2

but if i submit those parameters >> i will get the item:-

DestinationItemID2 eq 'b!B_cp4O1z3UWJZwD0nLlCD30PN0T59jBInsAjZKgerapT_CbZ-9oRS7oTEHC0zg-T.01DZCLQ3ZMKDHIM6B27ZHK2POEGQXSSXGX' and ListName eq 'Zoho'

any advice?

Thanks

Microsoft 365 and Office | SharePoint | Development
Microsoft 365 and Office | SharePoint | For business | Windows
0 comments No comments
{count} votes

Accepted answer
  1. Ling Zhou_MSFT 23,620 Reputation points Microsoft External Staff
    2024-10-18T02:28:38.6333333+00:00

    Hi @john john Pter,

    Thank you for posting in this community.

    I tested your first Rest API. I was able to get the items correctly. I checked your Rest API without problems.

    I suggest clearing the cache and retesting.

    Or I suggest you test your request directly through Internet Explorer, although the return value of the page is hard to read. However, we can read the return value through the Xml parser. This is the most direct way to check if your Rest API is correct. (Since I can't use post man, this is how I tested it.)

    Attached is the Rest API I used.

    https://{site url}/_api/web/lists/getbytitle('ListName')/items?$filter=(DestinationItemID2 eq 'b!B_cp4O1z3UWJZwD0nLlCD30PN0T59jBInsAjZKgerapT_CbZ-9oRS7oTEHC0zg-T.01DZCLQ3ZMKDHIM6B27ZHK2POEGQXSSXGX') and (ListName eq 'Zoho') and (ReadCount eq 2)
    

    Here is my test result:

    User's image

    User's image


    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.

    1 person found this answer helpful.
    0 comments No comments

1 additional answer

Sort by: Most helpful
  1. john john Pter 1,040 Reputation points
    2024-10-18T08:52:31.8833333+00:00

    @Ling Zhou_MSFT after 4 hours this is working well

    0 comments No comments

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.