Skip to main content

Data model

The body worn content destination API uses the OpenStack Swift addressing model with three levels: Account, Container, and Object.

For the full specification, see github.com/AxisCommunications/body-worn-content-destination-api.

Container and object structure​

Account
├── System/
│ ├── <bwsid> (system object, if StoreReadSystemID)
│ ├── Capabilities.json (capability declarations)
│ └── Categories.json (category list, if ReadCategories)
├── Users/
│ └── <userid> (one object per registered user)
├── Devices/
│ └── <deviceid> (one object per registered BWC)
└── <UserID>_<BWCSerialNumber>_<TriggerOnTime>/ (recording container)
├── <StartTime>_<RecordingID>.<ContainerType> (video clip)
├── <StartTime>_<RecordingID>.key (encryption key, if encrypted)
├── bookmark_<Timestamp>_<ID> (bookmark, if StoreBookmarks)
└── <date>_<time>_<id>_<bwcid>_gpstrail.json (GNSS trail, if StoreGNSSTrackRecording)

Connection file​

The connection file is a JSON file created by the content destination and imported into AXIS Body Worn Manager. Maximum size: 64 kB.

Connection file template
{
"ConnectionFileVersion": "1.0",
"SiteName": "<string:64>",
"ApplicationName": "<string:256>",
"ApplicationVersion": "<version-string:128>",
"ContentDestinationAsNTPServer": false,
"AuthenticationTokenURI": ["<URI:512>"],
"HTTPSCertificate": ["<Base64 encoded X509 Certificate:16k>"],
"BlobAPIKey": "<Password:64>",
"BlobAPIUserName": "<UserName:64>",
"ContainerType": "<mkv | mp4>",
"FullStoreAndReadSupport": false,
"WantEncryption": false,
"PublicKey": "<Base64 encoded PEM RSA PublicKey:2048>",
"PublicKeyId": "<string:128>"
}

Connection file attributes​

AttributeRequired at setupModifiableNotes
ConnectionFileVersionYes
SiteNameYes
ApplicationNameYes
ApplicationVersionYes
ContentDestinationAsNTPServerYes
AuthenticationTokenURIYes
HTTPSCertificateYesYesEnables HTTPS. If validation fails, connection setup fails. Omit only during development.
BlobAPIKeyYes
BlobAPIUserNameYes
ContainerTypeYesDefault: mkv. Optional.
FullStoreAndReadSupportYesDefault: false. Can only change from false to true.
WantEncryptionYesDefault: false. Can only change from false to true.
PublicKeyYesRequired when WantEncryption is true.
PublicKeyIdYesRequired when WantEncryption is true.

Recording container metadata​

Container name format: <UserID>_<BWCSerialNumber>_<TriggerOnTime> (TriggerOnTime in UTC, format YYYYMMDDTHHMMSSZ).

All metadata is sent as HTTP headers with prefix X-Container-Meta-. Values are URL-encoded UTF-8. String attributes are limited to 32 bytes unless noted.

KeyTypeDescription
ContainerNameStringThe container name
BWCSerialNumberStringSerial number of the recording camera
SCUSerialNumberStringSerial number of the system controller
FirmwareVersionStringBWC firmware version at recording time
UserIDStringUUID of the user assigned to the camera
TriggerOnStringWhy the recording started
TriggerOffStringWhy the recording stopped
TriggerOnTimeStringTrigger time, epoch UTC
TriggerOnTimeISOStringTrigger time, RFC 3339 (UTC)
TriggerOnLocationString (64)<lat><long><accuracy><epoch>
TriggerOffTimeStringStop trigger time, epoch UTC
TriggerOffTimeISOStringStop trigger time, RFC 3339 (UTC)
TriggerOffLocationString (64)<lat><long><accuracy><epoch>
StartTimeStringRecording start (includes pre-buffer), epoch UTC
StartTimeISOStringRecording start, RFC 3339 (UTC)
StopTimeStringRecording stop (includes post-buffer), epoch UTC
StopTimeISOStringRecording stop, RFC 3339 (UTC)
TimeZoneStringIANA time zone of the BWC at recording time
BWCModelStringCamera model (for example, W102)
StatusStringTransferring or Complete — no more updates after Complete

Video object metadata​

Object name format: <StartTime>_<RecordingID>.<ContainerType>

Headers use prefix X-Object-Meta-.

KeyTypeDescription
StartTimeStringClip start time, epoch UTC
StartTimeISOStringClip start time, RFC 3339 (UTC)
StopTimeStringClip end time, epoch UTC
StopTimeISOStringClip end time, RFC 3339 (UTC)
ContainerTypeStringFile type (mkv or mp4)

Key object metadata​

Object name format: <StartTime>_<RecordingID>.key

KeyTypeDescription
StartTimeStringStart time of the encrypted clip (or recording start for encrypted location data)
FileTypeStringAlways key

Bookmark object metadata​

Object name format: bookmark_<Timestamp>_<ID> (stored only if StoreBookmarks capability is set).

The object content is a free-text description in UTF-8. An empty bookmark with only a timestamp serves as a time marker.

KeyTypeDescription
CategoryIDStringCategory identifier
CategoryNameStringCategory display name
TagsStringSemicolon-separated key:value pairs
StartTimeStringBookmark time, RFC 3339 (UTC). Defaults to recording start if unset.
EndTimeStringEnd time, RFC 3339 (UTC). Absent if not set by user.
LocationString (64)Location at bookmark time

Location object metadata​

Object name format: <date>_<time>_<RecordingID>_<bwcid>_gpstrail.json (stored only if StoreGNSSTrackRecording capability is set).

KeyTypeDescription
FileTypeStringAlways json

See Capabilities — StoreGNSSTrackRecording for the JSON file format.

User object metadata​

Container: Users/. Object name: <UserUUID>.

KeyTypeDescription
ActiveStringTrue or False
NameString (100)Display name (not unique)
UserIDString (100)User-supplied ID (empty or unique). Only stored if StoreUserIDKey capability is set.
note

Name is not unique. Display as Name (UserID) to disambiguate users.

Device object metadata​

Container: Devices/. Object name: <BWCSerialNumber>.

KeyTypeDescription
ActiveStringTrue or False
NameString (100)Display name
ModelStringDevice model (for example, W100)

Object encryption​

Encrypt​

Set WantEncryption to true and provide PublicKey and PublicKeyId in the connection file.

  • The corresponding private key is required for decryption.
  • PublicKeyId is written to the key object so the CD knows which key to use.
  • Once encryption is enabled, it cannot be turned off.

Decrypt​

When encryption is enabled, each content object is accompanied by a .key file. The key file contains an EncryptedKey attribute holding the content encryption key wrapped with the public key.

See the example server documentation for decryption details.

String encoding​

All user-supplied strings are URL-encoded UTF-8 and can include any character except control characters. Content destinations should accept the full UTF-8 set but may translate characters in their UI if needed.