Newer Version Available
Files Connect Repository Folder Items
Get information about the files and folders in a repository folder.
Create a file in a repository folder.
To upload a file, send it in a multipart/form-data request. You can include metadata for the file in the multipart/form-data request as a JSON or XML request body. For information about how to create the multipart/form-data message, see Uploading Binary Files.
- Resource
-
1/connect/content-hub/repositories/repositoryId/folders/repositoryFolderId/items1/connect/communities/communityId/content-hub/repositories/repositoryId/folders/repositoryFolderId/items - Available version
- 32.0
The communities resource is available in version 35.0 and later.
- Requires Chatter
- No
- HTTP methods
- GET, HEAD, POST
POST is supported in version 35.0 and later.
- Request parameters for GET
-
Parameter Name Type Description Required or Optional Available Version page Integer An integer specifying a page of items. The default value is 0, which returns the first page. Optional 32.0 pageSize Integer Specifies the number of items per page. Valid values are between 1 and 100. If you pass in null, the default is 25. Optional 32.0 - Response body for GET
- Repository Folder Items Collection
- Request body for POST
- Uploads to repositories are limited to 75 MB.
Before you create an item in a repository folder, check to see which item types you’re allowed to create. Make a GET request to /connect/content-hub/repositories/repositoryId/folders/repositoryFolderId/allowed-item-types.
-
- Root XML tag
- <contentHubInputItem>
- JSON example
-
1{ 2 "itemTypeId" : "file", 3 "fields" : [ 4 { 5 "name" : "name", 6 "value" : "Content Hub Simple Create Specs" 7 }, 8 { 9 "name" : "description", 10 "value" : "Document explaining the various connect api endpoints required for simple create" 11 }] 12} - Properties
-
Name Type Description Required or Optional Available Version fields Files Connect Field Value Input[] List of fields for the item. Required to create a SharePoint file in a repository because the file name is required; otherwise optional 35.0 itemTypeId String ID of the item type. Required to create a file in a repository 35.0
- Response body for POST
- Repository Folder Item
- Example POST request
- This example creates a file and uploads it to an external repository. The example
shows the body parts in a multipart/form-data request. The first body part is a Files
Connect Item Input request body. The second is the content of the file. For more
information, see Uploading Binary Files.
1POST /services/data/v53.0/connect/content-hub/repositories/0XCxx000000002CGAQ/ 2folders/folder:0Bz0nXuFg43SiflFNdFNIaUJrY2hQaHVIVHMxYVpHd2ZHeXphTW83TElzcE84RUJ2Q3Q4Rm8/items 3 4Authorization: OAuth 00DD0000000Jhd2!AQIAQC.lh4qTQcBhOPm4TZom5IaOOZLVPVK4wI_rPYJvmE8r2VW8XA. 5OZ7S29JEM_7Ctq1lst2dzoV.owisJc0KacUbDxyae 6User-Agent: Jakarta Commons-HttpClient/3.0.1 7Host: instance_name 8Content-Length: 489 9Content-Type: multipart/form-data; boundary=a7V4kRcFA8E79pivMuV2tukQ85cmNKeoEgJgq 10Accept: application/json 11 12--a7V4kRcFA8E79pivMuV2tukQ85cmNKeoEgJgq 13Content-Type: application/json 14Content-Disposition: form-data; name="json" 15 16{ 17 "itemTypeId" : "file", 18 "fields" : [ 19 { 20 "name" : "name", 21 "value" : "Items Sharepoint 012.png" 22 }, 23 { 24 "name" : "description", 25 "value" : "This is a test file" 26 }] 27} 28 29--a7V4kRcFA8E79pivMuV2tukQ85cmNKeoEgJgq 30Content-Disposition: form-data; name="fileData"; filename="items_Sharepoint_012.png" 31Content-Type: image/png 32 33...PNG... 34 35--a7V4kRcFA8E79pivMuV2tukQ85cmNKeoEgJgq--