---
title: "Return all SSL certificate components on vhost"
method: GET
path: "/fetch_vhost_ssl_components"
tags: ["SSL", "cPanel Account Settings"]
---

# Return all SSL certificate components on vhost

`GET /fetch_vhost_ssl_components`

This function lists the components of each SSL certificate on the server's virtual hosts.

**Warning:**

* On most servers, this function returns a large amount of output. We **strongly**
recommend that you [filter](https://go.cpanel.net/WHMAPI1FilterOutput) and
[sort](https://go.cpanel.net/WHMAPI1SortOutput) the output.
* The following example uses the filter and sort options:

  `https://hostname.example.com:2087/cpsess##########/json-api/fetch_vhost_ssl_components?api.version=1&api.filter.a.field=servername&api.filter.a.arg0=servername.com&api.filter.a.type=eq&api.filter.enable=1&api.sort.enable=1&api.sort.a.field=servername`

## Response `200`

HTTP Request was successful.

- object
  - `data` object
    - `components` object[] — An array of objects containing the certificate information.
      - `cabundle` string, nullable — The certificate's certificate authority (CA) bundle.
      - `cabundle_id` string, nullable — The ID of the certificate's CA bundle.
      - `certificate` string — The certificate's text.
      - `certificate_id` string — The certificate's ID.
      - `key` string — The certificate's private key.
      - `key_id` string — The ID of the certificate's key.
      - `servername` string, domain — The domain or domains that the certificate covers.
  - `metadata` object
    - `command` string — The method name called.
    - `reason` string — The reason the API function failed when the `metadata.result` field is `0`. This field may display a success message when a function succeeds.
    - `result` 1 | 0 — * `1` — Success. * `0` — Failed. Check the `reason` field for more details.
    - `version` integer — The version of the API function.

---

[API](https://skmtc.net/cpanel/apis/whm-api.md) · [All operations](https://skmtc.net/cpanel/apis/whm-api/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/cpanel/whm-api/revisions/3da41671c02c/schema)
