kwent/syno

Error: The requested API does not exist

Closed this issue · 4 comments

I'm on dsm 5.2 and this is what I got after installing this module and trying a sample command:

DiskStation> syno -d fs getInfo --pretty
[DEBUG] : DSM Connection URL configured : http://USERNAME:PASSWORD@localhost:5000
[DEBUG] : Account: USERNAME
[DEBUG] : Password: PASSWORD
[DEBUG] : Host: localhost
[DEBUG] : Port: 5000
[DEBUG] : API: 6.0
[DEBUG] : Ignore certificate errors: false
[DEBUG] : DSM File Station API command selected
[DEBUG] : Method name configured : getInfo
[DEBUG] : Prettify output detected
REQUEST { rejectUnauthorized: true,
jar: true,
json: true,
url: 'http://localhost:5000/webapi/auth.cgi',
qs:
{ api: 'SYNO.API.Auth',
version: 3,
method: 'login',
account: 'USERNAME',
passwd: 'PASSWORD',
session: 'SYNO_SESSION_1471955298784' },
callback: [Function] }
REQUEST make request http://localhost:5000/webapi/auth.cgi?a ... 1955298784
REQUEST onRequestResponse http://localhost:5000/webapi/auth.cgi?a ... 1955298784 200 { date: 'Tue, 23 Aug 2016 12:28:19 GMT',
server: 'Apache',
p3p: 'CP="IDC DSP COR ADM DEVi TAIi PSA PSD IVAi IVDi CONi HIS OUR IND CNT"',
'set-cookie': [ 'id=UJm9Wo9HHDOX61490LAN880506;expires=Thu, 22-Sep-2016 12:28:20 GMT;path=/' ],
vary: 'Accept-Encoding',
connection: 'close',
'transfer-encoding': 'chunked',
'content-type': 'text/plain; charset="UTF-8"' }
REQUEST reading response's body
REQUEST finish init function http://localhost:5000/webapi/auth.cgi?a ... 1955298784
REQUEST response end http://localhost:5000/webapi/auth.cgi?a ... 1955298784 200 { date: 'Tue, 23 Aug 2016 12:28:19 GMT',
server: 'Apache',
p3p: 'CP="IDC DSP COR ADM DEVi TAIi PSA PSD IVAi IVDi CONi HIS OUR IND CNT"',
'set-cookie': [ 'id=UJm9Wo9HHDOX61490LAN880506;expires=Thu, 22-Sep-2016 12:28:20 GMT;path=/' ],
vary: 'Accept-Encoding',
connection: 'close',
'transfer-encoding': 'chunked',
'content-type': 'text/plain; charset="UTF-8"' }
REQUEST end event http://localhost:5000/webapi/auth.cgi?a ... 1955298784
REQUEST has body http://localhost:5000/webapi/auth.cgi?a ... 1955298784 61
REQUEST emitting complete http://localhost:5000/webapi/auth.cgi?a ... 1955298784
REQUEST { rejectUnauthorized: true,
jar: true,
json: true,
url: 'http://localhost:5000/webapi/entry.cgi',
qs: { api: 'SYNO.FileStation.Info', version: '1', method: 'get' },
callback: [Function] }
REQUEST make request http://localhost:5000/webapi/entry.cgi? ... method=get
REQUEST onRequestResponse http://localhost:5000/webapi/entry.cgi? ... method=get 200 { date: 'Tue, 23 Aug 2016 12:28:20 GMT',
server: 'Apache',
'cache-control': 'max-age=0, no-cache, no-store, must-revalidate',
pragma: 'no-cache',
expires: '0',
connection: 'close',
'transfer-encoding': 'chunked',
'content-type': 'application/json; charset="UTF-8"' }
REQUEST reading response's body
REQUEST finish init function http://localhost:5000/webapi/entry.cgi? ... method=get
REQUEST response end http://localhost:5000/webapi/entry.cgi? ... method=get 200 { date: 'Tue, 23 Aug 2016 12:28:20 GMT',
server: 'Apache',
'cache-control': 'max-age=0, no-cache, no-store, must-revalidate',
pragma: 'no-cache',
expires: '0',
connection: 'close',
'transfer-encoding': 'chunked',
'content-type': 'application/json; charset="UTF-8"' }
REQUEST end event http://localhost:5000/webapi/entry.cgi? ... method=get
REQUEST has body http://localhost:5000/webapi/entry.cgi? ... method=get 38
REQUEST emitting complete http://localhost:5000/webapi/entry.cgi? ... method=get
[ERROR] : Error: The requested API does not exist
REQUEST { rejectUnauthorized: true,
jar: true,
json: true,
url: 'http://localhost:5000/webapi/auth.cgi',
qs:
{ api: 'SYNO.API.Auth',
version: 3,
method: 'logout',
session: 'SYNO_SESSION_1471955298784' },
callback: [Function] }
kwent commented

Hello @rpgdev. You have a switch to use the CLI with 5.2.

-a, --api <version>              DSM API Version. Default to 6.0

So you need to use

syno -d -a 5.2 fs getInfo --pretty

Let me know if it works.

In the config file I put apiVersion 5.2 at one time and it didn't work either. Should I have done anything else?

kwent commented

That should work too. Otherwise force it as i said with -a 5.2 directly in the command line ?

kwent commented

@rpgdev. Closing. Feel free to reopen if you see any issue.