endpoint-reference.rst 10.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899
  1. .. _endpoint-reference:
  2. Endpoint Reference
  3. ------------------
  4. The following table summarizes basic information about the deSEC API endpoints used
  5. for :ref:`managing users <manage-account>` and :ref:`tokens <manage-tokens>`.
  6. +------------------------------------------------------+------------+---------------------------------------------+
  7. | Endpoint ``/api/v1``... | Methods | Use case |
  8. +======================================================+============+=============================================+
  9. | ...\ ``/auth/`` | ``POST`` | Register user account |
  10. +------------------------------------------------------+------------+---------------------------------------------+
  11. | ...\ ``/auth/account/`` | ``GET`` | Retrieve user account information |
  12. + +------------+---------------------------------------------+
  13. | | ``PATCH`` | Modify user account settings |
  14. + +------------+---------------------------------------------+
  15. | | ``PUT`` | Replace user account settings |
  16. +------------------------------------------------------+------------+---------------------------------------------+
  17. | ...\ ``/auth/account/change-email/`` | ``POST`` | Request account email address change |
  18. +------------------------------------------------------+------------+---------------------------------------------+
  19. | ...\ ``/auth/account/reset-password/`` | ``POST`` | Request password reset |
  20. +------------------------------------------------------+------------+---------------------------------------------+
  21. | ...\ ``/auth/account/delete/`` | ``POST`` | Request account deletion |
  22. +------------------------------------------------------+------------+---------------------------------------------+
  23. | ...\ ``/auth/login/`` | ``POST`` | Log in and request authentication token |
  24. +------------------------------------------------------+------------+---------------------------------------------+
  25. | ...\ ``/auth/logout/`` | ``POST`` | Log out (= delete current token) |
  26. +------------------------------------------------------+------------+---------------------------------------------+
  27. | ...\ ``/auth/tokens/`` | ``GET`` | Retrieve all current tokens |
  28. | +------------+---------------------------------------------+
  29. | | ``POST`` | Create new token |
  30. +------------------------------------------------------+------------+---------------------------------------------+
  31. | ...\ ``/auth/tokens/{id}/`` | ``GET`` | Retrieve token |
  32. | +------------+---------------------------------------------+
  33. | | ``DELETE`` | Delete token |
  34. +------------------------------------------------------+------------+---------------------------------------------+
  35. | ...\ ``/auth/tokens/{id}/policies/rrsets/`` | ``GET`` | Retrieve all RRset policies for the given |
  36. | | | token |
  37. | +------------+---------------------------------------------+
  38. | | ``POST`` | Create an RRset policy for the given token |
  39. +------------------------------------------------------+------------+---------------------------------------------+
  40. | ...\ ``/auth/tokens/{id}/policies/rrsets/{policy}/`` | ``GET`` | Retrieve a specific token RRset policy |
  41. | +------------+---------------------------------------------+
  42. | | ``PATCH`` | Modify a token policy |
  43. | +------------+---------------------------------------------+
  44. | | ``PUT`` | Replace a token policy |
  45. | +------------+---------------------------------------------+
  46. | | ``DELETE`` | Delete a token policy |
  47. +------------------------------------------------------+------------+---------------------------------------------+
  48. | ...\ ``/auth/totp/`` | | 2FA-related, interface subject to change |
  49. +------------------------------------------------------+------------+---------------------------------------------+
  50. | ...\ ``/captcha/`` | ``POST`` | Obtain captcha |
  51. +------------------------------------------------------+------------+---------------------------------------------+
  52. | ...\ ``/v/activate-account/{code}/`` | ``POST`` | Confirm email address for new account |
  53. +------------------------------------------------------+------------+---------------------------------------------+
  54. | ...\ ``/v/reset-password/{code}/`` | ``POST`` | Confirm password reset |
  55. +------------------------------------------------------+------------+---------------------------------------------+
  56. | ...\ ``/v/change-email/{code}/`` | ``POST`` | Confirm email address change |
  57. +------------------------------------------------------+------------+---------------------------------------------+
  58. | ...\ ``/v/delete-account/{code}/`` | ``POST`` | Confirm account deletion |
  59. +------------------------------------------------------+------------+---------------------------------------------+
  60. The following table summarizes basic information about the deSEC API endpoints used
  61. for :ref:`domain-management` and :ref:`Retrieving and Manipulating DNS
  62. Information <manage-rrsets>`.
  63. +------------------------------------------------+------------+---------------------------------------------+
  64. | Endpoint ``/api/v1/domains``... | Methods | Use case |
  65. +================================================+============+=============================================+
  66. | ...\ ``/`` | ``GET`` | Retrieve all domains you own |
  67. | +------------+---------------------------------------------+
  68. | | ``POST`` | Create a domain |
  69. +------------------------------------------------+------------+---------------------------------------------+
  70. | ...\ ``/{name}/`` | ``GET`` | Retrieve a specific domain |
  71. | +------------+---------------------------------------------+
  72. | | ``PATCH`` | Modify a domain (deprecated) |
  73. | +------------+---------------------------------------------+
  74. | | ``DELETE`` | Delete a domain |
  75. +------------------------------------------------+------------+---------------------------------------------+
  76. | ...\ ``/{name}/rrsets/`` | ``GET`` | Retrieve all RRsets from ``domain``, filter |
  77. | | | by ``subname`` or ``type`` query parameter |
  78. | +------------+---------------------------------------------+
  79. | | ``POST`` | Create one or more RRsets |
  80. | +------------+---------------------------------------------+
  81. | | ``PATCH`` | Create, modify or delete one or more RRsets |
  82. | +------------+---------------------------------------------+
  83. | | ``PUT`` | Create, modify or delete one or more RRsets |
  84. +------------------------------------------------+------------+---------------------------------------------+
  85. | ...\ ``/{name}/rrsets/@/{type}/`` | | Access an RRset at the zone apex |
  86. +------------------------------------------------+------------+---------------------------------------------+
  87. | ...\ ``/{name}/rrsets/{subname}/{type}/`` | ``GET`` | Retrieve a specific RRset |
  88. | +------------+---------------------------------------------+
  89. | ...\ ``/{name}/rrsets/{subname}.../{type}/`` | ``PATCH`` | Modify an RRset |
  90. | +------------+---------------------------------------------+
  91. | | ``PUT`` | Replace an RRset |
  92. | +------------+---------------------------------------------+
  93. | | ``DELETE`` | Delete an RRset |
  94. +------------------------------------------------+------------+---------------------------------------------+