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
Representation:
{
"value" : {
"has_errors" : true,
"invalid_files" : [
{
"error_message" : {
"args" : [
"string",
"string"
],
"default_message" : "string",
"localized" : "string",
"id" : "string",
"params" : [
{
"value" : {
"dt" : "2015-01-01T22:13:05.651Z",
"s" : "string",
"d" : 1.5,
"precision" : 1,
"format" : "SHORT_DATE",
"i" : 1,
"l" : {
"id" : "string",
"params" : [
{
"value" : {
"dt" : "2015-01-01T22:13:05.651Z",
"s" : "string",
"d" : 1.5,
"precision" : 1,
"format" : "SHORT_DATE",
"i" : 1,
"l" : {
"id" : "string",
"params" : [
{
"key" : "string"
}
]
}
},
"key" : "string"
}
]
}
},
"key" : "string"
}
]
},
"name" : "string"
},
{
"error_message" : {
"args" : [
"string",
"string"
],
"default_message" : "string",
"localized" : "string",
"id" : "string",
"params" : [
{
"value" : {
"dt" : "2015-01-01T22:13:05.651Z",
"s" : "string",
"d" : 1.5,
"precision" : 1,
"format" : "SHORT_DATE",
"i" : 1,
"l" : {
"id" : "string",
"params" : [
{
"value" : {
"dt" : "2015-01-01T22:13:05.651Z",
"s" : "string",
"d" : 1.5,
"precision" : 1,
"format" : "SHORT_DATE",
"i" : 1,
"l" : {
"id" : "string",
"params" : [
{
"key" : "string"
}
]
}
},
"key" : "string"
}
]
}
},
"key" : "string"
}
]
},
"name" : "string"
}
],
"missing_files" : [
"string",
"string"
]
}
}
"value" : {
"has_errors" : true,
"invalid_files" : [
{
"error_message" : {
"args" : [
"string",
"string"
],
"default_message" : "string",
"localized" : "string",
"id" : "string",
"params" : [
{
"value" : {
"dt" : "2015-01-01T22:13:05.651Z",
"s" : "string",
"d" : 1.5,
"precision" : 1,
"format" : "SHORT_DATE",
"i" : 1,
"l" : {
"id" : "string",
"params" : [
{
"value" : {
"dt" : "2015-01-01T22:13:05.651Z",
"s" : "string",
"d" : 1.5,
"precision" : 1,
"format" : "SHORT_DATE",
"i" : 1,
"l" : {
"id" : "string",
"params" : [
{
"key" : "string"
}
]
}
},
"key" : "string"
}
]
}
},
"key" : "string"
}
]
},
"name" : "string"
},
{
"error_message" : {
"args" : [
"string",
"string"
],
"default_message" : "string",
"localized" : "string",
"id" : "string",
"params" : [
{
"value" : {
"dt" : "2015-01-01T22:13:05.651Z",
"s" : "string",
"d" : 1.5,
"precision" : 1,
"format" : "SHORT_DATE",
"i" : 1,
"l" : {
"id" : "string",
"params" : [
{
"value" : {
"dt" : "2015-01-01T22:13:05.651Z",
"s" : "string",
"d" : 1.5,
"precision" : 1,
"format" : "SHORT_DATE",
"i" : 1,
"l" : {
"id" : "string",
"params" : [
{
"key" : "string"
}
]
}
},
"key" : "string"
}
]
}
},
"key" : "string"
}
]
},
"name" : "string"
}
],
"missing_files" : [
"string",
"string"
]
}
}
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[] | Positional arguments to be substituted into the message template. This list will be empty if the message uses named arguments or has no arguments. |
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. |