Object ID Representation

The JSON API represents the unique identifier as a 32 byte character hexadecimal string. For example: 90e9361f38c156df654ecd27b92f398c. When proxied via the HTSP api method, the unique identifier is encoded as a 16 byte binary field. When this field is represented as a hexadecimal string, it matches that used by the JSON API. The HTSP API represents the unique identifier of an object using an unsigned 32 bit big-endian integer. When represented as a hexadecimal string, the value matches the first 8 characters of the JSON unique identifier. When evaluated as binary data, it matches the first 4 bytes of the proxied JSON value.

Mixing and Matching API Values The following table summarises UUID handling by API.

API UsedUUID Value ReturnedEncoding




Proxied JSON






Additional Notes

  • The 32 bit ID may only contain 31 valid bits under certain circumstances. Based on how TVH creates 32 bit IDs, it is recommended to apply a 0x7fffffff mask for comparison operations between long and short ID forms.

  • There appears to be no guarantee that the 32 bit ID will be unique among ALL object types.

Last updated

© Tvheadend 2006-2024