content library item updatesession file: validate
Validates the files in the update session with the referenced identifier and ensures all necessary files are received. In the case where a file is missing, this operation will return its name in the content.library.item.updatesession.file.validation_result.missing_files set. The user can add the missing files and try re-validating. For other type of errors, content.library.item.updatesession.file.validation_result.invalid_files will contain the list of invalid files.
Request:
HTTP request
POST https://{server}/rest/com/vmware/content/library/item/updatesession/file/id:{update_session_id}?~action=validate
Path Parameters
Name | Type | Description |
---|---|---|
Required | ||
update_session_id | string | Identifier of the update session to validate. |
Response:
HTTP Status Code: 200
Representations:
{
"value": {
"has_errors": true,
"invalid_files": [
{
"error_message": {
"args": [
"string",
"string"
],
"default_message": "string",
"id": "string"
},
"name": "string"
},
{
"error_message": {
"args": [
"string",
"string"
],
"default_message": "string",
"id": "string"
},
"name": "string"
}
],
"missing_files": [
"string",
"string"
]
}
}
"value": {
"has_errors": true,
"invalid_files": [
{
"error_message": {
"args": [
"string",
"string"
],
"default_message": "string",
"id": "string"
},
"name": "string"
},
{
"error_message": {
"args": [
"string",
"string"
],
"default_message": "string",
"id": "string"
},
"name": "string"
}
],
"missing_files": [
"string",
"string"
]
}
}
<?xml version="1.0" ?>
<ns0:Validate-Result xmlns:ns0="http://vmware.com/content/library/item/updatesession/file" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
<value>
<has_errors>true</has_errors>
<missing_files-array>
<array-item>string</array-item>
<array-item>string</array-item>
</missing_files-array>
<invalid_files-array>
<array-item>
<error_message>
<default_message>string</default_message>
<id>string</id>
<args-array>
<array-item>string</array-item>
<array-item>string</array-item>
</args-array>
</error_message>
<name>string</name>
</array-item>
<array-item>
<error_message>
<default_message>string</default_message>
<id>string</id>
<args-array>
<array-item>string</array-item>
<array-item>string</array-item>
</args-array>
</error_message>
<name>string</name>
</array-item>
</invalid_files-array>
</value>
</ns0:Validate-Result>
<ns0:Validate-Result xmlns:ns0="http://vmware.com/content/library/item/updatesession/file" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
<value>
<has_errors>true</has_errors>
<missing_files-array>
<array-item>string</array-item>
<array-item>string</array-item>
</missing_files-array>
<invalid_files-array>
<array-item>
<error_message>
<default_message>string</default_message>
<id>string</id>
<args-array>
<array-item>string</array-item>
<array-item>string</array-item>
</args-array>
</error_message>
<name>string</name>
</array-item>
<array-item>
<error_message>
<default_message>string</default_message>
<id>string</id>
<args-array>
<array-item>string</array-item>
<array-item>string</array-item>
</args-array>
</error_message>
<name>string</name>
</array-item>
</invalid_files-array>
</value>
</ns0:Validate-Result>
Response Type:
Name | Type | Description |
---|---|---|
bold = required | ||
value | validation_result | A validation result containing missing files or invalid files and the reason why they are invalid. |
value.has_errors | boolean | Whether the validation was succesful or not. In case of errors, the content.library.item.updatesession.file.validation_result.missing_files and content.library.item.updatesession.file.validation_result.invalid_files will contain at least one entry. |
value.missing_files | string[] | A set containing the names of the files that are required but the client hasn't added. |
value.invalid_files | validation_error[] | A array containing the files that have been identified as invalid and details about the error. |
value.invalid_files[].name | string | The name of the file. |
value.invalid_files[].error_message | localizable_message | A message indicating why the file was considered invalid. |
value.invalid_files[].error_message.id | string | Unique identifier of the localizable string or message template. This identifier is typically used to retrieve a locale-specific string or message template from a message catalog. |
value.invalid_files[].error_message.default_message | string | The value of this localizable string or message template in the en_US (English) locale. If vapi.std.localizable_message.id refers to a message template, the default message will contain the substituted arguments. This value can be used by clients that do not need to display strings and messages in the native language of the user. It could also be used as a fallback if a client is unable to access the appropriate message catalog. |
value.invalid_files[].error_message.args | string[] | Arguments to be substituted into a message template. |
Errors:
HTTP Status Code | Type | Description |
---|---|---|
404 | not_found | if no update session with the given identifier exists. |
400 | not_allowed_in_current_state | if the update session is not in the ACTIVE state, or if some of the files that will be uploaded by the client aren't received correctly. |