2 Term and agreement
The protocol data is in the form of network byte-order arranging data (i.e., high byte first) during the transmission. ## 2.1 Terms #### Resource (URI): In the Web application, all things should have a unique ID, the unified concept of ID is: URI. URI consititutes a global namespace, and using URI to identify your key resources means that they get a unique, global ID. Any information that can be named can be used as a resource: a document or a picture, a collection of other resources, a non-virtual object (such as person, vehicle, device) and so on. In other words, the concept of any target of the hypertext must conform to the definition of the resource. A resource is a conceptual mapping to a group of entities, rather than the entity itself associated with the mapping at any given moment. #### Resource request methods: Clients can use HTTP methods (such as GET/POST/PUT/DELETE) to operate resources. Same operation method with HTTP protocol definition. GET: list all members of resource set of child resource. PUT: use a set to update (replace) another collection POST: creat the digital recource in a set, and its ID is automatically assigned. DELETE: delete all recource set. #### Parameter transfer method: When HTTP operates resources, transfering parameters can come from the different locations of the HTTP request. PathParamURL’s route QueryParamURL’s query parameters HeaderParamHTTP’s requested header information CookieParamHTTP’s requested Cookie ## 2.2 Agreement - The data type table: |Type|Description| |:---- |:------- | |String |string | |Number |number | |Date |date | |JSON |JSON object | |Array |JSON array | - Data request mode: - Update/Create: PUT - Delete: DELETE - Query: GET，POST ## 2.3 Announcement “-”: indicates the expired method, out of service. Time: all time (parameter,field etc.) in the document is UTC time.