Start a new topic
Answered

HTTP Request to get directory listing or a list of files

Is there an HTTP request which would give me all the files available for download. I saw the getXMLListing command but I was hoping a JSON output. 


Best Answer

add in a param of "format=jsonobj" and you will get json.


--Ben


Answer

add in a param of "format=jsonobj" and you will get json.


--Ben

like this? 

http://xyz.com/WebInterface/function/?command=getXMLListing&format=jsonobj&path=%252F


yes


or even:


http://xyz.com/?command=getXMLListing&format=jsonobj&path=%252F


still gives me an XML :(

I verified here.  It works.


My example I did:


http://127.0.0.1:8081/?command=getXMLListing&c2f=IsrD&path=/&format=jsonobj


I have csrf protection on and did this in my browser, so the c2f was required. I got a json mime type and a file called "download" since it wasn't XML.


CrushFTP 7.5.0_68

Perhaps, site admin has made some changes which are pushing the content into an XML. 



jsonobj not JSONobj

path = /


not path = %252F


CrushFTP 7.5....not CrushFTP 6.5

Login to post a comment