4

This is driving me crazy, but I think it's an issue on my sharepoint online.

Why the heck this is not working?

/_api/web/lists/getByTitle('Documents')/items/?$filter=startswith(ContentTypeId,  '0x0101')

The craziest thing is that if I use $filter=ContentTypeId eq '0x0101.................', it works.

1

If you want to perform a rest query using $filter and content type id field, you can do it like below:

http://siteurl/_api/web/lists/getbytitle('Documents')/items?$select=ID,Title&$filter=startswith(ContentTypeId,'0x0101')

Insert the internal column names in the $select to get the column names.

  • 2
    It was suppressed for the sake of moment. And, for sure it does not make any difference. but thank you anyway – egidiocs Apr 15 '16 at 5:22

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.