Create Subscriptions
Creates a subscription of the published library. if you do not have all of the privileges described as follows: - The resource com.vmware.content.Library referenced by the parameter library requires ContentLibrary.AddSubscription.
Request
URLURL
Path Parameters
Path Parameters
Identifier of the published library. The parameter must be an identifier for the resource type: com.vmware.content.Library.
Header Parameters
Header Parameters
A 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. If not specified, creation is not idempotent.
Required session ID, acquired from Create Session API under CIS product
vmware-api-session-id example
"b00db39f948d13ea1e59b4d6fce56389"
Request Body
Specification for the subscription.
{
"subscribed_library": {
"location": "LOCAL",
"placement": {
"folder": "string",
"resource_pool": "string"
},
"target": "CREATE_NEW"
}
}
Specification for the subscribed library to be associated with the subscription.
Authentication
Response
Response BodyResponse Body
Subscription identifier. The result will be an identifier for the resource type: com.vmware.content.library.Subscriptions.
Errors
com.vmware.vapi.std.errors.already_exists : If a subscription of the published library to the specified subscribed library already exists. This is only applicable when subscribedLibrary#subscribedLibrary is specified. | com.vmware.vapi.std.errors.invalid_argument : If Subscriptions.CreateSpec contains invalid arguments. | com.vmware.vapi.std.errors.invalid_element_type : If the library specified by library is a subscribed library. | com.vmware.vapi.std.errors.not_allowed_in_current_state : If the library specified by library is not a published library.
com.vmware.vapi.std.errors.unauthenticated : If the user that requested the operation cannot be authenticated.
com.vmware.vapi.std.errors.unauthorized : If the user that requested the operation is not authorized to perform the operation.
com.vmware.vapi.std.errors.not_found : If the library specified by library does not exist. If the subscribed library specified by subscribedLibrary#subscribedLibrary does not exist at the vCenter instance specified by subscribedLibrary#vcenter.
com.vmware.vapi.std.errors.error : If the system reports an error while responding to the request. | com.vmware.vapi.std.errors.resource_inaccessible : If the vCenter instance specified by subscribedLibrary#vcenter cannot be contacted or found.
‘Default’ means this response is used for all HTTP codes that are not covered individually for this operation.
Code Samples
PowerCLI Client SDK Example
PowerCLI Client SDK All Parameters Example
cURL Command
Vendor Extensions
x-vmw-doc-deprecated-method: post
x-vmw-doc-deprecated-path: /rest/com/vmware/content/library/subscriptions/id:{library}
x-vmw-doc-operation: create