[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.
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!

Postby 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
Knowledgeable
Knowledgeable
Posts: 377
Joined: Fri Oct 26, 2012 4:51 pm

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

Postby 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!

Postby 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!

Postby 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!

Postby 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 !! ;)

Return to “Developer Discussion Room”

Who is online

Users browsing this forum: No registered users and 3 guests