Filestation API - checking contents of folder

This forum is for devlopers to discuss questions about apps/plug-ins/extension modules/API specifically developed for using with Synology DiskStations.
csgnyc
I'm New!
I'm New!
Posts: 9
Joined: Tue Aug 16, 2016 4:35 am

Filestation API - checking contents of folder

Postby csgnyc » Thu Jun 01, 2017 7:33 am

I have successfully used the WebAPI to delete files and to move files, but I can't figure out what I'm doing wrong when I try to list all the contents of a folder
After getting my sid, I enter

Code: Select all

"curl -v 'http://192.168.1.10:5000/webapi/entry.cgi?api=SYNO.FileStation.Search&version=2&method=start&folder_path=%22%2Fdownloads%2Fwatch%22&recursive=true&_sid=[MY SID]'"


and I get

Code: Select all

 "{"data":{"has_not_index_share":true,"taskid":"593FB2FF5047C498"},"success":true}"


Not sure what this "has not index share" thing means -- it's not described in the API documentation.

Then to get a list of where things stand I enter

Code: Select all

"curl -v 'http://192.168.1.10:5000/webapi/entry.cgi?api=SYNO.FileStation.Search&version=2&method=list&taskid=%22593FB2FF5047C498%22&_sid=[MYSID]'"


and I get

Code: Select all

 "{"error":{"code":600},"success":false}"


I think I'm pretty careful in following the API instructions. Any idea what I'm doing wrong?
poorTom
I'm New!
I'm New!
Posts: 1
Joined: Fri Oct 20, 2017 10:24 am

Re: Filestation API - checking contents of folder

Postby poorTom » Fri Oct 20, 2017 10:31 am

Hi!

For a of list items in a specific folder i use this API: SYNO.Filestation.List:

https://[MyIP]:[MyPort]/webapi/entry.cgi?api=SYNO.FileStation.List&version=2&method=list&_sid=[MySID]&folder_path=%22%2F[FOLDERNAME]%22

_sid to use if you don't use cookies... if you use cookies you can kick this parameter
%22 = "
%2F = /

regards
flaviu
I'm New!
I'm New!
Posts: 1
Joined: Thu Oct 26, 2017 12:30 pm

Re: Filestation API - checking contents of folder

Postby flaviu » Thu Dec 07, 2017 6:53 pm

Hy
I have more or less same type of problem:
I can list the files from a folder, but if i want to list only specific files with a pattern , i dont get any file result, only 2 fields in json format with content = TRUE

I have the main folder on the Index lists, so i want to search files that contain a specific word.

How can i do that ?

Return to “Developer Discussion Room”

Who is online

Users browsing this forum: No registered users and 2 guests