GetCertificate
const url = 'https://example.com/hopbox.admin.v1.CertificateService/GetCertificate';const options = { method: 'POST', headers: { 'Connect-Protocol-Version': '1', 'Connect-Timeout-Ms': '1000', 'Content-Type': 'application/json' }, body: '{}'};
try { const response = await fetch(url, options); const data = await response.json(); console.log(data);} catch (error) { console.error(error);}curl --request POST \ --url https://example.com/hopbox.admin.v1.CertificateService/GetCertificate \ --header 'Connect-Protocol-Version: 1' \ --header 'Connect-Timeout-Ms: 1000' \ --header 'Content-Type: application/json' \ --data '{}'GetCertificate returns the certificate of the install, without its key, and the state of the ACME job.
Parameters
Section titled “Parameters”Header Parameters
Section titled “Header Parameters”Define the version of the Connect protocol
Define the version of the Connect protocol
Example
1Define the timeout, in ms
Define the timeout, in ms
Example
1000Request Bodyrequired
Section titled “Request Bodyrequired”GetCertificateRequest has no fields.
object
Example generated
{}Responses
Section titled “Responses”Success
GetCertificateResponse holds the certificate and the state of the ACME job.
object
Certificate is absent before the first certificate of the install.
object
Domain is the domain of the install that the certificate covers.
Names are the DNS names of the certificate: the domain and its wildcard.
Serial is the serial number of the certificate, in lowercase hex.
Issuer is the subject of the CA certificate that signed the certificate.
Not_before is the start of the validity of the certificate.
Not_after is the end of the validity of the certificate.
Renew_time is the time at which the certificate is due for renewal: after two thirds of its lifetime.
Directory_url is the ACME directory that issued the certificate.
Update_time is when the certificate replaced the one before it.
Status is the state of the ACME job.
object
Failures counts the attempts that failed since the last certificate.
Last_attempt_time is the start of the last attempt. It is absent before the first attempt.
Last_error is the error of the last attempt that failed. It is empty after a certificate. A change of the install config keeps it until the next attempt.
Next_attempt_time is the earliest time of the next attempt after a failure. It is absent after a certificate.
Ca_wait is true when the CA asked for the wait until next_attempt_time, with a rate limit or a Retry-After. A change of the install config does not end such a wait.
Terms_url is the URL of the terms of service of the CA that the directory named at the last attempt. The first attempt after an agreement records it, so it is empty before that attempt.
Renewals_stopped is why the ACME job plans no renewal of the certificate, such as no agreement to the terms of the CA. It is empty while the job renews the certificate, and before the first certificate.
Example
{ "certificate": { "notBefore": "2023-01-15T01:30:15.01Z", "notAfter": "2023-01-15T01:30:15.01Z", "renewTime": "2023-01-15T01:30:15.01Z", "updateTime": "2023-01-15T01:30:15.01Z" }, "status": { "lastAttemptTime": "2023-01-15T01:30:15.01Z", "nextAttemptTime": "2023-01-15T01:30:15.01Z" }}default
Section titled “default”Error
Error type returned by Connect: https://connectrpc.com/docs/go/errors/#http-representation
object
The status code, which should be an enum value of [google.rpc.Code][google.rpc.Code].
A developer-facing error message, which should be in English. Any user-facing error message should be localized and sent in the [google.rpc.Status.details][google.rpc.Status.details] field, or localized by the client.
A list of messages that carry the error details. There is no limit on the number of messages.
Contains an arbitrary serialized message along with a @type that describes the type of the serialized message, with an additional debug field for ConnectRPC error details.
object
A URL that acts as a globally unique identifier for the type of the serialized message. For example: type.googleapis.com/google.rpc.ErrorInfo.
The Protobuf message, serialized as bytes and base64-encoded. The specific message type is identified by the type field.
Deserialized error detail payload. The ‘type’ field indicates the schema. This field is for easier debugging and should not be relied upon for application logic.
object
Example
{ "code": "canceled"}