Content Library Item Updatesession File validate

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 ValidationResult.missing_files set. The user can add the missing files and try re-validating. For other type of errors, Content Library Item Updatesession File ValidationResult.invalid_files will contain the list of invalid files.

Returns an authorization error if you do not have all of the privileges described as follows:

  • Operation execution requires System.Anonymous.
Request
URI
POST
https://{api_host}/api/content/library/item/update-session/{updateSessionId}/file?action=validate
COPY
Path Parameters
string
updateSessionId
Required

Identifier of the update session to validate.

The parameter must be an identifier for the resource type: com.vmware.content.library.item.UpdateSession.


Authentication
This operation uses the following authentication methods.
Responses
200

A validation result containing missing files or invalid files and the reason why they are invalid.

{
    "has_errors": false,
    "missing_files": [
        "string"
    ],
    "invalid_files": [
        {
            "name": "string",
            "error_message": {
                "id": "string",
                "default_message": "string",
                "args": [
                    "string"
                ],
                "params": {
                    "params": {
                        "s": "string",
                        "dt": "string",
                        "i": 0,
                        "d": "number",
                        "l": "Vapi Std NestedLocalizableMessage Object",
                        "format": "string",
                        "precision": 0
                    }
                },
                "localized": "string"
            }
        }
    ]
}
boolean
has_errors
Required

Whether the validation was succesful or not. In case of errors, the Content Library Item Updatesession File ValidationResult.missing_files and Content Library Item Updatesession File ValidationResult.invalid_files will contain at least one entry.

array of string
missing_files
Required

A set containing the names of the files that are required but the client hasn't added.

array of object
invalid_files
Required

A list containing the files that have been identified as invalid and details about the error.


400

if the update session is not in the Content Library Item UpdateSessionModel State.ACTIVE state, or if some of the files that will be uploaded by the client aren't received correctly.

Returns Vapi Std Errors NotAllowedInCurrentState of type(s) application/json
This response body class contains all of the following: InlineVapi Std Errors NotAllowedInCurrentState0
"Vapi Std Errors NotAllowedInCurrentState Object"

404

if no update session with the given identifier exists.

Returns Vapi Std Errors NotFound of type(s) application/json
This response body class contains all of the following: InlineVapi Std Errors NotFound0
"Vapi Std Errors NotFound Object"

Code Samples
COPY
                    curl -X POST -H 'Authorization: <value>' https://{api_host}/api/content/library/item/update-session/{updateSessionId}/file?action=validate