Zum Hauptinhalt springen

Get a Certificate

GET/v2/certificates/{certificateId}
API-Version
v2
Request-Methode
GET
Operation-ID
ssl-get-certificate

Request​

  • certificateIdstring (uuid)required

    ID of the SSL Certificate to be retrieved.

Responses​

Format
application/json
Beschreibung

OK

  • caBundlestring
  • certificatestring
  • certificateOrderIdstring (uuid)
  • certificateRequestIdstring (uuid)required
  • certificateTypeinteger (einer von: 0, 1, 2, 3)required

    Specifies the type of certificate.

    Possible values:

    • 0 – UNSPECIFIED: The certificate type is not specified.
    • 1 – INTERNAL: A certificate issued and managed internally by the system.
    • 2 – EXTERNAL: A certificate provided by an external source and imported into the system.
    • 3 – DNS: A certificate validated using DNS-based verification.
  • commonNamestring
  • contactobject
    • citystring
    • companystring
    • countrystring

      Two letter abbreviation - country code (ISO 3166-1 Alpha-2).

    • organizationalUnitstring
    • statestring
  • dnsCertSpecobject
    • cnameTargetstring
    • statusobject
      • messagestring
      • statusstring (einer von: issuing, ready, cnameError, error, unspecified)required
      • updatedAtstring (date-time)
  • dnsNamesArray von string
    • Array[
      • *string
      ]
  • idstring (uuid)required
  • isExpiredboolean
  • issuerstring
  • lastExpirationThresholdHitinteger
  • projectIdstring (uuid)required
  • validFromstring (date-time)
  • validTostring (date-time)
Content-Type: application/json

{
"caBundle": "string",
"certificate": "string",
"certificateOrderId": "f0f86186-0a5a-45b2-aa33-502777496347",
"certificateRequestId": "f0f86186-0a5a-45b2-aa33-502777496347",
"certificateType": 123,
"commonName": "string",
"contact": {
"city": "string",
"company": "string",
"country": "DE",
"organizationalUnit": "string",
"state": "string"
},
"dnsCertSpec": {
"cnameTarget": "string",
"status": {
"message": "string",
"status": "issuing",
"updatedAt": "1985-10-26T01:21:00.000Z"
}
},
"dnsNames": [
"string"
],
"id": "f0f86186-0a5a-45b2-aa33-502777496347",
"isExpired": true,
"issuer": "string",
"lastExpirationThresholdHit": 123,
"projectId": "f0f86186-0a5a-45b2-aa33-502777496347",
"validFrom": "1985-10-26T01:21:00.000Z",
"validTo": "1985-10-26T01:21:00.000Z"
}
{
"properties": {
"caBundle": {
"type": "string"
},
"certificate": {
"type": "string"
},
"certificateOrderId": {
"format": "uuid",
"type": "string"
},
"certificateRequestId": {
"format": "uuid",
"type": "string"
},
"certificateType": {
"description": "Specifies the type of certificate.\n\nPossible values:\n- `0` – `UNSPECIFIED`: The certificate type is not specified.\n- `1` – `INTERNAL`: A certificate issued and managed internally by the system.\n- `2` – `EXTERNAL`: A certificate provided by an external source and imported into the system.\n- `3` – `DNS`: A certificate validated using DNS-based verification.\n",
"enum": [
0,
1,
2,
3
],
"type": "integer"
},
"commonName": {
"type": "string"
},
"contact": {
"properties": {
"city": {
"type": "string"
},
"company": {
"type": "string"
},
"country": {
"description": "Two letter abbreviation - country code (ISO 3166-1 Alpha-2).",
"example": "DE",
"pattern": "^[A-Z]{2}$",
"type": "string"
},
"organizationalUnit": {
"type": "string"
},
"state": {
"type": "string"
}
},
"type": "object"
},
"dnsCertSpec": {
"properties": {
"cnameTarget": {
"type": "string"
},
"status": {
"properties": {
"message": {
"type": "string"
},
"status": {
"enum": [
"issuing",
"ready",
"cnameError",
"error",
"unspecified"
],
"type": "string"
},
"updatedAt": {
"format": "date-time",
"type": "string"
}
},
"required": [
"status"
],
"type": "object"
}
},
"type": "object"
},
"dnsNames": {
"items": {
"type": "string"
},
"type": "array"
},
"id": {
"format": "uuid",
"type": "string"
},
"isExpired": {
"type": "boolean"
},
"issuer": {
"type": "string"
},
"lastExpirationThresholdHit": {
"type": "integer"
},
"projectId": {
"format": "uuid",
"type": "string"
},
"validFrom": {
"format": "date-time",
"type": "string"
},
"validTo": {
"format": "date-time",
"type": "string"
}
},
"required": [
"id",
"certificateType",
"certificateRequestId",
"projectId"
],
"type": "object"
}

Nutzungsbeispiele​

$ curl \
--fail \
--location \
-H "Authorization: Bearer $MITTWALD_API_TOKEN" \
https://api.mittwald.de/v2/certificates/f0f86186-0a5a-45b2-aa33-502777496347
import { MittwaldAPIV2Client } from "@mittwald/api-client";
import { assertStatus } from "@mittwald/api-client-commons";

const client = MittwaldAPIClient.newWithToken(process.env.MITTWALD_API_TOKEN);
const response = await client.domain.sslGetCertificate({
"certificateId": "f0f86186-0a5a-45b2-aa33-502777496347"
});

assertStatus(response, 200);

use \Mittwald\ApiClient\Generated\V2\Clients\Domain\SslGetCertificate\SslGetCertificateRequest;

$client = MittwaldAPIClient::newWithToken(getenv('MITTWALD_API_TOKEN'));

$request = (new SslGetCertificateRequest(
certificateId: "f0f86186-0a5a-45b2-aa33-502777496347"
));
$response = $client->domain()->sslGetCertificate($request);

var_dump($response->getBody();

Auf dieser Seite