Help Center/ Cloud Certificate Manager/ API Reference/ Examples/ Example 3: Pushing Your SSL Certificate Purchased Through CCM to Other Services
Updated on 2023-10-11 GMT+08:00

Example 3: Pushing Your SSL Certificate Purchased Through CCM to Other Services

Scenario

This topic describes how to push a certificate purchased and issued in CCM to WAF and CDN on Huawei Cloud to keep your workloads secure.

Involved APIs

Procedure

  1. Query the certificate list.

    • API information

      URI format: GET /v3/scm/certificates

      For details, see Querying the Certificate List.

    • Example request

      GET: https://{endpoint}/v3/scm/certificates

      Obtain {endpoint} from Regions and Endpoints.

      Body:

      {
          "limit": "2", 
          "offset": "0"
      }
    • Example response
      {
        "certificates" : [ {
          "id" : "scs1554192131150",
          "name" : "test",
          "domain" : "www.zx.com",
          "type" : "OV_SSL_CERT",
          "brand" : "GEOTRUST",
          "expire_time" : "2021-05-27 16:46:25.0",
          "domain_type" : "MULTI_DOMAIN",
          "validity_period" : 12,
          "status" : "ISSUED",
          "domain_count" : 2,
          "wildcard_count" : 0,
          "description" : null
        } ],
        "total_count" : 1
      }

  2. Push an SSL certificate to other services.

    • API information

      URI format: POST /v3/scm/certificates/{certificate_id}/push

      For details, see Pushing a Certificate

    • Example request

      POST: https://{endpoint}/v3/scm/certificates/scs1554192131150/push

      Obtain {endpoint} from Regions and Endpoints.

    • Example response
      {
        }
      or
      {
      "error_code" : "SCM.XXX",
      "error_msg" : "XXX"
      }