URL: v3/api/get-storage-directories

Method: GET

Description : The API endpoint returns the list of subdirectories present in a given directory which is a subdirectory of “storage” directory. By default the API endpoint will return the list of subdirectories present in “storage/app/private” as it’s the default directory for storing ticket attachments and media uploaded files. (Currently the API is written for using in media upload modal popup to show year field based on directories available in private directory)

Parameters:

Parameter Type Optional/Required Description
directory string Optional Path or name of directory to scan for subdirectories. If not passed default directory will be scanned.
meta boolean Optional As currently the use case of the API is limited we can use this parameter to retrieve more information

Success Response :

{

"Success":true,

"Data":[

{

"name":"2018",

"Value":"2018"

}, {

"name":"2019",

"Value":"2019"

}

]

}

 

Error Response

{

 "success":false,

 "message":"Not found" or error message

}

 

Tagged: