Zum Hauptinhalt springen

Create a CertificateRequest

POST/v2/certificate-requests
API-Version
v2
Request-Methode
POST
Operation-ID
ssl-create-certificate-request

Request​

Responses​

Format
application/json
Beschreibung

Created

  • commonNamestring
  • contactobject
    • citystring
    • companystring
    • countrystring

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

    • organizationalUnitstring
    • statestring
  • dnsNamesArray von string
    • Array[
      • *string
      ]
  • idstring (uuid)required
  • issuerstring
  • signingRequeststring
  • validFromstring (date-time)
  • validTostring (date-time)
Content-Type: application/json

{
"commonName": "string",
"contact": {
"city": "string",
"company": "string",
"country": "DE",
"organizationalUnit": "string",
"state": "string"
},
"dnsNames": [
"string"
],
"id": "f0f86186-0a5a-45b2-aa33-502777496347",
"issuer": "string",
"signingRequest": "string",
"validFrom": "1985-10-26T01:21:00.000Z",
"validTo": "1985-10-26T01:21:00.000Z"
}
{
"properties": {
"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"
},
"dnsNames": {
"items": {
"type": "string"
},
"type": "array"
},
"id": {
"format": "uuid",
"type": "string"
},
"issuer": {
"type": "string"
},
"signingRequest": {
"type": "string"
},
"validFrom": {
"format": "date-time",
"type": "string"
},
"validTo": {
"format": "date-time",
"type": "string"
}
},
"required": [
"id"
],
"type": "object"
}

Nutzungsbeispiele​

$ curl \
--fail \
--location \
-X POST \
-d '{"certificate":"string","privateKey":"string","projectId":"f0f86186-0a5a-45b2-aa33-502777496347"}' \
-H "Authorization: Bearer $MITTWALD_API_TOKEN" \
-H 'Content-Type: application/json' \
https://api.mittwald.de/v2/certificate-requests
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.sslCreateCertificateRequest({
"data": {
"certificate": "string",
"privateKey": "string",
"projectId": "f0f86186-0a5a-45b2-aa33-502777496347"
}
});

assertStatus(response, 201);

use \Mittwald\ApiClient\Generated\V2\Clients\Domain\SslCreateCertificateRequest\SslCreateCertificateRequestRequest;
use \Mittwald\ApiClient\Generated\V2\Clients\Domain\SslCreateCertificateRequest\SslCreateCertificateRequestRequestBody;

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

// TODO: Please consult the properties and constructor signature of
// SslCreateCertificateRequestRequestBody to learn how to construct a valid instance
$body = new SslCreateCertificateRequestRequestBody(/* TODO: ... */);

$request = (new SslCreateCertificateRequestRequest(
body: $body
));
$response = $client->domain()->sslCreateCertificateRequest($request);

var_dump($response->getBody();

Auf dieser Seite