[API] api.SomeMethods always return null!

This forum is for devlopers to discuss questions about apps/plug-ins/extension modules/API specifically developed for using with Synology DiskStations.
Forum rules
We've moved! Head over to Synology Community (community.synology.com) to meet up with our team and other Synology enthusiasts!
User avatar
Al3xI98O
I'm New!
I'm New!
Posts: 3
Joined: Thu Sep 21, 2017 10:35 pm
Location: Malpensa-Italy

[API] api.SomeMethods always return null!

Unread post by Al3xI98O » Thu Sep 21, 2017 10:53 pm

Hi everyone,
I try to grab some information from my DiskStation (synology DSM 4.2) in this easy way:

Code: Select all

var session = new SynologySession(new AppSettingsClientConfig());
session.Login();
var api = new SynologyApi(session);
var resp = api.GetDiskstationInfo();
    
if (resp.success)
    {
         // farò qualcosa
    }
session.LogOut();
I can do login (it look like correct... is it?):
Image

but when I run any api command I have always null result:
Image

I don't know the mistake... what can I do?

Thanks all and sorry for my english :)

synology_ukman
Seasoned
Seasoned
Posts: 569
Joined: Fri Oct 26, 2012 4:51 pm

Re: [API] api.SomeMethods always return null!

Unread post by synology_ukman » Fri Sep 22, 2017 10:30 am


User avatar
Al3xI98O
I'm New!
I'm New!
Posts: 3
Joined: Thu Sep 21, 2017 10:35 pm
Location: Malpensa-Italy

Re: [API] api.SomeMethods always return null!

Unread post by Al3xI98O » Fri Sep 22, 2017 11:39 am

synology_ukman wrote:I assume you saw this
https://github.com/brunskillage/Synolog ... logyApi.cs
Yes, both (mine and this project) login but return null...

is 4.2 too old version?

User avatar
Al3xI98O
I'm New!
I'm New!
Posts: 3
Joined: Thu Sep 21, 2017 10:35 pm
Location: Malpensa-Italy

Re: [API] api.SomeMethods always return null!

Unread post by Al3xI98O » Sun Sep 24, 2017 9:39 am

ATTENTION!!!
I try with a 5.2 version and it's ok!
I do only fast test but I have response and real information about disk info and folder info...


A question: may I have a complete informationa about current state? Number of folder, total disk space, free disk space... Now I find only correct data but folder by folder...



Thanks!

coollehavre
I'm New!
I'm New!
Posts: 3
Joined: Sun Sep 15, 2013 4:44 pm

Re: [API] api.SomeMethods always return null!

Unread post by coollehavre » Mon Oct 02, 2017 11:40 am

Hi,
i have the SAME problem (all methods return null, but i'm connected) and i have the DSM 6.1

Please help !! ;)

kalobyte
I'm New!
I'm New!
Posts: 1
Joined: Tue Jan 02, 2018 3:03 pm

Re: [API] api.SomeMethods always return null!

Unread post by kalobyte » Tue Jan 02, 2018 5:55 pm

in dsm 6.1 the entry point was changed
i.e. for SYNO.FileStation.Delete command the path was /FileStation/file_delete.cgi
but the new one is ip/webapi/entry.cgi

you must update the source code of brunskillage/Synology.NET
i will try this now for testing, but i'am not shure if the old api doc corresponds to the new dsm 6.1 api, the pdf is from 2013 outdated

Locked

Return to “Developer Discussion Room”