Interface List
Interface Group Management This is not a narrative, it is to classify the interface. This article is from: http://www.onebase.org/
For the Interface list page, there are two buttons in the upper left corner, one is the new interface, and the other is the interface document jump button.
Data list 1th column Interface name, 2nd Column Interface Group, 3rd column interface request type, onebase default unified post type, of course, need other types such as Get can self-extend, 4th listed as interface address that is (Controller/method), 5th is the interface current state, The options in the interface state can be configured under the API section of the System Setup, the 6th column is a developer, the developer member is also configured under the API section of the system setup, the following two is listed as the interface sort and operation, the interface sort is valid.
Interface New
^_^. Although there is a lot of form data data, but don't be afraid of clams, let's have a little explanation.
Let's go from left to right, numbered from top to bottom, for example 1 2 3 4 corresponds to Interface name, interface sort value, request address, request type.
1:api interface name, is used to look at the drip.
2: Interface sorting values, used for interface display sorting, these are very well understood.
3: Request address, Interface Access address format (Controller/method).
4: The request type, the default is post, need other types can expand themselves.
5: Whether it is a paging interface, meaning that this interface needs paging function, if you need paging function can pass related parameters, such as: List_rows The amount of data displayed per page, page query page.
6: Researcher, developer of this interface, optional values in the options can be configured under the API groupings of the system settings.
7: Request data, meaning that the execution of this interface requires a request parameter, the default is no no request data, here the request data control for the interface depends on the request parameters, you can open https://onebase.org/api.php see inside these interfaces there is a test interface function , the form where the interface function is tested is automatically generated based on the request data settings here, and the token and paging parameters are not controlled here.
8: Response data, meaning that the interface after the successful execution of the data returned, the default is no return data, to be able to add the data returned by the interface, of course, there will be special data such as paging data and the data signature will be described later.
9: Interface grouping, this is not introduced.
10: Interface status, this also drift over it.
11: Interface Response example, this is for the interface caller to see, convenient interface callers can see the data structure at a glance, improve team development efficiency.
12: Introduction to the interface, with a look at the drip.
13: Whether to verify the user token: User_token, used to do authentication drops, such as the article List interface, all visitors do not need to login and can see, set to No, so that interface calls do not need to take user_token, if the interface requires authentication, such as the list of orders, A member can only view their own orders, you need to use User_token, so like order management, personal center and other these interfaces are required to bring user_token. User_token is returned after invoking the login interface, so if the terminal wants to invoke an interface that requires authentication, it needs to call the login interface to save the User_token returned in the interface and use it during subsequent interface calls.
14: Whether to respond to data signature: Data_sign, this is used to do data security verification, such as our server to the terminal to return data, but the terminal how to know that the real drop is we return it? This is where Data_sign comes in handy. The returned data in the Data_sign field, the terminal based on the data returned by the server with the same algorithm on the server side, calculate the terminal data_sign, and then the data_sign on both ends of the match, if identical, then the data is exactly the same drop, so it is safe, Others want to change also not, hey.
15: Whether to verify the request data signature: Data_sign, the principle is the same drop, meaning that the terminal like the interface to submit data, we also need to know the server to submit the data is safe, so we also have to generate data_sign according to the data submitted, and submit the data with the Data_sign , do the comparison, not the same words do not perform the operation, the interface returns the data signature is not correct, the same words are released.
16: This is a spare. Worried about the service personnel too greasy harm, developed the interface is to use words can not express. You can use Rich text for graphic description.
OK, the input options are finished, let's look at the Edit data page of the login interface, and see what the input drops.
The background interface management function is introduced here, the further step will explain in the development of the interface. THINKPHP5
THINKPHP5 Interface Management