HTTP Configuration#

Functions Summary#

bool omniClientClearListCache(char const *url)

Clear the list/stat cache for the provider that serves the given URL.

OmniClientRequestId omniClientRegisterStorageDirect(struct OmniClientStorageRegistrationInfo const *info, void *userData, OmniClientRegisterStorageCallback callback)

Register a storage server directly.

OmniClientRequestId omniClientRegisterStorageFromDiscovery(char const *discoveryUrl, void *userData, OmniClientRegisterStorageCallback callback)

Register a storage server by discovery URL.

OmniClientResult omniClientSetAzureSASToken(char const *host, char const *container, char const *sasToken, bool writeConfig)

Set Azure SAS token for a blob container.

void omniClientSetHttpHeader(char const *key, char const *value)

Set a header to pass along with any http request.

OmniClientResult omniClientSetS3Configuration(char const *host, char const *bucket, char const *region, char const *accessKeyId, char const *secretAccessKey, char const *cloudfrontUrl, bool cloudfrontForList, bool writeConfig)

Set S3 configuration info for a given host.

OmniClientResult omniClientSetS3Configuration2(char const *host, char const *bucket, char const *region, char const *accessKeyId, char const *secretAccessKey, char const *sessionToken, char const *cloudfrontUrl, bool cloudfrontForList, bool writeConfig)

Set S3 configuration info for a given host.

OmniClientResult omniClientSetS3Configuration3(char const *host, char const *bucket, char const *region, char const *accessKeyId, char const *secretAccessKey, char const *sessionToken, char const *canonicalHost, char const *cloudfrontUrl, bool cloudfrontForList, bool writeConfig)

Set S3 configuration info for a given host.

Structs Summary#

OmniClientHttpHeader

Header key-value pair for HTTP requests.

OmniClientStorageRegistrationInfo

Storage registration information for direct registration.

Typedefs Summary#

Functions#

bool omniClientClearListCache(char const *url)#

Clear the list/stat cache for the provider that serves the given URL.

List and stat results are cached for HTTP/HTTPS and Nucleus providers. Call this as an escape hatch when the cache is known to be stale (e.g. the server sent an event we don’t propagate yet, or bulk external changes happened out-of-band); subsequent list and stat calls will re-fetch from the server.

For Nucleus, this also cancels any in-flight list/stat requests on the provider and drops active list-subscriptions — subscribers will stop receiving callbacks. It does not close the connection.

Parameters:

