Activate certificate

Activate an installed SSL certificate, so the webserver serves the site with this certificate.

Sites can hold multiple certificates next to each other, but only one is active at a time. Activating a certificate swaps the webserver configuration over to that certificate's files. The certificate must be fully installed before it can be activated, and load balancer certificates cannot be activated this way.

Tenant certificates can also be activated through this endpoint: the swap is then scoped to that tenant's webserver configuration, the site's own certificates are left untouched.


POST/api/servers/{server}/sites/{site}/certificates/{certificate}/activate

Activate certificate

This endpoint activates an installed SSL certificate. The previously active certificate stays installed and can be re-activated at any time.

Request

POST
/api/servers/{server}/sites/{site}/certificates/{certificate}/activate
curl -X POST "https://ploi.io/api/servers/{server}/sites/{site}/certificates/{certificate}/activate" \
  -H "Authorization: Bearer {token}" \
  -H "Content-Type: application/json" \
  -H "Accept: application/json"

Response

{
  "data": {
    "id": 2,
    "status": "active",
    "domain": "domain.com",
    "type": "letsencrypt",
    "active": false,
    "tenant": false,
    "site_id": 1,
    "site_tenant_id": null,
    "server_id": 1,
    "expires_at": "2019-10-29 05:34:30",
    "created_at": "2019-07-31 08:34:25"
  }
}