1# Sample Server Development Overview 2 3The sample server provides a simple server instance for deploying update packages. It can be used as an auxiliary test environment for the UpdateService subsystem. 4 5## When to Use 6 7In actual applications, developers need to query and download update packages from the server. The sample server provides the following functions: 8 9- Update package query: The server returns the version information of the update package. 10 11- Update package download: The server returns the download link of the update package. 12 13The sample server supports update service testing and secondary development function verification, building an end-to-end environment to cater for diverse update service use cases. 14 15## Basic Concepts 16 17- Package search service: one of the service capabilities provided by the UpdateService. It depends on the server that supports the TCP and SSL protocols. 18 19- Package search server: a server that provisions the package search service through the TCP connection and the SSL protocol. The sample server mentioned in this document is such a package search server. 20 21- Download server: an HTTP server. 22 23- update.serverip.search: a system parameter that indicates the IP address of the package search server configured on the UpdateService. The default value is **127.0.0.1**. 24 25## Constraints 26 27- The following is an example of the json response returned by the server. Note that the **verifyInfo** field indicates the SHA-256 value of the update package, and the **size** field indicates the size of the update package, in bytes. 28 29```json 30{ 31 "searchStatus": 0, 32 "errMsg": "success", 33 "checkResults": [{ 34 "versionName": "versionNameSample", 35 "versionCode": "versionCodeSample", 36 "verifyInfo": "verifyInfoSHA256Value1234567", 37 "size": 1234567, 38 "packageType": 1, 39 "url": "http://serverAddressSample/packageNameSample.fileTypeSample", 40 "descriptPackageId": "abcdefg1234567ABCDEFG" 41 }], 42 "descriptInfo": [{ 43 "descriptionType": 0, 44 "content": "This package is used for update." 45 }] 46} 47``` 48