0

I'm working on retrieving the Feeds' content data using REST API. The url to be submitted is of the format:

instance_url/services/data/v36.0/sobjects/object_name/id/ContentData

All the feed objects worked except for FeedItem which returned a 404. Is there a way that I could retrieve the contentdata without using Chatter or SOAP APIs?

Since I am downloading all the feed objects such as 'AccountFeed', 'ContactFeed', '*Feed' objects and FeedItem has a parentId field, does it make sense to download the FeedItem content data object in the first place?

2

As per v36.0, FeedItem object was introduced with the changes:

The following fields have been removed, and are available in API version 35.0 and earlier only

. These fields are no longer in use because content attachments are now created through FeedAttachment.

• ContentData

• ContentDescription

• ContentFileName

• ContentSize

• ContentType

The following relationship field has been added.

FeedAttachments

A child relationship field that associates a parent FeedItem record to its FeedAttachment records. FeedAttachment and FeedItem records are linked through the FeedAttachment.FeedEntityId field.

| improve this answer | |
0

second what dmachop said. The reason Salesforce had to move that part of the content data to FeedAttachment is that multiple file attachments per feedItem feature was introduced in that release, FeedItem to ContentData is no longer a 1:1 relationship. You should be able to retrieve the data from FeedAttachment.Record field.

| improve this answer | |

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.