black_ip.http 1.9 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091
  1. #
  2. # Copyright 2016-present the original author or authors.
  3. #
  4. # Licensed under the Apache License, Version 2.0 (the "License");
  5. # you may not use this file except in compliance with the License.
  6. # You may obtain a copy of the License at
  7. #
  8. # https://www.apache.org/licenses/LICENSE-2.0
  9. #
  10. # Unless required by applicable law or agreed to in writing, software
  11. # distributed under the License is distributed on an "AS IS" BASIS,
  12. # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
  13. # See the License for the specific language governing permissions and
  14. # limitations under the License.
  15. #
  16. ### 新增 BlackIp
  17. POST http://{{dc3-auth}}/auth/black_ip/add
  18. Accept: */*
  19. Content-Type: application/json
  20. Cache-Control: no-cache
  21. X-Auth-Tenant-Id: -1
  22. {
  23. "ip": "127.0.0.1",
  24. "description": "测试黑名单Ip"
  25. }
  26. ### 修改 BlackIp
  27. POST http://{{dc3-auth}}/auth/black_ip/update
  28. Accept: */*
  29. Content-Type: application/json
  30. Cache-Control: no-cache
  31. X-Auth-Tenant-Id: -1
  32. {
  33. "id": 1,
  34. "ip": "192.168.0.1",
  35. "enable": true,
  36. "description": "测试黑名单Ip"
  37. }
  38. ### 根据 ID 查询 BlackIp
  39. GET http://{{dc3-auth}}/auth/black_ip/id/1
  40. Accept: */*
  41. Cache-Control: no-cache
  42. ### 根据 Ip 查询 BlackIp
  43. GET http://{{dc3-auth}}/auth/black_ip/ip/127.0.0.1
  44. Accept: */*
  45. Cache-Control: no-cache
  46. X-Auth-Tenant-Id:-1
  47. ### 分页查询 BlackIp
  48. POST http://{{dc3-auth}}/auth/black_ip/list
  49. Accept: */*
  50. Content-Type: application/json
  51. Cache-Control: no-cache
  52. X-Auth-Tenant-Id:-1
  53. {
  54. "ip": "",
  55. "page": {
  56. "current": 1,
  57. "size": 500,
  58. "orders": [
  59. {
  60. "column": "id",
  61. "asc": false
  62. }
  63. ]
  64. }
  65. }
  66. ### 查询 BlackIp 是否存在并有效
  67. GET http://{{dc3-auth}}/auth/black_ip/check/192.168.0.1
  68. Accept: */*
  69. Cache-Control: no-cache
  70. X-Auth-Tenant-Id:-1
  71. ### 根据 ID 删除 BlackIp
  72. POST http://{{dc3-auth}}/auth/black_ip/delete/1383257757074976769
  73. Accept: */*
  74. Content-Type: application/json
  75. Cache-Control: no-cache