Change Camera Name using Surveillance Station API

This forum is for devlopers to discuss questions about apps/plug-ins/extension modules/API specifically developed for using with Synology DiskStations.
Forum rules
1) This is a user forum for Synology users to share experience/help out each other: if you need direct assistance from the Synology technical support team, please use the following form:

https://account.synology.com/support/su ... p?lang=enu



2) To avoid putting users' DiskStation at risk, please don't paste links to any patches provided by our Support team as we will systematically remove them. Our Support team will provide the correct patch for your DiskStation model.
synchronicity
I'm New!
I'm New!
Posts: 2
Joined: Sat Jun 09, 2018 10:33 pm

Change Camera Name using Surveillance Station API

Unread post by synchronicity » Sat Jun 09, 2018 10:52 pm

I'm using Surveillance Station 8.1.5-5513 (which is current as of this post). I want to change the Camera Name for a specific camera via the API. The 2.7 API spec is what I'm referencing ( https://global.download.synology.com/do ... I_v2.7.pdf ).

I can successfully authenticate a user that has the appropriate permissions, and I can retrieve camera data from a List command, eg:

Code: Select all

https://IP_ADDRESS:5001/webapi/entry.cgi?privCamType=3&version="8"&blIncludeDeletedCam=true&streamInfo=true&blPrivilege=false&api="SYNO.SurveillanceStation.Camera"&basic=true&blFromCamList=true&camStm=1&method="List"
I'm trying to use the following REST string to change the Camera Name:

Code: Select all

https://IP_ADDRESS:5001/webapi/entry.cgi?camId=1&version="1"&api="SYNO.SurveillanceStation.Camera.Wizard"&actFromHost=false&data={"camId":1,"camName":"NewCameraName"}&method="CamSaveAll"
However, I always receive the following response/result:

Code: Select all

{
  "error": {
    "code": 400,
    "errors": {
      "param1": "",
      "param2": "",
      "success": false
    }
  },
  "success": false
}
Code 400 most often seems to mean "Execution failed" which isn't terribly informative. :?

The Surveillance Station Log indicates:

Code: Select all

Camera [CURRENT_CAMERA_NAME] failed to be edited.
That log result seems to suggest that I am at least interfacing with the correct camera, but I can't understand why the Edit is unsuccessful.

I've run out of ideas of what else to try. I'm extremely grateful for any help!

Post Reply

Return to “Developer Discussion Room”