No Results
Search Tips:
- Please consider misspellings
- Try different search keywords
Newer Version Available
Files Resources
Available resources are:
| Resource | Description |
|---|---|
| /chatter/files/fileId | Returns details about the specified file. Can also be used to rename a file, upload a new version of an existing file, move a file to a different folder, and delete a file. |
| /chatter/files/fileId/content | Returns the content of the file. The content is streamed as the body of the response. |
| /chatter/files/fileId/file-shares | Returns information about the objects with which the specified file has been shared. Objects can be users, groups, or records. Can also be used to share the specified file with users. |
| /chatter/files/fileId/file-shares/link | A description of a file shared as a link. Create, access, and delete a file’s share link. |
| /chatter/files/fileId/rendition | 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. |
| /chatter/files/batch/fileIds | Information about a list of files, specified by file IDs. Get information about a list of files and delete a list of files. |
File Information
Returns details about the specified file. Can also be used to rename a file, upload a new version of an existing file, move a file to a different folder, and delete a file.
To upload a new version of an existing file, make a POST request. You must upload the new version as a binary part in a multipart/form-data request. See Uploading Binary Files. To upload a new file to the Files tab, use /chatter/users/me/files.
- Resource
1/chatter/files/fileId- Available since version
- 24.0
- HTTP methods
- GET, POST, PATCH, DELETE, or HEAD
- Request body for POST
- Root XML tag
- <fileInput>
- JSON
1{ 2 "desc" : "Employee Survey Results", 3 "title" : "emp_surv_results" 4}- Properties
-
- Request parameters for POST
-
Name Type Description Available Version desc String Description of the file to be uploaded. 26.0 isDataSync Boolean The request is automatically generated by an automated client. 30.0 (pilot only) isInMyFileSync Boolean true if the file is included in the user’s Salesforce Files folder, and is synced between that folder and Chatter; false otherwise. 30.0 (pilot only) title String Title of the file. 26.0 - Request parameters for GET and HEAD
Get information about the specified file.
Name Type Description Available Version versionNumber Integer Specify an existing version number for the file. If not specified, the latest version is returned. 23.0 - Request parameters for PATCH
Update the title or sync state of a file or move a file to a different folder.
Name Type Description Available Version title String A new title for the file 26.0 isInMyFileSync Boolean true if the file is included in the user’s Salesforce Files folder, and is synced between that folder and Chatter; false otherwise. 30.0 (pilot only) parentFolderId String ID of the containing folder 30.0 (pilot only) - Response body for GET, POST, PATCH, and HEAD
- File Detail
- Response body for DELETE
- Returns a status code of 204.
- Example
- This PATCH request updates the title of a file:
1/chatter/files/069D00000001FHF?title=A+New+Title
File Content
Returns the content of the file. The content is streamed as the body of the response.
- Resource
1/chatter/files/fileId/content- Available since version
- 24.0
- HTTP methods
- GET
- Request parameters
-
Name Type Description Available Version versionNumber Integer Specify an existing version number for the file. If not specified, the latest version is returned. 23.0 - Response body
- Binary stream of the file content.
File Rendition
- Resource
1/chatter/files/fileId/rendition- Available since version
- 24.0
- HTTP methods
- GET
- Request parameters
-
Name Type Description page Integer Specify a rendition of a specific page. The first page is 0. If you don’t specify a specific page, a rendition of the first page is returned. For a PDF file rendition, the rendition is for the entire document. The only valid value is 0: you can’t get the rendition of a single page.
type String Specify the type of rendition to be returned. Default value is THUMB120BY90. Valid values are: - FLASH
- THUMB120BY90
- THUMB240BY180
- THUMB720BY480
- Response body
- Binary stream of the rendition.
File Information, Batch
Information about a list of files, specified by file IDs. Get information about a list of files and delete a list of files. The number of file IDs you can specify is limited by the length of the URL. In general, you can specify up to 100 file IDs in a comma-separated list.
- Resource
1/chatter/files/batch/fileIds- Available since version
- 26.0
- HTTP methods
- GET, DELETE
- Response body
- Batch Result Item