# Surveillance Station GetSnapshot via API

1\) Infos zur API und ihren einzelnen Versionen rausholen:

GET

```
http://192.168.1.10:5000/webapi/query.cgi?api=SYNO.API.Info&method=Query&version=1&query=ALL
```

2\) Login via API:

GET

```
192.168.1.10:5000/webapi/auth.cgi?api=SYNO.API.Auth&method=login&version=7&account=MEINBENUTZER&passwd=MEINPASSWORT&session=SurveillanceStation&format=sid 
```

also Response kommt etwa

```json
{
    "data": {
        "account": "Eike",
        "device_id": "-Ezsffph96I7C.......o4sr2EI9h36Ym-j2w",
        "ik_message": "",
        "is_portal_port": false,
        "sid": "vF-JE8-4Xe6Yet........9XbSc_7z8NpLhf5VtU",
        "synotoken": "--------"
    },
    "success": true
}
```

daraus den sid (String Identifier) kopieren und an den getCameraList Request haengen:

3\) getCameraList

GET

```
http://192.168.1.10:5000/webapi/entry.cgi?api=SYNO.SurveillanceStation.Camera&method=List&version=3&_sid=vF-JE8-4......bSc_7z8NpLhf5VtU
```

Aus Response die ID der Kamera entnehmen:

[![image.png](https://bookstack.eike-f.de/uploads/images/gallery/2023-04/scaled-1680-/nA9image.png)](https://bookstack.eike-f.de/uploads/images/gallery/2023-04/nA9image.png)

4\) getSnapshot

id in Request fuer den Snapshot einfuegen

GET

```
192.168.1.10:5000/webapi/entry.cgi?version=9&id=10&api=SYNO.SurveillanceStation.Camera&method=GetSnapshot&profileType=1&_sid=vF-JE8-4Xe........_7z8NpLhf5VtU
```

<p class="callout success">Erfolg!</p>

[![image.png](https://bookstack.eike-f.de/uploads/images/gallery/2023-04/scaled-1680-/ryfimage.png)](https://bookstack.eike-f.de/uploads/images/gallery/2023-04/ryfimage.png)

<div data-darkreader-inline-bgcolor="" data-darkreader-inline-bgimage="" id="bkmrk--1" style="background: none; line-height: 0px; overflow: hidden; padding: 10px 5px 5px; position: absolute; z-index: 2147483647; visibility: visible; opacity: 1; --darkreader-inline-bgimage: none; --darkreader-inline-bgcolor: initial; top: 754px; left: 830px; width: auto; height: auto; display: none;"></div>