I have been reading up on the Chatter API. I am trying to use the Chatter API to search through a users Chatter items: Feed, People, Groups, Files.

After OAuth authentication, I can successfully do a GET to the following to get Feed, People, and Group results for a user:


However, I cannot seem to figure out a way to search through the Files in the Chatter account. The following does not work:


I have read through the documentation (https://resources.docs.salesforce.com/196/latest/en-us/sfdc/pdf/salesforce_chatter_rest_api.pdf) but could not figure how to search for files. What am I missing here?

2 Answers 2


You can search through files that a user owns with a GET request to the User Files, General endpoint:


But for a general file search, you'll need to do a SOQL query on ContentVersion or ContentDocument as described in the other answer.

  • Brilliant, worked just fine! Thanks. On a related note, how can I limit the fields being returned, sort of like how it's possible with SOSL?
    – rc1
    Jul 7, 2015 at 0:51
  • Do you want to a) search only on certain fields, or b) include only certain fields in the response? Option a) isn't possible with the REST endpoint. For Option b), you can use either filter groups or inclusion/exclusion filters: developer.salesforce.com/docs/atlas.en-us.chatterapi.meta/…
    – alouie
    Jul 7, 2015 at 6:52
  • I was trying to do Option b, and the resource you pointed me to is just right. Thanks yet again.
    – rc1
    Jul 11, 2015 at 1:35

You may want to query ContentVersion object for chatter file names. Looks to me all services are expecting some id (file or folder id).

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .