post.json 2.2 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394959697
  1. {
  2. "operationId": "createCertificate",
  3. "summary": "Create a Certificate",
  4. "tags": ["Certificates"],
  5. "security": [
  6. {
  7. "BearerAuth": ["certificates"]
  8. }
  9. ],
  10. "requestBody": {
  11. "description": "Certificate Payload",
  12. "required": true,
  13. "content": {
  14. "application/json": {
  15. "schema": {
  16. "type": "object",
  17. "additionalProperties": false,
  18. "required": ["provider"],
  19. "properties": {
  20. "provider": {
  21. "$ref": "../../../components/certificate-object.json#/properties/provider"
  22. },
  23. "nice_name": {
  24. "$ref": "../../../components/certificate-object.json#/properties/nice_name"
  25. },
  26. "domain_names": {
  27. "$ref": "../../../components/certificate-object.json#/properties/domain_names"
  28. },
  29. "meta": {
  30. "$ref": "../../../components/certificate-object.json#/properties/meta"
  31. }
  32. }
  33. }
  34. }
  35. }
  36. },
  37. "responses": {
  38. "201": {
  39. "description": "201 response",
  40. "content": {
  41. "application/json": {
  42. "examples": {
  43. "default": {
  44. "value": {
  45. "expires_on": "2025-01-07 04:30:17",
  46. "modified_on": "2024-10-09 05:28:51",
  47. "id": 5,
  48. "created_on": "2024-10-09 05:28:35",
  49. "owner_user_id": 1,
  50. "is_deleted": false,
  51. "provider": "letsencrypt",
  52. "nice_name": "test.example.com",
  53. "domain_names": ["test.example.com"],
  54. "meta": {
  55. "letsencrypt_email": "[email protected]",
  56. "letsencrypt_agree": true,
  57. "dns_challenge": false,
  58. "letsencrypt_certificate": {
  59. "cn": "test.example.com",
  60. "issuer": "C = US, O = Let's Encrypt, CN = E5",
  61. "dates": {
  62. "from": 1728448218,
  63. "to": 1736224217
  64. }
  65. }
  66. }
  67. }
  68. }
  69. },
  70. "schema": {
  71. "$ref": "../../../components/certificate-object.json"
  72. }
  73. }
  74. }
  75. },
  76. "400": {
  77. "description": "400 response",
  78. "content": {
  79. "application/json": {
  80. "examples": {
  81. "default": {
  82. "value": {
  83. "error": {
  84. "code": 400,
  85. "message": "Domains are invalid"
  86. }
  87. }
  88. }
  89. },
  90. "schema": {
  91. "$ref": "../../../components/error.json"
  92. }
  93. }
  94. }
  95. }
  96. }
  97. }