POST /com/vmware/content/subscribed-library |
POST /com/vmware/content/subscribed-library?~action=create |
Once created, the subscribed library will be empty. If the com.vmware.content.library_model.subscription_info property is set, the Content Library Service will attempt to synchronize to the remote source. This is an asynchronous operation so the content of the published library may not immediately appear.
{
"client_token": "string", "create_spec": { "creation_time": "2013-06-06T22:13:05", "description": "string", "id": "obj-103", "last_modified_time": "2013-06-06T22:13:05", "last_sync_time": "2013-06-06T22:13:05", "name": "string", "publish_info": { "authentication_method": "BASIC", "password": "secret string", "persist_json_enabled": true, "publish_url": "http://myurl.com", "published": true, "user_name": "string" }, "server_guid": "obj-103", "storage_backings": [ { "datastore_id": "obj-103", "storage_uri": "http://myurl.com", "type": "DATASTORE" }, { "datastore_id": "obj-103", "storage_uri": "http://myurl.com", "type": "DATASTORE" } ], "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" }, "type": "LOCAL", "version": "string" } }
<?xml version="1.0" ?>
<ns0:Create-Input xmlns:ns0="http://vmware.com/content/subscribed_library" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"> <create_spec> <id>obj-103</id> <publish_info> <user_name>string</user_name> <publish_url>http://myurl.com</publish_url> <authentication_method>BASIC</authentication_method> <published>true</published> <persist_json_enabled>true</persist_json_enabled> <password>secret string</password> </publish_info> <storage_backings-array> <array-item> <datastore_id>obj-103</datastore_id> <storage_uri>http://myurl.com</storage_uri> <type>DATASTORE</type> </array-item> <array-item> <datastore_id>obj-103</datastore_id> <storage_uri>http://myurl.com</storage_uri> <type>DATASTORE</type> </array-item> </storage_backings-array> <last_modified_time>2013-06-06T22:13:05</last_modified_time> <description>string</description> <name>string</name> <creation_time>2013-06-06T22:13:05</creation_time> <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> <type>LOCAL</type> <server_guid>obj-103</server_guid> <last_sync_time>2013-06-06T22:13:05</last_sync_time> <version>string</version> </create_spec> <client_token>string</client_token> </ns0:Create-Input>
POST /com/vmware/content/subscribed-library
?create_spec.id=obj-103 &create_spec.publish_info.user_name=string &create_spec.publish_info.publish_url=http%3A%2F%2Fmyurl.com &create_spec.publish_info.authentication_method=BASIC &create_spec.publish_info.published=true &create_spec.publish_info.persist_json_enabled=true &create_spec.publish_info.password=secret+string &create_spec.storage_backings.1.datastore_id=obj-103 &create_spec.storage_backings.1.storage_uri=http%3A%2F%2Fmyurl.com &create_spec.storage_backings.1.type=DATASTORE &create_spec.storage_backings.2.datastore_id=obj-103 &create_spec.storage_backings.2.storage_uri=http%3A%2F%2Fmyurl.com &create_spec.storage_backings.2.type=DATASTORE &create_spec.last_modified_time=2013-06-06T22%3A13%3A05 &create_spec.description=string &create_spec.name=string &create_spec.creation_time=2013-06-06T22%3A13%3A05 &create_spec.subscription_info.user_name=string &create_spec.subscription_info.ssl_thumbprint=string &create_spec.subscription_info.on_demand=true &create_spec.subscription_info.automatic_sync_enabled=true &create_spec.subscription_info.subscription_url=http%3A%2F%2Fmyurl.com &create_spec.subscription_info.authentication_method=BASIC &create_spec.subscription_info.password=secret+string &create_spec.type=LOCAL &create_spec.server_guid=obj-103 &create_spec.last_sync_time=2013-06-06T22%3A13%3A05 &create_spec.version=string &client_token=string |
Name | Type | Required | Description |
---|---|---|---|
client_token | string | No | Unique token generated on the client for each creation request. The token should be a universally unique identifier (UUID), for example: b8a2a2e3-2314-43cd-a871-6ede0f429751 . This token can be used to guarantee idempotent creation. |
create_spec* |
library_model | Yes | Specification for the new subscribed library. |
Name | Type | Required | Description |
---|---|---|---|
result | ID | Yes | Identifier of the newly created subscribed library. Id of type com.vmware.content.Library. |
Type | Description | HTTP Status Code |
---|---|---|
invalid_argument | if the create_spec is not valid. |
400 |
unsupported | if using multiple storage backings. | 400 |
resource_inaccessible | if subscribing to a published library which cannot be accessed. | 400 |
Copyright © 2014. All Rights Reserved.