bresleveloper
bresleveloper

Reputation: 6070

microsoft graph API using filter on get sharepoint items

i am trying to filter my Sharepoint Items results query with the Microsoft Graph API as explained here so i am trying this https://graph.microsoft.com/beta/sites/{site-id}/lists/{list-id}/items so i tried adding

?&filter=od eq 1, or copying from expand ?filter=fields(select%3Did) = 1, none works. please help

Upvotes: 12

Views: 9045

Answers (3)

Mani
Mani

Reputation: 65

@mhbuur

add request header Prefer: HonorNonIndexedQueriesWarningMayFailRandomly

Upvotes: 3

Baris Bikmaz
Baris Bikmaz

Reputation: 401

You don't need to filter by id just do:

https://graph.microsoft.com/beta/sites/{site-id}/lists/{list-id}/items/{id}

Upvotes: 1

bresleveloper
bresleveloper

Reputation: 6070

FOUND IT!

&filter=fields/id eq 1

&filter=fields/ContentType eq 'Apartment Page' -> NO DOUBLE QUOTES

&filter=startswith(fields/id,1)

Upvotes: 15

Related Questions