Create Item Deprecated
Creates a new library item. A new library item is created without any content. After creation, content can be added through the UpdateSession and File services.
A library item cannot be created in a subscribed library.
if you do not have all of the privileges described as follows: - The resource com.vmware.content.Library referenced by the attribute ItemModel.library-id requires ContentLibrary.AddLibraryItem.
Request
URLURL
Header Parameters
Header Parameters
Required session ID, acquired from Create Session API under CIS product
vmware-api-session-id example
"b00db39f948d13ea1e59b4d6fce56389"
Request Body
This is a request body class for an operation.
{
"create_spec": {}
}
Specification that defines the properties of the new library item.
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.
Authentication
Response
Response BodyResponse Body
Identifier of the new library item. The result will be an identifier for the resource type: com.vmware.content.library.Item.
{
"value": "string"
}
Identifier of the new library item. The result will be an identifier for the resource type: com.vmware.content.library.Item.
Errors
com.vmware.vapi.std.errors.invalid_argument : if one of the following is true for the new library item: - name is empty - name exceeds 80 characters - description exceeds 2000 characters
if the clientToken does not conform to the UUID format. | com.vmware.vapi.std.errors.invalid_element_type : if the ItemModel.library-id property of createSpec refers to a subscribed library. | com.vmware.vapi.std.errors.not_allowed_in_current_state : if the content of the library specified by the library ID (see ItemModel.library-id) property of createSpec has been deleted from the storage backings (see LibraryModel#storageBackings) associated with it. | com.vmware.vapi.std.errors.already_exists : if there is already a library item with same name in the library.
com.vmware.vapi.std.errors.not_found : if the ItemModel.library-id property of createSpec refers to a library that does not exist.
‘Default’ means this response is used for all HTTP codes that are not covered individually for this operation.
Code Samples
cURL Command
Vendor Extensions
x-vmw-doc-new-method: post
x-vmw-doc-new-path: /api/content/library/item
x-vmw-doc-operation: create