Get folder contents
https://{FusionAppsHost}/crmRestApi/atcProductCatalog/11.13.18.05/v1/folder/{name}
Request
-
name(required): string
The name of the parent folder to search content.
-
fileName.ew(required): string
The ending name of the file to fetch the filelist.
-
fileName.sw(required): string
The starting name of the file to fetch the filelist.
-
path(required): string
The name of the subfolder to fetch the filelist.
There's no request body for this operation.
Back to TopResponse
- application/json
200 Response
objectFolderOracle-
fileList: array
fileList
A list of file lists associated with the folder.
-
folderPath: string
The complete folder path of the directory(UCM path).
-
name: string
Folder path to from where to retrieve the contents.
array-
Array of:
object items
The information about the folder contents fetch from UCM.
object-
name: string
The name of the folder.
-
url: string
The URL to download the content.
400 Response
objectError-
@schemaLocation: string
The URI of the schema that defines the error.
-
@type: string
The class type of a REST resource.
-
code(required): string
Application related code (as defined in the API or from a common list).
-
message: string
The text that provides more details and corrective actions related to the error. This can be shown to a client user.
-
reason(required): string
The text that explains the reason for error. This can be shown to a client user.
-
referenceError: string
The URL pointing to documentation describing the error.
-
status: string
The status of the error.
401 Response
objectError-
@schemaLocation: string
The URI of the schema that defines the error.
-
@type: string
The class type of a REST resource.
-
code(required): string
Application related code (as defined in the API or from a common list).
-
message: string
The text that provides more details and corrective actions related to the error. This can be shown to a client user.
-
reason(required): string
The text that explains the reason for error. This can be shown to a client user.
-
referenceError: string
The URL pointing to documentation describing the error.
-
status: string
The status of the error.
404 Response
objectError-
@schemaLocation: string
The URI of the schema that defines the error.
-
@type: string
The class type of a REST resource.
-
code(required): string
Application related code (as defined in the API or from a common list).
-
message: string
The text that provides more details and corrective actions related to the error. This can be shown to a client user.
-
reason(required): string
The text that explains the reason for error. This can be shown to a client user.
-
referenceError: string
The URL pointing to documentation describing the error.
-
status: string
The status of the error.
405 Response
objectError-
@schemaLocation: string
The URI of the schema that defines the error.
-
@type: string
The class type of a REST resource.
-
code(required): string
Application related code (as defined in the API or from a common list).
-
message: string
The text that provides more details and corrective actions related to the error. This can be shown to a client user.
-
reason(required): string
The text that explains the reason for error. This can be shown to a client user.
-
referenceError: string
The URL pointing to documentation describing the error.
-
status: string
The status of the error.
500 Response
objectError-
@schemaLocation: string
The URI of the schema that defines the error.
-
@type: string
The class type of a REST resource.
-
code(required): string
Application related code (as defined in the API or from a common list).
-
message: string
The text that provides more details and corrective actions related to the error. This can be shown to a client user.
-
reason(required): string
The text that explains the reason for error. This can be shown to a client user.
-
referenceError: string
The URL pointing to documentation describing the error.
-
status: string
The status of the error.
Examples
The following example shows how to upload files into a folder by submitting a post request and how to get the contents of the folder by submitting a get request on the REST resource using cURL.
curl -H 'Authorization: Bearer <accessToken> -H POST https://{FusionAppsHost}/crmRestApi/atcProductCatalog/11.13.18.05/v1/folder/ -H "Content-Type: application/json" -D @post_foldercontents.json | json_ppcurl -u username:password -X GET https://{FusionAppsHost}/crmRestApi/atcProductCatalog/11.13.18.05/v1/attachment/{filename}?path={folder_name} -H "Content-Type: application/json"
Upload files
Prerequisites to upload files
- This resource only accepts zipped file as input.
- Ensure that the files are zipped into a single file.
- In the Request Body of Postman
- In the form-data tab, use the following
keys to upload the files:
- Mention primaryFile as KEY value and select the type as File. Choose the input zip file as Value.
- Use the path KEY and specify the name of the folder containing the zipped file
- In the form-data tab, use the following
keys to upload the files:
Example of Request Body
The following shows an example of the request body.
curl -H 'Authorization: Bearer <accessToken> -H POST https://{FusionAppsHost}/crmRestApi/atcProductCatalog/11.13.18.05/v1/folder/Example of Response Body
The following example shows the contents of the response body in JSON format.
[
{
"fileName": "Test1.docx",
"path": "files",
"url": "https://{FusionAppsHost}/crmRestApi/atcProductCatalog/11.13.18.05/v1/attachment/Test1.docx?path=files"
},
{
"fileName": "Test2.docx",
"path": "files",
"url": "https://{FusionAppsHost}/crmRestApi/atcProductCatalog/11.13.18.05/v1/attachment/Test2.docx?path=files"
}
]Get folder contents
Example of Request Body
The following shows an example of the request body.
curl -u username:password -X GET https://{FusionAppsHost}/crmRestApi/atcProductCatalog/11.13.18.05/v1/attachment/{filename}?path={folder_name}Example of Response Body
The following example shows the contents of the response body in JSON format.
>> Save the Output response in an file. >> Open the file to read the contents.
Export Files with queryParam fileName.sw
Example of Request Body
The following shows an example of the request body.
curl -u username:password -X GET https://{FusionAppsHost}/crmRestApi/atcProductCatalog/11.13.18.05/v1/folder/export?fileName.sw=exp_
Example of Response Body
The following example shows the contents of the response body in JSON format.
{
"name": "export",
"folderPath": "/Contribution Folders/CatalogManagement/export",
"fileList": [
{
"name": "exp_633002.json",
"url": "https://{FusionAppsHost}/crmRestApi/atcProductCatalog/11.13.18.05/v1/exportFile/exp_633002.json"
},
{
"name": "exp_633014.json",
"url": "https://{FusionAppsHost}/crmRestApi/atcProductCatalog/11.13.18.05/v1/exportFile/exp_633014.json"
},
{
"name": "exp_635674.json",
"url": "https://{FusionAppsHost}/crmRestApi/atcProductCatalog/11.13.18.05/v1/exportFile/exp_635674.json"
},
{
"name": "exp_647021.json",
"url": "https://{FusionAppsHost}/crmRestApi/atcProductCatalog/11.13.18.05/v1/exportFile/exp_647021.json"
}
]
}
Export Files with queryParam fileName.ew
Example of Request Body
The following shows an example of the request body.
curl -u username:password -X GET https://{FusionAppsHost}/crmRestApi/atcProductCatalog/11.13.18.05/v1/folder/export?fileName.ew=.csv
Example of Response Body
The following example shows the contents of the response body in JSON format.
{
"name": "export",
"folderPath": "/Contribution Folders/CatalogManagement/export",
"fileList": [
{
"name": "Test.csv",
"url": "{FusionAppsHost}/crmRestApi/atcProductCatalog/11.13.18.05/v1/exportFile/Test.csv"
},
{
"name": "VF_637601.csv",
"url": "{FusionAppsHost}/crmRestApi/atcProductCatalog/11.13.18.05/v1/exportFile/VF_637601.csv"
},
{
"name": "exp_664672.csv",
"url": "{FusionAppsHost}/crmRestApi/atcProductCatalog/11.13.18.05/v1/exportFile/exp_664672.csv"
},
{
"name": "exp_675274.csv",
"url": "{FusionAppsHost}/crmRestApi/atcProductCatalog/11.13.18.05/v1/exportFile/exp_675274.csv"
}
]