rotate_key.yaml 1.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354
  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. - email
  23. - password
  24. properties:
  25. email:
  26. type: string
  27. format: email
  28. description: Email of user that is admin for home
  29. example: john.smith@mail.com
  30. password:
  31. type: string
  32. description: Current user password
  33. example: password123
  34. responses:
  35. "200":
  36. description: "API key changed (always returns '{success: true}')"
  37. content:
  38. application/json:
  39. schema:
  40. type: object
  41. properties:
  42. success:
  43. type: boolean
  44. "400":
  45. $ref: "#/components/responses/400"
  46. "401":
  47. $ref: "#/components/responses/401"
  48. "403":
  49. $ref: "#/components/responses/403"
  50. "404":
  51. $ref: "#/components/responses/404"
  52. "500":
  53. $ref: "#/components/responses/500"