Skip to content
Start here

List Certificate Packs

client.SSL.CertificatePacks.List(ctx, params) (*V4PagePaginationArray[CertificatePackListResponse], error)
GET/zones/{zone_id}/ssl/certificate_packs

For a given zone, list all active certificate packs.

Security
API Token

The preferred authorization scheme for interacting with the Cloudflare API. Create a token.

Example:Authorization: Bearer Sn3lZJTBX6kkg7OdcBUAxOO963GEIyGQqnFTOFYY
API Email + API Key

The previous authorization scheme for interacting with the Cloudflare API, used in conjunction with a Global API key.

Example:X-Auth-Email: user@example.com

The previous authorization scheme for interacting with the Cloudflare API. When possible, use API tokens instead of Global API keys.

Example:X-Auth-Key: 144c9defac04969c7bfad8efaa8ea194
Accepted Permissions (at least one required)
SSL and Certificates WriteSSL and Certificates Read
ParametersExpand Collapse
params CertificatePackListParams
ZoneID param.Field[string]

Path param: Identifier.

maxLength32
Deploy param.Field[CertificatePackListParamsDeploy]optional

Query param: Specify the deployment environment for the certificate packs.

const CertificatePackListParamsDeployStaging CertificatePackListParamsDeploy = "staging"
const CertificatePackListParamsDeployProduction CertificatePackListParamsDeploy = "production"
Page param.Field[float64]optional

Query param: Page number of paginated results.

minimum1
PerPage param.Field[float64]optional

Query param: Number of certificate packs per page.

maximum50
minimum5
Status param.Field[CertificatePackListParamsStatus]optional

Query param: Include Certificate Packs of all statuses, not just active ones.

const CertificatePackListParamsStatusAll CertificatePackListParamsStatus = "all"
ReturnsExpand Collapse
type CertificatePackListResponse struct{…}

A certificate pack with all its properties.

ID string

Identifier.

maxLength32
Certificates []CertificatePackListResponseCertificate

Array of certificates in this pack.

ID string

Certificate identifier.

Hosts []string

Hostnames covered by this certificate.

Status string

Certificate status.

BundleMethod stringoptional

Certificate bundle method.

ExpiresOn Timeoptional

When the certificate from the authority expires.

formatdate-time
GeoRestrictions CertificatePackListResponseCertificatesGeoRestrictionsoptional

Specify the region where your private key can be held locally.

Label CertificatePackListResponseCertificatesGeoRestrictionsLabeloptional
One of the following:
const CertificatePackListResponseCertificatesGeoRestrictionsLabelUs CertificatePackListResponseCertificatesGeoRestrictionsLabel = "us"
const CertificatePackListResponseCertificatesGeoRestrictionsLabelEu CertificatePackListResponseCertificatesGeoRestrictionsLabel = "eu"
const CertificatePackListResponseCertificatesGeoRestrictionsLabelHighestSecurity CertificatePackListResponseCertificatesGeoRestrictionsLabel = "highest_security"
Issuer stringoptional

The certificate authority that issued the certificate.

ModifiedOn Timeoptional

When the certificate was last modified.

formatdate-time
Priority float64optional

The order/priority in which the certificate will be used.

Signature stringoptional

The type of hash used for the certificate.

UploadedOn Timeoptional

When the certificate was uploaded to Cloudflare.

formatdate-time
ZoneID stringoptional

Identifier.

maxLength32
Hosts []Host

Comma separated list of valid host names for the certificate packs. Must contain the zone apex, may not contain more than 50 hosts, and may not be empty.

Status Status

Status of certificate pack.

