HTTP Configuration#

Functions#

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.

Structs#

OmniClientHttpHeader

Header key-value pair for HTTP requests.

OmniClientStorageRegistrationInfo

Storage registration information for direct registration.

Typedefs#

Functions#

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

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)