basePath: /api/v1 definitions: api.TokenParams: properties: duration: example: 30d type: string id: example: 021b5075-2d1e-44bd-b5e5-ffc7be7ad4c3 type: string rate_limit_max_requests: example: 5 type: integer rate_limit_window: example: 1h type: string scope: example: - read - create - update - delete items: type: string type: array username: example: testfgx type: string type: object api.TokenResponse: properties: duration: type: string expires: type: string id: type: string rate_limit_max_requests: type: integer rate_limit_window: type: string scope: items: type: string type: array token: type: string tokenHash: type: string username: type: string type: object api.TokenResponseGet: properties: duration: type: string expires: type: string rate_limit_max_requests: type: integer rate_limit_window: type: string scope: items: type: string type: array tokenHash: type: string username: type: string type: object api.responseErrorJSON: properties: error: example: error type: string type: object models.CertMap: properties: bundle: type: boolean ca_issuer: example: |- -----BEGIN CERTIFICATE----- ... type: string cert: example: |- -----BEGIN CERTIFICATE----- ... type: string csr: type: string days: type: integer deleted_at: description: |- Unix timestamp in milliseconds when this entry was marked for deletion. Reason for doing marking first, and delete later, is to make sure that replica nodes watching the prefix will receive notification on "marking" -- at which point they can already remove entry from memory. Actual deletion from KV store does *not* trigger "watch" notification with a key for all KV stores. type: integer dns_challenge: type: string domain: type: string encryption: type: string expires: type: string fingerprint: type: string http_challenge: type: string issuer: type: string key_type: type: string labels: type: string name: description: Optional logical name to namespace the KV key. type: string owner: type: string profile: description: ACME profile for certificate issuance (draft-aaron-acme-profiles) type: string renewal_count: description: Total number of successful renewals, persisted to survive restarts. type: integer renewal_date: type: string renewal_days: type: string san: type: string serial: type: string updated_at: description: Unix timestamp in milliseconds when we have updated the key. type: integer url: example: https://acme-staging-v02.api.letsencrypt.org/acme/cert/4b63b4e8b6109 type: string type: object models.Certificate: properties: bundle: type: boolean csr: type: string days: type: integer deleted_at: description: |- Unix timestamp in milliseconds when this entry was marked for deletion. Reason for doing marking first, and delete later, is to make sure that replica nodes watching the prefix will receive notification on "marking" -- at which point they can already remove entry from memory. Actual deletion from KV store does *not* trigger "watch" notification with a key for all KV stores. type: integer dns_challenge: type: string domain: type: string encryption: type: string expires: type: string fingerprint: type: string http_challenge: type: string issuer: type: string key_type: type: string labels: type: string name: description: Optional logical name to namespace the KV key. type: string owner: type: string profile: description: ACME profile for certificate issuance (draft-aaron-acme-profiles) type: string renewal_count: description: Total number of successful renewals, persisted to survive restarts. type: integer renewal_date: type: string renewal_days: type: string san: type: string serial: type: string updated_at: description: Unix timestamp in milliseconds when we have updated the key. type: integer type: object models.CertificateParams: properties: bundle: example: false type: boolean csr: type: string days: example: 90 type: integer dns_challenge: example: ns1 type: string domain: example: testfgx.example.com type: string http_challenge: example: "" type: string issuer: example: letsencrypt type: string key_type: type: string labels: type: string name: example: prod type: string profile: example: connect-direct type: string renewal_days: example: "30" type: string revoke: type: boolean san: example: "" type: string type: object info: contact: email: francois.gouteroux@gmail.com name: François Gouteroux description: ACME Manager Server - Manages ACME certificates in cluster mode license: name: Apache 2.0 url: http://www.apache.org/licenses/LICENSE-2.0.html title: acme manager server version: "1.0" paths: /certificate: post: description: Create certificate for a given issuer and domain name. parameters: - default: Bearer description: Access token in: header name: Authorization required: true type: string - description: Certificate body in: body name: body required: true schema: $ref: '#/definitions/models.CertificateParams' produces: - application/json responses: "201": description: Created schema: $ref: '#/definitions/models.CertMap' "400": description: Bad Request schema: $ref: '#/definitions/api.responseErrorJSON' "401": description: Unauthorized schema: $ref: '#/definitions/api.responseErrorJSON' "403": description: Forbidden schema: $ref: '#/definitions/api.responseErrorJSON' "409": description: Conflict schema: $ref: '#/definitions/api.responseErrorJSON' "429": description: Too Many Requests schema: $ref: '#/definitions/api.responseErrorJSON' "500": description: Internal Server Error schema: $ref: '#/definitions/api.responseErrorJSON' "502": description: Bad Gateway schema: $ref: '#/definitions/api.responseErrorJSON' summary: Create certificate tags: - certificate put: description: Update certificate will revoke the old and create a new certificate with given parameters. parameters: - default: Bearer description: Access token in: header name: Authorization required: true type: string - description: Certificate body in: body name: body required: true schema: $ref: '#/definitions/models.CertificateParams' produces: - application/json responses: "200": description: OK schema: $ref: '#/definitions/models.CertMap' "400": description: Bad Request schema: $ref: '#/definitions/api.responseErrorJSON' "401": description: Unauthorized schema: $ref: '#/definitions/api.responseErrorJSON' "403": description: Forbidden schema: $ref: '#/definitions/api.responseErrorJSON' "404": description: Not Found schema: $ref: '#/definitions/api.responseErrorJSON' "409": description: Conflict schema: $ref: '#/definitions/api.responseErrorJSON' "429": description: Too Many Requests schema: $ref: '#/definitions/api.responseErrorJSON' "500": description: Internal Server Error schema: $ref: '#/definitions/api.responseErrorJSON' "502": description: Bad Gateway schema: $ref: '#/definitions/api.responseErrorJSON' summary: Update certificate tags: - certificate /certificate/{issuer}/{domain}: delete: description: Delete certificate for the given issuer and domain name. parameters: - default: Bearer description: Access token in: header name: Authorization required: true type: string - default: letsencrypt description: Certificate issuer in: path name: issuer required: true type: string - default: testfgx.example.com description: Certificate domain in: path name: domain required: true type: string - default: false description: Revoke Certificate in: query name: revoke type: boolean produces: - application/json responses: "204": description: No Content "400": description: Bad Request schema: $ref: '#/definitions/api.responseErrorJSON' "401": description: Unauthorized schema: $ref: '#/definitions/api.responseErrorJSON' "403": description: Forbidden schema: $ref: '#/definitions/api.responseErrorJSON' "404": description: Not Found schema: $ref: '#/definitions/api.responseErrorJSON' "409": description: Conflict schema: $ref: '#/definitions/api.responseErrorJSON' "429": description: Too Many Requests schema: $ref: '#/definitions/api.responseErrorJSON' "500": description: Internal Server Error schema: $ref: '#/definitions/api.responseErrorJSON' "502": description: Bad Gateway schema: $ref: '#/definitions/api.responseErrorJSON' summary: Delete certificate tags: - certificate get: description: Return certificate and issuer ca certificate. parameters: - default: Bearer description: Access token in: header name: Authorization required: true type: string - default: letsencrypt description: Certificate issuer in: path name: issuer required: true type: string - default: testfgx.example.com description: Certificate domain in: path name: domain required: true type: string produces: - application/json responses: "200": description: OK schema: $ref: '#/definitions/models.CertMap' "400": description: Bad Request schema: $ref: '#/definitions/api.responseErrorJSON' "401": description: Unauthorized schema: $ref: '#/definitions/api.responseErrorJSON' "403": description: Forbidden schema: $ref: '#/definitions/api.responseErrorJSON' "404": description: Not Found schema: $ref: '#/definitions/api.responseErrorJSON' "409": description: Conflict schema: $ref: '#/definitions/api.responseErrorJSON' "500": description: Internal Server Error schema: $ref: '#/definitions/api.responseErrorJSON' summary: Read certificate tags: - certificate /certificate/{name}: delete: description: Delete certificate for the given name. parameters: - default: Bearer description: Access token in: header name: Authorization required: true type: string - description: Certificate name in: path name: name required: true type: string - default: false description: Revoke Certificate in: query name: revoke type: boolean produces: - application/json responses: "204": description: No Content "400": description: Bad Request schema: $ref: '#/definitions/api.responseErrorJSON' "401": description: Unauthorized schema: $ref: '#/definitions/api.responseErrorJSON' "403": description: Forbidden schema: $ref: '#/definitions/api.responseErrorJSON' "404": description: Not Found schema: $ref: '#/definitions/api.responseErrorJSON' "409": description: Conflict schema: $ref: '#/definitions/api.responseErrorJSON' "429": description: Too Many Requests schema: $ref: '#/definitions/api.responseErrorJSON' "500": description: Internal Server Error schema: $ref: '#/definitions/api.responseErrorJSON' summary: Delete named certificate tags: - certificate get: description: Return certificate and issuer ca certificate for a named certificate. parameters: - default: Bearer description: Access token in: header name: Authorization required: true type: string - description: Certificate name in: path name: name required: true type: string produces: - application/json responses: "200": description: OK schema: $ref: '#/definitions/models.CertMap' "400": description: Bad Request schema: $ref: '#/definitions/api.responseErrorJSON' "401": description: Unauthorized schema: $ref: '#/definitions/api.responseErrorJSON' "403": description: Forbidden schema: $ref: '#/definitions/api.responseErrorJSON' "404": description: Not Found schema: $ref: '#/definitions/api.responseErrorJSON' "409": description: Conflict schema: $ref: '#/definitions/api.responseErrorJSON' "500": description: Internal Server Error schema: $ref: '#/definitions/api.responseErrorJSON' summary: Read named certificate tags: - certificate /certificate/metadata: get: description: Return certificate metadata like SAN,expiration, fingerprint... parameters: - default: Bearer description: Access token in: header name: Authorization required: true type: string - default: letsencrypt description: Certificate issuer in: query name: issuer type: string - default: testfgx.example.com description: Certificate domain in: query name: domain type: string produces: - application/json responses: "200": description: OK schema: items: $ref: '#/definitions/models.Certificate' type: array "404": description: Not Found schema: $ref: '#/definitions/api.responseErrorJSON' "409": description: Conflict schema: $ref: '#/definitions/api.responseErrorJSON' "500": description: Internal Server Error schema: $ref: '#/definitions/api.responseErrorJSON' summary: Read metadata certificate tags: - metadata certificate /token: post: description: Create token for a given username, scope and expiration time. parameters: - description: Token Body in: body name: body required: true schema: $ref: '#/definitions/api.TokenParams' produces: - application/json responses: "201": description: Created schema: $ref: '#/definitions/api.TokenResponse' "400": description: Bad Request schema: $ref: '#/definitions/api.responseErrorJSON' "401": description: Unauthorized schema: $ref: '#/definitions/api.responseErrorJSON' "500": description: Internal Server Error schema: $ref: '#/definitions/api.responseErrorJSON' security: - APIKeyAuth: [] summary: Create token tags: - token put: description: Update token for a given username, scope and expiration time, it will generate a new token. parameters: - description: Token Body in: body name: body required: true schema: $ref: '#/definitions/api.TokenParams' produces: - application/json responses: "200": description: OK schema: $ref: '#/definitions/api.TokenResponse' "400": description: Bad Request schema: $ref: '#/definitions/api.responseErrorJSON' "401": description: Unauthorized schema: $ref: '#/definitions/api.responseErrorJSON' "429": description: Too Many Requests schema: $ref: '#/definitions/api.responseErrorJSON' "500": description: Internal Server Error schema: $ref: '#/definitions/api.responseErrorJSON' security: - APIKeyAuth: [] summary: Update token tags: - token /token/{id}: delete: description: Revoke token for a given ID. parameters: - description: Token ID in: path name: id required: true type: string produces: - application/json responses: "204": description: No Content "401": description: Unauthorized schema: $ref: '#/definitions/api.responseErrorJSON' "404": description: Not Found schema: $ref: '#/definitions/api.responseErrorJSON' "500": description: Internal Server Error schema: $ref: '#/definitions/api.responseErrorJSON' security: - APIKeyAuth: [] summary: Revoke token tags: - token get: description: Return token infos like scope, expiration... parameters: - description: Token ID in: path name: id required: true type: string produces: - application/json responses: "200": description: OK schema: $ref: '#/definitions/api.TokenResponseGet' "400": description: Bad Request schema: $ref: '#/definitions/api.responseErrorJSON' "401": description: Unauthorized schema: $ref: '#/definitions/api.responseErrorJSON' "404": description: Not Found schema: $ref: '#/definitions/api.responseErrorJSON' "500": description: Internal Server Error schema: $ref: '#/definitions/api.responseErrorJSON' security: - APIKeyAuth: [] summary: Read token tags: - token securityDefinitions: APIKeyAuth: in: header name: X-API-Key type: apiKey swagger: "2.0"