Upload Certificate
This API is used to upload SSL certificate with PEM-encoded body, private key and certificate chain.
Request Definition
- API URL
https://lsdn-api.swiftfederation.com/v1.0/certificates
- Request Method
POST
- Request Header
Refer to HTTP Request Headers
- Request Body
Request Body Data Format: JSON
Field | Required | Type | Description |
---|---|---|---|
customer_id | Mandatory | int | Customer id for the certificate. |
certificate | Mandatory | string | PEM-encoded certificate body contents. |
private_key | Mandatory | string | PEM-encoded certificate private key contents. |
chain | Optional | string | PEM-encoded certificate chain contents. |
- Request Body Example
{
"customer_id":10,
"certificate": "-----BEGIN CERTIFICATE-----\n
MIIFZDCCBEygAwIBAgISA6PdrA2Muc5kvNzK/BMUHzvJMA0GCSqGSIb3DQEBCwUA
................................................................
iI2EUsOChlBfmbSI/Ure4JNRV6BkDfvEehBJxieA6tq0RXj39TnaJQ==\n
-----END CERTIFICATE-----",
"private_key": "-----BEGIN PRIVATE KEY-----\n
MIIEvQIBADANBgkqhkiG9w0BAQEFAASCBKcwggSjAgEAAoIBAQDnePLDlJEVhlio
................................................................
wOFoFDpV0knjnI3/toPQT4I=\n
-----END PRIVATE KEY-----",
"chain": "-----BEGIN CERTIFICATE-----\n
MIIEkjCCA3qgAwIBAgIQCgFBQgAAAVOFc2oLheynCDANBgkqhkiG9w0BAQsFADA/
................................................................
KOqkqm57TH2H3eDJAkSnh6/DNFu0Qg==\n
-----END CERTIFICATE-----"
}
Response Definition
- Response Header
Refer to HTTP Response Headers
- Response Body
Field | Type | Description |
---|---|---|
id | int | Certificate ID. |
customer_id | int | Customer ID of certificate. |
common_name | string | Certificate common name. |
notBefore | string | The valid from date that cerficate can be used. |
notAfter | string | The expired date of cerficate. |
created | string | The date that cerficate was created. |
- Response Body Example
{
"id": 101,
"customerId": 10,
"commonName": "www.website1.com",
"notBefore": "2019-01-01T04:28:32Z",
"notAfter": "2019-04-01T04:28:32Z",
"created": "2019-01-01T04:28:32Z"
}