REST API - list

content library item updatesession file: list

Lists all files in the library item associated with the update session.

Request:

HTTP request

GET https://{server}/rest/com/vmware/content/library/item/updatesession/file

?update_session_id=obj-103

Request Query Parameters:

Name Type Description
bold = required
update_session_id string Identifier of the update session.

Response:

HTTP Status Code: 200

Representation:

{
    "value"[
        {
            "bytes_transferred"1,
            "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"
                    }
                ]
            },
            "upload_endpoint"{
                "ssl_certificate_thumbprint""string",
                "uri""http://myurl.com"
            },
            "size"1,
            "checksum_info"{
                "checksum""string",
                "algorithm""SHA1"
            },
            "source_endpoint"{
                "ssl_certificate_thumbprint""string",
                "uri""http://myurl.com"
            },
            "name""string",
            "source_type""NONE",
            "keep_in_storage"true,
            "status""WAITING_FOR_TRANSFER"
        },
        {
            "bytes_transferred"1,
            "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"
                    }
                ]
            },
            "upload_endpoint"{
                "ssl_certificate_thumbprint""string",
                "uri""http://myurl.com"
            },
            "size"1,
            "checksum_info"{
                "checksum""string",
                "algorithm""SHA1"
            },
            "source_endpoint"{
                "ssl_certificate_thumbprint""string",
                "uri""http://myurl.com"
            },
            "name""string",
            "source_type""NONE",
            "keep_in_storage"true,
            "status""WAITING_FOR_TRANSFER"
        }
    ]
}

Response Type:

Name Type Description
bold = required
value info[] The array of the files in the library item associated with the update session. This array may be empty if the caller has removed all the files as part of this session (in which case completing the update session will result in an empty library item).
value[].name string The name of the file.

value[].source_type string The source type (NONE, PUSH, PULL) from which the file is being retrieved. This may be NONE if the file is not being changed.

Defines how the file content is retrieved. Value is one of:
NONE: No source type has been requested.
PUSH: The client is uploading content using HTTP(S) PUT requests.
PULL: The server is pulling content from a URL. The URL scheme can be http, https, file, or ds.

value[].size long The file size, in bytes as received by the server. This field is guaranteed to be set when the server has completely received the file.

Optional. This field won't be set until the file status is READY.

value[].checksum_info checksum_info The checksum information of the file received by the server.

Optional. If unset, the server does not verify the checksum.

value[].checksum_info.algorithm string The checksum algorithm (SHA1, MD5, SHA256, SHA512) used to calculate the checksum.

Optional. If not specified the default checksum algorithm is SH_a1.

value[].checksum_info.checksum string The checksum value calculated with content.library.item.file.checksum_info.algorithm.

value[].source_endpoint transfer_endpoint A source endpoint from which to retrieve the file.

Optional. It is only relevant when source_type has value PULL. This field is optional and it is only relevant when the value of source_type is PULL.

value[].source_endpoint.uri URI Transfer endpoint URI. The supported URI schemes are: http, https, and ds.

An endpoint URI with the ds scheme specifies the location of the file on the datastore. The format of the datastore URI is:

  • ds:///vmfs/volumes/uuid/path

When the transfer endpoint is a datastore location, the server can import the file directly from the storage backing without the overhead of streaming over HTTP.

value[].source_endpoint.ssl_certificate_thumbprint string Thumbprint of the expected SSL certificate for this endpoint. Only used for HTTPS connections. The thumbprint is the SHA-1 hash of the DER encoding of the remote endpoint's SSL certificate. If set, the remote endpoint's SSL certificate is only accepted if it matches this thumbprint, and no other certificate validation is performed.

Optional. If not specified, standard certificate validation is performed.

Errors:

HTTP Status Code Type Description
404 not_found if the update session doesn't exist.