com.vmware.content.library

The library service provides operations to manage and find com.vmware.content.library_model entities.

The library service provides support for generic functionality which can be applied equally to all types of libraries. The functionality provided by this service will not affect the properties specific to the type of library. See also com.vmware.content.local_library and com.vmware.content.subscribed_library.

update

PATCH /com/vmware/content/library/id:{library_id}
POST /com/vmware/content/library/id:{library_id}?~action=update
POST /com/vmware/content/library?~action=update

Updates the properties of a library.

This is an incremental update to the library. Any field in the com.vmware.content.library_model structure that is unset will not be modified.

This operation will only update the common properties for all library types. This will not, for example, update the com.vmware.content.library_model.publish_info of a local library, nor the com.vmware.content.library_model.subscription_info of a subscribed library. Specific properties are updated in update and update.

Request:
Representations:
{
    "library_id""obj-103",
    "update_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:Update-Input xmlns:ns0="http://vmware.com/content/library" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
  <update_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>
  </update_spec>
  <library_id>obj-103</library_id>
</ns0:Update-Input>
POST /com/vmware/content/library?~action=update
&update_spec.id=obj-103
&update_spec.publish_info.user_name=string
&update_spec.publish_info.publish_url=http%3A%2F%2Fmyurl.com
&update_spec.publish_info.authentication_method=BASIC
&update_spec.publish_info.published=true
&update_spec.publish_info.persist_json_enabled=true
&update_spec.publish_info.password=secret+string
&update_spec.storage_backings.1.datastore_id=obj-103
&update_spec.storage_backings.1.storage_uri=http%3A%2F%2Fmyurl.com
&update_spec.storage_backings.1.type=DATASTORE
&update_spec.storage_backings.2.datastore_id=obj-103
&update_spec.storage_backings.2.storage_uri=http%3A%2F%2Fmyurl.com
&update_spec.storage_backings.2.type=DATASTORE
&update_spec.last_modified_time=2013-06-06T22%3A13%3A05
&update_spec.description=string
&update_spec.name=string
&update_spec.creation_time=2013-06-06T22%3A13%3A05
&update_spec.subscription_info.user_name=string
&update_spec.subscription_info.ssl_thumbprint=string
&update_spec.subscription_info.on_demand=true
&update_spec.subscription_info.automatic_sync_enabled=true
&update_spec.subscription_info.subscription_url=http%3A%2F%2Fmyurl.com
&update_spec.subscription_info.authentication_method=BASIC
&update_spec.subscription_info.password=secret+string
&update_spec.type=LOCAL
&update_spec.server_guid=obj-103
&update_spec.last_sync_time=2013-06-06T22%3A13%3A05
&update_spec.version=string
&library_id=obj-103

Parameters:
Name Type Required Description
library_id
 *
ID Yes Identifier of the library to update. Id of type com.vmware.content.Library.
update_spec
 *
library_model Yes Specification of the new property values to set on the library.

Response:
Representations:

Parameters:
Name Type Required Description
result VOID Yes

Errors:
Type Description HTTP Status Code
not_found if the library associated with library_id does not exist. 404
invalid_argument if the update_spec is not valid. 400

Copyright © 2014. All Rights Reserved.