Skip to content
Yannick Croissant edited this page Aug 17, 2013 · 6 revisions

dsm.application

?????

dsm.autoBlock

?????

dsm.connection

GET /webapi/dsm/connection.cgi

Return the list of the current connections.

Parameters

Parameter Mandatory Default value Description
api Y Method ID: SYNO.DSM.Connection
version Y Version of the api to use. Possible values: 1.
method Y Method to use. Possibles values: list

Example

var Synology = require('synology');

var syno = new Synology();

syno.dsm.query(
  path: '/webapi/dsm/connection.cgi',
  params: {
    api: 'SYNO.DSM.Connection',
    version: 1,
    method: 'list'
  }
}, function(err, data) {
  if (err) throw err;
  console.log(data);
});

Results

{
    "data": {
        "connections": [{
            "activity": "Storage1",
            "address": "HTPC(192.168.0.26)",
            "timestamp": 1376596086,
            "type": "samba",
            "user": "xbmc"
        }, {
            "activity": "DiskStation Manager",
            "address": "192.168.0.10",
            "timestamp": 1376698031,
            "type": "dsm",
            "user": "john"
        }]
    },
    "success": true
}

dsm.encryptShare

?????

dsm.findMe

?????

dsm.group

?????

dsm.info

GET /webapi/dsm/info.cgi

Return informations about the NAS.

Parameters

Parameter Mandatory Default value Description
api Y Method ID: SYNO.DSM.Info
version Y Version of the api to use. Possible values: 1.
method Y Method to use. Possibles values: getinfo

Example

var Synology = require('synology');

var syno = new Synology();

syno.query(
  path: '/webapi/dsm/info.cgi',
  params: {
    api: 'SYNO.DSM.Info',
    version: 1,
    method: 'getinfo'
  }
}, function(err, data) {
  if (err) throw err;
  console.log(data);
});

Results

{
    "data": {
        "codepage": "fre",
        "model": "DS412+",
        "ram": 1024,
        "serial": "C8GDN06509",
        "temperature": 48,
        "temperature_warn": false,
        "time": "Sat Aug 17 00:37:38 2013",
        "uptime": 3299114,
        "version": "3750",
        "version_string": "DSM 4.3-3750"
    },
    "success": true
}

dsm.logViewer

Should be GET /webapi/dsm/logViewer.cgi but cannot get it to works. Using GET /webman/modules/LogViewer/LogViewer.cgi for now

Return system logs.

Parameters

Parameter Mandatory Default value Description
start 0 Offset where to start the listing.
limit 50 Maximum number of logs to return.
sort time Field used to order the files. Possible values: time, level, logtype, who and descr
dir DESC Set to ASC for an ascending order or to DESC for a descending one.
logtype syslog Type of logs to return. Possible values: syslog, connlog, ftpxfer, dsmfmxfer, webdavxfer, smbxfer, tftpxfer, bkplog and netbkplog. You can concatenate multiple logtype with a ,.
datefrom Start of the date range (Unix timestamp).
dateto End of the date range (Unix timestamp).
keyword Keyword filter
loglevel 1,2,3 Level filter. Possibles values: 1 (info), 2 (warning), 3 (error). You can concatenate multiple loglevel with a ,.
action Actions to perform on the logs. Possible values: download.
exporttype Type of export. Possible values: html and csv.
title Title of the exported file.
filename Filename of the exported file.

Example

var Synology = require('synology');

var syno = new Synology();

syno.query({
  path: '/webman/modules/LogViewer/LogViewer.cgi',
  params: {
    limit: 100
  }
}, function(err, data) {
  if (err) throw err;
  console.log(data);
});

Results

{
    "errorCount": 18,
    "infoCount": 759,
    "isSupportFileTransferLog": true,
    "items": [{
        "descr": "User [john] logged in from [192.168.1.64]",
        "level": "info",
        "logtype": "System",
        "orginalLogType": "syslog",
        "time": "2012/12/13 22:49:19",
        "who": "john"
    }, {
        "descr": "Apple file service was started.",
        "level": "info",
        "logtype": "System",
        "orginalLogType": "syslog",
        "time": "2012/12/12 23:45:24",
        "who": "SYSTEM"
    }, {
        "descr": "Host [122.125.157.90] has been blocked at [Mon Dec 10 09:46:16 2012].",
        "level": "warn",
        "logtype": "System",
        "orginalLogType": "syslog",
        "time": "2012/12/10 09:46:16",
        "who": "SYSTEM"
    }],
    "total": 1287,
    "warnCount": 511
}

dsm.network

?????

dsm.package

?????

dsm.pushNotification

?????

dsm.service

GET /webapi/dsm/service.cgi

Return the service's list and their status.

Parameters

Parameter Mandatory Default value Description
api Y Method ID: SYNO.DSM.Service
version Y Version of the api to use. Possible values: 1.
method Y Method to use. Possibles values: list

Example

var Synology = require('synology');

var syno = new Synology();

syno.query({
  path: '/webapi/dsm/service.cgi',
  params: {
    api: 'SYNO.DSM.Service',
    version: 1,
    method: 'list'
  }
}, function(err, data) {
  if (err) throw err;
  console.log(data);
});

Results

{
    "data": {
        "offset": 0,
        "services": [{
            "enabled": true,
            "name": "Samba"
        }, {
            "enabled": true,
            "name": "AutoBlock"
        }, {
            "enabled": false,
            "name": "WebDAV"
        }],
        "total": 3
    },
    "success": true
}

dsm.share

?????

dsm.system

?????

dsm.systemLoading

?????

dsm.user

?????

dsm.volume

?????

dsm.iSCSI

?????

Clone this wiki locally