One of the following:
const StatusInitializing Status = "initializing"
const StatusPendingValidation Status = "pending_validation"
const StatusDeleted Status = "deleted"
const StatusPendingIssuance Status = "pending_issuance"
const StatusPendingDeployment Status = "pending_deployment"
const StatusPendingDeletion Status = "pending_deletion"
const StatusPendingExpiration Status = "pending_expiration"
const StatusExpired Status = "expired"
const StatusActive Status = "active"
const StatusInitializingTimedOut Status = "initializing_timed_out"
const StatusValidationTimedOut Status = "validation_timed_out"
const StatusIssuanceTimedOut Status = "issuance_timed_out"
const StatusDeploymentTimedOut Status = "deployment_timed_out"
const StatusDeletionTimedOut Status = "deletion_timed_out"
const StatusPendingCleanup Status = "pending_cleanup"
const StatusStagingDeployment Status = "staging_deployment"
const StatusStagingActive Status = "staging_active"
const StatusDeactivating Status = "deactivating"
const StatusInactive Status = "inactive"
const StatusBackupIssued Status = "backup_issued"
const StatusHoldingDeployment Status = "holding_deployment"
Type CertificatePackListResponseType

Type of certificate pack.

One of the following:
const CertificatePackListResponseTypeMhCustom CertificatePackListResponseType = "mh_custom"
const CertificatePackListResponseTypeManagedHostname CertificatePackListResponseType = "managed_hostname"
const CertificatePackListResponseTypeSNICustom CertificatePackListResponseType = "sni_custom"
const CertificatePackListResponseTypeUniversal CertificatePackListResponseType = "universal"
const CertificatePackListResponseTypeAdvanced CertificatePackListResponseType = "advanced"
const CertificatePackListResponseTypeTotalTLS CertificatePackListResponseType = "total_tls"
const CertificatePackListResponseTypeKeyless CertificatePackListResponseType = "keyless"
const CertificatePackListResponseTypeLegacyCustom CertificatePackListResponseType = "legacy_custom"
CertificateAuthority CertificatePackListResponseCertificateAuthorityoptional

Certificate Authority selected for the order. For information on any certificate authority specific details or restrictions see this page for more details.

One of the following:
const CertificatePackListResponseCertificateAuthorityGoogle CertificatePackListResponseCertificateAuthority = "google"
const CertificatePackListResponseCertificateAuthorityLetsEncrypt CertificatePackListResponseCertificateAuthority = "lets_encrypt"
const CertificatePackListResponseCertificateAuthoritySSLCom CertificatePackListResponseCertificateAuthority = "ssl_com"
CloudflareBranding booloptional

Whether or not to add Cloudflare Branding for the order. This will add a subdomain of sni.cloudflaressl.com as the Common Name if set to true.

DCVDelegationRecords []CertificatePackListResponseDCVDelegationRecordoptional

DCV Delegation records for domain validation.

CNAME stringoptional

The CNAME record hostname for DCV delegation.

CNAMETarget stringoptional

The CNAME record target value for DCV delegation.

Emails []stringoptional

The set of email addresses that the certificate authority (CA) will use to complete domain validation.

HTTPBody stringoptional

The content that the certificate authority (CA) will expect to find at the http_url during the domain validation.

HTTPURL stringoptional

The url that will be checked during domain validation.

Status stringoptional

Status of the validation record.

TXTName stringoptional

The hostname that the certificate authority (CA) will check for a TXT record during domain validation .

TXTValue stringoptional

The TXT record that the certificate authority (CA) will check during domain validation.

PrimaryCertificate stringoptional

Identifier of the primary certificate in a pack.

ValidationErrors []CertificatePackListResponseValidationErroroptional

Domain validation errors that have been received by the certificate authority (CA).

Message stringoptional

A domain validation error.

ValidationMethod CertificatePackListResponseValidationMethodoptional

Validation Method selected for the order.

One of the following:
const CertificatePackListResponseValidationMethodTXT CertificatePackListResponseValidationMethod = "txt"
const CertificatePackListResponseValidationMethodHTTP CertificatePackListResponseValidationMethod = "http"
const CertificatePackListResponseValidationMethodEmail CertificatePackListResponseValidationMethod = "email"
ValidationRecords []CertificatePackListResponseValidationRecordoptional

Certificates' validation records.

CNAME stringoptional

The CNAME record hostname for DCV delegation.

