Get folder contents

get

https://{FusionAppsHost}/crmRestApi/atcProductCatalog/11.13.18.05/v1/folder/{name}

Returns a list of folders that match the search criteria.

Request

Path Parameters
Query Parameters

There's no request body for this operation.

Back to Top

Response

Supported Media Types

200 Response

The list of folders was returned successfully.
Body ()
Root Schema : FolderOracle
Type: object
Title: FolderOracle
The folder resource.
Show Source
Nested Schema : fileList
Type: array
A list of file lists associated with the folder.
Show Source
Nested Schema : items
Type: object
The information about the folder contents fetch from UCM.
Show Source

400 Response

Your request couldn't be processed because it contains missing or invalid information, such as a validation error on an input field, a missing required value, and so forth.
Body ()
Root Schema : Error
Type: object
Title: Error
The error resource.
Show Source

401 Response

Your request isn't authorized. The authentication credentials included with this request are missing or invalid.
Body ()
Root Schema : Error
Type: object
Title: Error
The error resource.
Show Source

404 Response

The resource with the specified URI couldn't be found.
Body ()
Root Schema : Error
Type: object
Title: Error
The error resource.
Show Source

405 Response

HTTP action specified in the request (DELETE, GET, POST, PUT) isn't supported for this request URI.
Body ()
Root Schema : Error
Type: object
Title: Error
The error resource.
Show Source

500 Response

The server encountered something unexpected that prevented it from completing the request.
Body ()
Root Schema : Error
Type: object
Title: Error
The error resource.
Show Source
Back to Top

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_pp
  • curl -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

  1. This resource only accepts zipped file as input.
  2. Ensure that the files are zipped into a single file.
  3. 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

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"
        }
]
Back to Top