content subscribed library: probe

Probes remote library subscription information, including URL, SSL certificate and password. The resulting content.subscribed_library.probe_result structure describes whether or not the subscription configuration is successful.

Request:

HTTP request

POST https://{server}/rest/com/vmware/content/subscribed-library?~action=probe

Request Body Structure:

{
    "subscription_info"{
        "authentication_method""BASIC",
        "automatic_sync_enabled"true,
        "on_demand"true,
        "password""secret string",
        "ssl_thumbprint""string",
        "subscription_url""http://myurl.com",
        "user_name""string"
    }
}
<?xml version="1.0" ?>
<ns0:Probe-Input xmlns:ns0="http://vmware.com/content/subscribed_library" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
  <subscription_info>
    <user_name>string</user_name>
    <ssl_thumbprint>string</ssl_thumbprint>
    <on_demand>true</on_demand>
    <automatic_sync_enabled>true</automatic_sync_enabled>
    <subscription_url>http://myurl.com</subscription_url>
    <authentication_method>BASIC</authentication_method>
    <password>secret string</password>
  </subscription_info>
</ns0:Probe-Input>

Request Body Parameters:

Name Type Description
bold = required
subscription_info subscription_info The subscription info to be probed.
subscription_info.authentication_method string Indicate how the subscribed library should authenticate (BASIC, NONE) with the published library endpoint.

Indicate how the subscribed library should authenticate with the published library endpoint. Value is one of:
BASIC: Require HTTP Basic authentication matching a specified username and password.
NONE: Require no authentication.Optional. This field must be provided for the create operation. It will always be present in the result of the get or list operations. It is optional for the update operation.

subscription_info.automatic_sync_enabled boolean Whether the library should participate in automatic library synchronization. In order for automatic synchronization to happen, the global content.configuration_model.automatic_sync_enabled option must also be true. The subscription is still active even when automatic synchronization is turned off, but synchronization is only activated with an explicit call to sync or sync. In other words, manual synchronization is still available even when automatic synchronization is disabled.

Optional. This field must be provided for the create operation. It will always be present in the result of the get or list operations. It is optional for the update operation.

subscription_info.on_demand boolean Indicates whether a library item's content will be synchronized only on demand.

If this is set to true, then the library item's metadata will be synchronized but the item's content (its files) will not be synchronized. The Content Library Service will synchronize the content upon request only. This can cause the first use of the content to have a noticeable delay.

Items without synchronized content can be forcefully synchronized in advance using the sync call with forceSyncContent set to true. Once content has been synchronized, the content can removed with the evict call.

If this value is set to false, all content will be synchronized in advance.

Optional. This field must be provided for the create operation. It will always be present in the result of the get or list operations. It is optional for the update operation.

subscription_info.password secret The password to use when authenticating.

The password must be set when using a password-based authentication method; empty strings are not allowed.

Optional. This field is optional for the create operation. It will not be present in the result of the get or list operations. It is optional for the update operation.

subscription_info.ssl_thumbprint string An optional SHA-1 hash of the SSL certificate for the remote endpoint.

If this value is defined the SSL certificate will be verified by comparing it to the SSL thumbprint. The SSL certificate must verify against the thumbprint. When specified, the standard certificate chain validation behavior is not used. The certificate chain is validated normally if this value is unset.

Optional. This field is optional for the create operation. It will not be present in the result of the get or list operations. It is optional for the update operation.

subscription_info.subscription_url URI The URL of the endpoint where the metadata for the remotely published library is being served.

