REST API - create

vcenter folder: create

Create a new folder in the vCenter inventory. Warning: This operation is part of a new feature in development. It may be changed at any time and may not have all supported functionality implemented.

Request:

HTTP request

POST https://{server}/rest/vcenter/folder

Request Body Structure:

{
    "spec"{
        "parent_folder""obj-103",
        "name""string"
    }
}

Request Body Parameters:

Name Type Description
bold = required
spec create_spec Specification for the new folder to be created.
spec.name string The name of the folder to be created. Warning: This attribute is part of a new feature in development. It may be changed at any time and may not have all supported functionality implemented.

spec.parent_folder string Parent folder in which the new folder should be created. Warning: This attribute is part of a new feature in development. It may be changed at any time and may not have all supported functionality implemented.

When clients pass a value of this structure as a parameter, the field must be an identifier for the resource type: Folder. When operations return a value of this structure as a result, the field will be an identifier for the resource type: Folder.

Response:

HTTP Status Code: 200

Representation:

{
    "value""obj-103"
}

Response Type:

Name Type Description
bold = required
value string The identifier of the newly created folder.

Errors:

HTTP Status Code Type Description
500 error if the system reports an error while responding to the request.
400 already_exists if a folder with the same name is already present.
400 invalid_argument if the folder name is empty or invalid as per the underlying implementation.
404 not_found if the parent folder cannot be found.
503 service_unavailable if the system is unable to communicate with a service to complete the request.
401 unauthenticated if the user can not be authenticated.
403 unauthorized if the user doesn't have the required privileges.