Skip to main content

Best Snapshot Configuration API

This API is based on the Device Configuration API framework. For guidance on how to use these APIs, please refer to the Device Configuration APIs section in the VAPIX®.

Description

The Best Snapshot Configuration API provides configuration for sending cropped snapshots of objects with metadata from analytics metadata producers, for example, "Analytics Scene Description".

With this API, you can configure:

  • Whether to generate cropped snapshots of objects to be included by analytics metadata producers.
  • Whether the cropped snapshot should have a margin which includes more of the image around the bounding box.

Use Cases

Enable best snapshot with margin

This example shows how to enable best snapshot with margin.

JSON request:

PATCH /config/rest/best-snapshot/v1 HTTP/1.1
HOST: my-device
Content-Type: application/json

{
"data": {
"enabled": true,
"margin": true
}
}

JSON response:

HTTP/1.1 200 OK
Content-Type: application/json

{
"status": "success"
}

Disable best snapshot

This example shows how to disable best snapshot.

JSON request:

PATCH /config/rest/best-snapshot/v1/enabled HTTP/1.1
HOST: my-device
Content-Type: application/json

{
"data": false
}

JSON response:

HTTP/1.1 200 OK
Content-Type: application/json

{
"status": "success"
}

Get best snapshot settings

This example shows how to get and understand the best snapshot settings.

JSON request:

GET /config/rest/best-snapshot/v1 HTTP/1.1
HOST: my-device
Content-Type: application/json

JSON response:

HTTP/1.1 200 OK
Content-Type: application/json

{
"status": "success",
"data": {
"enabled": true,
"margin": true
}
}
  • If the value of enabled is true, best snapshot is included in the data stream.
  • If the value of enabled is false, best snapshot is not included in the data stream.
  • If the value of margin is true, best snapshot includes margins.
  • If the value of margin is false, best snapshot does not include margins.

API definition

Structure

best-snapshot.v1 (Root Entity)
├── enabled (Property)
├── margin (Property)

Entities

best-snapshot.v1
  • Description: Root entity
  • Type: Singleton
  • Operations:
    • Get
    • Set
      • Fields: enabled, margin

Properties

best-snapshot.v1.enabled
  • Description: Whether to generate cropped snapshots of objects that can be included by downstream analytics metadata producers
  • Data Type: boolean
  • Operations:
    • Get
      • Permissions: admin
    • Set
      • Permissions: admin
best-snapshot.v1.margin
  • Description: Whether the cropped snapshot should include more of the image around the object bounding box
  • Data Type: boolean
  • Operations:
    • Get
      • Permissions: admin
    • Set
      • Permissions: admin