REST API - validate-task

appliance infraprofile configs: validate-task

Validates the desired profile specification.

Request:

HTTP request

POST https://{server}/api/appliance/infraprofile/configs

?action=validate
&vmw-task=true
{
    "config_spec""string",
    "profile_spec"{
        "profiles"[
            "obj-103",
            "obj-103"
        ],
        "encryption_key""secret string",
        "description""string"
    }
}

Body Parameters:

Name Type Description
bold = required
- import_profile_spec information to validate the profile.
-.config_spec string The JSON string representing the desired config specification.

-.profile_spec profiles_spec The profile specification, if any

Optional. only set if there is a profilespec avaliable for this import profilespec.

-.profile_spec.encryption_key secret Encryption Key to encrypt/decrypt profiles.

Optional. If unset encryption will not be used for the profile.

-.profile_spec.description string Custom description provided by the user.

Optional. If unset description will be empty.

-.profile_spec.profiles string[] Profiles to be exported/imported.

Optional. If unset or empty, all profiles will be returned.When clients pass a value of this structure as a parameter, the field must contain identifiers for the resource type: com.vmware.infraprofile.profile. When operations return a value of this structure as a result, the field will contain identifiers for the resource type: com.vmware.infraprofile.profile.

Response:

HTTP Status Code: 202

Response Body Structure:

"obj-103"

Headers:

None

Type:

Name Type Description
bold = required
- string Result of validation.

Errors:

HTTP Status Code Type Description
500 error If there is unknown internal error. The accompanying error message will give more details about the failure.
404 not_found If there is no profile associated.
503 service_unavailable If the service is not available.
401 unauthenticated If the caller is not authenticated.