1 Public
1 Public
1.1 Basic Interface Definitions
- The client must send the JSON of the restful api as POST
 - The server returns json data in a fixed format.
 
1.2 API public encapsulation
Client→Server Request
| KEY | VAL | Default | Remark | 
|---|---|---|---|
| token | string | – | Authentication, some whitelisting procedures ignored | 
| [ANY] | [ANY] | [ANY] | Other parameters are defined by the API function | 
Server→Client Response
| KEY | VAL | Default | Remark | 
|---|---|---|---|
| uri | string | – | Returns the name of the URI corresponding to the request | 
| code | int | – | Success or failure identifier (refer to internationalisation.md) | 
| msg | string | – | Information Alerts | 
| data | array | – | Data content, defined by API functions | 
Caveats:
- The project’s APIs are encapsulated in the /appenv/lib/icvpapi file. Please check the code to confirm the specific API function and implementation.
 - Please refer to the public encapsulation first, the following interface description has been reduced in order to focus on the interface and therefore the description is reduced in content.
 - At the time of the client request the data only describes the proprietary key part (the public part is not described, see as above)
 - In Server return data only the content of data_subkey is described (the public part is not described, please refer to as above)
 - Try to use string as a datatype and avoid using int on new development interfaces. nor any other datatype.
 
1.3 Description of DEF and REQ
REQ (for KEY instructions)
- Y indicates that it must be passed
 - Y/N indicates that there are conditions that must be passed on, refer to the instructions to understand the conditions
 - N indicates an optional parameter, which will be automatically ignored if not passed.
 
DEF (value-specific description)
- -: Indicates that an error will be reported directly when the value is illegal or incorrect.
 - Empty: indicates that the empty string is automatically used to correct the value when it is not legal or wrong (note that it is not null)
 - Other: if the value is not legal, it is automatically corrected using this value
 
Caveats:
- Mutual Exclusivity: When a mark has a statement that it is mutually exclusive with another key, the Default value is automatically used once the problem is detected.
 - Other: Default value is used automatically when other issues arise