Skip to content

garrettdieckmann/synologyapi

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

11 Commits
 
 
 
 

Repository files navigation

Synology DSM API Client

Client library for calling the Synology DSM APIs. Synology DSM (DiskStation Manager) is the Operating System: https://www.synology.com/en-us/dsm/6.1

Getting Started

Instructions for using the library.

Getting the library

go get github.com/garrettdieckmann/synologyapi

Examples

Get 1 Minute Load

package main

import (
	"fmt"
	"log"
	"strconv"

	sapi "github.com/garrettdieckmann/synologyapi"
)

func main() {
	synas, err := sapi.NewConnection("192.168.x.x", "5000", "account", "password")
  if err != nil {
		log.Fatal(err)
	}
	sysresp, err := synas.GetSystemInfo()
	if err != nil {
		log.Fatal(err)
	}
	fmt.Println(fmt.Sprintf("1 minute load: %v.", sysresp.CPU.OneMinLoad))
}

Endpoints implemented

Function Name Synology API Notes
getSIDToken SYNO.API.Auth Not an exported function
GetSystemInfo SYNO.Core.System.Utilization
GetShareInfo SYNO.Core.Share
GetStorageInfo SYNO.Storage.CGI.Storage

Acknowledgements

About

Client library for the Synology DSM API

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages