1
0

template_api-en.tpl 1.2 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071
  1. #### Introduction:
  2. - User Login
  3. #### Version:
  4. |ver|Maker|Set date|Revision date|
  5. |:---- |:---|:----- |----- |
  6. |2.1.0 |Ben |2021-04-15 | xxxx-xx-xx |
  7. #### Request URL:
  8. - http://xx.com/api/login
  9. #### Request Method:
  10. - GET
  11. - POST
  12. #### Request Header:
  13. |Paramter|Must|Type|Description|
  14. |:---- |:---|:----- |----- |
  15. |Content-Type |Y |string |request type: application/json |
  16. |Content-MD5 |Y |string | request sign |
  17. #### request paramters:
  18. |Paramter|Must|Type|description|
  19. |:---- |:---|:----- |----- |
  20. |username |Y |string | |
  21. |password |Y |string | |
  22. #### Return Example:
  23. **Correct Return:**
  24. ```
  25. {
  26. "errcode": 0,
  27. "data": {
  28. "uid": "1",
  29. "account": "admin",
  30. "nickname": "Minho",
  31. "group_level": 0 ,
  32. "create_time": "1436864169",
  33. "last_login_time": "0",
  34. }
  35. }
  36. ```
  37. **Error Return:**
  38. ```
  39. {
  40. "errcode": 500,
  41. "errmsg": "invalid appid"
  42. }
  43. ```
  44. #### Return Paramters:
  45. |Paramter|Type|description|
  46. |:----- |:-----|----- |
  47. |group_level |int |user group id,1:Super administrator;2:normal |
  48. #### Remark:
  49. - Check Error Code for more return error message