CNAMETarget stringoptional

The CNAME record target value for DCV delegation.

Emails []stringoptional

The set of email addresses that the certificate authority (CA) will use to complete domain validation.

HTTPBody stringoptional

The content that the certificate authority (CA) will expect to find at the http_url during the domain validation.

HTTPURL stringoptional

The url that will be checked during domain validation.

Status stringoptional

Status of the validation record.

TXTName stringoptional

The hostname that the certificate authority (CA) will check for a TXT record during domain validation .

TXTValue stringoptional

The TXT record that the certificate authority (CA) will check during domain validation.

ValidityDays CertificatePackListResponseValidityDaysoptional

Validity Days selected for the order.

One of the following:
const CertificatePackListResponseValidityDays14 CertificatePackListResponseValidityDays = 14
const CertificatePackListResponseValidityDays30 CertificatePackListResponseValidityDays = 30
const CertificatePackListResponseValidityDays90 CertificatePackListResponseValidityDays = 90
const CertificatePackListResponseValidityDays365 CertificatePackListResponseValidityDays = 365

List Certificate Packs

package main

import (
  "context"
  "fmt"

  "github.com/cloudflare/cloudflare-go"
  "github.com/cloudflare/cloudflare-go/option"
  "github.com/cloudflare/cloudflare-go/ssl"
)

