Rest API

I’m using the REST API to fetch camera details.

I found an endpoint that - according to the example - should tell me whether the camera is set to record on motion (/API/rest/v1/cameras/{id}). But when I execute the request as shown in the example, I don’t receive the motion field in the response.

No, whether record on motion is active or not is governed by a rule, so it is not something you can get from /API/rest/v1/cameras/{id}

However you can get the setup of motion detection, the setup you see in the Management Client, camera properties, the Motion tab.

/API/rest/v1/cameras/{id}/motionDetections

will give you this.

Tip. Try a

/API/rest/v1/cameras/{id}?resources

to see more possible resources.