diff --git a/platform/paths/dns/tls/lookup.yml b/platform/paths/dns/tls/lookup.yml index e2c6defd..42bc1871 100644 --- a/platform/paths/dns/tls/lookup.yml +++ b/platform/paths/dns/tls/lookup.yml @@ -4,7 +4,7 @@ get: description: | Lookup and retrieve a TLS certificate bundle for a specified domain. - Requires the `dns-view` capability. + If the `private` parameter is set to `true`, the private key, bundle, and/or CSR will be included. Including these private fields requires the `dns-certs-view` capability. tags: - TLS parameters: @@ -15,16 +15,16 @@ get: description: "The domain to lookup." schema: type: string - - name: wildcard + - name: private in: query style: form required: false - description: "Whether or not to lookup a *. wildcard certificate that would be applicable for this domain. For example, if you are looking for a certificate for x.test.com, setting this to true will identify a *.test.com certificate that would also be applicable." + description: "If true, will include the private key, bundle, and/or CSR for this certificate. Requires the `dns-certs-view` capability." schema: type: boolean responses: 200: - description: Returns a TLS certificate bundle. + description: Returns a TLS certificate bundle if available. content: application/json: schema: @@ -33,44 +33,16 @@ get: - data properties: data: - type: object - description: A DNS TLS certificate. - required: - - id - - hub_id - - domains - - events - - bundle - - private_key - properties: - id: - $ref: ../../../../components/schemas/ID.yml - hub_id: - $ref: ../../../../components/schemas/HubID.yml - domains: - description: A list of domains associated with the certificate. - type: array - items: - type: string - events: - type: object - description: A collection of timestamps for each event in the certificate's lifetime. + allOf: + - $ref: ../../../../components/schemas/dns/tls/TlsCertificate.yml + - type: object properties: - created: - $ref: ../../../../components/schemas/DateTime.yml - updated: - $ref: ../../../../components/schemas/DateTime.yml - deleted: - $ref: ../../../../components/schemas/DateTime.yml - generated: - description: "When the certificate was generated." - $ref: ../../../../components/schemas/DateTime.yml - bundle: - description: The certificate bundle - type: string - private_key: - description: The private key for the certificate - type: string + private_key: + type: string + bundle: + type: string + csr: + type: string default: $ref: ../../../../components/responses/errors/DefaultError.yml