func main() {
  client := cloudflare.NewClient(
    option.WithAPIToken("Sn3lZJTBX6kkg7OdcBUAxOO963GEIyGQqnFTOFYY"),
  )
  page, err := client.SSL.CertificatePacks.List(context.TODO(), ssl.CertificatePackListParams{
    ZoneID: cloudflare.F("023e105f4ecef8ad9ca31a8372d0c353"),
  })
  if err != nil {
    panic(err.Error())
  }
  fmt.Printf("%+v\n", page)
}
{
  "errors": [
    {
      "code": 1000,
      "message": "message",
      "documentation_url": "documentation_url",
      "source": {
        "pointer": "pointer"
      }
    }
  ],
  "messages": [
    {
      "code": 1000,
      "message": "message",
      "documentation_url": "documentation_url",
      "source": {
        "pointer": "pointer"
      }
    }
  ],
  "success": true,
  "result": [
    {
      "id": "023e105f4ecef8ad9ca31a8372d0c353",
      "certificates": [
        {
          "id": "7e7b8deba8538af625850b7b2530034c",
          "hosts": [
            "example.com",
            "*.example.com"
          ],
          "status": "active",
          "bundle_method": "ubiquitous",
          "expires_on": "2024-01-01T00:00:00Z",
          "geo_restrictions": {
            "label": "us"
          },
          "issuer": "Let's Encrypt",
          "modified_on": "2014-01-01T05:20:00Z",
          "priority": 0,
          "signature": "ECDSAWithSHA256",
          "uploaded_on": "2014-01-01T05:20:00Z",
          "zone_id": "023e105f4ecef8ad9ca31a8372d0c353"
        }
      ],
      "hosts": [
        "example.com",
        "*.example.com",
        "www.example.com"
      ],
      "status": "initializing",
      "type": "universal",
      "certificate_authority": "lets_encrypt",
      "cloudflare_branding": false,
      "dcv_delegation_records": [
        {
          "cname": "_acme-challenge.example.com",
          "cname_target": "dcv.cloudflare.com",
          "emails": [
            "administrator@example.com",
            "webmaster@example.com"
          ],
          "http_body": "ca3-574923932a82475cb8592200f1a2a23d",
          "http_url": "http://app.example.com/.well-known/pki-validation/ca3-da12a1c25e7b48cf80408c6c1763b8a2.txt",
          "status": "pending",
          "txt_name": "_acme-challenge.app.example.com",
          "txt_value": "810b7d5f01154524b961ba0cd578acc2"
        }
      ],
      "primary_certificate": "7e7b8deba8538af625850b7b2530034c",
      "validation_errors": [
        {
          "message": "SERVFAIL looking up CAA for app.example.com"
        }
      ],
      "validation_method": "txt",
      "validation_records": [
        {
          "cname": "_acme-challenge.example.com",
          "cname_target": "dcv.cloudflare.com",
          "emails": [
            "administrator@example.com",
            "webmaster@example.com"
          ],
          "http_body": "ca3-574923932a82475cb8592200f1a2a23d",
          "http_url": "http://app.example.com/.well-known/pki-validation/ca3-da12a1c25e7b48cf80408c6c1763b8a2.txt",
          "status": "pending",
          "txt_name": "_acme-challenge.app.example.com",
          "txt_value": "810b7d5f01154524b961ba0cd578acc2"
        }
      ],
      "validity_days": 14
    }
  ],
  "result_info": {
    "count": 1,
    "page": 1,
    "per_page": 20,
    "total_count": 2000,
    "total_pages": 100
  }
}
Returns Examples
{
  "errors": [
    {
      "code": 1000,
      "message": "message",
      "documentation_url": "documentation_url",
      "source": {
        "pointer": "pointer"
      }
    }
  ],
  "messages": [
    {
      "code": 1000,
      "message": "message",
      "documentation_url": "documentation_url",
      "source": {
        "pointer": "pointer"
      }
    }
  ],
  "success": true,
  "result": [
    {
      "id": "023e105f4ecef8ad9ca31a8372d0c353",
      "certificates": [
        {
          "id": "7e7b8deba8538af625850b7b2530034c",
          "hosts": [
            "example.com",
            "*.example.com"
          ],
          "status": "active",
          "bundle_method": "ubiquitous",
          "expires_on": "2024-01-01T00:00:00Z",
          "geo_restrictions": {
            "label": "us"
          },
          "issuer": "Let's Encrypt",
          "modified_on": "2014-01-01T05:20:00Z",
          "priority": 0,
          "signature": "ECDSAWithSHA256",
          "uploaded_on": "2014-01-01T05:20:00Z",
          "zone_id": "023e105f4ecef8ad9ca31a8372d0c353"
        }
      ],
      "hosts": [
        "example.com",
        "*.example.com",
        "www.example.com"
      ],
      "status": "initializing",
      "type": "universal",
      "certificate_authority": "lets_encrypt",
      "cloudflare_branding": false,
      "dcv_delegation_records": [
        {
          "cname": "_acme-challenge.example.com",
          "cname_target": "dcv.cloudflare.com",
          "emails": [
            "administrator@example.com",
            "webmaster@example.com"
          ],
          "http_body": "ca3-574923932a82475cb8592200f1a2a23d",
          "http_url": "http://app.example.com/.well-known/pki-validation/ca3-da12a1c25e7b48cf80408c6c1763b8a2.txt",
          "status": "pending",
          "txt_name": "_acme-challenge.app.example.com",
          "txt_value": "810b7d5f01154524b961ba0cd578acc2"
        }
      ],
      "primary_certificate": "7e7b8deba8538af625850b7b2530034c",
      "validation_errors": [
        {
          "message": "SERVFAIL looking up CAA for app.example.com"
        }
      ],
      "validation_method": "txt",
      "validation_records": [
        {
          "cname": "_acme-challenge.example.com",
          "cname_target": "dcv.cloudflare.com",
          "emails": [
            "administrator@example.com",
            "webmaster@example.com"
          ],
          "http_body": "ca3-574923932a82475cb8592200f1a2a23d",
          "http_url": "http://app.example.com/.well-known/pki-validation/ca3-da12a1c25e7b48cf80408c6c1763b8a2.txt",
          "status": "pending",
          "txt_name": "_acme-challenge.app.example.com",
          "txt_value": "810b7d5f01154524b961ba0cd578acc2"
        }
      ],
      "validity_days": 14
    }
  ],
  "result_info": {
    "count": 1,
    "page": 1,
    "per_page": 20,
    "total_count": 2000,
    "total_pages": 100
  }
}