Web API - to interact with my QNAP?

Post your questions about Web Server usage and Apache + PHP + MySQL/SQLite web applications.
Post Reply
User avatar
parkerc
Easy as a breeze
Posts: 294
Joined: Thu Oct 16, 2014 7:36 am
Location: Near London, England
Contact:

Web API - to interact with my QNAP?

Post by parkerc » Fri Feb 05, 2016 4:26 pm

Hi

I'm looking to use the iOS app 'Workflow' to save content directly to my QNAP, and someone has posted something in reply to my question that works on a Synology unit.. (https://www.reddit.com/r/workflow/comme ... _on_a_nas/)

So I'm wondering what needs to change for it to work with my QNAP -

HTTPS://192.168.1.234:5001/webapi/auth. ... format=sid

And

HTTPS://192.168.1.234:5001/webapi/Downl ... _sid=&uri=
Model Name : QNAP TS-253be (16GB) & TS-453 Pro (8GB)
Firmware Version:: QTS Latest
OS Version : Apple iOS (iPad/Safari Browser)
Number & Type of HDDs : 2 WD Reds, 3TB each, in Raid 1
Website (When I have time) : http://www.nodecentral.co.uk

User avatar
parkerc
Easy as a breeze
Posts: 294
Joined: Thu Oct 16, 2014 7:36 am
Location: Near London, England
Contact:

Re: Web API - to interact with my QNAP?

Post by parkerc » Fri Feb 05, 2016 4:38 pm

I've found an online reference for FileStation - http://qnap.ru/dev/download/QNAP_QTS_Fi ... I_v0.9.pdf , now trying to see if there is one for DownloadStation as the objective is to be able to create content and or take URLs and pass the output to a location on my QNAP.

Is anyone using the QNAP webapi to do anything ?
Model Name : QNAP TS-253be (16GB) & TS-453 Pro (8GB)
Firmware Version:: QTS Latest
OS Version : Apple iOS (iPad/Safari Browser)
Number & Type of HDDs : 2 WD Reds, 3TB each, in Raid 1
Website (When I have time) : http://www.nodecentral.co.uk

User avatar
parkerc
Easy as a breeze
Posts: 294
Joined: Thu Oct 16, 2014 7:36 am
Location: Near London, England
Contact:

Re: Web API - to interact with my QNAP?

Post by parkerc » Sun Feb 07, 2016 5:35 pm

The challenge I am having in using the web apis for FIle Station is that my password needs to be encoded, using a java script file ( called “get_sid.js” via http://eu1.qnap.com/Storage/SDK/get_sid.js ) and I've also seen a Python version too (https://github.com/mdhorda/qnap/blob/master/get_sid.py ) .

Can anyone help me to build something that would allow me to encode my password ?
Model Name : QNAP TS-253be (16GB) & TS-453 Pro (8GB)
Firmware Version:: QTS Latest
OS Version : Apple iOS (iPad/Safari Browser)
Number & Type of HDDs : 2 WD Reds, 3TB each, in Raid 1
Website (When I have time) : http://www.nodecentral.co.uk

User avatar
parkerc
Easy as a breeze
Posts: 294
Joined: Thu Oct 16, 2014 7:36 am
Location: Near London, England
Contact:

Re: Web API - to interact with my QNAP?

Post by parkerc » Mon Feb 08, 2016 4:18 pm

Ok, some progress..

I found a GitHub post where someone had created a python script to encode your password using the same algorithm - so I used that and when I send the required http request to get the session ID it returns successfully !!

I'm really looking to find people who are using the webapi
Model Name : QNAP TS-253be (16GB) & TS-453 Pro (8GB)
Firmware Version:: QTS Latest
OS Version : Apple iOS (iPad/Safari Browser)
Number & Type of HDDs : 2 WD Reds, 3TB each, in Raid 1
Website (When I have time) : http://www.nodecentral.co.uk

User avatar
parkerc
Easy as a breeze
Posts: 294
Joined: Thu Oct 16, 2014 7:36 am
Location: Near London, England
Contact:

Re: Web API - to interact with my QNAP?

Post by parkerc » Mon Feb 15, 2016 2:20 am

So far it seems I can successfully log in and get a session ID, but any action I take does not seem to work even though it reports back as successful

The upload command is as follow for a file called test.zip to go to the Public share.

Code: Select all

http://xxx.xxx.xxx.xxx:8080/cgi-bin/filemanager/utilRequest.cgi?func=upload&type=standard&sid=xxxxxx&dest_path=/Public&overwrite=1&progress=-Public-test.zip


And this is what is returned, but nothing was uploaded.

Code: Select all

{"status":3,"success":"true","version":"4.2.1","build":"20151118"}


I tried the same with a make directory request and get the same success message, but no folder is created

Code: Select all

http://xxx.xxx.xxx.xxx:8080/cgi-bin/filemanager/utilRequest.cgi?func=createdir&sid=Xxxxxxx&dest_folder=TestFolder&dest_path=/Public


Message returned

Code: Select all

{"status":3,"success":"true","version":"4.2.1","build":"20151118"}
Model Name : QNAP TS-253be (16GB) & TS-453 Pro (8GB)
Firmware Version:: QTS Latest
OS Version : Apple iOS (iPad/Safari Browser)
Number & Type of HDDs : 2 WD Reds, 3TB each, in Raid 1
Website (When I have time) : http://www.nodecentral.co.uk

cbasolutions
First post
Posts: 1
Joined: Wed Jan 11, 2017 3:14 am

Re: Web API - to interact with my QNAP?

Post by cbasolutions » Fri Sep 01, 2017 6:31 am

You ever figure this out?

johnny1337
First post
Posts: 1
Joined: Mon Jun 22, 2020 6:45 pm

Re: Web API - to interact with my QNAP?

Post by johnny1337 » Mon Jun 22, 2020 6:51 pm

Anyone who knows how to get this to work?

Post Reply

Return to “Web Server & Applications (Apache + PHP + MySQL / SQLite)”