Skip to main content

Object Snapshot Configuration API

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

Description​

The Object 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.

Authentication​

For detailed information on how to authenticate requests to this API, please refer to Authentication.

Use cases​

Enable Object Snapshot with margin​

This example shows how to enable Object Snapshot with margin.

JSON request:

curl --request PATCH \
--anyauth \
--user "<username>:<password>" \
--header "Content-Type: application/json" \
"http://<servername>/config/rest/object-snapshot/v1" \
--data '{
"data": {
"enabled": true,
"margin": true
}
}'

JSON response:

200 OK
Content-Type: application/json

{
"status": "success"
}

Disable Object Snapshot​

This example shows how to disable Object Snapshot.

JSON request:

curl --request PATCH \
--anyauth \
--user "<username>:<password>" \
--header "Content-Type: application/json" \
"http://<servername>/config/rest/object-snapshot/v1/enabled" \
--data '{
"data": false
}'

JSON response:

200 OK
Content-Type: application/json

{
"status": "success"
}

Get Object Snapshot settings​

This example shows how to get and understand the Object Snapshot settings.

JSON request:

curl --request GET \
--anyauth \
--user "<username>:<password>" \
--header "Content-Type: application/json" \
"http://<servername>/config/rest/object-snapshot/v1"

JSON response:

200 OK
Content-Type: application/json

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

API definition​

Structure​

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

Entities​

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

Properties​

object-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
object-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