Get Folder Details

Get the Details of a Single Folder

The method that retrieves the details of a specific folder referred through its unique folder ID is the get() method. The folder used in the code snippet below is the folder object.

Note : The promise returned here will be resolved to an object in which the content key contains details of a single folder.
    
copy
//Get the folder details using the folder Object var filestore = catalyst.file; var folder = filestore.folderId(2136000000008551); var folderPromise = folder.get(); folderPromise .then((response) => { console.log(response.content); }) .catch((err) => { console.log(err); });

A sample response that you will receive for each version is shown below:

    
Web SDK
copy
{
"folder_name":"Store_Data",
"created_time":"Aug 13, 2021 05:32 PM",
"created_by":{
"zuid":"66466723",
"is_confirmed":false,
"email_id":"emma@zylker.com",
"first_name":"Amelia",
"last_name":"Burrows",
"user_type":"Admin",
"user_id":"2136000000006003"
},
"modified_time":"Aug 13, 2021 05:32 PM",
"modified_by":{
"zuid":"66466723",
"is_confirmed":false,
"email_id":"emma@zylker.com",
"first_name":"Amelia",
"last_name":"Burrows",
"user_type":"Admin",
"user_id":"2136000000006003"
},
"project_details":{
"project_name":"ShipmentTracking",
"id":"2136000000007733",
"project_type":"Live"
},
"file_details":[
{
  "id":"2136000000020111",
  "file_location":null,
  "file_name":"Img.jpeg",
  "file_size":"84881",
  "created_by":{
      "zuid":"66466723",
      "is_confirmed":false,
      "email_id":"p.boyle@zylker.com",
      "first_name":"Patricia",
      "last_name":"Boyle",
      "user_type":"Admin",
      "user_id":"2136000000006767"
  },
  "created_time":"Aug 17, 2021 09:32 PM",
  "modified_by":{
      "zuid":"66466723",
      "is_confirmed":false,
      "email_id":"p.boyle@zylker.com",
      "first_name":"Patricia",
      "last_name":"Boyle",
      "user_type":"Admin",
      "user_id":"2136000000006767"
  },
  "modified_time":"Aug 17, 2021 09:32 PM",
  "project_details":{
      "project_name":"ShipmentTracking",
      "id":"2136000000007733",
      "project_type":"Live"
  },
  "folder_details":"2136000000008551"
}
],
"id":"2136000000008551"
}
{
"folder_name":"Store_Data",
"created_time":"Aug 13, 2021 05:32 PM",
"created_by":{
"zuid":66466723,
"is_confirmed":false,
"email_id":"emma@zylker.com",
"first_name":"Amelia",
"last_name":"Burrows",
"user_type":"Admin",
"user_id":2136000000006003
},
"modified_time":"Aug 13, 2021 05:32 PM",
"modified_by":{
"zuid":66466723,
"is_confirmed":false,
"email_id":"emma@zylker.com",
"first_name":"Amelia",
"last_name":"Burrows",
"user_type":"Admin",
"user_id":2136000000006003
},
"project_details":{
"project_name":"ShipmentTracking",
"id":2136000000007733,
"project_type":"Live"
},
"file_details":[
{
  "id":2136000000020111,
  "file_location":null,
  "file_name":"invoice1349.jpeg",
  "file_size":84881,
  "created_by":{
      "zuid":66466723,
      "is_confirmed":false,
      "email_id":"p.boyle@zylker.com",
      "first_name":"Patricia",
      "last_name":"Boyle",
      "user_type":"Admin",
      "user_id":2136000000006767
  },
  "created_time":"Aug 17, 2021 09:32 PM",
  "modified_by":{
      "zuid":66466723,
      "is_confirmed":false,
      "email_id":"p.boyle@zylker.com",
      "first_name":"Patricia",
      "last_name":"Boyle",
      "user_type":"Admin",
      "user_id":2136000000006767
  },
  "modified_time":"Aug 17, 2021 09:32 PM",
  "project_details":{
      "project_name":"ShipmentTracking",
      "id":2136000000007733,
      "project_type":"Live"
  },
  "folder_details":2136000000008551
}
],
"id":2136000000008551
}