url – A URL that is served by the provider whose cache should be cleared (e.g. “https://example.com/container” or “omniverse://server”)

Returns:

true if the provider’s cache was cleared, false if the URL is invalid or the provider has no list cache

OmniClientRequestId omniClientRegisterStorageDirect(
struct OmniClientStorageRegistrationInfo const *info,
void *userData,
OmniClientRegisterStorageCallback callback,
)#

Register a storage server directly.

This function registers a storage server directly by providing its URL and optional headers. The storage service is available until you call stop. Upon successful registration, the callback receives a list of top-level addresses served by the provider.

Note

If this function is called after omniClientShutdown, kInvalidRequestId will be returned, and the callback will not be called.

Parameters:
  • info – Storage registration information containing URL and headers

  • userData – User data passed to the callback

  • callback – The callback function that receives the result and list of top-level addresses

Returns:

A request ID that can be used with omniClientStop

OmniClientRequestId omniClientRegisterStorageFromDiscovery(
char const *discoveryUrl,
void *userData,
OmniClientRegisterStorageCallback callback,
)#

Register a storage server by discovery URL.

This function registers a storage server using a discovery URL. The storage service is available until you call stop. Upon successful registration, the callback receives a list of top-level addresses served by the provider.

Note

If this function is called after omniClientShutdown, kInvalidRequestId will be returned, and the callback will not be called.

Parameters:
  • discoveryUrl – The URL of the discovery service

  • userData – User data passed to the callback

  • callback – The callback function that receives the result and list of top-level addresses

Returns:

A request ID that can be used with omniClientStop

OmniClientResult omniClientSetAzureSASToken(
char const *host,
char const *container,
char const *sasToken,
bool writeConfig,
)#

Set Azure SAS token for a blob container.

Parameters:
  • host – The ‘host’ portion of the URL. For example “myaccount.blob.core.windows.net”

  • container – The ‘container’ portion of the URL.

  • sasToken – A SAS token which grants access to the container.

  • writeConfig – True to write omniverse.toml file back to disk, false to only have changes in memory.

Returns:

The result of the configuration operation

void omniClientSetHttpHeader(char const *key, char const *value)#

Set a header to pass along with any http request.

Pass null as the value to clear a previously set header

Note: This does not apply to redirects from Nucleus

Parameters:
  • key – The header key to set

  • value – The header value to set, or nullptr to clear the header

OmniClientResult omniClientSetS3Configuration(
char const *host,
char const *bucket,
char const *region,
char const *accessKeyId,
char const *secretAccessKey,
char const *cloudfrontUrl,
bool cloudfrontForList,
bool writeConfig,
)#

Set S3 configuration info for a given host.

Parameters:
  • host – S3 host to configure. Can be any host even a custom domain. Required.

  • bucket – S3 bucket name. Optional (required if region is specified).

  • region – S3 region. Optional (required if bucket is specified).

  • accessKeyId – S3 access key. Optional.

  • secretAccessKey – S3 secret access key. Optional.

  • cloudfrontUrl – CloudFront URL. Optional. If set, any URLs using url will automatically be rewritten to use this URL.

  • cloudfrontForList – Send all list and stat requests through the CloudFront URLs instead of directly to the S3 endpoint.

  • writeConfig – True to write omniverse.toml file back to disk, false to only have changes in memory

Returns:

The result of the configuration operation

OmniClientResult omniClientSetS3Configuration2(
char const *host,
char const *bucket,
char const *region,
char const *accessKeyId,
char const *secretAccessKey,
char const *sessionToken,
char const *cloudfrontUrl,
bool cloudfrontForList,
bool writeConfig,
)#

Set S3 configuration info for a given host.

Parameters:
  • host – S3 host to configure. Can be any host even a custom domain. Required.

  • bucket – S3 bucket name. Optional (required if region is specified).

  • region – S3 region. Optional (required if bucket is specified).

  • accessKeyId – S3 access key. Optional.

  • secretAccessKey – S3 secret access key. Optional.

  • sessionToken – S3 session token. Optional.

  • cloudfrontUrl – CloudFront URL. Optional. If set, any URLs using url will automatically be rewritten to use this URL.

  • cloudfrontForList – Send all list and stat requests through the CloudFront URLs instead of directly to the S3 endpoint.

  • writeConfig – True to write omniverse.toml file back to disk, false to only have changes in memory

Returns:

The result of the configuration operation

OmniClientResult omniClientSetS3Configuration3(
char const *host,
char const *bucket,
char const *region,
char const *accessKeyId,
char const *secretAccessKey,
char const *sessionToken,
char const *canonicalHost,
char const *cloudfrontUrl,
bool cloudfrontForList,
bool writeConfig,
)#

Set S3 configuration info for a given host.

Parameters:
  • host – S3 host to configure. Can be any host even a custom domain. Required.

  • bucket – S3 bucket name. Optional (required if region is specified).

  • region – S3 region. Optional (required if bucket is specified).

  • accessKeyId – S3 access key. Optional.

  • secretAccessKey – S3 secret access key. Optional.

  • sessionToken – S3 session token. Optional.

  • canonicalHost – The canonical S3 host for AWS signature (e.g. bucket.s3.region.amazonaws.com). Optional. Use when accessing S3 via custom domain.

  • cloudfrontUrl – CloudFront URL. Optional. If set, any URLs using url will automatically be rewritten to use this URL.

  • cloudfrontForList – Send all list and stat requests through the CloudFront URLs instead of directly to the S3 endpoint.

  • writeConfig – True to write omniverse.toml file back to disk, false to only have changes in memory

Returns:

The result of the configuration operation

Typedefs#

typedef void (*OmniClientRegisterStorageCallback)(void *userData, OmniClientResult result, const char *const *addresses)#

This is called with the result of omniClientRegisterStorageFromDiscovery or omniClientRegisterStorageDirect.

Param userData:

User data passed to the registration function

Param result:

The result of the registration operation

Param addresses:

A null-terminated array of top-level address strings served by the storage provider (nullptr on error)