Input validation#
This page lists the rules the service applies to request fields and delta content.
A violation fails INVALID_ARGUMENT and applies nothing; on a chained UpdateLayer the status also carries the INVALID_UPDATE reason (Chained writes).
A delta over one of the two count limits carries its own reason instead, on every CreateLayer and UpdateLayer (Deltas that are too large).
Request fields#
Request and header fields are checked before the permission check. Lengths are in bytes, not characters; upload size limits are in Sending an upload.
Field |
Rule |
|---|---|
|
Non-empty, at most 256 bytes, no control characters ( |
Session name, |
Not blank, at most 255 bytes, no control characters, no |
|
Non-empty, at most 4,096 bytes before and after canonicalization, no control characters. |
|
At most 256 bytes, no control characters, no pipe character. Empty is valid, except on an |
|
Empty means none. Otherwise at most 64 bytes, each one of |
|
Its |
|
Non-zero. |
|
Empty, or at most 256 bytes with no control characters. |
Delta content#
Delta rules are checked after authorization, once the upload is parsed, and before anything is committed.
Delta element |
Rule |
|---|---|
Entry count |
At most 99,999 entries per delta: structural commands, |
|
At most 100,000 ids in one list. |
Section, field and move names ( |
At most 4,096 bytes, no control characters. |
|
Finite: NaN and ±infinity are refused. |
|
A section cannot be its own parent. |
|
Refused when another sibling already holds the new |
|
Within the length limit, never refused for the ids it names: ids that are not current children are ignored, and a repeated id counts once. An empty list changes nothing. |
Section-tree depth |
At most 10,000 sections from the root after the delta applies. |
Root section, |
Content that leaves sections, fields or time samples must leave at least one section whose |
Root section, |
A delta may not remove a layer’s last section whose |
|
At most 2^53 − 1. |
Two siblings can still share a name, because a MoveSection rename under the same parent is never checked.
Where they do, a name conflict always resolves to the sibling with the lowest section_id.
Each SetField advances its layer’s running set order by its set_order plus one, and each commit advances the sequence number by one.
A layer whose running set order or sequence number would pass 2^53 − 1 refuses every further update with INTERNAL, message internal error, and applies nothing; other layers are unaffected.
Keep set_order values small: timestamp-sized values can use up a layer within a few updates.
To recover, replace the layer with CreateLayer: the new object starts its set order again at zero.
The layer’s root section#
A layer’s root section is a section whose parent_id is 0; USD readers map it to the layer’s pseudo-root /.
Content that leaves a root section of its own is kept as sent.
A CreateLayer whose content leaves no section, field or time sample, including a header with no chunks, creates the layer holding only the root section: section_id 1, parent_id 0, empty name, section_type 7, no fields.
Readers receive it when they subscribe.
Build under section 1: outside a reset, a later CreateSection of section 1 is refused INVALID_ARGUMENT as a duplicate, and a DiffChangeSection of it changes it in place.
During a rolling upgrade or after a rollback, a replica of an earlier version gives a layer created from empty content no root section, and accepts the two root-section requests the table above refuses.
To be sure of the root then, send it in your CreateLayer content.
Time samples at -0.0#
A TimeSample at time -0.0 is accepted and is the same time as 0.0.
The service stores it, and serves it to late joiners and in content restored from backup, as 0.0; live subscribers receive the update as sent, -0.0 included.
So treat -0.0 and 0.0 as one time when you apply updates.
A section holds one sample at that time: within one delta the last time sample at either spelling is the one kept, and a later write at either spelling replaces the earlier one.
This applies to the times of TimeSample entries only.
Field values, including a whole timeSamples dictionary set by a SetField, are stored and served byte for byte.
Deltas that are too large#
A delta over a count limit is refused with an ErrorInfo of domain nvidia.omniverse.live.v1alpha and no RetryInfo, chained or not; re-sending the same delta always fails.
Every metadata value is a decimal integer.
Status |
Reason and metadata |
Applied? |
What to do |
|---|---|---|---|
|
|
No |
Split the content into several smaller deltas. For a new layer, send the first part with |
|
|
No |
Name at most 100,000 children in one |
The limits apply to each upload, not to a layer: a layer can grow past them through further updates.
Match the reason, not the message text.
During a rolling upgrade, a replica of an earlier version refuses the same delta INVALID_ARGUMENT without these reasons.
External values#
Every SetField or TimeSample with a non-zero extValueSize references an external value, an OMPF part of the same upload.
For each reference:
extValueIndexis 1-based: 1 names the first external-value part (part 0 is the delta, and index 0 is refused), and that part is exactlyextValueSizebytes;valueOrExtHashis exactly 32 bytes and equals the part’s content hash.
The content hash is not plain SHA-256. It is SHA-256 over the concatenated SHA-256 digests of the value’s consecutive 1,048,576-byte blocks, the last block holding the remainder:
import hashlib
def external_value_hash(value: bytes) -> bytes:
block = 1024 * 1024
digests = b"".join(
hashlib.sha256(value[i:i + block]).digest()
for i in range(0, len(value), block)
)
return hashlib.sha256(digests).digest()
An empty value hashes to SHA-256 of the empty string. A refused upload stores, applies and broadcasts nothing.
Base path canonicalization#
CreateSession and ListSessions normalize the base path, so equivalent spellings of one address name the same sessions:
In the path, every byte outside
A–Z a–z 0–9 - _ . ~ /becomes an uppercase%XXescape, and an encoded slash becomes/.user@example.comanduser%40example.comare one path, as are a space and%20.The scheme is lowercased, and so is the host under
ftp,file,http,https,wsandwss.
Not normalized: the host under any other scheme (omniverse://Server/x and omniverse://server/x differ), the user-info and port, and the query and fragment, which are kept exactly as sent.
Canonicalization also refuses, with INVALID_ARGUMENT:
percent-escapes that do not decode to valid UTF-8;
escapes that decode to a NUL or control character;
.or..path segments, encoded ones included.
Encoding can lengthen a path up to about three times, and the 4,096-byte limit applies to the result too.
See next#
Return to the client API overview.