You can retrieve the details of the folders created in the file store. This can be a single folder or all the folders located in the file store. The filestore used in the code snippets below is the component instance.

Get all the Folder Details

If you want to fetch the details of all the folders in your Catalyst project, the getAllFolder() method is used.

Note : The promise returned here will be resolved to an object in which the content key contains an array of all the folder details.
    
copy
//Get all the folders by calling the method which in turn return a promise var filestore = catalyst.file; var allFolderPromise = filestore.getAllFolder(); allFolderPromise .then((response) => { console.log(response.content); }) .catch((err) => { console.log(err); });

A sample response that you will receive for each version is shown below:

    
Web SDK
copy
    [
    {
    folder_name: "Store_Data",
    created_time: "Jul 05, 2023 12:42 PM",
    created_by: {
    zuid: 788778872,
    is_confirmed: false,
    email_id: "amelia.burrows@zylker.com",
    first_name: "Amelia",
    last_name: "Burrows",
    user_type: "Admin",
    user_id: 10103000000003004
    },
    modified_time: "Jul 05, 2023 12:42 PM",
    modified_by: {
    zuid: 788778872,
    is_confirmed: false,
    email_id: "amelia.burrows@zylker.com",
    first_name: "Amelia",
    last_name: "Burrows",
    user_type: "Admin",
    user_id: 10103000000003004
    },
    project_details: {
    project_name: "Shipment_Tracking",
    id: 10103000000115000,
    project_type: "Live"
    },
    audit_consent: false,
    id: 10103000000114006
    },
    {
    folder_name: "Git_Details",
    created_time: "Jul 05, 2023 12:36 PM",
    created_by: {
    zuid: 788778872,
    is_confirmed: false,
    email_id: "amelia.burrows@zylker.com",
    first_name: "Amelia",
    last_name: "Burrows",
    user_type: "Admin",
    user_id: 10103000000003004
    },
    modified_time: "Jul 05, 2023 12:36 PM",
    modified_by: {
    zuid: 788778872,
    is_confirmed: false,
    email_id: "amelia.burrows@zylker.com",
    first_name: "Amelia",
    last_name: "Burrows",
    user_type: "Admin",
    user_id: 10103000000003004
    },
    project_details: {
    project_name: "GitHubBot",
    id: 10103000000115000,
    project_type: "Live"
    },
    audit_consent: false,
    id: 10103000000115076
    }
    ]
[
{
"folder_name":"Invoices",
"created_time":"Aug 25, 2021 11:38 AM",
"created_by":{
"zuid":66466723,
"is_confirmed":false,
"email_id":"emma@zylker.com",
"first_name":"Amelia",
"last_name":"Burrows",
"user_type":"Admin",
"user_id":2136000000006003
},
"modified_time":"Aug 25, 2021 11:38 AM",
"modified_by":{
"zuid":66466723,
"is_confirmed":false,
"email_id":"emma@zylker.com",
"first_name":"Amelia",
"last_name":"Burrows",
"user_type":"Admin",
"user_id":2136000000006003
},
"project_details":{
"project_name":"ShipmentTracking",
"id":2136000000007733,
"project_type":"Live"
},
"id":2136000000037021
},
{
"folder_name":"Store_Data",
"created_time":"Aug 13, 2021 05:32 PM",
"created_by":{
"zuid":66466723,
"is_confirmed":false,
"email_id":"emma@zylker.com",
"first_name":"Amelia",
"last_name":"Burrows",
"user_type":"Admin",
"user_id":2136000000006003
},
"modified_time":"Aug 13, 2021 05:32 PM",
"modified_by":{
"zuid":66466723,
"is_confirmed":false,
"email_id":"emma@zylker.com",
"first_name":"Amelia",
"last_name":"Burrows",
"user_type":"Admin",
"user_id":2136000000006003
},
"project_details":{
"project_name":"ShipmentTracking",
"id":2136000000007733,
"project_type":"Live"
},
"id":2136000000008551
}
]

Last Updated 2023-11-30 17:09:44 +0530 +0530