rotate_key.yaml 1.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748
  1. operationId: homeRotateKey
  2. summary: Rotate API Key
  3. security:
  4. - UserAuth: []
  5. description: Rotate the API key
  6. tags: [Home]
  7. parameters:
  8. - name: home_id
  9. in: path
  10. description: ID of home
  11. required: true
  12. schema:
  13. type: string
  14. format: uuid
  15. example: c27f3ac5-c6e7-4cda-a383-26115e6f5620
  16. requestBody:
  17. content:
  18. application/json:
  19. schema:
  20. type: object
  21. required:
  22. - password
  23. properties:
  24. password:
  25. type: string
  26. description: Current user password
  27. example: password123
  28. responses:
  29. "200":
  30. description: "API key changed (always returns '{success: true}')"
  31. content:
  32. application/json:
  33. schema:
  34. type: object
  35. properties:
  36. success:
  37. type: boolean
  38. "400":
  39. $ref: "#/components/responses/400"
  40. "401":
  41. $ref: "#/components/responses/401"
  42. "403":
  43. $ref: "#/components/responses/403"
  44. "404":
  45. $ref: "#/components/responses/404"
  46. "500":
  47. $ref: "#/components/responses/500"