Newer Version Available

This content describes an older version of this product. View Latest

Salesforce Files

Use Connect REST API to work with Salesforce Files.

Use Salesforce Files to upload, store, find, follow, share, and collaborate on files in the cloud.

Resource HTTP Methods Tasks
/chatter/feed-elements GET, POST Post feed elements and search all feed elements in an organization.
/chatter/feeds/files/me/feed-elements GET Returns all feed elements posted with files by people or groups that the context user follows.
/chatter/feeds/news/me/feed-elements GET All feed elements from all groups the context user either owns or is a member of, as well as all files, records, and users the context user follows. Use this resource to get information about feed elements and to post feed elements.
/chatter/feeds/record/​recordId/feed-elements GET Returns the feed elements for all the records the context user is following, or all the feed elements of the specified recordId. Use this resource to search a feed or to get the feed elements for a specific feed, including another user’s feed. To use this resource to get the feed elements for a group, specify the group ID as the recordId.
/chatter/feeds/user-profile/​userId/feed-elements GET Returns feed elements created by the user, parented by the user, and where the user is mentioned. In Experience Cloud sites only, this feed also contains feed elements on which the user commented. This feed is different than the news feed, which returns more feed items, including group updates. You can post to the user-profile feed. You can get another user’s user profile feed.
/connect/files/fileId GET, POST, PATCH, DELETE Get information about a specified file, including references to external files. Upload a new version of an existing file, including references to external files. Rename a file, move a file to a different folder, and delete a file.
/connect/files/fileId/asset POST Create an asset file.
/connect/file-assets/assetId GET, PATCH Get information about an asset file or change the visibility of an asset file for unauthenticated users.
/connect/file-assets/fullyQualifiedName​/content GET Get the streamed content of an asset file.
/connect/file-assets/fullyQualifiedName​/rendition GET Get up to 25 streamed renditions of an asset file. A rendition is a binary preview of the file.
/connect/file-assets/batch/assetIds GET Get information about a comma-separated list of up to 100 asset files.
/connect/files/fileId/content GET Returns the content of the file, including references to external files. The content is streamed as the body of the response.
/connect/files/fileId/file-shares GET, POST Get the users, groups, or records with which a file has been shared. Share a file with users.
/connect/files/fileId/image GET Get information about a file image.
/connect/files/fileId/file-shares/link GET, PUT, DELETE Get, create, and delete a file’s share link.
/connect/files/fileId/previews GET, PATCH Get information about a file's supported previews and generate up to 500 pages in a file preview.
/connect/files/fileId/previews/​previewFormat GET Get up to 500 pages in a file preview or get a specific page in a preview.
/connect/files/fileId/rendition GET A rendition of the file. A rendition is a binary preview of the file. The format of the binary depends on the format specified in the request.
/connect/files/batch/fileIds GET, DELETE Information about a list of files, specified by file IDs. Get information about a list of files and delete a list of files.
/connect/folders/folderId GET, PATCH, DELETE Get information about the specified folder. Move, rename, and delete a folder.
/connect/folders/folderId/items GET, POST Get information about the contents of a folder. Add a file to a folder and create a folder.
/chatter/groups/groupId/files GET Get information about the files posted to the specified group.
/connect/topics/topicId/files GET Returns information about the five files most recently posted to the specified topic.
/connect/files/users/userId GET, POST Upload a file, including references to external files, to the Files home or get information about files a user owns. These files don’t include files shared with a user, files a user follows, or general organization files.
/connect/files/users/me/filter/groups GET Get information about files posted to groups that the specified user is a member of.
/connect/files/users/me/filter/​shared-with-me GET Get information about files that have been shared with the specified user.

You can replace the alias me with the user ID of the context user.

Note

To work with repository files, see Files Connect Repository Resources.