This URL can be the content.library.publish_info.publish_url of the published library (for example, https://server/path/lib.json).

If the source content comes from a published library with content.library.publish_info.persist_json_enabled, the subscription URL can be a URL pointing to the library JSON file on a datastore or remote file system. The supported formats are:

vSphere 6.5

  • ds:///vmfs/volumes/{uuid}/mylibrary/lib.json (for datastore)
  • nfs://server/path/mylibrary/lib.json (for NFSv3 server on vCenter Server Appliance)
  • nfs://server/path/mylibrary/lib.json?version=4 (for NFSv4 server on vCenter Server Appliance)
  • smb://server/path/mylibrary/lib.json (for SMB server)

vSphere 6.0

  • file://server/mylibrary/lib.json (for UNC server on vCenter Server for Windows)
  • file:///path/mylibrary/lib.json (for local file system)

When you specify a DS subscription URL, the datastore must be on the same vCenter Server as the subscribed library. When you specify an NFS or SMB subscription URL, the content.library.storage_backing.storage_uri of the subscribed library must be on the same remote file server and should share a common parent path with the subscription URL.

Optional. This field must be provided for the create operation. It will always be present in the result of the get or list operations. It is optional for the update operation.

subscription_info.user_name string The username to use when authenticating.

The username must be set when using a password-based authentication method. Empty strings are allowed for usernames.

Optional. This field is optional for the create operation. It is optional in the result of the get or list operations. It is optional for the update operation.

Response:

HTTP Status Code: 200

Representations:

{
    "value"{
        "error_messages"[
            {
                "args"[
                    "string",
                    "string"
                ],
                "default_message""string",
                "id""string"
            },
            {
                "args"[
                    "string",
                    "string"
                ],
                "default_message""string",
                "id""string"
            }
        ],
        "ssl_thumbprint""string",
        "status""SUCCESS"
    }
}
<?xml version="1.0" ?>
<ns0:Probe-Result xmlns:ns0="http://vmware.com/content/subscribed_library" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
  <value>
    <ssl_thumbprint>string</ssl_thumbprint>
    <status>SUCCESS</status>
    <error_messages-array>
      <array-item>
        <default_message>string</default_message>
        <id>string</id>
        <args-array>
          <array-item>string</array-item>
          <array-item>string</array-item>
        </args-array>
      </array-item>
      <array-item>
        <default_message>string</default_message>
        <id>string</id>
        <args-array>
          <array-item>string</array-item>
          <array-item>string</array-item>
        </args-array>
      </array-item>
    </error_messages-array>
  </value>
</ns0:Probe-Result>

Response Type:

Name Type Description
bold = required
value probe_result The subscription info probe result.
value.status string The status of probe result. This will be one of SUCCESS, INVALID_URL, TIMED_OUT, HOST_NOT_FOUND, RESOURCE_NOT_FOUND, INVALID_CREDENTIALS, CERTIFICATE_ERROR, UNKNOWN_ERROR.

Defines the error status constants for the probe result. Value is one of:
SUCCESS: Indicates that the probe was successful.
INVALID_URL: Indicates that the supplied URL was not valid.
TIMED_OUT: Indicates that the probe timed out while attempting to connect to the URL.
HOST_NOT_FOUND: Indicates that the host in the URL could not be found.
RESOURCE_NOT_FOUND: Indicates that the given resource at the URL was not found.
INVALID_CREDENTIALS: Indicates that the connection was rejected due to invalid credentials.
CERTIFICATE_ERROR: Indicates that the provided server certificate thumbprint in content.library.subscription_info.ssl_thumbprint is invalid. In this case, the returned #sslThumbprint should be set in content.library.subscription_info.ssl_thumbprint.
UNKNOWN_ERROR: Indicates an unspecified error different from the other error cases defined in content.subscribed_library.probe_result.status.

value.ssl_thumbprint string The SSL thumbprint for the remote endpoint.

Optional. An SSL thumbprint is only returned if the host is secured with SSL/TLS.

value.error_messages localizable_message[] If the probe result is in an error status, this field will contain the detailed error messages.

value.error_messages[].id string Unique identifier of the localizable string or message template.

This identifier is typically used to retrieve a locale-specific string or message template from a message catalog.

value.error_messages[].default_message string The value of this localizable string or message template in the en_US (English) locale. If vapi.std.localizable_message.id refers to a message template, the default message will contain the substituted arguments. This value can be used by clients that do not need to display strings and messages in the native language of the user. It could also be used as a fallback if a client is unable to access the appropriate message catalog.

value.error_messages[].args string[] Arguments to be substituted into a message template.

Errors:

None